You are not logged in.

#1 2009-12-15 19:12:13

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

HG and 404: Not Found

I'm trying to write PKGBUILD using mercurial and am getting a: 404: Not Found error when trying to download the repository.  I must be missing something obvious here but... phhht.  When I do:

hg clone http://hg.icculus.org/icculus/mojosetup

from the command line, no problems.  When I put this into the PKGBUILD, and doing 'makepkg -sf', I'm getting:

==> Determining latest hg revision...                                           
abort: HTTP Error 404: Not Found

Been a little bit but I seem to remember doing this on git pkgbuilds.  Here's the PKGBUILD:

# Maintainer: Gen2ly <toddrpartridge@gmail.com>

pkgname=mojosetup-hg
_pkgname=mojosetup
pkgver=1
pkgrel=1
pkgdesc="Nextgen installer for Unix Independent Software Vendors (ISVs)"
arch=('i686' 'x86_64')
url="http://icculus.org/mojosetup/"
license=('custom')
depends=('bzip2' 'libfetch' 'lua' 'zlib')
makedepends=('mercurial')
optdepends=('')
options=()
install=""
source=('')
md5sums=()


_hgroot="http://hg.icculus.org/icculus/mojosetup"
_hgrepo="mojosetup"

build() {

  msg "Connecting to Mercurial server..."
  if [ -d $_hgrepo ]; then
    cd $_hgrepo
    hg pull -u || return 1
    msg2 "The local files have been updated"
  else
    hg clone $_hgroot $_hgrepo || return 1
    msg2 "Mercurial checkout done"
  fi
  
  # Build
  mv $_pkgname $_pkgname-$pkgver
  cd "$srcdir/$_pkgname-$pkgver"
  mkdir cmake-build
  cd cmake-build
  cmake .. -DCMAKE_INSTALL_PREFIX=/usr 
  #-CMAKE_BUILD_TYPE=MinSizeRel
  make || return 1
  make DESTDIR="$pkgdir/" install
  
}

I'm guessing mercurial does versioning differently????  Any ideas?


Setting Up a Scripting Environment | Proud donor to wikipedia - link

Offline

#2 2009-12-15 21:31:54

azleifel
Member
Registered: 2007-10-28
Posts: 486

Re: HG and 404: Not Found

I got the build process to start reliably by changing source=('') to source=(), correcting _hgroot and adding a couple of cd ${srcdir}'s:

_hgroot="http://hg.icculus.org/icculus"          
_hgrepo="mojosetup"

build() {

  cd ${srcdir}

  ...
    
  # Build
  cd ${srcdir}

Unfortunately, it bombed before completing:

...
Scanning dependencies of target mojosetup
[ 40%] Building C object CMakeFiles/mojosetup.dir/buildver.o
[ 41%] Building C object CMakeFiles/mojosetup.dir/mojosetup.o
[ 42%] Building C object CMakeFiles/mojosetup.dir/gui.o
[ 43%] Building C object CMakeFiles/mojosetup.dir/fileio.o
[ 45%] Building C object CMakeFiles/mojosetup.dir/archive_zip.o
cc1: warnings being treated as errors
/home/david/Junk/mojosetup/src/mojosetup-733/archive_zip.c: In function 'zip_find_end_of_central_dir':
/home/david/Junk/mojosetup/src/mojosetup-733/archive_zip.c:608: error: dereferencing type-punned pointer will break strict-aliasing rules
make[2]: *** [CMakeFiles/mojosetup.dir/archive_zip.o] Error 1
make[1]: *** [CMakeFiles/mojosetup.dir/all] Error 2
make: *** [all] Error 2
==> ERROR: Build Failed.
    Aborting...

Last edited by azleifel (2009-12-15 21:32:48)

Offline

#3 2009-12-16 01:40:15

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: HG and 404: Not Found

azleifel wrote:

Unfortunately, it bombed before completing:

...
Scanning dependencies of target mojosetup
[ 40%] Building C object CMakeFiles/mojosetup.dir/buildver.o
[ 41%] Building C object CMakeFiles/mojosetup.dir/mojosetup.o
[ 42%] Building C object CMakeFiles/mojosetup.dir/gui.o
[ 43%] Building C object CMakeFiles/mojosetup.dir/fileio.o
[ 45%] Building C object CMakeFiles/mojosetup.dir/archive_zip.o
cc1: warnings being treated as errors
/home/david/Junk/mojosetup/src/mojosetup-733/archive_zip.c: In function 'zip_find_end_of_central_dir':
/home/david/Junk/mojosetup/src/mojosetup-733/archive_zip.c:608: error: dereferencing type-punned pointer will break strict-aliasing rules
make[2]: *** [CMakeFiles/mojosetup.dir/archive_zip.o] Error 1
make[1]: *** [CMakeFiles/mojosetup.dir/all] Error 2
make: *** [all] Error 2
==> ERROR: Build Failed.
    Aborting...

Patch the makefile to remove the -Werror compiling option. Something like this might work:

sed -i 's/-Werror//' Makefile

Offline

Board footer

Powered by FluxBB