37 lines
1.2 KiB
Bash
37 lines
1.2 KiB
Bash
# Template file for 'swi-prolog'
|
|
pkgname=swi-prolog
|
|
version=7.2.2
|
|
revision=2
|
|
wrksrc="swipl-${version}"
|
|
build_style=gnu-configure
|
|
hostmakedepends="pkg-config"
|
|
makedepends="gmp-devel readline-devel libressl-devel zlib-devel libarchive-devel libXft-devel libjpeg-turbo-devel libXpm-devel libXinerama-devel unixodbc-devel libXt-devel"
|
|
short_desc="A comprehensive free Prolog environment"
|
|
maintainer="Christian Neukirchen <chneukirchen@gmail.com>"
|
|
license="LGPL-2.1"
|
|
homepage="http://www.swi-prolog.org/"
|
|
distfiles="http://www.swi-prolog.org/download/stable/src/swipl-${version}.tar.gz"
|
|
checksum=c137bbe1d652a6aaa003278045e592637cd9fd5f1d52b05f9f0751bfd9449c8d
|
|
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"
|
|
}
|