First push!
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* mpc — GNU MPC library (complex numbers, built on gmp and mpfr).
|
||||
*
|
||||
* The last of the three libraries gcc needs at configure time. Same
|
||||
* static-only + dependency-path pattern as mpfr.kap.
|
||||
*/
|
||||
package "mpc" {
|
||||
const version = "1.3.1"
|
||||
const source = "https://ftp.gnu.org/gnu/mpc/mpc-${version}.tar.gz"
|
||||
sha256 = "ab642492f5cf882b74aa0cb730cd410a81edcdbec895183ce930e706c1c759b8"
|
||||
license = "LGPL-3.0-or-later"
|
||||
|
||||
provides = ["libmpc.a", "mpc"]
|
||||
|
||||
depends = [
|
||||
{ name = "gmp" },
|
||||
{ name = "mpfr" },
|
||||
{ name = "make" },
|
||||
]
|
||||
|
||||
prepare {
|
||||
curl -L -O ${source}
|
||||
echo "ab642492f5cf882b74aa0cb730cd410a81edcdbec895183ce930e706c1c759b8 mpc-${version}.tar.gz" | sha256sum -c -
|
||||
tar xf mpc-${version}.tar.gz --strip-components=1
|
||||
ROOT=$KAPPA_ROOT; [ -z $ROOT ] && ROOT=/usr/local/kappa; if [ -d $ROOT/temp/gmp/destdir/usr ]; then echo $ROOT/temp/gmp/destdir/usr; else echo $ROOT/bin/$(grep '^gmp ' $ROOT/db/installed | tail -1 | cut -d' ' -f3)/usr; fi > gmp.path; if [ -d $ROOT/temp/mpfr/destdir/usr ]; then echo $ROOT/temp/mpfr/destdir/usr; else echo $ROOT/bin/$(grep '^mpfr ' $ROOT/db/installed | tail -1 | cut -d' ' -f3)/usr; fi > mpfr.path
|
||||
}
|
||||
|
||||
build {
|
||||
./configure --prefix=${prefix} --with-gmp=$(cat gmp.path) --with-mpfr=$(cat mpfr.path) --disable-shared
|
||||
make -j${jobs}
|
||||
}
|
||||
|
||||
check {
|
||||
make check
|
||||
}
|
||||
|
||||
install {
|
||||
make DESTDIR=${destdir} install
|
||||
// Strip libtool .la files: they record stale absolute paths (the
|
||||
// rpath /usr/lib rewrite of uninstalled deps) that break dependents.
|
||||
find ${destdir} -name '*.la' -delete
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user