-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add gmp-xen.6.0.0-1 and gmp-freestanding.6.0.0-1 (which are 6.0.0 + w…
…ith-pic) depend in zarith-{xen,freestanding}.1.6 on "> gmp-{xen,freestanding}.6.0.0"
- Loading branch information
Showing
16 changed files
with
178 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
The GNU Multiple Precision Arithmetic Library | ||
|
||
Freestanding build of GNU GMP. |
9 changes: 9 additions & 0 deletions
9
packages/gmp-freestanding/gmp-freestanding.6.0.0-1/files/gmp-freestanding.pc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
libdir=${pcfiledir}/../gmp-freestanding | ||
includedir=${libdir}/include | ||
|
||
Name: gmp-freestanding | ||
Version: 6.0.0 | ||
URL: https://gmplib.org | ||
Description: The GNU Multiple Precision Arithmetic Library | ||
Cflags: -I${includedir} | ||
Libs: -L${libdir} -lgmp-freestanding |
37 changes: 37 additions & 0 deletions
37
packages/gmp-freestanding/gmp-freestanding.6.0.0-1/files/mirage-build.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/sh -ex | ||
if [ -z "$PREFIX" ]; then | ||
PREFIX="`opam config var prefix`/lib/gmp-freestanding" | ||
fi | ||
|
||
PKG_CONFIG_DEPS="ocaml-freestanding" | ||
check_deps () { | ||
pkg-config --print-errors --exists ${PKG_CONFIG_DEPS} | ||
} | ||
|
||
if ! check_deps 2>/dev/null; then | ||
# rely on `opam` if deps are unavailable | ||
export PKG_CONFIG_PATH="`opam config var prefix`/lib/pkgconfig" | ||
fi | ||
check_deps || exit 1 | ||
|
||
# | ||
# ocaml-freestanding does not provide a real cross compiler, so we fake it: | ||
# | ||
# - set CC to stop configure trying to find a host compiler | ||
# - set CPPFLAGS to ocaml-freestanding CFLAGS, this prevents inclusion of | ||
# system headers | ||
# - manually override tests for missing functions | ||
# - manually trim the components (SUBDIRS) of libgmp we build to the subset | ||
# actually used by zarith-freestanding (our sole dependency) | ||
# - set -Werror=implicit-function-declaration at *build* time to catch any | ||
# undefined symbols | ||
# | ||
ac_cv_func_obstack_vprintf=no \ | ||
ac_cv_func_localeconv=no \ | ||
./configure \ | ||
--host=x86_64-unknown-none --enable-fat --disable-shared --with-pic \ | ||
CC=cc "CPPFLAGS=$(pkg-config --cflags ${PKG_CONFIG_DEPS})" | ||
|
||
make SUBDIRS="mpn mpz mpq mpf" \ | ||
PRINTF_OBJECTS= SCANF_OBJECTS= \ | ||
CFLAGS+=-Werror=implicit-function-declaration |
14 changes: 14 additions & 0 deletions
14
packages/gmp-freestanding/gmp-freestanding.6.0.0-1/files/mirage-install.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/sh -ex | ||
if [ -z "$PREFIX" ]; then | ||
PREFIX=`opam config var prefix` | ||
fi | ||
PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig | ||
LIBDIR=${PREFIX}/lib/gmp-freestanding | ||
|
||
mkdir -p ${PKG_CONFIG_PATH} | ||
cp gmp-freestanding.pc ${PKG_CONFIG_PATH} | ||
mkdir -p ${LIBDIR} | ||
cp .libs/libgmp.a ${LIBDIR}/libgmp-freestanding.a | ||
touch ${LIBDIR}/META | ||
mkdir -p ${LIBDIR}/include | ||
cp gmp.h ${LIBDIR}/include |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
opam-version: "1.2" | ||
maintainer: "Martin Lucina <martin@lucina.net>" | ||
homepage: "https://gmplib.org/" | ||
license: "GNU LGPL v3 and GNU GPL v2" | ||
authors: "Torbjörn Granlund and contributors" | ||
bug-reports: "mirageos-devel@lists.xenproject.org" | ||
|
||
build: ["sh" "-ex" "./mirage-build.sh"] | ||
install: ["sh" "-ex" "./mirage-install.sh"] | ||
remove: [ | ||
"rm" "-rf" | ||
"%{prefix}%/lib/pkgconfig/gmp-freestanding.pc" | ||
"%{prefix}%/lib/gmp-freestanding" | ||
] | ||
depends: [ | ||
"ocaml-freestanding" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
archive: "https://gmplib.org/download/gmp/gmp-6.0.0a.tar.xz" | ||
checksum: "1e6da4e434553d2811437aa42c7f7c76" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
The GNU Multiple Precision Arithmetic Library |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- gmp-6.0.0.orig.orig/config.guess 2014-03-25 14:37:55.000000000 +0000 | ||
+++ gmp-6.0.0.orig/config.guess 2014-09-16 15:46:57.457485087 +0000 | ||
@@ -173,7 +173,7 @@ | ||
;; | ||
|
||
arm*-*-*) | ||
- cpu_code=`sed -n 's/^CPU part.*\(0x.*\)$/\1/p' /proc/cpuinfo 2>/dev/null` | ||
+ cpu_code=`sed -n 's/^CPU part.*\(0x.*\)$/\1/p' /proc/cpuinfo | head -1 2>/dev/null` | ||
case "$cpu_code" in | ||
0xa10 | 0xa11 | 0xb11) # v4 strongarm/sa1100 | ||
exact_cpu="armsa1";; | ||
@@ -200,7 +200,7 @@ | ||
0xc15) exact_cpu="armcortexr5";; # v7r | ||
0xc23) exact_cpu="armcortexm3";; # v7m | ||
esac | ||
- exact_cpu="${exact_cpu}`sed -n 's;^Features.*\(neon\).*;\1;p' /proc/cpuinfo 2>/dev/null`" | ||
+ exact_cpu="${exact_cpu}`sed -n 's;^Features.*\(neon\).*;\1;p' /proc/cpuinfo | head -1 2>/dev/null`" | ||
;; | ||
|
||
ia64*-*-*) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
libdir=${pcfiledir}/../gmp-xen | ||
includedir=${libdir}/include | ||
|
||
Name: gmp-xen | ||
Version: 6.0.0 | ||
URL: https://gmplib.org | ||
Description: The GNU Multiple Precision Arithmetic Library | ||
Cflags: -I${includedir} | ||
Libs: -L${libdir} -lgmp-xen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/sh -ex | ||
if [ -z "$PREFIX" ]; then | ||
PREFIX="`opam config var prefix`/lib/gmp-xen" | ||
fi | ||
|
||
PKG_CONFIG_DEPS="mirage-xen-posix" | ||
check_deps () { | ||
pkg-config --print-errors --exists ${PKG_CONFIG_DEPS} | ||
} | ||
|
||
if ! check_deps 2>/dev/null; then | ||
# rely on `opam` if deps are unavailable | ||
export PKG_CONFIG_PATH="`opam config var prefix`/lib/pkgconfig" | ||
fi | ||
check_deps || exit 1 | ||
|
||
CPPFLAGS="$CPPFLAGS `pkg-config $PKG_CONFIG_DEPS --cflags` -O2 -pedantic -fomit-frame-pointer -fno-builtin -D_FORTIFY_SOURCE=0 -Wmissing-prototypes --std=gnu99" | ||
# Use different --host and --build to trigger cross-compilation mode (don't try to test binaries during configure) | ||
# Set CC to stop it trying to find a separate compiler for HOST. | ||
# Pass CPPFLAGS (not just CFLAGS) to stop it finding the Linux headers (just generates warnings). | ||
# Use -Werror=missing-prototypes because we're not running the tests due to cross-compiling. | ||
HOST="`uname -m`-unknown-none" | ||
BUILD=`./config.guess` | ||
./configure --host="$HOST" --build="$BUILD" --enable-fat CC=gcc --prefix="$PREFIX" --disable-shared CPPFLAGS="$CPPFLAGS" --with-pic | ||
# Because we're cross-compiling, configurate can't tell whether a function | ||
# actually exists and just assumes they all do. For localeconv, this is wrong. | ||
sed -e '/HAVE_LOCALECONV/d' \ | ||
-e '/HAVE_OBSTACK_VPRINTF/d'\ | ||
-i config.status | ||
./config.status | ||
make |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/sh -ex | ||
if [ -z "$PREFIX" ]; then | ||
PREFIX=`opam config var prefix` | ||
fi | ||
LIBDIR="$PREFIX/lib/gmp-xen" | ||
PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig" | ||
export PKG_CONFIG_PATH | ||
|
||
make install | ||
mkdir -p "$PKG_CONFIG_PATH" | ||
cp gmp-xen.pc "$PKG_CONFIG_PATH/" | ||
mkdir -p "$LIBDIR" | ||
cp .libs/libgmp.a "$LIBDIR/libgmp-xen.a" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
opam-version: "1.2" | ||
maintainer: "Thomas Leonard <talex5@gmail.com>" | ||
homepage: "https://gmplib.org/" | ||
license: "GNU LGPL v3 and GNU GPL v2" | ||
authors: "Torbjörn Granlund and contributors" | ||
|
||
patches: ["gmp-6a.diff"] | ||
build: ["sh" "-ex" "./mirage-build.sh"] | ||
install: ["sh" "-ex" "./mirage-install.sh"] | ||
remove: [ | ||
"rm" "-rf" | ||
"%{prefix}%/lib/pkgconfig/gmp-xen.pc" | ||
"%{prefix}%/lib/gmp-xen" | ||
] | ||
depends: [ | ||
"mirage-xen-posix" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
archive: "https://gmplib.org/download/gmp/gmp-6.0.0a.tar.xz" | ||
checksum: "1e6da4e434553d2811437aa42c7f7c76" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters