Skip to content

Instantly share code, notes, and snippets.

@PedroHLC
Created September 28, 2013 13:52
Show Gist options
  • Save PedroHLC/6742282 to your computer and use it in GitHub Desktop.
Save PedroHLC/6742282 to your computer and use it in GitHub Desktop.
AUR gmp4 PKGBUILD fixed
pkgname=gmp4
pkgver=4.3.2
pkgrel=2
pkgdesc="Legacy version of gmp. Provides 'libgmp.so.3'."
arch=('i686')
url="http://gmplib.org/"
depends=('gcc-libs' 'sh')
optdepends=('gmp')
license=('LGPL3')
options=('!libtool' '!buildflags')
source=(ftp://ftp.gmplib.org/pub/gmp-${pkgver}/gmp-${pkgver}.tar.lz)
md5sums=('0bab51afae3024393185a16bb05298e5')
prepare(){
cd "${srcdir}/gmp-${pkgver}"
#Put gmp.h in the same folder as gmpxx.h
sed -i 's/$(exec_prefix)\/include/$\(includedir\)/' Makefile.in
}
build() {
cd "${srcdir}/gmp-${pkgver}"
./configure --prefix=/usr --enable-cxx
make DESTDIR="${srcdir}/installed" install || return 1
}
package() {
mkdir -p "${pkgdir}/usr/lib"
cp -a "${srcdir}/installed/usr/lib/"libgmp.so.3* "${pkgdir}/usr/lib/" || return 1
}
@artemklevtsov
Copy link

Seems the dependencies must be corrected:

$ namcap -i /var/cache/pacman/pkg/gmp4-4.3.2-2-x86_64.pkg.tar.xz 
gmp4 I: Link-level dependence (glibc) in file ['usr/lib/libc.so.6']
gmp4 I: Symlink (usr/lib/libgmp.so.3) found that points to libgmp.so.3.5.2
gmp4 W: Dependency included and not needed ('gcc-libs')
gmp4 W: Dependency included and not needed ('sh')
gmp4 I: Dependency covered by dependencies from link dependence (linux-api-headers)
gmp4 I: Dependency covered by dependencies from link dependence (tzdata)
gmp4 I: Dependency covered by dependencies from link dependence (filesystem)
gmp4 I: Dependency covered by dependencies from link dependence (iana-etc)
gmp4 I: Depends as namcap sees them: depends=(glibc)

And add x86_64 arch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment