summaryrefslogtreecommitdiff
path: root/lang/swi-prolog-lite
diff options
context:
space:
mode:
authorleot <leot@pkgsrc.org>2018-12-10 14:59:50 +0000
committerleot <leot@pkgsrc.org>2018-12-10 14:59:50 +0000
commit305083ff1f5c0849e9fa49771ac4fed5120f1cf4 (patch)
tree34dcd74aa031ef425e01bc4929508176e2c02906 /lang/swi-prolog-lite
parent157af084ae7c20ad2ca7bc824a78402b49f3b6c9 (diff)
downloadpkgsrc-305083ff1f5c0849e9fa49771ac4fed5120f1cf4.tar.gz
swi-prolog*: Update lang/swi-prolog* to 7.6.4
pkgsrc changes: - Add patches/patch-src_os_pl-files.c to avoid overlapping `src' and `dst' in srtcpy(3). It is an undefined behaviour and it leads to build issue in swi-prolog-packages on platforms that uses SSP. - readline dependency is no longer needed for swi-prolog-lite. The readline functionality is now provided as a package via swi-prolog-packages. - Inject CFLAGS via COFLAGS and pass -fPIC via CMFLAGS so that swi-prolog-jpl will link - Add patches/patch-src_pl-rsort.c to use FreeBSD qsort_r(3) instead of using nested functions. This is probably more portable and has less problems (e.g. does not need for PaX MPROTECT). Changes: 7.6.x ----- Major release. Multi-argument indexing, better multi-threaded performance, threaded global GC (atoms and clauses), mode-directed tabling, restored same expand and directive semantics for initial load and reloading files, cleaner initializatin and command line handling. 7.4.x ----- Major release. More robust and better scalable support for multi-core hardware, tabling, engines. Many enhancements to the RDF, HTTP and SSL libraries. This is the first release licensed under the Simplified BSD (BSD-2) license. 7.2.x ----- Major release, providing native key-value support by means of dicts, native strings using "hello world" syntax, web-accessible Prolog engines (Pengines) and a high level SQL library called CQL. Please note that this is just a summary of the most important changes, for more information please give a look to: <http://www.swi-prolog.org/ChangeLog?branch=stable>
Diffstat (limited to 'lang/swi-prolog-lite')
-rw-r--r--lang/swi-prolog-lite/Makefile7
-rw-r--r--lang/swi-prolog-lite/Makefile.common9
-rw-r--r--lang/swi-prolog-lite/PLIST87
-rw-r--r--lang/swi-prolog-lite/buildlink3.mk5
-rw-r--r--lang/swi-prolog-lite/distinfo17
-rw-r--r--lang/swi-prolog-lite/patches/patch-ad22
-rw-r--r--lang/swi-prolog-lite/patches/patch-packages_Dialect.defs.in13
-rw-r--r--lang/swi-prolog-lite/patches/patch-src_os_pl-files.c40
-rw-r--r--lang/swi-prolog-lite/patches/patch-src_pl-rsort.c217
-rw-r--r--lang/swi-prolog-lite/patches/patch-src_pl-thread.c22
10 files changed, 353 insertions, 86 deletions
diff --git a/lang/swi-prolog-lite/Makefile b/lang/swi-prolog-lite/Makefile
index e08c24168c0..5ca452824e6 100644
--- a/lang/swi-prolog-lite/Makefile
+++ b/lang/swi-prolog-lite/Makefile
@@ -1,6 +1,5 @@
-# $NetBSD: Makefile,v 1.27 2018/09/06 19:07:12 leot Exp $
+# $NetBSD: Makefile,v 1.28 2018/12/10 14:59:50 leot Exp $
-PKGREVISION= 2
.include "Makefile.common"
PKGNAME= swi-prolog-lite-${SWIPLVERS}
@@ -31,9 +30,7 @@ REPLACE_FILES.swipl+= library/dialect/sicstus/swipl-lfr.pl
TEST_TARGET= check
-.include "../../devel/ncurses/buildlink3.mk"
-# uses rl_event_hook() interface
-.include "../../devel/readline/buildlink3.mk"
.include "../../devel/gmp/buildlink3.mk"
+.include "../../mk/curses.buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/lang/swi-prolog-lite/Makefile.common b/lang/swi-prolog-lite/Makefile.common
index ee444c0802c..8f9a873f0f4 100644
--- a/lang/swi-prolog-lite/Makefile.common
+++ b/lang/swi-prolog-lite/Makefile.common
@@ -1,11 +1,11 @@
-# $NetBSD: Makefile.common,v 1.14 2017/01/19 18:52:15 agc Exp $
+# $NetBSD: Makefile.common,v 1.15 2018/12/10 14:59:50 leot Exp $
#
# used by lang/swi-prolog/Makefile
# used by lang/swi-prolog-packages/Makefile
# used by lang/swi-prolog-jpl/Makefile
-SWIPLVERS= 6.6.6
-DISTNAME= pl-${SWIPLVERS}
+SWIPLVERS= 7.6.4
+DISTNAME= swipl-${SWIPLVERS}
CATEGORIES= lang
MASTER_SITES= http://www.swi-prolog.org/download/stable/src/
MASTER_SITES+= http://www.swi-prolog.org/download/devel/src/
@@ -16,3 +16,6 @@ LICENSE= gnu-lgpl-v2.1
DIST_SUBDIR= swi-prolog
DISTINFO_FILE= ${.CURDIR}/../../lang/swi-prolog-lite/distinfo
PATCHDIR= ${.CURDIR}/../../lang/swi-prolog-lite/patches
+
+CONFIGURE_ENV+= CMFLAGS="-fPIC"
+CONFIGURE_ENV+= COFLAGS=${CFLAGS:M*:Q}
diff --git a/lang/swi-prolog-lite/PLIST b/lang/swi-prolog-lite/PLIST
index 3fff3465d62..c2a407fcc76 100644
--- a/lang/swi-prolog-lite/PLIST
+++ b/lang/swi-prolog-lite/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.12 2014/05/28 10:29:12 markd Exp $
+@comment $NetBSD: PLIST,v 1.13 2018/12/10 14:59:50 leot Exp $
bin/swi-prolog
bin/swipl-ld
bin/swipl-rc
@@ -12,7 +12,9 @@ lib/swi-prolog-${PKGVERSION}/boot/attvar.pl
lib/swi-prolog-${PKGVERSION}/boot/autoload.pl
lib/swi-prolog-${PKGVERSION}/boot/bags.pl
lib/swi-prolog-${PKGVERSION}/boot/dcg.pl
+lib/swi-prolog-${PKGVERSION}/boot/dicts.pl
lib/swi-prolog-${PKGVERSION}/boot/dwim.pl
+lib/swi-prolog-${PKGVERSION}/boot/engines.pl
lib/swi-prolog-${PKGVERSION}/boot/expand.pl
lib/swi-prolog-${PKGVERSION}/boot/history.pl
lib/swi-prolog-${PKGVERSION}/boot/init.pl
@@ -29,7 +31,7 @@ lib/swi-prolog-${PKGVERSION}/boot/toplevel.pl
lib/swi-prolog-${PKGVERSION}/boot/topvars.pl
lib/swi-prolog-${PKGVERSION}/boot${BITS}.prc
lib/swi-prolog-${PKGVERSION}/customize/README
-lib/swi-prolog-${PKGVERSION}/customize/dotplrc
+lib/swi-prolog-${PKGVERSION}/customize/dotswiplrc
lib/swi-prolog-${PKGVERSION}/customize/dotxpcerc
lib/swi-prolog-${PKGVERSION}/customize/edit
lib/swi-prolog-${PKGVERSION}/demo/README
@@ -66,7 +68,8 @@ lib/swi-prolog-${PKGVERSION}/doc/Manual/chartype.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/check.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/chr.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/chrintro.html
-lib/swi-prolog-${PKGVERSION}/doc/Manual/clicense.html
+lib/swi-prolog-${PKGVERSION}/doc/Manual/clp.html
+lib/swi-prolog-${PKGVERSION}/doc/Manual/clpb.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/clpfd.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/clpqr.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/cmdline.html
@@ -85,18 +88,29 @@ lib/swi-prolog-${PKGVERSION}/doc/Manual/debugger.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/debugging.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/debugoverview.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/defmodule.html
+lib/swi-prolog-${PKGVERSION}/doc/Manual/delcont.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/dialect.html
+lib/swi-prolog-${PKGVERSION}/doc/Manual/dicts.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/dynamic-modules.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/dynamic.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/edit.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/editreload.html
+lib/swi-prolog-${PKGVERSION}/doc/Manual/engine-examples.html
+lib/swi-prolog-${PKGVERSION}/doc/Manual/engine-predicates.html
+lib/swi-prolog-${PKGVERSION}/doc/Manual/engine-resources.html
+lib/swi-prolog-${PKGVERSION}/doc/Manual/engines.html
+lib/swi-prolog-${PKGVERSION}/doc/Manual/error.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/errors.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/examineprog.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/examples.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/excepthook.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/exception.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/exception3.html
-lib/swi-prolog-${PKGVERSION}/doc/Manual/extvar.html
+lib/swi-prolog-${PKGVERSION}/doc/Manual/ext-integration.html
+lib/swi-prolog-${PKGVERSION}/doc/Manual/ext-issues.html
+lib/swi-prolog-${PKGVERSION}/doc/Manual/ext-lists.html
+lib/swi-prolog-${PKGVERSION}/doc/Manual/ext-syntax.html
+lib/swi-prolog-${PKGVERSION}/doc/Manual/extensions.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/files.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/findappfile.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/findhome.html
@@ -136,6 +150,7 @@ lib/swi-prolog-${PKGVERSION}/doc/Manual/initfile.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/initgoal.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/intlibs.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/intro.html
+lib/swi-prolog-${PKGVERSION}/doc/Manual/iostream.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/jitindex.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/libpl.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/library.html
@@ -145,6 +160,7 @@ lib/swi-prolog-${PKGVERSION}/doc/Manual/listing.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/lists.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/loadfilehook.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/locale.html
+lib/swi-prolog-${PKGVERSION}/doc/Manual/main.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/manipatom.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/manipmodule.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/manipstack.html
@@ -170,8 +186,10 @@ lib/swi-prolog-${PKGVERSION}/doc/Manual/ordsets.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/otherlicenses.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/overrule.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/overview.html
+lib/swi-prolog-${PKGVERSION}/doc/Manual/packs.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/pairs.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/pceemacs.html
+lib/swi-prolog-${PKGVERSION}/doc/Manual/persistency.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/pio.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/plld.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/portabilitystrategies.html
@@ -191,7 +209,6 @@ lib/swi-prolog-${PKGVERSION}/doc/Manual/qsavelimits.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/quasiquotations.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/quickstart.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/random.html
-lib/swi-prolog-${PKGVERSION}/doc/Manual/readline.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/readutil.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/record.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/reexport.html
@@ -202,6 +219,7 @@ lib/swi-prolog-${PKGVERSION}/doc/Manual/sicstus-chr.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/signal.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/simplex.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/softlicense.html
+lib/swi-prolog-${PKGVERSION}/doc/Manual/solutionsequences.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/sponsor.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/statistics.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/status.html
@@ -211,8 +229,8 @@ lib/swi-prolog-${PKGVERSION}/doc/Manual/summary.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/swiorother.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/swiprolog.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/syntax.html
-lib/swi-prolog-${PKGVERSION}/doc/Manual/syntaxext.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/system.html
+lib/swi-prolog-${PKGVERSION}/doc/Manual/tabling.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/termrw.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/thmonitor.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/threadcom.html
@@ -238,6 +256,7 @@ lib/swi-prolog-${PKGVERSION}/doc/Manual/www_browser.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/xref.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/xrefchatdep.gif
lib/swi-prolog-${PKGVERSION}/doc/Manual/xrefchatfile.gif
+lib/swi-prolog-${PKGVERSION}/doc/Manual/yall.html
lib/swi-prolog-${PKGVERSION}/doc/Manual/yellow_pages.gif
lib/swi-prolog-${PKGVERSION}/include/SWI-Prolog.h
lib/swi-prolog-${PKGVERSION}/include/SWI-Stream.h
@@ -247,7 +266,6 @@ lib/swi-prolog-${PKGVERSION}/lib/${MACHINE_GNU_PLATFORM}/libswipl.a
lib/swi-prolog-${PKGVERSION}/library/INDEX.pl
lib/swi-prolog-${PKGVERSION}/library/MANUAL
lib/swi-prolog-${PKGVERSION}/library/aggregate.pl
-lib/swi-prolog-${PKGVERSION}/library/am_match.pl
lib/swi-prolog-${PKGVERSION}/library/ansi_term.pl
lib/swi-prolog-${PKGVERSION}/library/apply.pl
lib/swi-prolog-${PKGVERSION}/library/apply_macros.pl
@@ -259,11 +277,13 @@ lib/swi-prolog-${PKGVERSION}/library/base64.pl
lib/swi-prolog-${PKGVERSION}/library/broadcast.pl
lib/swi-prolog-${PKGVERSION}/library/charsio.pl
lib/swi-prolog-${PKGVERSION}/library/check.pl
+lib/swi-prolog-${PKGVERSION}/library/check_installation.pl
lib/swi-prolog-${PKGVERSION}/library/checklast.pl
lib/swi-prolog-${PKGVERSION}/library/checkselect.pl
lib/swi-prolog-${PKGVERSION}/library/clp/bounds.pl
lib/swi-prolog-${PKGVERSION}/library/clp/clp_distinct.pl
lib/swi-prolog-${PKGVERSION}/library/clp/clp_events.pl
+lib/swi-prolog-${PKGVERSION}/library/clp/clpb.pl
lib/swi-prolog-${PKGVERSION}/library/clp/clpfd.pl
lib/swi-prolog-${PKGVERSION}/library/clp/simplex.pl
lib/swi-prolog-${PKGVERSION}/library/codesio.pl
@@ -276,48 +296,8 @@ lib/swi-prolog-${PKGVERSION}/library/dcg/basics.pl
lib/swi-prolog-${PKGVERSION}/library/debug.pl
lib/swi-prolog-${PKGVERSION}/library/dialect.pl
lib/swi-prolog-${PKGVERSION}/library/dialect/bim.pl
-lib/swi-prolog-${PKGVERSION}/library/dialect/ciao.pl
-lib/swi-prolog-${PKGVERSION}/library/dialect/ciao/aggregates.pl
-lib/swi-prolog-${PKGVERSION}/library/dialect/ciao/assertions.pl
-lib/swi-prolog-${PKGVERSION}/library/dialect/ciao/basicmodes.pl
-lib/swi-prolog-${PKGVERSION}/library/dialect/ciao/classic.pl
-lib/swi-prolog-${PKGVERSION}/library/dialect/ciao/dcg.pl
-lib/swi-prolog-${PKGVERSION}/library/dialect/ciao/engine/attributes.pl
-lib/swi-prolog-${PKGVERSION}/library/dialect/ciao/engine/basic_props.pl
-lib/swi-prolog-${PKGVERSION}/library/dialect/ciao/engine/basiccontrol.pl
-lib/swi-prolog-${PKGVERSION}/library/dialect/ciao/engine/exceptions.pl
-lib/swi-prolog-${PKGVERSION}/library/dialect/ciao/engine/exceptions_db.pl
-lib/swi-prolog-${PKGVERSION}/library/dialect/ciao/engine/hiord_rt.pl
-lib/swi-prolog-${PKGVERSION}/library/dialect/ciao/engine/internals.pl
-lib/swi-prolog-${PKGVERSION}/library/dialect/ciao/engine/io_aux.pl
-lib/swi-prolog-${PKGVERSION}/library/dialect/ciao/file_utils.pl
-lib/swi-prolog-${PKGVERSION}/library/dialect/ciao/format.pl
-lib/swi-prolog-${PKGVERSION}/library/dialect/ciao/freeze.pl
-lib/swi-prolog-${PKGVERSION}/library/dialect/ciao/hiord.pl
-lib/swi-prolog-${PKGVERSION}/library/dialect/ciao/hiordlib.pl
-lib/swi-prolog-${PKGVERSION}/library/dialect/ciao/iso_misc.pl
-lib/swi-prolog-${PKGVERSION}/library/dialect/ciao/isomodes.pl
-lib/swi-prolog-${PKGVERSION}/library/dialect/ciao/lists.pl
-lib/swi-prolog-${PKGVERSION}/library/dialect/ciao/llists.pl
-lib/swi-prolog-${PKGVERSION}/library/dialect/ciao/nativeprops.pl
-lib/swi-prolog-${PKGVERSION}/library/dialect/ciao/nortchecks.pl
-lib/swi-prolog-${PKGVERSION}/library/dialect/ciao/odd.pl
-lib/swi-prolog-${PKGVERSION}/library/dialect/ciao/prolog_flags.pl
-lib/swi-prolog-${PKGVERSION}/library/dialect/ciao/read.pl
-lib/swi-prolog-${PKGVERSION}/library/dialect/ciao/regtypes.pl
-lib/swi-prolog-${PKGVERSION}/library/dialect/ciao/regtypes/regtypes_tr.pl
-lib/swi-prolog-${PKGVERSION}/library/dialect/ciao/sockets.pl
-lib/swi-prolog-${PKGVERSION}/library/dialect/ciao/sort.pl
-lib/swi-prolog-${PKGVERSION}/library/dialect/ciao/streams.pl
-lib/swi-prolog-${PKGVERSION}/library/dialect/ciao/strings.pl
-lib/swi-prolog-${PKGVERSION}/library/dialect/ciao/system.pl
-lib/swi-prolog-${PKGVERSION}/library/dialect/ciao/terms.pl
-lib/swi-prolog-${PKGVERSION}/library/dialect/ciao/terms_check.pl
-lib/swi-prolog-${PKGVERSION}/library/dialect/ciao/terms_vars.pl
-lib/swi-prolog-${PKGVERSION}/library/dialect/ciao/unittestdecls.pl
-lib/swi-prolog-${PKGVERSION}/library/dialect/ciao/unittestprops.pl
-lib/swi-prolog-${PKGVERSION}/library/dialect/ciao/write.pl
lib/swi-prolog-${PKGVERSION}/library/dialect/commons.pl
+lib/swi-prolog-${PKGVERSION}/library/dialect/eclipse/test_util_iso.pl
lib/swi-prolog-${PKGVERSION}/library/dialect/hprolog.pl
lib/swi-prolog-${PKGVERSION}/library/dialect/hprolog/format.pl
lib/swi-prolog-${PKGVERSION}/library/dialect/ifprolog.pl
@@ -334,6 +314,7 @@ lib/swi-prolog-${PKGVERSION}/library/dialect/sicstus/timeout.pl
lib/swi-prolog-${PKGVERSION}/library/dialect/swi/syspred_options.pl
lib/swi-prolog-${PKGVERSION}/library/dialect/yap.pl
lib/swi-prolog-${PKGVERSION}/library/dialect/yap/README.TXT
+lib/swi-prolog-${PKGVERSION}/library/dicts.pl
lib/swi-prolog-${PKGVERSION}/library/dif.pl
lib/swi-prolog-${PKGVERSION}/library/edinburgh.pl
lib/swi-prolog-${PKGVERSION}/library/edit.pl
@@ -347,10 +328,13 @@ lib/swi-prolog-${PKGVERSION}/library/heaps.pl
lib/swi-prolog-${PKGVERSION}/library/help.pl
lib/swi-prolog-${PKGVERSION}/library/helpidx.pl
lib/swi-prolog-${PKGVERSION}/library/hotfix.pl
+lib/swi-prolog-${PKGVERSION}/library/iostream.pl
+lib/swi-prolog-${PKGVERSION}/library/lazy_lists.pl
lib/swi-prolog-${PKGVERSION}/library/listing.pl
lib/swi-prolog-${PKGVERSION}/library/lists.pl
lib/swi-prolog-${PKGVERSION}/library/main.pl
lib/swi-prolog-${PKGVERSION}/library/make.pl
+lib/swi-prolog-${PKGVERSION}/library/modules.pl
lib/swi-prolog-${PKGVERSION}/library/nb_rbtrees.pl
lib/swi-prolog-${PKGVERSION}/library/nb_set.pl
lib/swi-prolog-${PKGVERSION}/library/occurs.pl
@@ -363,13 +347,17 @@ lib/swi-prolog-${PKGVERSION}/library/pairs.pl
lib/swi-prolog-${PKGVERSION}/library/persistency.pl
lib/swi-prolog-${PKGVERSION}/library/pio.pl
lib/swi-prolog-${PKGVERSION}/library/portray_text.pl
+lib/swi-prolog-${PKGVERSION}/library/pprint.pl
lib/swi-prolog-${PKGVERSION}/library/predicate_options.pl
lib/swi-prolog-${PKGVERSION}/library/prolog_autoload.pl
lib/swi-prolog-${PKGVERSION}/library/prolog_breakpoints.pl
lib/swi-prolog-${PKGVERSION}/library/prolog_clause.pl
lib/swi-prolog-${PKGVERSION}/library/prolog_codewalk.pl
lib/swi-prolog-${PKGVERSION}/library/prolog_colour.pl
+lib/swi-prolog-${PKGVERSION}/library/prolog_format.pl
lib/swi-prolog-${PKGVERSION}/library/prolog_history.pl
+lib/swi-prolog-${PKGVERSION}/library/prolog_install.pl
+lib/swi-prolog-${PKGVERSION}/library/prolog_jiti.pl
lib/swi-prolog-${PKGVERSION}/library/prolog_metainference.pl
lib/swi-prolog-${PKGVERSION}/library/prolog_pack.pl
lib/swi-prolog-${PKGVERSION}/library/prolog_source.pl
@@ -389,9 +377,11 @@ lib/swi-prolog-${PKGVERSION}/library/sandbox.pl
lib/swi-prolog-${PKGVERSION}/library/settings.pl
lib/swi-prolog-${PKGVERSION}/library/shell.pl
lib/swi-prolog-${PKGVERSION}/library/shlib.pl
+lib/swi-prolog-${PKGVERSION}/library/solution_sequences.pl
lib/swi-prolog-${PKGVERSION}/library/sort.pl
lib/swi-prolog-${PKGVERSION}/library/statistics.pl
lib/swi-prolog-${PKGVERSION}/library/system.pl
+lib/swi-prolog-${PKGVERSION}/library/tabling.pl
lib/swi-prolog-${PKGVERSION}/library/terms.pl
lib/swi-prolog-${PKGVERSION}/library/thread.pl
lib/swi-prolog-${PKGVERSION}/library/thread_pool.pl
@@ -408,6 +398,7 @@ lib/swi-prolog-${PKGVERSION}/library/when.pl
lib/swi-prolog-${PKGVERSION}/library/win_menu.pl
lib/swi-prolog-${PKGVERSION}/library/writef.pl
lib/swi-prolog-${PKGVERSION}/library/www_browser.pl
+lib/swi-prolog-${PKGVERSION}/library/yall.pl
lib/swi-prolog-${PKGVERSION}/swipl.home
man/man1/swi-prolog.1
man/man1/swipl-ld.1
diff --git a/lang/swi-prolog-lite/buildlink3.mk b/lang/swi-prolog-lite/buildlink3.mk
index 50d571fa738..87460789526 100644
--- a/lang/swi-prolog-lite/buildlink3.mk
+++ b/lang/swi-prolog-lite/buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.12 2015/08/18 07:31:01 wiz Exp $
+# $NetBSD: buildlink3.mk,v 1.13 2018/12/10 14:59:50 leot Exp $
BUILDLINK_TREE+= swi-prolog-lite
@@ -9,9 +9,6 @@ BUILDLINK_API_DEPENDS.swi-prolog-lite+= swi-prolog-lite>=5.2.9
BUILDLINK_ABI_DEPENDS.swi-prolog-lite+= swi-prolog-lite>=6.6.6nb2
BUILDLINK_PKGSRCDIR.swi-prolog-lite?= ../../lang/swi-prolog-lite
-.include "../../devel/ncurses/buildlink3.mk"
-.include "../../devel/readline/buildlink3.mk"
-#.include "../../devel/gmp/buildlink3.mk" ?
.endif # SWI_PROLOG_LITE_BUILDLINK3_MK
BUILDLINK_TREE+= -swi-prolog-lite
diff --git a/lang/swi-prolog-lite/distinfo b/lang/swi-prolog-lite/distinfo
index b015f9e115b..6b6bc80f9ce 100644
--- a/lang/swi-prolog-lite/distinfo
+++ b/lang/swi-prolog-lite/distinfo
@@ -1,10 +1,13 @@
-$NetBSD: distinfo,v 1.21 2015/12/29 23:34:56 dholland Exp $
+$NetBSD: distinfo,v 1.22 2018/12/10 14:59:50 leot Exp $
-SHA1 (swi-prolog/pl-6.6.6.tar.gz) = 38cc6772a48fd412f50fc06e24e6e4673eb71d3b
-RMD160 (swi-prolog/pl-6.6.6.tar.gz) = 0bb257d261189f09fe1a49262ce0f03774a6e8f5
-SHA512 (swi-prolog/pl-6.6.6.tar.gz) = a850b0f6b283d34aa77d5e9d8a0053161fa534fa6d8935c7472362ff7b59ea6035de0658d9e38c317e2d92ed810370f2adc3e92b6346fc0ff392d18f1c8012a6
-Size (swi-prolog/pl-6.6.6.tar.gz) = 14838653 bytes
-SHA1 (patch-ad) = a6c0b88f4e2f2a26ba1f2e56eb620d8a467f939f
-SHA1 (patch-packages_Dialect.defs.in) = f75ceac51bae428a81ba2001d39d8408ccb099f9
+SHA1 (swi-prolog/swipl-7.6.4.tar.gz) = 655acec1abb62a2d09edc85f52a08101a9665379
+RMD160 (swi-prolog/swipl-7.6.4.tar.gz) = 26e4358d277761380298d9e8c189e9aa1147609c
+SHA512 (swi-prolog/swipl-7.6.4.tar.gz) = f0ed16e4f1436115651c38a0bb37008d0dadad5a19b0f09894fcfc51dd3d429f86488e89cce00788c3c36cc2f0cd2957f92df47d5441133a6f8ea9d91ca5470f
+Size (swi-prolog/swipl-7.6.4.tar.gz) = 16777875 bytes
+SHA1 (patch-ad) = f5e7ec0cce757963e021539a397af387eff5cf8f
+SHA1 (patch-packages_Dialect.defs.in) = 7ef29c29efc62e9162c53e88efc1f3e9ec987198
SHA1 (patch-packages_clib_sha1_brg_endian.h) = e7bc21953cedafce67e0070b9ec326446bf474fa
+SHA1 (patch-src_os_pl-files.c) = 222a9a4682808fc62e410b01f38e31c4dcc62f53
SHA1 (patch-src_pl-funcs.h) = fd821e245ca49a42e595096d05a21ee20d25c41c
+SHA1 (patch-src_pl-rsort.c) = 233430c9ead3e1361f40ae541d0527408a141d6e
+SHA1 (patch-src_pl-thread.c) = d45bb808e8fc80ab0766720415677328bd9bee1c
diff --git a/lang/swi-prolog-lite/patches/patch-ad b/lang/swi-prolog-lite/patches/patch-ad
index 23dcb7fff5d..c0f2fc005d4 100644
--- a/lang/swi-prolog-lite/patches/patch-ad
+++ b/lang/swi-prolog-lite/patches/patch-ad
@@ -1,15 +1,19 @@
-$NetBSD: patch-ad,v 1.5 2014/05/28 10:29:12 markd Exp $
+$NetBSD: patch-ad,v 1.6 2018/12/10 14:59:50 leot Exp $
Split install target.
---- packages/Makefile.in.orig 2014-04-25 14:06:38.000000000 +0000
+--- packages/Makefile.in.orig 2018-01-12 12:04:38.000000000 +0000
+++ packages/Makefile.in
-@@ -91,6 +91,8 @@ install::
- for p in $(PKG); do \
- if [ -r $$p/Makefile ]; then $(MAKE) -C $$p $@ || exit 1; fi; \
- done
-+
-+post-install::
- $(FORCE_MKINDEX)
+@@ -112,9 +112,11 @@ install::
+ $(MAKE) -C $$p $@ || echo $$p >> .failed.$@; \
+ fi; \
+ done
+- $(FORCE_MKINDEX)
+ $(END_FORPKG)
++post-install::
++ $(FORCE_MKINDEX)
++
rpm-install: html-install
+ $(BEGIN_FORPKG)
+ for p in $(PKG); do \
diff --git a/lang/swi-prolog-lite/patches/patch-packages_Dialect.defs.in b/lang/swi-prolog-lite/patches/patch-packages_Dialect.defs.in
index d3572d46b20..326507c4949 100644
--- a/lang/swi-prolog-lite/patches/patch-packages_Dialect.defs.in
+++ b/lang/swi-prolog-lite/patches/patch-packages_Dialect.defs.in
@@ -1,16 +1,9 @@
-$NetBSD: patch-packages_Dialect.defs.in,v 1.1 2014/05/28 10:29:12 markd Exp $
+$NetBSD: patch-packages_Dialect.defs.in,v 1.2 2018/12/10 14:59:50 leot Exp $
+
+Adjust LDFLAGS to link with installed libraries.
--- packages/Dialect.defs.in.orig 2014-05-27 12:23:38.000000000 +0000
+++ packages/Dialect.defs.in
-@@ -44,7 +44,7 @@ SO=@SO_EXT@
- SO_PATH=@SO_PATH@
- COFLAGS=@COFLAGS@
- CWFLAGS=@CWFLAGS@
--CMFLAGS=@CMFLAGS@
-+CMFLAGS=@CMFLAGS@ -fPIC
- CIFLAGS=@CIFLAGS@ -I@abs_top_builddir@/../include
- DEFS=@DEFS@ -D__SWI_PROLOG__
- CFLAGS=$(COFLAGS) $(CWFLAGS) $(CMFLAGS) $(CIFLAGS) $(PKGCFLAGS) $(DEFS)
@@ -57,7 +57,7 @@ else
LIBPLSO=$(LIBPLEMBED)
endif
diff --git a/lang/swi-prolog-lite/patches/patch-src_os_pl-files.c b/lang/swi-prolog-lite/patches/patch-src_os_pl-files.c
new file mode 100644
index 00000000000..ad56259916f
--- /dev/null
+++ b/lang/swi-prolog-lite/patches/patch-src_os_pl-files.c
@@ -0,0 +1,40 @@
+$NetBSD: patch-src_os_pl-files.c,v 1.1 2018/12/10 14:59:50 leot Exp $
+
+Avoid overlapping `src' and `dst' in strcpy(3).
+
+This is reproducible via:
+
+ % ln -s `which swi-prolog` swipl-l
+ % ./swipl-l
+
+...and was also triggered similarly as part of building swi-prolog-packages.
+
+--- src/os/pl-files.c.orig 2018-01-12 12:04:38.000000000 +0000
++++ src/os/pl-files.c
+@@ -273,6 +273,7 @@ ReadLink(const char *f, char *buf)
+ static char *
+ DeRefLink1(const char *f, char *lbuf)
+ { char buf[MAXPATHLEN];
++ char tmpbuf[MAXPATHLEN];
+ char *l;
+
+ if ( (l=ReadLink(f, buf)) )
+@@ -282,13 +283,14 @@ DeRefLink1(const char *f, char *lbuf)
+ } else
+ { char *q;
+
+- strcpy(lbuf, f);
+- q = &lbuf[strlen(lbuf)];
+- while(q>lbuf && q[-1] != '/')
++ strcpy(tmpbuf, f);
++ q = &tmpbuf[strlen(tmpbuf)];
++ while(q>tmpbuf && q[-1] != '/')
+ q--;
+ strcpy(q, l);
+
+- canonicaliseFileName(lbuf);
++ canonicaliseFileName(tmpbuf);
++ strcpy(lbuf, tmpbuf);
+
+ return lbuf;
+ }
diff --git a/lang/swi-prolog-lite/patches/patch-src_pl-rsort.c b/lang/swi-prolog-lite/patches/patch-src_pl-rsort.c
new file mode 100644
index 00000000000..70be582d9fb
--- /dev/null
+++ b/lang/swi-prolog-lite/patches/patch-src_pl-rsort.c
@@ -0,0 +1,217 @@
+$NetBSD: patch-src_pl-rsort.c,v 1.1 2018/12/10 14:59:50 leot Exp $
+
+Use FreeBSD qsort_r(3) if not available instead of using nested
+functions.
+
+--- src/pl-rsort.c.orig 2018-01-12 12:04:38.000000000 +0000
++++ src/pl-rsort.c
+@@ -65,43 +65,177 @@ from pl-list.c.
+
+ #if !defined(HAVE_QSORT_R) && !defined(HAVE_QSORT_S)
+
+-#ifdef QSORT_R_WITH_NESTED_FUNCTIONS
++/*-
++ * SPDX-License-Identifier: BSD-3-Clause
++ *
++ * Copyright (c) 1992, 1993
++ * The Regents of the University of California. All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ * notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ * notice, this list of conditions and the following disclaimer in the
++ * documentation and/or other materials provided with the distribution.
++ * 3. Neither the name of the University nor the names of its contributors
++ * may be used to endorse or promote products derived from this software
++ * without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
++ * SUCH DAMAGE.
++ */
++
++typedef int cmp_t(void *, const void *, const void *);
++static inline char *med3(char *, char *, char *, cmp_t *, void *);
++
++#define MIN(a, b) ((a) < (b) ? a : b)
++
++/*
++ * Qsort routine from Bentley & McIlroy's "Engineering a Sort Function".
++ */
+
+-void
+-sort_r(void *base, size_t nel, size_t width,
+- int (*compar)(const void *a1, const void *a2, void *aarg), void *arg)
+-{ int nested_cmp(const void *a, const void *b)
+- {
+- return compar(a, b, arg);
+- }
++static inline void
++swapfunc(char *a, char *b, size_t es)
++{
++ char t;
+
+- qsort(base, nel, width, nested_cmp);
++ do {
++ t = *a;
++ *a++ = *b;
++ *b++ = t;
++ } while (--es > 0);
+ }
+
+-#else
++#define vecswap(a, b, n) \
++ if ((n) > 0) swapfunc(a, b, n)
+
+-static void *sort_r_ctx;
+-static int (*sort_r_compar)(const void *a1, const void *a2, void *aarg);
++#define CMP(t, x, y) (cmp((t), (x), (y)))
+
+-int
+-nested_cmp(const void *a, const void *b)
+-{ return (*sort_r_compar)(a, b, sort_r_ctx);
++static inline char *
++med3(char *a, char *b, char *c, cmp_t *cmp, void *thunk
++)
++{
++ return CMP(thunk, a, b) < 0 ?
++ (CMP(thunk, b, c) < 0 ? b : (CMP(thunk, a, c) < 0 ? c : a ))
++ :(CMP(thunk, b, c) > 0 ? b : (CMP(thunk, a, c) < 0 ? a : c ));
+ }
+
+ void
+-sort_r(void *base, size_t nel, size_t width,
+- int (*compar)(const void *a1, const void *a2, void *aarg), void *arg)
+-{ PL_LOCK(L_SORTR);
+- sort_r_ctx = arg;
+- sort_r_compar = compar;
+-
+- qsort(base, nel, width, nested_cmp);
+- PL_UNLOCK(L_SORTR);
++qsort_r(void *a, size_t n, size_t es, void *thunk, cmp_t *cmp)
++{
++ char *pa, *pb, *pc, *pd, *pl, *pm, *pn;
++ size_t d1, d2;
++ int cmp_result;
++ int swap_cnt;
++
++loop:
++ swap_cnt = 0;
++ if (n < 7) {
++ for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es)
++ for (pl = pm;
++ pl > (char *)a && CMP(thunk, pl - es, pl) > 0;
++ pl -= es)
++ swapfunc(pl, pl - es, es);
++ return;
++ }
++ pm = (char *)a + (n / 2) * es;
++ if (n > 7) {
++ pl = a;
++ pn = (char *)a + (n - 1) * es;
++ if (n > 40) {
++ size_t d = (n / 8) * es;
++
++ pl = med3(pl, pl + d, pl + 2 * d, cmp, thunk);
++ pm = med3(pm - d, pm, pm + d, cmp, thunk);
++ pn = med3(pn - 2 * d, pn - d, pn, cmp, thunk);
++ }
++ pm = med3(pl, pm, pn, cmp, thunk);
++ }
++ swapfunc(a, pm, es);
++ pa = pb = (char *)a + es;
++
++ pc = pd = (char *)a + (n - 1) * es;
++ for (;;) {
++ while (pb <= pc && (cmp_result = CMP(thunk, pb, a)) <= 0) {
++ if (cmp_result == 0) {
++ swap_cnt = 1;
++ swapfunc(pa, pb, es);
++ pa += es;
++ }
++ pb += es;
++ }
++ while (pb <= pc && (cmp_result = CMP(thunk, pc, a)) >= 0) {
++ if (cmp_result == 0) {
++ swap_cnt = 1;
++ swapfunc(pc, pd, es);
++ pd -= es;
++ }
++ pc -= es;
++ }
++ if (pb > pc)
++ break;
++ swapfunc(pb, pc, es);
++ swap_cnt = 1;
++ pb += es;
++ pc -= es;
++ }
++ if (swap_cnt == 0) { /* Switch to insertion sort */
++ for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es)
++ for (pl = pm;
++ pl > (char *)a && CMP(thunk, pl - es, pl) > 0;
++ pl -= es)
++ swapfunc(pl, pl - es, es);
++ return;
++ }
++
++ pn = (char *)a + n * es;
++ d1 = MIN(pa - (char *)a, pb - pa);
++ vecswap(a, pb - d1, d1);
++ d1 = MIN(pd - pc, pn - pd - es);
++ vecswap(pb, pn - d1, d1);
++
++ d1 = pb - pa;
++ d2 = pd - pc;
++ if (d1 <= d2) {
++ /* Recurse on left partition, then iterate on right partition */
++ if (d1 > es) {
++ qsort_r(a, d1 / es, es, thunk, cmp);
++ }
++ if (d2 > es) {
++ /* Iterate rather than recurse to save stack space */
++ /* qsort(pn - d2, d2 / es, es, cmp); */
++ a = pn - d2;
++ n = d2 / es;
++ goto loop;
++ }
++ } else {
++ /* Recurse on right partition, then iterate on left partition */
++ if (d2 > es) {
++ qsort_r(pn - d2, d2 / es, es, thunk, cmp);
++ }
++ if (d1 > es) {
++ /* Iterate rather than recurse to save stack space */
++ /* qsort(a, d1 / es, es, cmp); */
++ n = d1 / es;
++ goto loop;
++ }
++ }
+ }
+
+-#endif
++#define HAVE_QSORT_R
+
+-#else /*HAVE_QSORT_R|HAVE_QSORT_S*/
++#endif /* !defined(HAVE_QSORT_R) && !defined(HAVE_QSORT_S) */
+
+ #ifndef QSORT_R_GNU
+ struct sort_r_data
+@@ -132,6 +266,3 @@ sort_r(void *base, size_t nel, size_t wi
+ qsort_s(base, nel, width, &sort_r_arg_swap, &tmp);
+ #endif
+ }
+-
+-#endif /*HAVE_QSORT_R|HAVE_QSORT_S*/
+-
diff --git a/lang/swi-prolog-lite/patches/patch-src_pl-thread.c b/lang/swi-prolog-lite/patches/patch-src_pl-thread.c
new file mode 100644
index 00000000000..fc9bdf706e8
--- /dev/null
+++ b/lang/swi-prolog-lite/patches/patch-src_pl-thread.c
@@ -0,0 +1,22 @@
+$NetBSD: patch-src_pl-thread.c,v 1.1 2018/12/10 14:59:50 leot Exp $
+
+Add support for NetBSD pthread_setname_np(3).
+
+--- src/pl-thread.c.orig 2018-01-12 12:04:38.000000000 +0000
++++ src/pl-thread.c
+@@ -1635,10 +1635,15 @@ set_os_thread_name_from_charp(const char
+ if ( pthread_setname_np(name) == 0 )
+ return TRUE;
+ #else
++#if defined(__NetBSD__)
++ if ( pthread_setname_np(pthread_self(), "%s", (void *)name) == 0 )
++ return TRUE;
++#else
+ if ( pthread_setname_np(pthread_self(), name) == 0 )
+ return TRUE;
+ #endif
+ #endif
++#endif
+ return FALSE;
+ }
+