changeset 75:271cbb745f91

Updated for >=7.3.8
author samer
date Mon, 05 Oct 2015 00:47:43 +0100
parents 30d5c450cf0a
children 11e07aa6ffae
files src/swipl/build src/swipl/upgrade_swipl
diffstat 2 files changed, 46 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/src/swipl/build	Mon Oct 05 00:47:10 2015 +0100
+++ b/src/swipl/build	Mon Oct 05 00:47:43 2015 +0100
@@ -7,9 +7,9 @@
 
 # [EDIT] Prefix location of the installation. It is _not_ adviced to use
 # a    versioned    prefix.    The    system      will     install    in
-# $PREFIX/lib/pl-<version> and create symlinks from  $PREFIX/bin for the
-# main  programs.  Users  can  always  use  older  versions  by  running
-# $PREFIX/lib/pl-<version>/bin/<arch>/pl
+# $PREFIX/lib/swipl-<version> and create symlinks   from $PREFIX/bin for
+# the main programs. Users can  always   use  older  versions by running
+# $PREFIX/lib/swipl-<version>/bin/<arch>/pl
 #
 # If you change PREFIX such that the system  is installed in a place for
 # which you have no write access, set  SUDO   to  the command to run the
@@ -17,17 +17,20 @@
 # PREFIX to /usr/local you typically must change SUDO to "sudo"
 
 PREFIX=/usr/local
+#SUDO=
 SUDO="sudo"
 
 # [EDIT] Version of make to use.  This   must  be GNU-make. On many Unix
 # systems this is installed as 'gmake'. On most GNU-based systems (e.g.,
 # linux), the default make is GNU-make.  You can use 'make --jobs=<max>'
 # to build the system faster using  all   your  cores. The optimal value
-# depends a lot on your hardware. Using   4 jobs on a dual-core machines
-# seems enough to keep both cores busy.
+# depends a lot on your hardware.   Unfortunately,  not all dependencies
+# are covered by the Makefiles. If your build   fails on what might be a
+# missing dependency, try  re-running  without   --jobs  and  report the
+# issue.
 
-MAKE=make
-# MAKE='make --jobs=4'
+# MAKE=make
+MAKE='make --jobs=8'
 
 # [EDIT] Compiler and options.
 #
@@ -48,13 +51,21 @@
 # export CIFLAGS=
 # export LDFLAGS="-O2 -g"
 
-# On MacOS you need this to  get   some  libraries  from Macports. Since
-# recently, there are three C compilers:   gcc-llvm  and clang come with
-# XCode. Native gcc can  be  installed   in  various  ways  (e.g., using
-# Macports). Current SWI-Prolog sources compile and  work with all these
-# alternatives. If you want the last bit   of performance and don't mind
-# some extra work, get a recent  native   GCC,  set  CC below and enable
-# --enable-useprofile (see below).
+# On MacOS you need this to get  some libraries from Macports. There are
+# three commonly used C compilers on the   Mac:  gcc (based on llvm) and
+# clang that come with XCode and (native) gcc from Macports. The current
+# SWI-Prolog sources compile and work with all these alternatives. There
+# are a few gotchas:
+#
+#   - The ssl package uses the Apple security API that can only be
+#     compiled using the XCode compilers.  Compiled with native
+#     gcc SSL has no access to the OS root certificates and can only
+#     be used without certificate validation or with certificates
+#     explicitly provided by the user.
+#   - If you want the last bit of performance and don't mind some extra
+#     work, get a recent native GCC, set CC below and enable
+#     --enable-useprofile (see below).  You could compile SSL using
+#     the XCode compiler.
 #
 # Recent versions of Quartz  (X11)  seem   to  install  the headers into
 # /opt/X11/include. We put this  after   /opt/local/include,  to use the
@@ -65,10 +76,24 @@
 # $JAVAPREFIX to the bin directory holding =java=.  We try to find it at
 # the most likely places below.
 
+# If you use HomeBrew as your Mac OS package manager, uncomment the
+# following line to use the default installation locations for shared
+# libraries and header files.
+
+# USE_HOMEBREW=yes
+
 if [ "`uname`" = Darwin ]; then
-  export LIBRARY_PATH=/usr/lib:/opt/local/lib
-  export CPATH=/usr/include:/opt/local/include:/opt/X11/include
-  export PKG_CONFIG_PATH=/usr/X11R6/lib/pkgconfig:/opt/local/lib/pkgconfig
+  if [ "x$USE_HOMEBREW" = xyes ]; then
+	  echo USING HOMEBREW PATHS
+      export LIBRARY_PATH=/usr/local/lib:/usr/lib
+      export CPATH=/usr/local/include:/usr/include:/opt/X11/include
+  else
+	  echo USING MACPORTS PATHS
+      export LIBRARY_PATH=/usr/lib:/opt/local/lib:/opt/local/lib/db60
+      export CPATH=/usr/include:/opt/local/include:/opt/local/include/db60:/opt/X11/include
+  fi
+
+  export PKG_CONFIG_PATH=/usr/X11R6/lib/pkgconfig:/opt/local/lib/pkgconfig:/opt/X11/lib/pkgconfig
   if [ -f "$JAVA_HOME/bin/java" ]; then
     export JAVAPREFIX="$JAVA_HOME/bin"
   elif [ -f /Library/Java/Home/bin/java ]; then
@@ -108,10 +133,11 @@
 # export PKG=
 
 # [EDIT] Packages to skip.  Leaving it blank compiles all default packages.
-export DISABLE_PKGS="jasmine PDT R jpl"
+export DISABLE_PKGS="jasmine R PDT tipc jpl"
 
 # [EDIT] Packages to add.
 # export EXTRA_PKGS="db ltx2htm space"
+export EXTRA_PKGS="bdb"
 
 # [EDIT] Where to find the jar for Junit 3.8.  Needed to test jpl
 # export JUNIT=/opt/local/share/java/junit.jar
@@ -154,6 +180,7 @@
 # EXTRACFG+=" --enable-useprofile"
 # EXTRACFG+=" --disable-libdirversion"
 # EXTRACFG+=" --enable-shared"
+EXTRACFG+=--with-odbc=/opt/local
 export EXTRACFG
 
 # One possiblity to make relocatable executables   on  Linux is by using
--- a/src/swipl/upgrade_swipl	Mon Oct 05 00:47:10 2015 +0100
+++ b/src/swipl/upgrade_swipl	Mon Oct 05 00:47:43 2015 +0100
@@ -10,4 +10,4 @@
 cd ~/src/swipl
 curl "http://www.swi-prolog.org/download/devel/src/swipl-$ver.tar.gz" | tar xz
 (cd "swipl-$ver" && cp -p ../http_openid.pl packages/http && cp ../build . && ./build)
-swipl -g "maplist(pack_rebuild,[real,prosqlite,plml,plsmf]), halt"
+swipl -g "pack_rebuild, halt"