diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..318a656 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +Yap-5.1.3.tar.gz +chr_translate_bootstrap1.pl +chr_translate_bootstrap2.pl +chr_translate.pl +guard_entailment.pl +/yap-6.2.0.tar.gz diff --git a/Yap-5.1.3-soname.patch b/Yap-5.1.3-soname.patch new file mode 100644 index 0000000..d05937a --- /dev/null +++ b/Yap-5.1.3-soname.patch @@ -0,0 +1,42 @@ +diff -up Yap-5.1.3/Makefile.in.soname Yap-5.1.3/Makefile.in +--- Yap-5.1.3/Makefile.in.soname 2009-06-15 22:12:57.000000000 +0200 ++++ Yap-5.1.3/Makefile.in 2009-06-15 21:59:18.000000000 +0200 +@@ -578,16 +578,16 @@ startup: yap@EXEC_SUFFIX@ $(PL_SOURCES) + -rm -f startup + echo "bootstrap('$(srcdir)/pl/init.yap'). module(user). save_program(startup)." | @CROSS_SIMULATOR@ ./yap -b $(srcdir)/pl/boot.yap + +-yap@EXEC_SUFFIX@: $(HEADERS) yap.o @YAPLIB@.5.1.3 +- $(MPI_CC) $(STANDARD_CFLAGS) $(LDFLAGS) -o yap yap.o @YAPLIB@.5.1.3 $(LIBS) @MPI_LIBS@ ++yap@EXEC_SUFFIX@: $(HEADERS) yap.o @YAPLIB@ ++ $(MPI_CC) $(STANDARD_CFLAGS) $(LDFLAGS) -o yap yap.o @YAPLIB@ $(LIBS) @MPI_LIBS@ + + libYap.a: $(LIB_OBJECTS) + -rm -f libYap.a + $(AR) rc libYap.a $(LIB_OBJECTS) + $(RANLIB) libYap.a + +-@DYNYAPLIB@.5.1.3: $(LIB_OBJECTS) +- @DYNLIB_LD@ -Wl,-soname=@YAPLIB@.5.1.3 -o @YAPLIB@.5.1.3 $(LIB_OBJECTS) $(LIBS) $(LDFLGS) ++@DYNYAPLIB@: $(LIB_OBJECTS) ++ @DYNLIB_LD@ -o @YAPLIB@ $(LIB_OBJECTS) $(LIBS) $(LDFLGS) + + install: install_bin install_data + +@@ -598,7 +598,7 @@ install_unix: startup libYap.a + $(INSTALL_PROGRAM) -m 755 yap@EXEC_SUFFIX@ $(DESTDIR)$(BINDIR)/yap + mkdir -p $(DESTDIR)$(YAPLIBDIR) + $(INSTALL_DATA) startup $(DESTDIR)$(YAPLIBDIR)/startup +- @INSTALL_DLLS@ $(INSTALL_DATA) -m 755 @YAPLIB@.5.1.3 $(DESTDIR)$(LIBDIR) ++ @INSTALL_DLLS@ $(INSTALL_DATA) -m 755 @YAPLIB@ $(DESTDIR)$(LIBDIR) + mkdir -p $(DESTDIR)$(SHAREDIR)/Yap + mkdir -p $(DESTDIR)$(SHAREDIR)/Yap/pl + mkdir -p $(DESTDIR)$(SHAREDIR)/Yap/swi +@@ -643,7 +643,7 @@ install_win32: startup + (cd library/tries; make install) + @ENABLE_CPLINT@ (cd cplint; make install) + +-install_library: @YAPLIB@.5.1.3 ++install_library: @YAPLIB@ + mkdir -p $(DESTDIR)$(INCLUDEDIR) + for h in $(HEADERS); do $(INSTALL) $$h $(DESTDIR)$(INCLUDEDIR); done + diff --git a/Yap-noni386.patch b/Yap-noni386.patch new file mode 100644 index 0000000..ce01f3f --- /dev/null +++ b/Yap-noni386.patch @@ -0,0 +1,11 @@ +--- Yap-4.5.5/H/absmi.h.noni386 2005-06-18 15:52:24.000000000 +0200 ++++ Yap-4.5.5/H/absmi.h 2005-06-18 15:52:34.000000000 +0200 +@@ -282,7 +282,7 @@ + + #define CACHE_A1() (SREG = (CELL *)ARG1) + +-#define CACHED_A1() ((CELL)SREG) ++#define CACHED_A1() SREG + + #endif /* S_IN_MEM */ + diff --git a/dead.package b/dead.package deleted file mode 100644 index 9ed1316..0000000 --- a/dead.package +++ /dev/null @@ -1 +0,0 @@ -Fails to build with GCC 7, upstream does not respond (bug #1421711). diff --git a/sources b/sources new file mode 100644 index 0000000..ca55625 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +df250bab67a7576ac9293f78156d4ee0 yap-6.2.0.tar.gz diff --git a/yap-6.2.0-Do-not-install-README-etc.patch b/yap-6.2.0-Do-not-install-README-etc.patch new file mode 100644 index 0000000..b5a4b57 --- /dev/null +++ b/yap-6.2.0-Do-not-install-README-etc.patch @@ -0,0 +1,26 @@ +From d9acef3be4ca926d0f138184535e3f16b15d6045 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Wed, 22 Dec 2010 09:31:28 +0100 +Subject: [PATCH] Do not install README etc. + +--- + Makefile.in | 3 --- + 1 files changed, 0 insertions(+), 3 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index 522ac0a..8f37d05 100755 +--- a/Makefile.in ++++ b/Makefile.in +@@ -554,9 +554,6 @@ install_unix: startup.yss libYap.a + mkdir -p $(DESTDIR)$(SHAREDIR)/Yap + mkdir -p $(DESTDIR)$(SHAREDIR)/Yap/pl + mkdir -p $(DESTDIR)$(DOCSDIR) +- $(INSTALL) $(srcdir)/Artistic $(DESTDIR)$(DOCSDIR) +- $(INSTALL) $(srcdir)/README $(DESTDIR)$(DOCSDIR) +- $(INSTALL) $(srcdir)/COPYING $(DESTDIR)$(DOCSDIR) + for f in $(PL_SOURCES); do $(INSTALL) $$f $(DESTDIR)$(SHAREDIR)/Yap/pl; done + @INSTALL_DLLS@ (cd packages/PLStream; $(MAKE) install) + @INSTALL_DLLS@ (cd library/lammpi; $(MAKE) install) +-- +1.7.3.4 + diff --git a/yap-6.2.0-Do-not-install-info-dir-index.patch b/yap-6.2.0-Do-not-install-info-dir-index.patch new file mode 100644 index 0000000..6cc701d --- /dev/null +++ b/yap-6.2.0-Do-not-install-info-dir-index.patch @@ -0,0 +1,32 @@ +From 07a8f2b1e905d9133c057d2a2d83a2b7a5bb44ba Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Wed, 22 Dec 2010 10:59:06 +0100 +Subject: [PATCH] Do not install info dir index + +--- + Makefile.in | 2 -- + 1 files changed, 0 insertions(+), 2 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index c513d0c..cbdfcaf 100755 +--- a/Makefile.in ++++ b/Makefile.in +@@ -717,7 +717,6 @@ install_info: + gzip --quiet --force $(DESTDIR)$(INFODIR)/yap.info*; \ + fi \ + fi; \ +- $(INSTALL_INFO) --quiet --section "Programming Languages" yap.info $(DESTDIR)$(INFODIR)/dir; \ + cd $(srcdir)/LGPL/pillow/doc ; \ + $(INSTALL_DATA) pillow_doc.info $(DESTDIR)$(INFODIR); \ + if test -e $(DESTDIR)$(INFODIR)/emacs.bz2; then \ +@@ -727,7 +726,6 @@ install_info: + gzip --quiet --force $(DESTDIR)$(INFODIR)/pillow_doc.info; \ + fi \ + fi; \ +- $(INSTALL_INFO) --quiet --section "Programming Languages" --entry="`cat pillow_doc.infoindex`" --info-dir=$(DESTDIR)$(INFODIR) pillow_doc.info + + install_docs: + $(MAKE) pdf +-- +1.7.3.4 + diff --git a/yap-6.2.0-Install-directory-for-info-pages.patch b/yap-6.2.0-Install-directory-for-info-pages.patch new file mode 100644 index 0000000..cbe8fb5 --- /dev/null +++ b/yap-6.2.0-Install-directory-for-info-pages.patch @@ -0,0 +1,24 @@ +From d6ce7191c9dcac1681a2b29d68db0858133405c3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Tue, 21 Dec 2010 11:31:37 +0100 +Subject: [PATCH] Install directory for info pages + +--- + Makefile.in | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index 5fbf662..522ac0a 100755 +--- a/Makefile.in ++++ b/Makefile.in +@@ -711,6 +711,7 @@ yap.dll: libYap.a + + install_info: + $(MAKE) info; \ ++ mkdir -p $(DESTDIR)$(INFODIR); \ + $(INSTALL) yap.info* $(DESTDIR)$(INFODIR); \ + if test -e $(DESTDIR)$(INFODIR)/emacs.bz2; then \ + bzip2 --quiet --force $(DESTDIR)$(INFODIR)/yap.info*; \ +-- +1.7.3.4 + diff --git a/yap-6.2.0-Install-http-CSS-files-into-PLTARGET.patch b/yap-6.2.0-Install-http-CSS-files-into-PLTARGET.patch new file mode 100644 index 0000000..6b3f949 --- /dev/null +++ b/yap-6.2.0-Install-http-CSS-files-into-PLTARGET.patch @@ -0,0 +1,30 @@ +From 1ea44f8db749d81a790c55d63bfa4c1dbd5cb211 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Tue, 21 Dec 2010 12:59:55 +0100 +Subject: [PATCH] Install http CSS files into PLTARGET + +--- + packages/http/Makefile.in | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/packages/http/Makefile.in b/packages/http/Makefile.in +index 8609697..1c3dbda 100755 +--- a/packages/http/Makefile.in ++++ b/packages/http/Makefile.in +@@ -111,11 +111,11 @@ install: $(LIBPL) $(SOLIBS) + $(INSTALL_PROGRAM) $(SOLIBS) $(BINTARGET) + mkdir -p $(PLTARGET) + mkdir -p $(PLTARGET)/web/icons +- mkdir -p $(DESTDIR)$(LIBDIR)/web/css ++ mkdir -p $(PLTARGET)/web/css + $(INSTALL_DATA) $(LIBPL) $(PLTARGET) + $(INSTALL_DATA) $(srcdir)/README $(PLTARGET) + $(INSTALL_DATA) $(srcdir)/web/icons/*.png $(PLTARGET)/web/icons +- $(INSTALL_DATA) $(srcdir)/web/css/*.css $(DESTDIR)$(LIBDIR)/web/css ++ $(INSTALL_DATA) $(srcdir)/web/css/*.css $(PLTARGET)/web/css + $(PL) -f none -g make -t halt + + ln-install: $(LIBPL) +-- +1.7.3.4 + diff --git a/yap-6.2.0-Install-info-pages-non-executable.patch b/yap-6.2.0-Install-info-pages-non-executable.patch new file mode 100644 index 0000000..44b2837 --- /dev/null +++ b/yap-6.2.0-Install-info-pages-non-executable.patch @@ -0,0 +1,34 @@ +From 84f7e2e5ac18dd130d1656b677d40ebdd7cda9a1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Wed, 22 Dec 2010 10:18:17 +0100 +Subject: [PATCH] Install info pages non-executable + +--- + Makefile.in | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index 8f37d05..c513d0c 100755 +--- a/Makefile.in ++++ b/Makefile.in +@@ -709,7 +709,7 @@ yap.dll: libYap.a + install_info: + $(MAKE) info; \ + mkdir -p $(DESTDIR)$(INFODIR); \ +- $(INSTALL) yap.info* $(DESTDIR)$(INFODIR); \ ++ $(INSTALL_DATA) yap.info* $(DESTDIR)$(INFODIR); \ + if test -e $(DESTDIR)$(INFODIR)/emacs.bz2; then \ + bzip2 --quiet --force $(DESTDIR)$(INFODIR)/yap.info*; \ + else \ +@@ -719,7 +719,7 @@ install_info: + fi; \ + $(INSTALL_INFO) --quiet --section "Programming Languages" yap.info $(DESTDIR)$(INFODIR)/dir; \ + cd $(srcdir)/LGPL/pillow/doc ; \ +- $(INSTALL) pillow_doc.info $(DESTDIR)$(INFODIR); \ ++ $(INSTALL_DATA) pillow_doc.info $(DESTDIR)$(INFODIR); \ + if test -e $(DESTDIR)$(INFODIR)/emacs.bz2; then \ + bzip2 --quiet --force $(DESTDIR)$(INFODIR)/pillow_doc.info; \ + else \ +-- +1.7.3.4 + diff --git a/yap-6.2.0-Locate-mysql-by-mysql_config.patch b/yap-6.2.0-Locate-mysql-by-mysql_config.patch new file mode 100644 index 0000000..ae81528 --- /dev/null +++ b/yap-6.2.0-Locate-mysql-by-mysql_config.patch @@ -0,0 +1,25 @@ +From 131213c12d09cdce8a56b5148ce753b0f5ae8e77 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Tue, 21 Dec 2010 10:32:02 +0100 +Subject: [PATCH] Locate mysql by mysql_config + +--- + configure.in | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/configure.in b/configure.in +index 4ce9538..80208e5 100755 +--- a/configure.in ++++ b/configure.in +@@ -665,7 +665,7 @@ then + if test "$yap_cv_mysql" = yes + then + YAP_EXTRAS="$YAP_EXTRAS -DMYDDAS_MYSQL" +- LIBS="$LIBS -L${yap_cv_myddas}/lib/mysql -lmysqlclient " ++ LIBS="$LIBS $(mysql_config --libs) " + fi + + dnl check for odbc +-- +1.7.3.4 + diff --git a/yap-6.2.0-Remove-feature-macro.patch b/yap-6.2.0-Remove-feature-macro.patch new file mode 100644 index 0000000..75201ee --- /dev/null +++ b/yap-6.2.0-Remove-feature-macro.patch @@ -0,0 +1,27 @@ +From 9419d68dc09a4e3f7adfe7e654ef3952327cd9bf Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Wed, 7 Dec 2011 14:14:25 +0100 +Subject: [PATCH] Remove feature macro + +This macro clashes with struct ppc_debug_info member in +on PPC. The macro is not used anywhere in yap. +--- + packages/PLStream/pl-incl.h | 2 -- + 1 files changed, 0 insertions(+), 2 deletions(-) + +diff --git a/packages/PLStream/pl-incl.h b/packages/PLStream/pl-incl.h +index aa7b99c..8bf63de 100755 +--- a/packages/PLStream/pl-incl.h ++++ b/packages/PLStream/pl-incl.h +@@ -363,8 +363,6 @@ typedef struct PL_local_data { + + #define usedStack(D) 0 + +-#define features (LD->feature.mask) +- + extern PL_local_data_t lds; + + #define exception_term (LD->exception.term) +-- +1.7.7.4 + diff --git a/yap-6.2.0-fix-chr-install-from-Keri.patch b/yap-6.2.0-fix-chr-install-from-Keri.patch new file mode 100644 index 0000000..bbdee5f --- /dev/null +++ b/yap-6.2.0-fix-chr-install-from-Keri.patch @@ -0,0 +1,106 @@ +From 23d07e2d78cf285e32b6f42c635edf506ff70c78 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADtor=20Santos=20Costa?= +Date: Tue, 9 Nov 2010 16:39:34 +0000 +Subject: [PATCH] fix chr install (from Keri) + +--- + configure.in | 20 ++++++++++---------- + 1 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/configure.in b/configure.in +index 920d01a..3bc0c1d 100755 +--- a/configure.in ++++ b/configure.in +@@ -924,7 +924,7 @@ case "$target_os" in + then + YAPLIB_LD="\$(CC) -shared" + EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS -L\$(abs_top_builddir) -lYap -Wl,-R,\$(YAPLIBDIR) -Wl,-R,\$(LIBDIR)" +- INSTALL_ENV="LD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)" ++ INSTALL_ENV="LD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR):\$(DESTDIR)\$(YAPLIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)" + PRE_INSTALL_ENV="LD_LIBRARY_PATH=\$(abs_top_builddir)" + else + YAPLIB_LD="\$(CC)" +@@ -946,7 +946,7 @@ case "$target_os" in + DYNYAPLIB=libYap."$SO" + EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS -L\$(abs_top_builddir) -lYap -Wl,-R,\$(YAPLIBDIR) -Wl,-R,\$(LIBDIR)" + PRE_INSTALL_ENV="LD_LIBRARY_PATH=\$(abs_top_builddir)" +- INSTALL_ENV="LD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)" ++ INSTALL_ENV="LD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR):\$(DESTDIR)\$(YAPLIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)" + ;; + *hpux*) + #do not use the first memory quadrant +@@ -985,7 +985,7 @@ case "$target_os" in + DYNYAPLIB=libYap."$SO" + EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS -L\$(abs_top_builddir) -lYap -Wl,-R,\$(YAPLIBDIR) -Wl,-R,\$(LIBDIR)" + PRE_INSTALL_ENV="LD_LIBRARY_PATH=\$(abs_top_builddir)" +- INSTALL_ENV="LD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)" ++ INSTALL_ENV="LD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR):\$(DESTDIR)\$(YAPLIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)" + ;; + *aix*) + # To actually use dlls in AIX I'd need to build YAP as a DLL first. +@@ -998,7 +998,7 @@ case "$target_os" in + DYNYAPLIB=libYap."$SO" + EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS -L\$(abs_top_builddir) -lYap -Wl,-R,\$(YAPLIBDIR) -Wl,\$(LIBDIR)" + PRE_INSTALL_ENV="LD_LIBRARY_PATH=\$(abs_top_builddir)" +- INSTALL_ENV="LD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)" ++ INSTALL_ENV="LD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR):\$(DESTDIR)\$(YAPLIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)" + ;; + *osf*) + if ${use_condor} = no +@@ -1016,7 +1016,7 @@ dnl Linux has both elf and a.out, in this case we found elf + DYNYAPLIB=libYap."$SO" + EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS -L\$(abs_top_builddir) -lYap -Wl,-R,\$(YAPLIBDIR) -Wl,-R,\$(LIBDIR)" + PRE_INSTALL_ENV="LD_LIBRARY_PATH=\$(abs_top_builddir)" +- INSTALL_ENV="LD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)" ++ INSTALL_ENV="LD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR):\$(DESTDIR)\$(YAPLIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)" + ;; + *irix6*) + SHLIB_CFLAGS="$CFLAGS" +@@ -1030,7 +1030,7 @@ dnl Linux has both elf and a.out, in this case we found elf + DYNYAPLIB=libYap."$SO" + EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS -L\$(abs_top_builddir) -lYap -Wl,-R,\$(YAPLIBDIR) -Wl,-R,\$(LIBDIR)" + PRE_INSTALL_ENV="LD_LIBRARY_PATH=\$(abs_top_builddir)" +- INSTALL_ENV="LD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)" ++ INSTALL_ENV="LD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR):\$(DESTDIR)\$(YAPLIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)" + ;; + *darwin*) + if test ${use_dlcompat} = yes +@@ -1051,7 +1051,7 @@ dnl Linux has both elf and a.out, in this case we found elf + SHLIB_LD="$CC -dynamiclib" + SHLIB_CXX_LD="$CXX -dynamiclib" + EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS -L\$(abs_top_builddir) -lYap -Wl,-install_name,\$(YAPLIBDIR)/\$@" +- INSTALL_ENV="DYLD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)" ++ INSTALL_ENV="DYLD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR):\$(DESTDIR)\$(YAPLIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)" + else + SHLIB_LD="$CC -dynamiclib -Wl,-undefined,dynamic_lookup" + SHLIB_CXX_LD="$CXX -dynamiclib -Wl,-undefined,dynamic_lookup" +@@ -1091,7 +1091,7 @@ dnl Linux has both elf and a.out, in this case we found elf + DYNYAPLIB=libYap."$SO" + EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS -L\$(abs_top_builddir) -Wl,-R,\$(YAPLIBDIR)" + PRE_INSTALL_ENV="LD_LIBRARY_PATH=\$(abs_top_builddir)" +- INSTALL_ENV="LD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)" ++ INSTALL_ENV="LD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR):\$(DESTDIR)\$(YAPLIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)" + ;; + *solaris*) + #an elf system +@@ -1110,7 +1110,7 @@ dnl Linux has both elf and a.out, in this case we found elf + YAPLIB_LD="\$(CC)" + EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS -L\$(abs_top_builddir) -lYap -Wl,-R,\$(YAPLIBDIR) -Wl,-R,\$(LIBDIR)" + PRE_INSTALL_ENV="LD_LIBRARY_PATH=\$(abs_top_builddir)" +- INSTALL_ENV="LD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)" ++ INSTALL_ENV="LD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR):\$(DESTDIR)\$(YAPLIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)" + else + EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS -Wl,-R,\$(YAPLIBDIR) -Wl,-R,\$(LIBDIR)" + PRE_INSTALL_ENV="" +@@ -1165,7 +1165,7 @@ dnl Linux has both elf and a.out, in this case we found elf + DYNYAPLIB=libYap."$SO" + EXTRA_LIBS_FOR_DLLS="$EXTRA_LIBS_FOR_DLLS -L\$(abs_top_builddir) -lYap -Wl,-R,\$(YAPLIBDIR) -Wl,-R,\$(LIBDIR)" + PRE_INSTALL_ENV="LD_LIBRARY_PATH=\$(abs_top_builddir)" +- INSTALL_ENV="LD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)" ++ INSTALL_ENV="LD_LIBRARY_PATH=\$(DESTDIR)\$(LIBDIR):\$(DESTDIR)\$(YAPLIBDIR): YAPSHAREDIR=\$(DESTDIR)\$(SHAREDIR) YAPLIBDIR=\$(DESTDIR)\$(YAPLIBDIR)" + ;; + esac + +-- +1.7.3.4 + diff --git a/yap-6.2.0-gprof-macro.patch b/yap-6.2.0-gprof-macro.patch new file mode 100644 index 0000000..1d18164 --- /dev/null +++ b/yap-6.2.0-gprof-macro.patch @@ -0,0 +1,14 @@ +diff -up yap-6/C/gprof.c.macro yap-6/C/gprof.c +--- yap-6/C/gprof.c.macro 2011-06-23 14:45:25.000000000 +0200 ++++ yap-6/C/gprof.c 2011-06-23 14:45:43.000000000 +0200 +@@ -102,8 +102,8 @@ typedef greg_t context_reg; + + #else + +-#define CONTEXT_PC NULL +-#define CONTEXT_BP NULL ++#define CONTEXT_PC(scv) NULL ++#define CONTEXT_BP(scv) NULL + + #endif + diff --git a/yap-6.2.0-ppc-mmap-addr.patch b/yap-6.2.0-ppc-mmap-addr.patch new file mode 100644 index 0000000..e29aebc --- /dev/null +++ b/yap-6.2.0-ppc-mmap-addr.patch @@ -0,0 +1,11 @@ +--- yap-6.orig/H/Yap.h 2010-10-18 21:48:20.000000000 +1300 ++++ yap-6/H/Yap.h 2010-12-01 20:09:57.000000000 +1300 +@@ -268,6 +268,8 @@ + #define MMAP_ADDR 0x200000000 + #elif defined(__APPLE__) && !__LP64__ + #define MMAP_ADDR 0x20000000 ++#elif defined(__powerpc__) ++#define MMAP_ADDR 0x20000000 + #else + #define MMAP_ADDR 0x10000000 + #endif diff --git a/yap-6.2.2-Off-by-one-error-when-initializing-yap_flags.patch b/yap-6.2.2-Off-by-one-error-when-initializing-yap_flags.patch new file mode 100644 index 0000000..a376743 --- /dev/null +++ b/yap-6.2.2-Off-by-one-error-when-initializing-yap_flags.patch @@ -0,0 +1,41 @@ +From fa8f0f7b2d107770ae4d37bc77c902eafc59c86c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Mon, 7 Jan 2013 17:31:08 +0100 +Subject: [PATCH] Off-by-one error when initializing yap_flags + +The yap_flags_field of all_heap_codes structure is of type +Int[LAST_FLAG], thus the loop should iterate from 0 to LAST_FLAG - 1. +--- + C/init.c | 2 +- + C/stdpreds.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/C/init.c b/C/init.c +index dda09cc..8f01864 100755 +--- a/C/init.c ++++ b/C/init.c +@@ -1348,7 +1348,7 @@ Yap_InitWorkspace(UInt Heap, UInt Stack, UInt Trail, UInt Atts, UInt max_table_s + Yap_InitTime (); + /* InitAbsmi must be done before InitCodes */ + /* This must be done before initialising predicates */ +- for (i = 0; i <= LAST_FLAG; i++) { ++ for (i = 0; i < LAST_FLAG; i++) { + yap_flags[i] = 0; + } + #ifdef MPW +diff --git a/C/stdpreds.c b/C/stdpreds.c +index a4c0e86..8a4183f 100755 +--- a/C/stdpreds.c ++++ b/C/stdpreds.c +@@ -3637,7 +3637,7 @@ p_access_yap_flags(void) + return(FALSE); + } + flag = IntOfTerm(tflag); +- if (flag < 0 || flag > NUMBER_OF_YAP_FLAGS) { ++ if (flag < 0 || flag >= NUMBER_OF_YAP_FLAGS) { + return(FALSE); + } + #ifdef TABLING +-- +1.7.11.7 + diff --git a/yap.spec b/yap.spec new file mode 100644 index 0000000..4e2ea0d --- /dev/null +++ b/yap.spec @@ -0,0 +1,363 @@ +# BEAM is experimantal and some interpreter code unimplemented. See +# README.EAM.html for more details. +%global use_eam 0 + +Name: yap +Version: 6.2.0 +Release: 7%{?dist} +Summary: High-performance Prolog Compiler +Group: Development/Languages +# README Perl Artistic license 2 and the FSF's LGPL +# packages/ProbLog/ Artistic 2.0 +# COPYING LGPL +# LGPL/pillow/pillow.pl LGPLv2+ +# packages/clib/sha1/sha2.c BSD or GPL +# packages/http/examples/demo_threads.pl GPLv2+ +License: Artistic 2.0 and LGPLv2+ and (BSD or GPL+) and (GPLv2+) +URL: http://www.ncc.up.pt/~vsc/Yap +Source: http://www.ncc.up.pt/~vsc/Yap/%{name}-%{version}.tar.gz +Patch1: Yap-noni386.patch +Patch2: yap-6.2.0-Locate-mysql-by-mysql_config.patch +Patch3: yap-6.2.0-Install-directory-for-info-pages.patch +Patch4: yap-6.2.0-Install-http-CSS-files-into-PLTARGET.patch +Patch5: yap-6.2.0-Do-not-install-README-etc.patch +Patch6: yap-6.2.0-Install-info-pages-non-executable.patch +Patch7: yap-6.2.0-Do-not-install-info-dir-index.patch +# In upstream already +Patch8: yap-6.2.0-fix-chr-install-from-Keri.patch +# fix non-x86 build with recent gcc +Patch9: yap-6.2.0-gprof-macro.patch +# Fix segfaults on PPC. Taken from Gentoo yap-6.2.0-gentoo-patchset-5.tar.gz +Patch10: yap-6.2.0-ppc-mmap-addr.patch +# Fix compilation of PLStream package on PPC +Patch11: yap-6.2.0-Remove-feature-macro.patch +# Reported to upstream +Patch12: yap-6.2.2-Off-by-one-error-when-initializing-yap_flags.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: autoconf +BuildRequires: gmp-devel +BuildRequires: mysql-devel +# TODO: BuildRequires: openmpi-devel +BuildRequires: readline-devel +BuildRequires: texinfo +BuildRequires: unixODBC-devel +BuildRequires: zlib-devel +Requires(post): /sbin/install-info, /sbin/ldconfig +Requires(postun): /sbin/install-info, /sbin/ldconfig + +# Do not export provides and requires on private libraries +%filter_provides_in /usr/lib64/Yap/ +%filter_from_requires /^libplstream.so(/d +%filter_setup + +%description +A high-performance Prolog compiler developed at LIACC, Universidade do +Porto. The Prolog engine is based in the WAM (Warren Abstract +Machine), with several optimizations for better performance. YAP +follows the Edinburgh tradition, and is largely compatible with the +ISO-Prolog standard and with Quintus and SICStus Prolog. + + +%package devel +Summary: C-Interface development files for Yap +Group: Development/Languages +Requires: %{name} = %{version}-%{release} + +%description devel +C-Interface development files for Yap. + + +%package docs +Summary: Documentation for Yap +Group: Development/Languages +BuildArch: noarch +Requires: %{name} = %{version}-%{release} + +%description docs +Documentation for Yap. + + +%prep +%setup -q -n %{name}-6 +%patch1 -p1 +%patch2 -p1 -b .mysql_config +%patch3 -p1 -b .install_info_directory +%patch4 -p1 -b .install_css_into_pltarget +%patch5 -p1 -b .do_not_install_readme +%patch6 -p1 -b .non_executable_info +%patch7 -p1 -b .do_not_install_info_index +%patch8 -p1 -b .fix_chr_install +%patch9 -p1 -b .macro +%patch10 -p1 -b .ppc +%patch11 -p1 -b .remove_feature_macro +%patch12 -p1 -b .initialization + +# remove redundant RPATH +sed -i 's/-Wl,-R\(,\)\{0,1\}\\$(LIBDIR)//' configure.in +# transform RPATH into RUN_PATH. Private libraries dlopen()ed depend each on +# other +sed -i 's/-Wl,-R/-Wl,--enable-new-dtags,-R/g' configure.in + +# Regerenate configure because of patching +autoconf + +# chr and clpqr are optional and they are a copy from SWI Prolog (LGPLv2+) +# TODO: Unbundle chr and clpqr libraries as subpackages + +# Add soname to library and symlink from unversioned to versioned one +sed -i \ + -e '/@YAPLIB_LD@/ s/\(-o @YAPLIB@\)\(.*\)/-Wl,-soname=@YAPLIB@.%{version} \1.%{version}\2\n\tln -s @YAPLIB@.%{version} @YAPLIB@/' \ + -e '/@INSTALL_DLLS@.* @YAPLIB@/ s/\(@YAPLIB@\)\(.*\)/\1.%{version}\2\n\t@LN_S@ @YAPLIB@.%{version} $(DESTDIR)$(LIBDIR)\/@YAPLIB@/' \ + Makefile.in + +# Fix file encoding +for F in README changes.css; do + tr -d '\r' < "$F" > "${F}.new" + touch -r "$F"{,.new} + mv "$F"{.new,} +done +for F in docs/yap.tex TO_DO; do + iconv -f iso-8859-1 -t utf-8 < "$F" > "${F}.new" + touch -r "$F"{,.new} + mv "$F"{.new,} +done + +# Fix file permissions +chmod -x COPYING packages/http/examples/demo_inetd +# Permissions for debuginfo content +find -name '*.h' -exec chmod 0644 '{}' ';' +find -name '*.c' -exec chmod 0644 '{}' ';' + + +%build +# % define optflags $(echo $RPM_OPT_FLAGS | sed 's|-fstack-protector||') +%configure \ + --enable-coroutining \ + --enable-max-performance \ + --enable-depth-limit \ + --enable-dynamic-loading \ + --enable-myddas \ +%if %{use_eam} + --enable-eam \ +%endif + --enable-chr \ + --enable-clpqr +# TODO: --with-java + +make %{?_smp_mflags} +make %{?_smp_mflags} info + + +%install +rm -rf $RPM_BUILD_ROOT +%ifarch ppc ppc64 +ulimit -s unlimited +%endif +make DESTDIR=$RPM_BUILD_ROOT install +make DESTDIR=$RPM_BUILD_ROOT install_info + +# fix permissions and flags +chmod 0644 $RPM_BUILD_ROOT%{_datadir}/Yap/pl/* +chmod 0644 $RPM_BUILD_ROOT%{_includedir}/Yap/* + +# Move installed examples to docs dir +%global documentation docs-documentation +for P in clpbn; do + mkdir -p "%{documentation}/examples/${P}" + mv "$RPM_BUILD_ROOT%{_datadir}/Yap/${P}/examples/"* \ + "%{documentation}/examples/${P}" + rmdir "$RPM_BUILD_ROOT%{_datadir}/Yap/${P}/examples" +done +for P in minisat problog; do + mkdir -p "%{documentation}/examples/${P}" + mv "$RPM_BUILD_ROOT%{_datadir}/Yap/${P}_examples/"* \ + "%{documentation}/examples/${P}" + rmdir "$RPM_BUILD_ROOT%{_datadir}/Yap/${P}_examples" +done +# Copy not-installed examples to docs dir +# CLPBN/*, swi-minisat2 installed already +# TODO: jpl documentation with java support +# TODO: mpi documentation with mpi support +for P in pyswip cplint http plunit; do + mkdir -p "%{documentation}/examples/${P}" + cp -a "packages/${P}/examples/"* "%{documentation}/examples/${P}" +done +for P in LGPL/pillow; do + mkdir -p "%{documentation}/examples/${P}" + cp -a "${P}/examples/"* "%{documentation}/examples/${P}" +done + +# Remove empty files +for F in $RPM_BUILD_ROOT%{_datadir}/Yap/myddas_top_level.yap \ + %{documentation}/examples/cplint/coin.uni; do + test -s "$F" || rm "$F" +done + + +%post +/sbin/install-info %{_infodir}/yap.info --section "Programming Languages" %{_infodir}/dir 2>/dev/null || : +/sbin/install-info %{_infodir}/pillow_doc.info --section "Programming Languages" %{_infodir}/dir 2>/dev/null || : +/sbin/ldconfig + + +%postun +if [ $1 -eq 0 ]; then + /sbin/install-info --delete %{_infodir}/yap.info %{_infodir}/dir 2>/dev/null || : + /sbin/install-info --delete %{_infodir}/pillow_doc.info %{_infodir}/dir 2>/dev/null || : +fi +/sbin/ldconfig + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc Artistic changes* COPYING README TO_DO +%if %{use_eam} +%doc README.EAM.html +%endif +%{_bindir}/yap +%{_datadir}/Yap +%{_libdir}/Yap +%{_libdir}/libYap.so.* +%{_infodir}/* + + +%files devel +%defattr(-,root,root,-) +%{_libdir}/libYap.so +%{_includedir}/Yap + + +%files docs +%defattr(-,root,root,-) +%doc LGPL/pillow/doc/pillow_doc_html/* +%doc LGPL/pillow/doc/article.ps.gz +%doc %{documentation}/* + + +%changelog +* Mon Jan 07 2013 Petr Pisar - 6.2.0-7 +- Fix off-by-one error when initializing yap_flags + +* Wed Dec 07 2011 Petr Pisar - 6.2.0-6 +- Fix building on PowerPC (bug #751144) + +* Thu Jun 23 2011 Dan Horák - 6.2.0-5 +- fix non-x86 builds with recent gcc + +* Wed Mar 23 2011 Dan Horák - 6.2.0-4 +- rebuilt for mysql 5.5.10 (soname bump in libmysqlclient) + +* Wed Mar 23 2011 Petr Pisar - 6.2.0-3 +- Rebuild against mysql 5.5.10 + +* Tue Feb 08 2011 Fedora Release Engineering - 6.2.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Tue Jan 04 2011 Petr Pisar - 6.2.0-1 +- Reorder metadata in spec file +- 6.2.0 bump +- Remove uneeded Yap-creat.patch +- Remove uneeded Yap-5.1.1-config.sub.patch +- Locate mysql by mysql_config +- Fix info pages installation +- Logtalk is no logner distributed with yap +- Install http module CSS files to correct place +- Convert TO_DO into UTF-8 +- Make COPYING non-executable +- Remove empty myddas_top_level.yap file +- Fix soname injection +- Fix BuildRequires +- Package clpbn examples +- Fix Source URL +- Clean exported Requires +- Correct RPATH +- Enable chr and clpqr libraries installation (still bundled with source tar + ball) +- Package uninstalled examples + +* Wed Dec 08 2010 Petr Pisar - 5.1.3-3 +- Hack SWI-compatible libraries build system to be compilable (bug #660965) +- Correct spec file syntax (white spaces, percentages) +- Convert documentation into UTF-8/CR +- Do not put unversioned library into main package +- Make docs subpackege architecture independent + +* Mon Jul 27 2009 Fedora Release Engineering - 5.1.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Mon Jun 15 2009 Gerard Milmeister - 5.1.3-1 +- new release 5.1.3 + +* Sun Mar 01 2009 Ralf Corsépius - 5.1.1-13 +- Add Yap-5.1.1-config.sub.patch: + Upgrade outdated config.sub to fix rebuild breakdown on ppc64. + +* Fri Jul 11 2008 Tom "spot" Callaway - 5.1.1-11 +- fix license tag + +* Thu Apr 10 2008 Gerard Milmeister - 5.1.1-10 +- enable rpm_opt_flags +- patch for incorrect open call with O_CREAT + +* Mon Feb 18 2008 Fedora Release Engineering - 5.1.1-9 +- Autorebuild for GCC 4.3 + +* Sat Oct 20 2007 Gerard Milmeister - 5.1.1-8 +- fix library path for 64-bit platforms + +* Wed Aug 29 2007 Gerard Milmeister - 5.1.1-7 +- replaced ld -shared with gcc -shared + +* Wed Aug 29 2007 Fedora Release Engineering - 5.1.1-6 +- Rebuild for selinux ppc32 issue. + +* Thu Jul 5 2007 Gerard Milmeister - 5.1.1-5 +- also build libYap.so + +* Fri May 11 2007 Gerard Milmeister - 5.1.1-3 +- remove -fstack-protector from optflags in order to enable + loading of .so modules + +* Mon Aug 28 2006 Gerard Milmeister - 5.1.1-2 +- Rebuild for FE6 + +* Mon May 1 2006 Gerard Milmeister - 5.1.1-1 +- new version 5.1.1 +- split off devel and docs packages + +* Fri Feb 17 2006 Gerard Milmeister - 5.0.1-2 +- Rebuild for Fedora Extras 5 + +* Tue Oct 25 2005 Gerard Milmeister - 5.0.1-1 +- New Version 5.0.1 + +* Wed Sep 7 2005 Gerard Milmeister - 5.0.0-1 +- New Version 5.0.0 + +* Sat Jun 18 2005 Gerard Milmeister - 4.5.5-5 +- Use %%{_prefix}/lib for x86_64 + +* Sat Jun 18 2005 Gerard Milmeister - 4.5.5-4 +- Fix for non-i386 compilers + +* Sat Jun 18 2005 Gerard Milmeister - 4.5.5-3 +- Compiler fix for FC4 + +* Fri Apr 7 2005 Michael Schwendt +- rebuilt + +* Sat Feb 12 2005 Gerard Milmeister - 0:4.5.5-1 +- New Version 4.5.5 + +* Mon Nov 29 2004 Gerard Milmeister - 0:4.5.3-0.fdr.1 +- New Version 4.5.3 + +* Sat Mar 13 2004 Gerard Milmeister - 0:4.5.2-0.fdr.1 +- New Version 4.5.2 + +* Sat Nov 22 2003 Gerard Milmeister - 0:4.4.3-0.fdr.1 +- First Fedora release