diff options
author | Keri Harris <keri@gentoo.org> | 2006-08-30 10:07:44 +0000 |
---|---|---|
committer | Keri Harris <keri@gentoo.org> | 2006-08-30 10:07:44 +0000 |
commit | 741ebd46e60d7ea1f0367e6390870eab07363b0a (patch) | |
tree | e416a9da693f33e8ea3de0fd5a1ed248569edbe4 /dev-lang/swi-prolog | |
parent | Stable for x86. See bug #145571 (diff) | |
download | gentoo-2-741ebd46e60d7ea1f0367e6390870eab07363b0a.tar.gz gentoo-2-741ebd46e60d7ea1f0367e6390870eab07363b0a.tar.bz2 gentoo-2-741ebd46e60d7ea1f0367e6390870eab07363b0a.zip |
Refactor build process in order to avoid lengthy autoconf runs.
(Portage version: 2.1.1_rc1-r1)
Diffstat (limited to 'dev-lang/swi-prolog')
16 files changed, 1063 insertions, 1 deletions
diff --git a/dev-lang/swi-prolog/ChangeLog b/dev-lang/swi-prolog/ChangeLog index 2d12a54e9862..3a853503ab62 100644 --- a/dev-lang/swi-prolog/ChangeLog +++ b/dev-lang/swi-prolog/ChangeLog @@ -1,6 +1,19 @@ # ChangeLog for dev-lang/swi-prolog # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/swi-prolog/ChangeLog,v 1.28 2006/08/28 10:29:02 keri Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/swi-prolog/ChangeLog,v 1.29 2006/08/30 10:07:44 keri Exp $ + +*swi-prolog-5.6.17-r1 (30 Aug 2006) + + 30 Aug 2006; keri <keri@gentoo.org> +files/swi-prolog-CFLAGS-r1.patch, + +files/swi-prolog-PLBASE-r1.patch, +files/swi-prolog-cppproxy.patch, + +files/swi-prolog-db-docs.patch, +files/swi-prolog-db-versioned.patch, + +files/swi-prolog-jpl-install.patch, +files/swi-prolog-jpl-ppc.patch, + +files/swi-prolog-libtai.patch, +files/swi-prolog-ltx2htm.patch, + +files/swi-prolog-portage.patch, + +files/swi-prolog-semweb-sparc-alignment.patch, + +files/swi-prolog-thread-tests.patch, +files/swi-prolog-xpce-test.patch, + +swi-prolog-5.6.17-r1.ebuild: + Refactor build process in order to avoid lengthy autoconf runs. 28 Aug 2006; keri <keri@gentoo.org> files/swi-prolog-packages-test.patch: Handle single-threaded check for X server. Bug #144665. diff --git a/dev-lang/swi-prolog/files/digest-swi-prolog-5.6.17-r1 b/dev-lang/swi-prolog/files/digest-swi-prolog-5.6.17-r1 new file mode 100644 index 000000000000..56aaea0e1546 --- /dev/null +++ b/dev-lang/swi-prolog/files/digest-swi-prolog-5.6.17-r1 @@ -0,0 +1,3 @@ +MD5 3858e1f3073deac18ca1f76986f8b69c pl-5.6.17.tar.gz 10652203 +RMD160 7f6786013b43c2e00b8e4a3799cbad1f7cac2fab pl-5.6.17.tar.gz 10652203 +SHA256 4768761ec4ad4c7160373950bc21d6124c3641dfff9dbe5db4dd7c48433e0072 pl-5.6.17.tar.gz 10652203 diff --git a/dev-lang/swi-prolog/files/swi-prolog-CFLAGS-r1.patch b/dev-lang/swi-prolog/files/swi-prolog-CFLAGS-r1.patch new file mode 100644 index 000000000000..101420fec7a5 --- /dev/null +++ b/dev-lang/swi-prolog/files/swi-prolog-CFLAGS-r1.patch @@ -0,0 +1,310 @@ +--- pl-5.6.17.orig/src/configure 2006-07-11 20:31:16.000000000 +1200 ++++ pl-5.6.17/src/configure 2006-08-26 17:49:55.000000000 +1200 +@@ -3807,7 +3807,7 @@ + esac + fi + else +- COFLAGS=$CFLAGS ++ COFLAGS="$CFLAGS -fno-strict-aliasing" + fi + + +@@ -14213,7 +14213,7 @@ + LNLIBS="$LIBS" + fi + +-echo " CFLAGS=$CWFLAGS $COFLAGS $CIFLAGS $CMFLAGS" ++echo " CFLAGS=$CWFLAGS $COFLAGS $CMFLAGS" + echo " LDFLAGS=$LDFLAGS" + echo " LIBS=$LIBS" + +--- pl-5.6.17.orig/src/Makefile.in 2006-07-15 01:51:53.000000000 +1200 ++++ pl-5.6.17/src/Makefile.in 2006-08-26 17:47:12.000000000 +1200 +@@ -69,7 +69,7 @@ + CWFLAGS=@CWFLAGS@ + CIFLAGS=@CIFLAGS@ + CMFLAGS=@CMFLAGS@ +-CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS) ++CFLAGS= $(CWFLAGS) $(COFLAGS) $(CMFLAGS) + LDFLAGS=@LDFLAGS@ + + PLFOREIGN=@PLFOREIGN@ +--- pl-5.6.17.orig/src/rc/Makefile.in 2006-07-11 20:22:28.000000000 +1200 ++++ pl-5.6.17/src/rc/Makefile.in 2006-08-26 17:47:52.000000000 +1200 +@@ -30,7 +30,7 @@ + CIFLAGS=@CIFLAGS@ + CMFLAGS=@CMFLAGS@ + LDFLAGS=@LDFLAGS@ +-CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS) ++CFLAGS= $(CWFLAGS) $(COFLAGS) $(CMFLAGS) + + INSTALL=@INSTALL@ + INSTALL_PROGRAM=@INSTALL_PROGRAM@ +--- pl-5.6.17.orig/src/libtai/Makefile.in 2006-07-11 20:41:05.000000000 +1200 ++++ pl-5.6.17/src/libtai/Makefile.in 2006-08-26 17:52:02.000000000 +1200 +@@ -29,7 +29,7 @@ + CIFLAGS=@CIFLAGS@ + CMFLAGS=@CMFLAGS@ + LDFLAGS=@LDFLAGS@ +-CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS) ++CFLAGS= $(CWFLAGS) $(COFLAGS) $(CMFLAGS) + + INSTALL=@INSTALL@ + INSTALL_PROGRAM=@INSTALL_PROGRAM@ +--- pl-5.6.17.orig/packages/clib/configure 2006-01-11 09:41:55.000000000 +1300 ++++ pl-5.6.17/packages/clib/configure 2006-08-26 16:23:26.000000000 +1200 +@@ -3117,7 +3117,6 @@ + + fi + +-CFLAGS="$CMFLAGS" + # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works + # for constant arguments. Useless! + echo "$as_me:$LINENO: checking for working alloca.h" >&5 +@@ -3709,7 +3708,7 @@ + + + if test ! -z "$GCC"; then +- COFLAGS="-O2 -fno-strict-aliasing" ++ COFLAGS="$CFLAGS -fno-strict-aliasing" + CWFLAGS=-Wall + else + COFLAGS=-O +--- pl-5.6.17.orig/packages/clib/maildrop/rfc2045/configure 2005-07-25 02:37:57.000000000 +1200 ++++ pl-5.6.17/packages/clib/maildrop/rfc2045/configure 2006-08-26 16:31:05.000000000 +1200 +@@ -3155,7 +3155,7 @@ + + if test "$GCC" = yes ; then + CXXFLAGS="$CXXFLAGS -Wall" +- CFLAGS="$CFLAGS -Wall" ++ CFLAGS="$CFLAGS -fpic -Wall" + fi + + +pl-5.6.17/packages/clib/maildrop/rfc822/configure +--- pl-5.6.17.orig/packages/clib/maildrop/rfc822/configure 2005-07-25 02:37:57.000000000 +1200 ++++ pl-5.6.17/packages/clib/maildrop/rfc822/configure 2006-08-26 16:32:11.000000000 +1200 +@@ -3144,7 +3144,7 @@ + + if test "$GCC" = yes ; then + CXXFLAGS="$CXXFLAGS -Wall" +- CFLAGS="$CFLAGS -Wall" ++ CFLAGS="$CFLAGS -fpic -Wall" + fi + + +--- pl-5.6.17.orig/packages/cppproxy/configure 2006-01-23 22:29:29.000000000 +1300 ++++ pl-5.6.17/packages/cppproxy/configure 2006-08-26 16:40:49.000000000 +1200 +@@ -3111,7 +3111,6 @@ + + fi + +-CFLAGS="$CMFLAGS" + # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works + # for constant arguments. Useless! + echo "$as_me:$LINENO: checking for working alloca.h" >&5 +@@ -3703,7 +3702,7 @@ + + + if test ! -z "$GCC"; then +- COFLAGS="-O2 -fno-strict-aliasing" ++ COFLAGS="$CFLAGS -fno-strict-aliasing" + CWFLAGS=-Wall + else + COFLAGS=-O +--- pl-5.6.17.orig/packages/db/configure.in 2006-07-07 23:29:11.000000000 +1200 ++++ pl-5.6.17/packages/db/configure.in 2006-08-26 18:35:22.000000000 +1200 +@@ -93,13 +93,13 @@ + AC_ISC_POSIX + AC_HEADER_STDC + if test ! -z "$GCC"; then +- COFLAGS="-O2 -fno-strict-aliasing" ++ COFLAGS="$CFLAGS -fno-strict-aliasing" + CWFLAGS=-Wall + else + COFLAGS=-O + CWFLAGS= + fi +-CFLAGS="$CMFLAGS $CIFLAGS" ++ + AC_FUNC_ALLOCA + AC_C_BIGENDIAN + +--- pl-5.6.17.orig/packages/jpl/configure.in 2005-01-31 23:47:37.000000000 +1300 ++++ pl-5.6.17/packages/jpl/configure.in 2006-08-26 18:50:11.000000000 +1200 +@@ -70,10 +70,10 @@ + AC_PROG_INSTALL + AC_ISC_POSIX + AC_HEADER_STDC +-CFLAGS="$CMFLAGS" ++ + + if test ! -z "$GCC"; then +- COFLAGS="-O2 -fno-strict-aliasing" ++ COFLAGS="$CFLAGS -fno-strict-aliasing" + CWFLAGS="-Wall -Wno-strict-aliasing" + else + COFLAGS=-O +--- pl-5.6.17.orig/packages/ltx2htm/configure 2004-09-22 02:28:17.000000000 +1200 ++++ pl-5.6.17/packages/ltx2htm/configure 2006-08-26 15:58:58.000000000 +1200 +@@ -1351,6 +1351,7 @@ + CC=$PLLD + LD=$PLLD + LDSOFLAGS=-shared ++CMFLAGS=-fpic + + SO="$PLSOEXT" + +@@ -2925,7 +2926,6 @@ + + fi + +-CFLAGS="$CMFLAGS" + # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works + # for constant arguments. Useless! + echo "$as_me:$LINENO: checking for working alloca.h" >&5 +@@ -3455,7 +3455,7 @@ + + + if test ! -z "$GCC"; then +- COFLAGS=-O2 ++ COFLAGS="$CFLAGS" + CWFLAGS=-Wall + else + COFLAGS=-O +--- pl-5.6.17.orig/packages/nlp/configure 2005-11-26 23:54:48.000000000 +1300 ++++ pl-5.6.17/packages/nlp/configure 2006-08-26 17:33:02.000000000 +1200 +@@ -3111,7 +3111,6 @@ + + fi + +-CFLAGS="$CMFLAGS" + # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works + # for constant arguments. Useless! + echo "$as_me:$LINENO: checking for working alloca.h" >&5 +@@ -3703,7 +3702,7 @@ + + + if test ! -z "$GCC"; then +- COFLAGS="-O2 -fno-strict-aliasing" ++ COFLAGS="$CFLAGS -fno-strict-aliasing" + CWFLAGS=-Wall + else + COFLAGS=-O +--- pl-5.6.17.orig/packages/odbc/configure 2006-02-16 09:48:34.000000000 +1300 ++++ pl-5.6.17/packages/odbc/configure 2006-08-26 17:34:38.000000000 +1200 +@@ -3147,7 +3147,6 @@ + + fi + +-CFLAGS="$CMFLAGS" + # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works + # for constant arguments. Useless! + echo "$as_me:$LINENO: checking for working alloca.h" >&5 +@@ -3739,7 +3738,7 @@ + + + if test ! -z "$GCC"; then +- COFLAGS="-O2 -fno-strict-aliasing" ++ COFLAGS="$CFLAGS -fno-strict-aliasing" + CWFLAGS=-Wall + else + COFLAGS=-O +--- pl-5.6.17.orig/packages/semweb/configure 2006-03-08 03:43:04.000000000 +1300 ++++ pl-5.6.17/packages/semweb/configure 2006-08-26 17:35:48.000000000 +1200 +@@ -3145,7 +3145,6 @@ + + fi + +-CFLAGS="$CMFLAGS" + # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works + # for constant arguments. Useless! + echo "$as_me:$LINENO: checking for working alloca.h" >&5 +@@ -4294,7 +4293,7 @@ + + + if test ! -z "$GCC"; then +- COFLAGS="-O3 -fno-strict-aliasing" ++ COFLAGS="$CFLAGS -fno-strict-aliasing" + CWFLAGS=-Wall + else + COFLAGS=-O +--- pl-5.6.17.orig/packages/sgml/configure 2006-02-04 04:38:50.000000000 +1300 ++++ pl-5.6.17/packages/sgml/configure 2006-08-26 17:37:53.000000000 +1200 +@@ -3184,16 +3184,12 @@ + fi + + if test ! -z "$GCC"; then +- if test $gmake = yes; then +- COFLAGS='$(shell if test -r .coflags; then cat .coflags; else echo "-O2"; fi)' +- else +- COFLAGS="-O2 -fno-strict-aliasing" +- fi ++ COFLAGS="$CFLAGS -fno-strict-aliasing" + CWFLAGS="$CWFLAGS -Wall" + else + COFLAGS=-O + fi +-CFLAGS="$CMFLAGS" ++ + echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 + echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 + if test "${ac_cv_c_bigendian+set}" = set; then +--- pl-5.6.17.orig/packages/ssl/configure 2006-02-04 04:38:50.000000000 +1300 ++++ pl-5.6.17/packages/ssl/configure 2006-08-26 17:40:02.000000000 +1200 +@@ -3147,7 +3147,6 @@ + + fi + +-CFLAGS="$CMFLAGS" + # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works + # for constant arguments. Useless! + echo "$as_me:$LINENO: checking for working alloca.h" >&5 +@@ -3739,7 +3738,7 @@ + + + if test ! -z "$GCC"; then +- COFLAGS="-O2 -fno-strict-aliasing" ++ COFLAGS="$CFLAGS -fno-strict-aliasing" + CWFLAGS=-Wall + else + COFLAGS=-O +--- pl-5.6.17.orig/packages/table/configure 2005-01-31 23:47:37.000000000 +1300 ++++ pl-5.6.17/packages/table/configure 2006-08-26 17:41:22.000000000 +1200 +@@ -3112,7 +3112,6 @@ + + fi + +-CFLAGS="$CMFLAGS" + # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works + # for constant arguments. Useless! + echo "$as_me:$LINENO: checking for working alloca.h" >&5 +@@ -3704,7 +3703,7 @@ + + + if test ! -z "$GCC"; then +- COFLAGS="-O2 -fno-strict-aliasing" ++ COFLAGS="$CFLAGS -fno-strict-aliasing" + CWFLAGS=-Wall + else + COFLAGS=-O +--- pl-5.6.17.orig/packages/xpce/src/configure 2006-04-05 19:29:14.000000000 +1200 ++++ pl-5.6.17/packages/xpce/src/configure 2006-08-26 17:43:18.000000000 +1200 +@@ -4391,7 +4391,7 @@ + fi + + if test ! -z "$GCC"; then +- COFLAGS="-O2 -fno-strict-aliasing" ++ COFLAGS="$CFLAGS -fno-strict-aliasing" + if test "$ac_cv_header_stdc" = "yes" || test "$syslibh" = "yes"; then + CWFLAGS=-Wall + else +@@ -4401,7 +4401,7 @@ + COFLAGS=-O + CWFLAGS= + fi +-CFLAGS="$CMFLAGS" ++ + echo "$as_me:$LINENO: checking for inline" >&5 + echo $ECHO_N "checking for inline... $ECHO_C" >&6 + if test "${ac_cv_c_inline+set}" = set; then diff --git a/dev-lang/swi-prolog/files/swi-prolog-PLBASE-r1.patch b/dev-lang/swi-prolog/files/swi-prolog-PLBASE-r1.patch new file mode 100644 index 000000000000..058427316ae7 --- /dev/null +++ b/dev-lang/swi-prolog/files/swi-prolog-PLBASE-r1.patch @@ -0,0 +1,84 @@ +--- pl-5.6.17.orig/src/rc/Makefile.in 2006-07-11 20:22:28.000000000 +1200 ++++ pl-5.6.17/src/rc/Makefile.in 2006-08-26 19:44:07.000000000 +1200 +@@ -14,7 +14,7 @@ + srcdir=@srcdir@ + @VPATH@ @srcdir@ + bindir=$(exec_prefix)/bin +-PLBASE=$(prefix)/lib/@PL@-$(PLVERSION) ++PLBASE=@libdir@/@PL@-$(PLVERSION) + man_prefix=$(prefix)/man + mansec=1 + lmansec=3 +--- pl-5.6.17.orig/src/Makefile.in 2006-07-15 01:51:53.000000000 +1200 ++++ pl-5.6.17/src/Makefile.in 2006-08-26 19:44:07.000000000 +1200 +@@ -36,6 +36,7 @@ + srcdir=@srcdir@ + @VPATH@ @srcdir@ + bindir=@bindir@ ++libdir=@libdir@ + mandir=@mandir@ + mansec=1 + lmansec=3 +@@ -46,7 +47,7 @@ + PLVERSION=@PLVERSION@ + PL=@PL@@RT@ + PLV=@PL@@RT@-@PLVERSION@ +-PLBASE=$(prefix)/lib/@PL@@RT@-@PLVERSION@ ++PLBASE=$(libdir)/@PL@@RT@-@PLVERSION@ + BOOTFILE=@BOOTFILE@ + + CC=@CC@ +@@ -360,7 +361,7 @@ + $(INSTALL_DATA) libplimp.a $(DESTDIR)$(PLBASE)/lib/$(ARCH) + + idirs:: +- if [ ! -d $(DESTDIR)$(prefix)/lib ]; then $(MKDIR) $(DESTDIR)$(prefix)/lib; fi ++ if [ ! -d $(DESTDIR)$(libdir) ]; then $(MKDIR) $(DESTDIR)$(libdir); fi + if [ ! -d $(DESTDIR)$(PLBASE) ]; then $(MKDIR) $(DESTDIR)$(PLBASE); fi + for d in $(installdirs); do \ + if [ ! -d $(DESTDIR)$(PLBASE)/$$d ]; then \ +@@ -423,7 +424,7 @@ + # runtime-only environment installation + # + +-RTHOME= $(DESTDIR)$(prefix)/lib/$(PLV) ++RTHOME= $(DESTDIR)$(libdir)/$(PLV) + RTDIRS= $(RTHOME) $(RTHOME)/bin $(RTHOME)/lib $(RTHOME)/lib/$(ARCH) \ + $(RTHOME)/man $(RTHOME)/bin/$(ARCH) $(RTHOME)/include + +--- pl-5.6.17.orig/src/configure 2006-07-11 20:31:16.000000000 +1200 ++++ pl-5.6.17/src/configure 2006-08-26 19:56:00.000000000 +1200 +@@ -2546,7 +2546,7 @@ + + + test "x$prefix" = xNONE && prefix=$ac_default_prefix +-PLBASE=$prefix/lib/$PL-$PLVERSION ++PLBASE=$libdir/$PL-$PLVERSION + + + for ac_prog in gmake make +--- pl-5.6.17.orig/packages/Makefile.in 2005-11-13 03:15:23.000000000 +1300 ++++ pl-5.6.17/packages/Makefile.in 2006-08-26 19:44:07.000000000 +1200 +@@ -28,9 +28,10 @@ + prefix=@prefix@ + exec_prefix=@exec_prefix@ + bindir=@bindir@ ++libdir=@libdir@ + PL=@PL@@RT@ + PLVERSION=@PLVERSION@ +-PLBASE=$(prefix)/lib/@PL@-$(PLVERSION) ++PLBASE=$(libdir)/@PL@-$(PLVERSION) + PKGDOC=$(PLBASE)/doc/packages + PLLIBS=@LIBS@ + PLARCH=@ARCH@ +--- pl-5.6.17.orig/packages/ltx2htm/Makefile.in 2005-12-02 21:53:05.000000000 +1300 ++++ pl-5.6.17/packages/ltx2htm/Makefile.in 2006-08-30 20:44:21.000000000 +1200 +@@ -33,7 +33,7 @@ + INSTALL_DATA=@INSTALL_DATA@ + + # Don't change, this is also in latex2html.in! +-LIBDIR=$(prefix)/lib/latex2html ++LIBDIR=@libdir@/latex2html + + OBJ= tex.o psfile.o + LIB= latex2html.pl latex.cmd pl.pl pl.cmd xpce.pl xpce.cmd diff --git a/dev-lang/swi-prolog/files/swi-prolog-cppproxy.patch b/dev-lang/swi-prolog/files/swi-prolog-cppproxy.patch new file mode 100644 index 000000000000..ba18dbbdd7b3 --- /dev/null +++ b/dev-lang/swi-prolog/files/swi-prolog-cppproxy.patch @@ -0,0 +1,11 @@ +--- pl-5.6.7.orig/packages/configure.in 2005-11-30 05:26:17.000000000 +1300 ++++ pl-5.6.7/packages/configure.in 2006-02-15 21:16:23.000000000 +1300 +@@ -54,7 +54,7 @@ + + + if [ -z "$PKG" ]; then +- PKG="clib cpp odbc table xpce sgml sgml/RDF semweb http chr clpqr nlp ssl jpl" ++ PKG="clib cpp cppproxy odbc table xpce sgml sgml/RDF semweb http chr clpqr nlp ssl jpl" + fi + + configoptions="" diff --git a/dev-lang/swi-prolog/files/swi-prolog-db-docs.patch b/dev-lang/swi-prolog/files/swi-prolog-db-docs.patch new file mode 100644 index 000000000000..12b7389fe918 --- /dev/null +++ b/dev-lang/swi-prolog/files/swi-prolog-db-docs.patch @@ -0,0 +1,21 @@ +--- pl-5.6.17.orig/packages/db/Makefile.in 2005-12-15 04:54:38.000000000 +1300 ++++ pl-5.6.17/packages/db/Makefile.in 2006-08-27 10:41:12.000000000 +1200 +@@ -9,6 +9,7 @@ + PL=@PL@ + PLBASE=@PLBASE@ + PLARCH=@PLARCH@ ++PKGDOC=$(PLBASE)/doc/packages + PCEHOME=/staff/jan/src/xpce + DESTDIR= + +@@ -57,6 +58,10 @@ + $(INSTALL) -m 644 $(LIBPL) $(DESTDIR)$(PLBASE)/library + $(PL) -f none -g make -t halt + ++html-install:: ++ mkdir -p $(DESTDIR)$(PKGDOC) ++ $(INSTALL_DATA) $(DOC).html $(DESTDIR)$(PKGDOC) ++ + uninstall: + (cd $(PLBASE)/library && rm -f $(LIBPL)) + $(PL) -f none -g make -t halt diff --git a/dev-lang/swi-prolog/files/swi-prolog-db-versioned.patch b/dev-lang/swi-prolog/files/swi-prolog-db-versioned.patch new file mode 100644 index 000000000000..969a3e851a58 --- /dev/null +++ b/dev-lang/swi-prolog/files/swi-prolog-db-versioned.patch @@ -0,0 +1,31 @@ +--- pl-5.6.17.orig/packages/db/configure.in 2006-07-07 23:29:11.000000000 +1200 ++++ pl-5.6.17/packages/db/configure.in 2006-08-27 11:08:41.000000000 +1200 +@@ -112,20 +112,17 @@ + AC_DEFINE(HAVE_LIBNSL, 1, + [Define if you have the nsl library])) + +-AS_VAR_PUSHDEF([ac_Lib], [ac_cv_lib_$LIBDB''_db_create]) +-AC_CACHE_CHECK([for db_create in -l$LIBDB], ac_Lib, +- [ac_check_lib_save_LIBS=$LIBS ++AC_CHECK_HEADERS(db.h) ++AC_MSG_CHECKING(db_create in -ldb) + LIBS="-l$LIBDB $LIBS" + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <db.h>]], + [[db_create(0,0,0)]])], +- [AS_VAR_SET(ac_Lib, yes) +- LIBS="-l$LIBDB $LIBS" +- HAVEDB=yes], +- [AS_VAR_SET(ac_Lib, no) +- HAVEDB=no]) +-LIBS=$ac_check_lib_save_LIBS]) +- +-AC_CHECK_HEADERS(db.h) ++ [HAVEDB=yes ++ AC_MSG_RESULT(yes) ++ ], ++ [HAVEDB=no ++ AC_MSG_RESULT(no) ++ ]) + + AC_MSG_CHECKING(Whether environment is sane) + if test "$HAVEDB" = "yes"; then diff --git a/dev-lang/swi-prolog/files/swi-prolog-jpl-install.patch b/dev-lang/swi-prolog/files/swi-prolog-jpl-install.patch new file mode 100644 index 000000000000..61e794e2d972 --- /dev/null +++ b/dev-lang/swi-prolog/files/swi-prolog-jpl-install.patch @@ -0,0 +1,11 @@ +--- pl-5.6.16.orig/packages/jpl/Makefile.in 2006-02-04 04:38:49.000000000 +1300 ++++ pl-5.6.16/packages/jpl/Makefile.in 2006-07-08 16:26:06.000000000 +1200 +@@ -157,7 +157,7 @@ + if [ -f examples/java/$$d/$$plfile ]; then \ + $(INSTALL_DATA) examples/java/$$d/$$plfile $(DESTDIR)$(EXJAVA)/$$d ;\ + fi; \ +- $(INSTALL_DATA) examples/java/$$d/$$d.class $(DESTDIR)$(EXJAVA)/$$d ;\ ++ $(INSTALL_DATA) examples/java/$$d/$$d*.class $(DESTDIR)$(EXJAVA)/$$d ;\ + done + $(INSTALL_DATA) examples/java/SemWeb/test.rdf $(DESTDIR)$(EXJAVA)/SemWeb + diff --git a/dev-lang/swi-prolog/files/swi-prolog-jpl-ppc.patch b/dev-lang/swi-prolog/files/swi-prolog-jpl-ppc.patch new file mode 100644 index 000000000000..f132cea2f512 --- /dev/null +++ b/dev-lang/swi-prolog/files/swi-prolog-jpl-ppc.patch @@ -0,0 +1,90 @@ +--- pl-5.6.17.orig/packages/jpl/Makefile.in 2006-02-04 04:38:49.000000000 +1300 ++++ pl-5.6.17/packages/jpl/Makefile.in 2006-08-26 14:24:40.000000000 +1200 +@@ -34,6 +34,7 @@ + JAVA_HOME=@JAVA_HOME@ + JAVAC=@JAVAC@ + JAVALIBS=@JAVALIBS@ ++JAVALDPATH=@JAVALDPATH@ + + DOCTOTEX=$(PCEHOME)/bin/doc2tex + PLTOTEX=$(PCEHOME)/bin/pl2tex +@@ -68,7 +69,7 @@ + ################################################################ + + check:: TestJPL.class +- $(PL) -q -f check.pl -g test,halt -t 'halt(1)' ++ LD_LIBRARY_PATH=$(JAVALDPATH) $(PL) -q -f check.pl -g test,halt -t 'halt(1)' + + TestJPL.class: TestJPL.java + $(JAVAC) -classpath jpl.jar TestJPL.java +pl-5.6.17/packages/jpl/ac/ac_jni_include_dirs.m4 +--- pl-5.6.17.orig/packages/jpl/ac/ac_jni_include_dirs.m4 2006-02-04 04:38:49.000000000 +1300 ++++ pl-5.6.17/packages/jpl/ac/ac_jni_include_dirs.m4 2006-08-26 10:16:50.000000000 +1200 +@@ -54,19 +54,32 @@ + done + + case "$host_cpu" in +- i?86) _JNI_LIBDIRS="i386" ++ i?86) ++ _JNI_LIBDIRS="lib/i386" + _JNI_LIBSUBDIR="client" + ;; +- x86_64) _JNI_LIBDIRS="amd64" ++ x86_64) ++ _JNI_LIBDIRS="lib/amd64" + _JNI_LIBSUBDIR="server" + ;; +- *) _JNI_LIBDIRS="" ++ powerpc) ++ case "$host_os" in ++ linux*) ++ _JNI_LIBDIRS="bin" ++ _JNI_LIBSUBDIR="classic" ++ ;; ++ *) ++ _JNI_LIBDIRS="" ++ esac ++ ;; ++ *) ++ _JNI_LIBDIRS="" + esac + + for d in $_JNI_LIBDIRS; do +- echo "Trying $_JTOPDIR/jre/lib/$d/$_JNI_LIBSUBDIR" +- if test -d $_JTOPDIR/jre/lib/$d/$_JNI_LIBSUBDIR; then +- JNI_CLIENT_DIRS="$JNI_CLIENT_DIRS $_JTOPDIR/jre/lib/$d/$_JNI_LIBSUBDIR $_JTOPDIR/jre/lib/$d" ++ echo "Trying $_JTOPDIR/jre/$d/$_JNI_LIBSUBDIR" ++ if test -d $_JTOPDIR/jre/$d/$_JNI_LIBSUBDIR; then ++ JNI_CLIENT_DIRS="$JNI_CLIENT_DIRS $_JTOPDIR/jre/$d/$_JNI_LIBSUBDIR $_JTOPDIR/jre/$d" + fi + done + +pl-5.6.17/packages/jpl/configure.in +--- pl-5.6.17.orig/packages/jpl/configure.in 2005-01-31 23:47:37.000000000 +1300 ++++ pl-5.6.17/packages/jpl/configure.in 2006-08-26 18:50:11.000000000 +1200 +@@ -18,6 +18,7 @@ + AC_SUBST(LDSOFLAGS) + AC_SUBST(JAVA_HOME) + AC_SUBST(JAVALIBS) ++AC_SUBST(JAVALDPATH) + + AC_ARG_ENABLE(mt, [ --enable-mt Enable Multi-threading], + [case "$enableval" in +@@ -84,6 +85,9 @@ + *darwin*) + JAVALIBS="-Wl,-framework,JavaVM" + ;; ++ *powerpc-linux*) ++ JAVALIBS="-ljava -ljvm" ++ ;; + *) + JAVALIBS="-ljava -lverify -ljvm" + ;; +@@ -128,6 +132,7 @@ + + for d in $JNI_CLIENT_DIRS; do + LDSOFLAGS="$LDSOFLAGS -L$d" ++ JAVALDPATH="$JAVALDPATH:$d" + done + + if test "$java_abs_paths" = yes; then diff --git a/dev-lang/swi-prolog/files/swi-prolog-libtai.patch b/dev-lang/swi-prolog/files/swi-prolog-libtai.patch new file mode 100644 index 000000000000..1d6be873a74c --- /dev/null +++ b/dev-lang/swi-prolog/files/swi-prolog-libtai.patch @@ -0,0 +1,11 @@ +--- pl-5.6.17.orig/src/pl-tai.c 2006-07-28 21:20:12.000000000 +1200 ++++ pl-5.6.17/src/pl-tai.c 2006-08-30 21:55:37.000000000 +1200 +@@ -664,7 +664,7 @@ + break; + case '+': + { char buf[26]; +- ++ cal_ftm(ftm, HAS_WYDAY); + asctime_r(&ftm->tm, buf); + buf[24] = EOS; + OUTSTR(buf); diff --git a/dev-lang/swi-prolog/files/swi-prolog-ltx2htm.patch b/dev-lang/swi-prolog/files/swi-prolog-ltx2htm.patch new file mode 100644 index 000000000000..de6df69900de --- /dev/null +++ b/dev-lang/swi-prolog/files/swi-prolog-ltx2htm.patch @@ -0,0 +1,68 @@ +--- pl-5.6.4.orig/packages/ltx2htm/doc2tex 1997-01-21 06:39:40.000000000 +1300 ++++ pl-5.6.4/packages/ltx2htm/doc2tex 2006-02-13 23:29:54.000000000 +1300 +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/perl ++#!/usr/bin/perl + + sub printTeX + { s/`([@\w]+)\s*<->(\w+)/\\index{\l\1,\\both{\2}}`\1 \\both{\2}/g; +--- pl-5.6.17.orig/packages/ltx2htm/Makefile.in 2005-12-02 21:53:05.000000000 +1300 ++++ pl-5.6.17/packages/ltx2htm/Makefile.in 2006-08-26 16:12:20.000000000 +1200 +@@ -11,9 +11,11 @@ + + MAKE=@MAKE@ + +-PL=@PL@ ++PL=../@PL@.sh ++PLBASE=@PLBASE@ + PLARCH=@PLARCH@ + PLHOME=@PLHOME@ ++PKGDOC=$(PLBASE)/doc/packages + prefix=@prefix@ + exec_prefix=@exec_prefix@ + bindir=@bindir@ +@@ -38,32 +40,29 @@ + OBJ= tex.o psfile.o + LIB= latex2html.pl latex.cmd pl.pl pl.cmd xpce.pl xpce.cmd + +-all: +- @echo "===============================================================" +- @echo "Usage:" +- @echo "" +- @echo "$(MAKE) install Install the package" +- @echo "$(MAKE) html Translate the documentation into HTML" +- @echo "$(MAKE) dvi Translate the documentation into DVI" +- @echo "===============================================================" ++all: tex.@SO@ + + install: tex.@SO@ +- mkdir -p $(DESTDIR)$(LIBDIR)/lib/$(PLARCH) +- $(INSTALL_DATA) tex.@SO@ $(DESTDIR)$(LIBDIR)/lib/$(PLARCH) +- $(INSTALL_PROGRAM) latex2html $(DESTDIR)$(bindir) +- for f in $(LIB); do $(INSTALL_DATA) $$f $(DESTDIR)$(LIBDIR); done +- mkdir -p $(DESTDIR)$(LIBDIR)/icons +- for f in icons/*.gif; do $(INSTALL_DATA) $$f $(DESTDIR)$(LIBDIR)/icons; done ++ mkdir -p $(DESTDIR)$(PLBASE)/lib/$(PLARCH) ++ $(INSTALL_DATA) -m 755 tex.@SO@ $(DESTDIR)$(PLBASE)/lib/$(PLARCH) ++ mkdir -p $(DESTDIR)$(PLBASE)/library ++ for f in $(LIB); do $(INSTALL_DATA) $$f $(DESTDIR)$(PLBASE)/library; done + + tex.@SO@: $(OBJ) + $(LD) $(LDFLAGS) -o $@ $(OBJ) + ++html-install: html ++ mkdir -p $(DESTDIR)$(PKGDOC)/latex2html ++ for f in manual/*; do $(INSTALL_DATA) $$f $(DESTDIR)$(PKGDOC)/latex2html; done ++ ++check:: ++ + ################################################################ + # Documentation + ################################################################ + + html: manual.tex +- latex2html manual ++ $(PL) -p library=. -f none -g "assert(user:file_search_path(foreign, '.')),load_files(library(latex2html),[silent(true)]),latex2html('manual.tex')" -t halt + + dvi: manual.tex + latex manual diff --git a/dev-lang/swi-prolog/files/swi-prolog-portage.patch b/dev-lang/swi-prolog/files/swi-prolog-portage.patch new file mode 100644 index 000000000000..9e5d6a15fd6b --- /dev/null +++ b/dev-lang/swi-prolog/files/swi-prolog-portage.patch @@ -0,0 +1,40 @@ +--- pl-5.6.4.orig/packages/Makefile.in 2005-11-13 03:15:23.000000000 +1300 ++++ pl-5.6.4/packages/Makefile.in 2006-02-13 23:09:00.000000000 +1300 +@@ -76,7 +76,7 @@ + + install:: + for p in $(PKG); do \ +- if [ -r $$p/Makefile ]; then ( cd $$p && $(MAKE) $@ ); fi; \ ++ if [ -r $$p/Makefile ]; then $(MAKE) -C $$p $@ || exit 1; fi; \ + done + @echo "*** Forcing update of library index ***" + rm -f $(DESTDIR)$(PLLIB)/INDEX.pl +@@ -110,7 +110,7 @@ + echo "**********************"; \ + echo "* Package $$p"; \ + echo "**********************"; \ +- ( cd $$p && $(CONFIG) ); \ ++ ( cd $$p && $(CONFIG) ) || exit 1; \ + fi; \ + done + +@@ -127,7 +127,7 @@ + + check:: + for p in $(PKG); do \ +- if [ -r $$p/Makefile ]; then ( cd $$p && $(MAKE) $@ ); fi; \ ++ if [ -r $$p/Makefile ]; then $(MAKE) -C $$p $@ || exit 1; fi; \ + done + + # test environment +--- pl-5.6.17.orig/packages/db/Makefile.in 2005-12-15 04:54:38.000000000 +1300 ++++ pl-5.6.17/packages/db/Makefile.in 2006-08-27 10:42:25.000000000 +1200 +@@ -61,6 +61,8 @@ + (cd $(PLBASE)/library && rm -f $(LIBPL)) + $(PL) -f none -g make -t halt + ++check:: ++ + ################################################################ + # Documentation + ################################################################ diff --git a/dev-lang/swi-prolog/files/swi-prolog-semweb-sparc-alignment.patch b/dev-lang/swi-prolog/files/swi-prolog-semweb-sparc-alignment.patch new file mode 100644 index 000000000000..b73480777523 --- /dev/null +++ b/dev-lang/swi-prolog/files/swi-prolog-semweb-sparc-alignment.patch @@ -0,0 +1,14 @@ +--- pl-5.6.17.orig/packages/semweb/avl.h 2006-03-07 04:23:47.000000000 +1300 ++++ pl-5.6.17/packages/semweb/avl.h 2006-08-15 21:59:09.000000000 +1200 +@@ -58,7 +58,11 @@ + /* structure for a node in an AVL tree */ + typedef struct avl_node + { struct avl_node *subtree[2]; /* LEFT and RIGHT subtrees */ ++#ifndef __sparc__ + short bal; /* balance factor */ ++#else ++ long bal; /* balance factor */ ++#endif + char data[1]; /* data on my back */ + } AVLnode, *AVLtree; + diff --git a/dev-lang/swi-prolog/files/swi-prolog-thread-tests.patch b/dev-lang/swi-prolog/files/swi-prolog-thread-tests.patch new file mode 100644 index 000000000000..150b10e95bfb --- /dev/null +++ b/dev-lang/swi-prolog/files/swi-prolog-thread-tests.patch @@ -0,0 +1,61 @@ +--- pl-5.6.17.orig/packages/clib/testsocket.pl 2004-09-22 02:28:16.000000000 +1200 ++++ pl-5.6.17/packages/clib/testsocket.pl 2006-08-27 09:57:19.000000000 +1200 +@@ -35,6 +35,12 @@ + client/1 % +Address + ]). + ++:- ( current_prolog_flag(system_thread_id, _) ++ -> true ++ ; format('Disabling tcp_test on single-threaded engine~n~n', []), ++ halt ++ ). ++ + :- asserta(user:file_search_path(foreign, '.')). + + :- use_module(socket). +--- pl-5.6.17.orig/packages/semweb/litmap_test.pl 2006-03-07 02:17:30.000000000 +1300 ++++ pl-5.6.17/packages/semweb/litmap_test.pl 2006-08-27 10:13:14.000000000 +1200 +@@ -3,6 +3,13 @@ + test/1, + test/2 + ]). ++ ++:- ( current_prolog_flag(system_thread_id, _) ++ -> true ++ ; format('Disabling literal map test on single-threaded engine~n~n', []), ++ halt ++ ). ++ + :- use_module(library(debug)). + :- use_module(library(debug)). + :- asserta(user:file_search_path(foreign, '../sgml')). +--- pl-5.6.17.orig/packages/semweb/rdf_db_test.pl 2006-03-09 03:32:48.000000000 +1300 ++++ pl-5.6.17/packages/semweb/rdf_db_test.pl 2006-08-27 10:11:29.000000000 +1200 +@@ -5,6 +5,12 @@ + Copyright (C) 1996 University of Amsterdam. All rights reserved. + */ + ++:- ( current_prolog_flag(system_thread_id, _) ++ -> true ++ ; format('Disabling RDF_DB test suite on single-threaded engine~n~n', []), ++ halt ++ ). ++ + :- asserta(file_search_path(foreign, '../sgml')). + :- asserta(file_search_path(library, '../sgml')). + :- asserta(file_search_path(library, '../sgml/RDF')). +--- pl-5.6.17.orig/packages/ssl/ssl_test.pl 2006-06-21 19:51:59.000000000 +1200 ++++ pl-5.6.17/packages/ssl/ssl_test.pl 2006-08-27 10:17:41.000000000 +1200 +@@ -29,6 +29,12 @@ + the GNU General Public License. + */ + ++:- ( current_prolog_flag(system_thread_id, _) ++ -> true ++ ; format('Disabling SSL test on single-threaded engine~n~n', []), ++ halt ++ ). ++ + :- asserta(user:file_search_path(foreign, '.')). + + :- use_module(ssl). diff --git a/dev-lang/swi-prolog/files/swi-prolog-xpce-test.patch b/dev-lang/swi-prolog/files/swi-prolog-xpce-test.patch new file mode 100644 index 000000000000..4983b0baae66 --- /dev/null +++ b/dev-lang/swi-prolog/files/swi-prolog-xpce-test.patch @@ -0,0 +1,154 @@ +--- pl-5.6.17.orig/packages/xpce/src/Makefile.in 2006-07-28 08:29:29.000000000 +1200 ++++ pl-5.6.17/packages/xpce/src/Makefile.in 2006-08-27 10:22:16.000000000 +1200 +@@ -125,6 +125,7 @@ + PLBINDIR=$(PLBASE)/bin/$(PLARCH) + PL=@PL@ + PLBUILD=@PLBUILD@ ++PCEBUILD=$(PCEHOME)/src/xpce.sh + PLNAME=@PLNAME@ + PLLD=@PLLD@ + +@@ -897,7 +898,8 @@ + ################################################################ + + check:: +- $(PLBUILD) -q -g "['../src/test.pl'],test,halt" -t 'halt(1)' ++ $(PCEBUILD) -q -g "['./find_display.pl'],find_display,halt" -t 'halt(0)' ++ $(PCEBUILD) -q -g "['../src/test.pl'],test,halt" -t 'halt(1)' + + + ################################################################ +--- pl-5.6.17.orig/packages/xpce/src/find_display.pl 1970-01-01 12:00:00.000000000 +1200 ++++ pl-5.6.17/packages/xpce/src/find_display.pl 2006-08-28 21:47:54.000000000 +1200 +@@ -0,0 +1,13 @@ ++:- asserta(library_directory('../prolog/lib')). ++:- use_module(library(pce)). ++ ++find_display :- ++ current_input(InputStream), ++ open_null_stream(NullStream), ++ set_prolog_IO(InputStream, NullStream, NullStream), ++ ( exists_file('display_exists') ++ -> delete_file('display_exists') ++ ; true), ++ get(@display, visual_type, _), ++ open('display_exists', update, Fd), ++ close(Fd). +--- pl-5.6.17.orig/packages/xpce/src/test.pl 2006-03-30 01:42:18.000000000 +1200 ++++ pl-5.6.17/packages/xpce/src/test.pl 2006-08-28 21:47:10.000000000 +1200 +@@ -35,11 +35,23 @@ + ?- test. + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ + ++:- asserta(library_directory('../prolog/lib')). ++:- use_module(library(pce)). ++:- use_module(library(pce_util)). ++ + :- get(@pce, version, V), + format('XPCE/SWI-Prolog test suite. (XPCE version ~w)~n\ + To run all tests run ?- test.~n~n', [V]). + ++:- dynamic ++ display_enabled/0. + ++:- format('Checking for usable X server~n', []), ++ ( exists_file('display_exists') ++ -> format('X server found.~n~n', []), ++ assert(display_enabled) ++ ; format('No usable X server found. Some tests are disabled.~n~n', []) ++ ). + + /******************************* + * NAMES * +@@ -163,12 +175,12 @@ + *******************************/ + + srcsink(contents-1) :- +- numlist(32, 1000, L), ++ numlist(32, 255, L), + tmp_file(test, Tmp), +- open(Tmp, write, Out, [encoding(utf8)]), ++ open(Tmp, write, Out, [encoding(iso_latin_1)]), + maplist(put_code(Out), L), + close(Out), +- new(File, file(Tmp, utf8)), ++ new(File, file(Tmp, iso_latin_1)), + get(File, contents, String), + delete_file(Tmp), + get(String, value, Atom), +@@ -193,7 +205,7 @@ + *******************************/ + + foreign(Name) :- +- atom_codes(Name, [1087, 1083, 1072, 1090, 1085, 1072, 1103]). ++ atom_codes(Name, [102, 105, 108, 101, 110, 97, 109, 101]). + + file(env-1) :- + new(F, file('$PCEHOME/Defaults')), +@@ -202,11 +214,6 @@ + get(F, name, PceName), + same_file(PceName, PlName), + send(F, same, PlName). +-file(home-1) :- +- new(F, file('~/foobar')), +- get(F, name, PceName), +- expand_file_name('~/foobar', [PlName]), +- same_file(PceName, PlName). + file(abs-1) :- + new(F, file(foobar)), + get(F, absolute_path, Abs), +@@ -221,13 +228,15 @@ + -> send(file(F), exists) + ; \+ send(file(F), exists) + )). +-file(utf8-1) :- ++file(ascii-1) :- + foreign(Name), + new(F, file(Name)), ++ send(F, encoding, iso_latin_1), + send(F, open, write), + send(F, append, 'Hello world\n'), + send(F, close), + new(F2, file(Name)), ++ send(F2, encoding, iso_latin_1), + exists_file(Name), + send(F2, exists), + get(F2, contents, string('Hello world\n')), +@@ -312,12 +321,12 @@ + atom_concat(hello, Wide, New). + textbuffer(file-1) :- + new(TB, text_buffer), +- numlist(32, 1000, L), ++ numlist(32, 255, L), + atom_codes(WAtom, L), + send(TB, append, WAtom), + tmp_file(test, Tmp), +- send(TB, save, file(Tmp, utf8)), +- get(file(Tmp, utf8), contents, string(Copy)), ++ send(TB, save, file(Tmp, iso_latin_1)), ++ get(file(Tmp, iso_latin_1), contents, string(Copy)), + delete_file(Tmp), + Copy == WAtom. + textbuffer(store-1) :- +@@ -635,6 +644,10 @@ + testset(regex). % Regular expression matches + testset(type). % Check type logic + ++display_required(bom). ++display_required(selection). ++display_required(image). ++ + % testdir(Dir) + % + % Enumerate directories holding tests. +@@ -683,6 +696,10 @@ + ). + + runtest(Name) :- ++ display_required(Name), ++ \+display_enabled, ++ format('Disabling test set "~w"~n', [Name]). ++runtest(Name) :- + format('Running test set "~w" ', [Name]), + flush, + functor(Head, Name, 1), diff --git a/dev-lang/swi-prolog/swi-prolog-5.6.17-r1.ebuild b/dev-lang/swi-prolog/swi-prolog-5.6.17-r1.ebuild new file mode 100644 index 000000000000..a89147755607 --- /dev/null +++ b/dev-lang/swi-prolog/swi-prolog-5.6.17-r1.ebuild @@ -0,0 +1,140 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/swi-prolog/swi-prolog-5.6.17-r1.ebuild,v 1.1 2006/08/30 10:07:44 keri Exp $ + +inherit autotools eutils + +DESCRIPTION="free, small, and standard compliant Prolog compiler" +HOMEPAGE="http://www.swi-prolog.org/" +SRC_URI="http://gollem.science.uva.nl/cgi-bin/nph-download/SWI-Prolog/pl-${PV}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~ppc ~ppc-macos ~sparc ~x86" +IUSE="berkdb doc gmp java minimal odbc readline ssl static tetex threads X" + +DEPEND="!dev-lang/swi-prolog-lite + sys-libs/ncurses + odbc? ( dev-db/unixODBC ) + berkdb? ( sys-libs/db ) + readline? ( sys-libs/readline ) + gmp? ( dev-libs/gmp ) + ssl? ( dev-libs/openssl ) + java? ( >=virtual/jdk-1.4 ) + X? ( media-libs/jpeg + || ( ( + x11-libs/libX11 + x11-libs/libXft + x11-libs/libXpm + x11-libs/libXt + x11-libs/libICE + x11-libs/libSM + x11-proto/xproto ) + virtual/x11 ) )" + +S="${WORKDIR}/pl-${PV}" + +src_unpack() { + unpack ${A} + cd "${S}" + + sed -i -e "s/man boot library/boot library/" src/Makefile.in + epatch "${FILESDIR}"/${PN}-portage.patch + epatch "${FILESDIR}"/${PN}-CFLAGS-r1.patch + epatch "${FILESDIR}"/${PN}-PLBASE-r1.patch + epatch "${FILESDIR}"/${PN}-test_date.patch + epatch "${FILESDIR}"/${PN}-cppproxy.patch + epatch "${FILESDIR}"/${PN}-db-versioned.patch + epatch "${FILESDIR}"/${PN}-db-docs.patch + epatch "${FILESDIR}"/${PN}-jpl-ppc.patch + epatch "${FILESDIR}"/${PN}-jpl-install.patch + epatch "${FILESDIR}"/${PN}-libtai.patch + epatch "${FILESDIR}"/${PN}-ltx2htm.patch + epatch "${FILESDIR}"/${PN}-semweb-sparc-alignment.patch + epatch "${FILESDIR}"/${PN}-thread-tests.patch + epatch "${FILESDIR}"/${PN}-xpce-test.patch +} + +src_compile() { + einfo "Building SWI-Prolog compiler" + + local threadconf + if use java && ! use minimal || use threads ; then + threadconf="--enable-mt" + else + threadconf="--disable-mt" + fi + + cd "${S}"/src + econf \ + --libdir=/usr/$(get_libdir) \ + ${threadconf} \ + $(use_enable gmp) \ + $(use_enable readline) \ + $(use_enable !static shared) \ + --disable-custom-flags \ + || die "econf failed" + emake -j1 || die "emake failed" + + if ! use minimal ; then + einfo "Building SWI-Prolog additional packages" + + for package in db jpl + do + cd "${S}/packages/${package}" + eautoreconf + done + + cd "${S}/packages" + econf \ + --libdir=/usr/$(get_libdir) \ + ${threadconf} \ + $(use_enable !static shared) \ + --without-C-sicstus \ + --with-chr \ + --with-clib \ + --with-clpqr \ + --with-cpp \ + --with-cppproxy \ + $(use_with berkdb db) \ + --with-http \ + --without-jasmine \ + $(use_with java jpl) \ + $(use_with tetex ltx2htm) \ + --with-nlp \ + $(use_with odbc) \ + --with-semweb \ + --with-sgml \ + --with-sgml/RDF \ + $(use_with ssl) \ + --with-table \ + $(use_with X xpce) \ + || die "packages econf failed" + + emake -j1 || die "packages emake failed" + fi +} + +src_install() { + make -C src DESTDIR="${D}" install || die "install src failed" + + if ! use minimal ; then + make -C packages DESTDIR="${D}" install || die "install packages failed" + if use doc ; then + make -C packages DESTDIR="${D}" html-install || die "html-install failed" + make -C packages/cppproxy DESTDIR="${D}" install-examples || die "install-examples failed" + fi + fi + + dodoc ANNOUNCE ChangeLog INSTALL INSTALL.notes PORTING README README.GUI VERSION +} + +src_test() { + cd "${S}/src" + make check || die "make check failed. See above for details." + + if ! use minimal ; then + cd "${S}/packages" + make check || die "make check failed. See above for details." + fi +} |