42 lines
1.4 KiB
Bash
42 lines
1.4 KiB
Bash
# Template file for 'swi-prolog'
|
|
pkgname=swi-prolog
|
|
version=7.6.3
|
|
revision=1
|
|
wrksrc="swipl-${version}"
|
|
build_style=gnu-configure
|
|
hostmakedepends="pkg-config"
|
|
makedepends="gmp-devel libXft-devel libXinerama-devel libXpm-devel libXt-devel
|
|
libarchive-devel libjpeg-turbo-devel libressl-devel readline-devel
|
|
unixodbc-devel zlib-devel"
|
|
short_desc="Comprehensive free Prolog environment"
|
|
maintainer="Leah Neukirchen <leah@vuxu.org>"
|
|
license="LGPL-2.1"
|
|
homepage="http://www.swi-prolog.org/"
|
|
_changelog="http://www.swi-prolog.org/ChangeLog?branch=stable"
|
|
distfiles="http://www.swi-prolog.org/download/stable/src/swipl-${version}.tar.gz"
|
|
checksum=9c0be513dc98e6ca420d109f7a455a6593840682cf1b0e21876d1e71e7f35d39
|
|
nocross=yes
|
|
|
|
post_extract() {
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
*-musl)
|
|
sed -i 's/unsigned int line/int line/' src/pl-thread.c
|
|
sed -i '1i#include <stdio.h>' src/pl-trace.c src/os/pl-fmt.c
|
|
esac
|
|
}
|
|
do_configure() {
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
*-musl)
|
|
# Work around lack of qsort_r, needs executable stack.
|
|
CFLAGS+=" -DQSORT_WITH_NESTED_FUNCTIONS"
|
|
LDFLAGS+=" -Wl,-z,execstack"
|
|
esac
|
|
COFLAGS="${CFLAGS}" ./configure ${configure_args} \
|
|
--with-world --enable-custom-flags
|
|
}
|
|
post_install() {
|
|
chmod +x "${DESTDIR}/usr/lib/swipl-${version}/library/dialect/sicstus/swipl-lfr.pl"
|
|
ln -sfr ${DESTDIR}/usr/lib/swipl-${version}/lib/*/libswipl.so.${version} \
|
|
${DESTDIR}/usr/lib/libswipl.so.${version%.*}
|
|
}
|