diff options
author | Zach van Rijn <me@zv.io> | 2022-11-04 02:26:55 +0000 |
---|---|---|
committer | Zach van Rijn <me@zv.io> | 2022-11-04 02:26:55 +0000 |
commit | b7965cf9a40f3b41761906c578d825bb8f8b572e (patch) | |
tree | 20806aeed4e1cc309ab30ab690ada676e225c17d /experimental/libffcall/APKBUILD | |
parent | eced2938ac3c628ac5c5ea8d1b8a7238452107cd (diff) | |
download | packages-b7965cf9a40f3b41761906c578d825bb8f8b572e.tar.gz packages-b7965cf9a40f3b41761906c578d825bb8f8b572e.tar.bz2 packages-b7965cf9a40f3b41761906c578d825bb8f8b572e.tar.xz packages-b7965cf9a40f3b41761906c578d825bb8f8b572e.zip |
user/libffcall: move to 'experimental/'. see #761.
Diffstat (limited to 'experimental/libffcall/APKBUILD')
-rw-r--r-- | experimental/libffcall/APKBUILD | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/experimental/libffcall/APKBUILD b/experimental/libffcall/APKBUILD new file mode 100644 index 000000000..f3bc87e30 --- /dev/null +++ b/experimental/libffcall/APKBUILD @@ -0,0 +1,70 @@ +# Contributor: Carlo Landmeter <clandmeter@gmail.com> +# Contributor: Will Sinatra <wpsinatra@gmail.com> +# Maintainer: Lee Starnes <lee@canned-death.us> +pkgname=libffcall +pkgver=2.4 +pkgrel=0 +pkgdesc="C library for implementing foreign function calls in embedded interpreters" +url="https://www.gnu.org/software/libffcall" +arch="all" +license="GPL-2.0+" +depends="" +makedepends="" +subpackages="$pkgname-dev $pkgname-doc" +source="https://ftp.gnu.org/gnu/libffcall/libffcall-$pkgver.tar.gz + ppc64.patch + " + +prepare() { + default_prepare + case "${CARCH}" in + ppc64) + # C sources are patched, bundled .S need to be regenerated; + # recipes for *-powerpc64-elfv2-linux.S from Makefile.devel + temp=$(mktemp) + comm="-D__powerpc64__ -D__powerpc64_elfv2__ -O2 -fno-omit-frame-pointer -o ${temp}" + nxst="../common/noexecstack.h" + + flag="${comm} -I.. -I../dummy" + for k in avcall vacall; do + cd ${k} + gcc ${flag} -S ${k}-powerpc64.c + cat ${temp} ${nxst} > ${k}-powerpc64-elfv2-linux.S + cd - + done + + flag="${comm} -I. -I../.. -I../../dummy -fPIC -DREENTRANT" + cd callback/vacall_r + gcc ${flag} -S ../../vacall/vacall-powerpc64.c + cat ${temp} ../${nxst} > vacall-powerpc64-elfv2-linux.S + cd - + + rm ${temp} + ;; + esac +} + +build() { + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --localstatedir=/var + # Fails to build if building in parallel + make -j1 +} + +check() { + make check +} + +package() { + make DESTDIR="$pkgdir" htmldir=/usr/share/doc/ffcall install + +} + +sha512sums="c9451662764a888e3be21499c29673bfb0e1df4915814da3506db5d395a2b00ea2f0c08d1c9dffebf030179f9347794876ec6ec9e6710b4fc70fd760960335e6 libffcall-2.4.tar.gz +7360a5bdea23dec4a84f9653e96540dcccfcce1214899c421ad66760aeffa6223eb1a2d9011a1e0cddb1027b90242518e37c45b12625f8ff9a276e181db278d3 ppc64.patch" |