Update lang/swi-prolog to version 7.6.0.

For the first time, all tests are now passing on OpenBSD. This is thanks to the
hard work of Jan Wielemaker who went on a bug fixing rampage after I set him up
an OpenBSD VM. As a result, lots of patches also disappeared, thus making the
port simpler. Many thanks for this Jan!

OK jeremy@, thanks.
This commit is contained in:
edd 2017-11-06 21:57:01 +00:00
parent 570e9d2a8f
commit 16aad340c7
6 changed files with 33 additions and 155 deletions

View File

@ -1,17 +1,16 @@
# $OpenBSD: Makefile,v 1.73 2017/09/29 19:46:53 naddy Exp $
# $OpenBSD: Makefile,v 1.74 2017/11/06 21:57:01 edd Exp $
BROKEN-hppa = undefined reference to __sync_fetch_and_add_4
BROKEN-sparc64 = infinite loop or aborts during build
COMMENT = Prolog for the real world
V = 6.6.4
REVISION = 12
DISTNAME = pl-$V
V = 7.6.0
DISTNAME = swipl-$V
PKGNAME = swi-prolog-$V
CATEGORIES = lang
SHARED_LIBS = pl 5.0
SHARED_LIBS = swipl 0.0 # 7.5
HOMEPAGE = http://www.swi-prolog.org/
@ -20,68 +19,56 @@ MAINTAINER = Edd Barrett <edd@openbsd.org>
# LGPLv2.1
PERMIT_PACKAGE_CDROM = Yes
WANTLIB += ICE SM X11 Xext Xft Xinerama Xpm Xt c crypto execinfo
WANTLIB += fontconfig freetype gmp jpeg m ncursesw pthread readline ssl
WANTLIB += z
WANTLIB += ICE SM X11 Xext Xft Xinerama Xpm Xt archive c crypto
WANTLIB += db edit execinfo fontconfig freetype gmp iodbc jpeg
WANTLIB += m ncursesw ossp-uuid pcre pthread readline ssl z
MASTER_SITES = ${HOMEPAGE}download/stable/src/ \
https://distfiles.nl/
# The reccommended way to build is using build.templ. We mimick this as best
# we can and use the top-level configure script.
CONFIGURE_STYLE = gnu
MODGNU_CONFIG_GUESS_DIRS = ${WRKSRC}/src \
MODGNU_CONFIG_GUESS_DIRS = ${WRKSRC}/packages/clib \
${WRKSRC}/packages/jpl \
${WRKSRC}/packages/xpce/src
${WRKSRC}/packages/xpce/ \
${WRKSRC}/packages/xpce/src \
${WRKSRC}/src
CONFIGURE_ENV += CIFLAGS=' -I${LOCALBASE}/include' \
LDFLAGS=' -L${LOCALBASE}/lib' \
COFLAGS='${CFLAGS}'
CFLAGS += -I${LOCALBASE}/include
LDFLAGS += -L${LOCALBASE}/lib
CONFIGURE_ENV += CIFLAGS='${CFLAGS}' \
LDFLAGS='${LDFLAGS}'
MAKE_ENV = ${CONFIGURE_ENV}
CONFIGURE_ARGS = --enable-mt \
--disable-custom-flags \
--with-world \
--with-jpeg=${LOCALBASE} \
--enable-shared
CONFIGURE_ARGS += --enable-shared \
--with-world
USE_GMAKE = Yes
# Don't pick up bash
MAKE_ENV = MAKESHELL=/bin/sh
MAKE_FLAGS = SONAMEOPT= \
SHAREDV=libpl.so.${LIBpl_VERSION}
MODULES = gcc4
# for atomic builtins
MODGCC4_ARCHS = arm
AUTOCONF_VERSION = 2.69
BUILD_DEPENDS = ${MODGNU_AUTOCONF_DEPENDS} \
${RUN_DEPENDS}
BUILD_DEPENDS = ${RUN_DEPENDS}
BUILD_DEPENDS += shells/bash
LIB_DEPENDS = devel/gmp \
devel/libexecinfo \
graphics/jpeg
graphics/jpeg \
devel/uuid \
databases/db/v4 \
archivers/libarchive \
databases/iodbc \
devel/pcre
FULLARCH = ${MACHINE_ARCH:S/amd64/x86_64/}-openbsd${OSREV}
SUBST_VARS += V BOOT FULLARCH
# only packages/clib/maildrop/rfc822/configure.in is patched
pre-configure:
cd ${WRKSRC}/packages/clib/maildrop/rfc822 && \
AUTOCONF_VERSION=${AUTOCONF_VERSION} autoconf
${SUBST_CMD} ${WRKSRC}/src/Makefile.in
post-install:
cd ${PREFIX}/lib && \
ln -sf swipl-$V/lib/${FULLARCH}/libpl.so.${LIBpl_VERSION}
ln -sf swipl-$V/lib/${FULLARCH}/libswipl.so.${LIBswipl_VERSION}
mv ${PREFIX}/lib/swipl-${V}/doc ${PREFIX}/share/doc/swipl
# Swipl multithreading flaky at best on OpenBSD.
# We are not sure if this is our threading implementation or their code.
# The following tests fail (hang). We remove them to allow the rest
# of the tests to execute atleast.
# When updating, uncomment these to see if they still fail.
pre-test:
rm -f ${WRKBUILD}/src/Tests/core/test_resource_error.pl
.include <bsd.port.arch.mk>
.if ${PROPERTIES:Mlp64}

View File

@ -1,2 +1,2 @@
SHA256 (pl-6.6.4.tar.gz) = Zjl3lZl544nfD4fC60JqtxEFwSIGYF7ECSWJO5FzPO8=
SIZE (pl-6.6.4.tar.gz) = 14830255
SHA256 (swipl-7.6.0.tar.gz) = WRx2ve/yne1NHbsAn8uhxRBnpfbzpp+tp+Qyf870sP8=
SIZE (swipl-7.6.0.tar.gz) = 16763479

View File

@ -1,15 +0,0 @@
$OpenBSD: patch-packages_clib_Makefile_in,v 1.3 2014/04/04 17:53:49 edd Exp $
More hanging tests.
--- packages/clib/Makefile.in.orig Thu Dec 5 11:26:17 2013
+++ packages/clib/Makefile.in Thu Dec 5 11:26:22 2013
@@ -127,7 +127,7 @@ uninstall::
# Testing
################################################################
-check: check-socket check-memfile check-unit check-process \
+check: check-socket check-memfile check-unit \
check-read check-uri check-cgi
torture: torture-socket

View File

@ -1,44 +0,0 @@
$OpenBSD: patch-packages_clib_maildrop_rfc822_configure_in,v 1.1 2017/09/29 19:46:53 naddy Exp $
Index: packages/clib/maildrop/rfc822/configure.in
--- packages/clib/maildrop/rfc822/configure.in.orig
+++ packages/clib/maildrop/rfc822/configure.in
@@ -42,25 +42,15 @@ AC_CACHE_CHECK([how to calculate alternate timezone],l
AC_TRY_COMPILE([
#include <time.h>
],[
-int main()
-{
time_t t=altzone;
int offset = -timezone;
-
- return (0);
-}
], librfc822_cv_SYS_TIMEZONE=altzone,
AC_TRY_COMPILE([
#include <time.h>
],[
-int main()
-{
int n=daylight;
int offset = -timezone;
-
- return (0);
-}
], librfc822_cv_SYS_TIMEZONE=daylight,
AC_TRY_COMPILE([
@@ -68,12 +58,7 @@ int offset = -timezone;
extern struct tm dummy;
],[
-int main()
-{
long n=dummy.tm_gmtoff;
-
- return (0);
-}
] ,librfc822_cv_SYS_TIMEZONE=tm_gmtoff,
librfc822_cv_SYS_TIMEZONE=unknown
)

View File

@ -1,11 +0,0 @@
$OpenBSD: patch-packages_clib_nonblockio_h,v 1.1 2016/09/10 13:03:42 ajacoutot Exp $
--- packages/clib/nonblockio.h.orig Sat Sep 10 11:42:58 2016
+++ packages/clib/nonblockio.h Sat Sep 10 11:43:31 2016
@@ -52,6 +52,7 @@
#else /*__WINDOWS__*/
+#include <sys/select.h> /* fd_set */
#include <sys/types.h>
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>

View File

@ -1,39 +0,0 @@
$OpenBSD: patch-packages_ssl_ssl4pl_c,v 1.3 2014/04/24 21:52:20 edd Exp $
Fallout from OpenSSL rampage.
--- packages/ssl/ssl4pl.c.orig Tue Jan 21 14:47:42 2014
+++ packages/ssl/ssl4pl.c Thu Apr 24 11:16:54 2014
@@ -67,7 +67,9 @@ static functor_t FUNCTOR_equals2;
static functor_t FUNCTOR_crl1;
static functor_t FUNCTOR_revocations1;
static functor_t FUNCTOR_revoked2;
+#ifndef __OpenBSD__
static functor_t FUNCTOR_session_key1;
+#endif
static functor_t FUNCTOR_master_key1;
static functor_t FUNCTOR_session_id1;
static functor_t FUNCTOR_client_random1;
@@ -1529,10 +1531,12 @@ pl_ssl_session(term_t stream_t, term_t session_t)
if ( !PL_unify_list_ex(list_t, node_t, list_t) )
return FALSE;
+#ifndef __OpenBSD__
if ( !PL_unify_term(node_t,
PL_FUNCTOR, FUNCTOR_session_key1,
PL_NCHARS, session->key_arg_length, session->key_arg))
return FALSE;
+#endif
if ( !PL_unify_list_ex(list_t, node_t, list_t))
return FALSE;
@@ -1614,7 +1618,9 @@ install_ssl4pl()
FUNCTOR_crl1 = PL_new_functor(PL_new_atom("crl"), 1);
FUNCTOR_revoked2 = PL_new_functor(PL_new_atom("revoked"), 2);
FUNCTOR_revocations1 = PL_new_functor(PL_new_atom("revocations"), 1);
+#ifndef __OpenBSD__
FUNCTOR_session_key1 = PL_new_functor(PL_new_atom("session_key"), 1);
+#endif
FUNCTOR_master_key1 = PL_new_functor(PL_new_atom("master_key"), 1);
FUNCTOR_session_id1 = PL_new_functor(PL_new_atom("session_id"), 1);
FUNCTOR_client_random1 = PL_new_functor(PL_new_atom("client_random"), 1);