Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
Petr Písař
124682cb27 Fails to build with GCC 7, upstream does not respond (bug #1421711). 2017-03-03 13:08:03 +01:00
17 changed files with 1 additions and 839 deletions

7
.gitignore vendored
View file

@ -1,7 +0,0 @@
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
/yap-6.2.2.tar.gz

View file

@ -1,42 +0,0 @@
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

View file

@ -1,11 +0,0 @@
--- 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 */

1
dead.package Normal file
View file

@ -0,0 +1 @@
Fails to build with GCC 7, upstream does not respond (bug #1421711).

View file

@ -1 +0,0 @@
5010225464ffe8b2aa3e0bca9d935937 yap-6.2.2.tar.gz

View file

@ -1,26 +0,0 @@
From d9acef3be4ca926d0f138184535e3f16b15d6045 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
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

View file

@ -1,32 +0,0 @@
From 07a8f2b1e905d9133c057d2a2d83a2b7a5bb44ba Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
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

View file

@ -1,24 +0,0 @@
From d6ce7191c9dcac1681a2b29d68db0858133405c3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
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

View file

@ -1,30 +0,0 @@
From 1ea44f8db749d81a790c55d63bfa4c1dbd5cb211 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
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

View file

@ -1,34 +0,0 @@
From 84f7e2e5ac18dd130d1656b677d40ebdd7cda9a1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
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

View file

@ -1,25 +0,0 @@
From 131213c12d09cdce8a56b5148ce753b0f5ae8e77 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
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

View file

@ -1,27 +0,0 @@
From 9419d68dc09a4e3f7adfe7e654ef3952327cd9bf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Wed, 7 Dec 2011 14:14:25 +0100
Subject: [PATCH] Remove feature macro
This macro clashes with struct ppc_debug_info member in <asm/ptrace.h>
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

View file

@ -1,14 +0,0 @@
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

View file

@ -1,62 +0,0 @@
From 92d5303c23fcc698233b754fc8f180df1fa2aa9b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Thu, 12 Feb 2015 17:37:57 +0100
Subject: [PATCH] Friend function template defined in a class cannot be used
without ADL
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
GCC 5.0 stopped searching friend function templates without ADL.
The Clause_new() function can be kept a friend but must be defined out
of scope of the Clause class, or the callers must use fully
qualificated name (Clause::Clause_new()) and the method must be
changed from friend to static.
So far my poor C++ knowledge.
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
packages/swi-minisat2/C/Solver.C | 4 ++--
packages/swi-minisat2/C/SolverTypes.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/packages/swi-minisat2/C/Solver.C b/packages/swi-minisat2/C/Solver.C
index 2de3e6d..1bcdbff 100644
--- a/packages/swi-minisat2/C/Solver.C
+++ b/packages/swi-minisat2/C/Solver.C
@@ -120,7 +120,7 @@ bool Solver::addClause(vec<Lit>& ps)
uncheckedEnqueue(ps[0]);
return ok = (propagate() == NULL);
}else{
- Clause* c = Clause_new(ps, false);
+ Clause* c = Clause::Clause_new(ps, false);
clauses.push(c);
attachClause(*c);
}
@@ -599,7 +599,7 @@ lbool Solver::search(int nof_conflicts, int nof_learnts)
if (learnt_clause.size() == 1){
uncheckedEnqueue(learnt_clause[0]);
}else{
- Clause* c = Clause_new(learnt_clause, true);
+ Clause* c = Clause::Clause_new(learnt_clause, true);
learnts.push(c);
attachClause(*c);
claBumpActivity(*c);
diff --git a/packages/swi-minisat2/C/SolverTypes.h b/packages/swi-minisat2/C/SolverTypes.h
index 47e3023..919b60b 100644
--- a/packages/swi-minisat2/C/SolverTypes.h
+++ b/packages/swi-minisat2/C/SolverTypes.h
@@ -119,7 +119,7 @@ public:
// -- use this function instead:
template<class V>
- friend Clause* Clause_new(const V& ps, bool learnt = false) {
+ static Clause* Clause_new(const V& ps, bool learnt = false) {
assert(sizeof(Lit) == sizeof(uint32_t));
assert(sizeof(float) == sizeof(uint32_t));
void* mem = malloc(sizeof(Clause) + sizeof(uint32_t)*(ps.size()));
--
1.9.3

View file

@ -1,41 +0,0 @@
From fa8f0f7b2d107770ae4d37bc77c902eafc59c86c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
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

View file

@ -1,34 +0,0 @@
From 04fae092c7dd5e55846073887a9604e1008cbc82 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Thu, 28 Mar 2013 10:13:43 +0100
Subject: [PATCH] Texinfo 5 does not allow @bullet as @table indicator
From Texinfo 5 documentation:
Write the '@table' command at the beginning of a line, after a blank
line, and follow it on the same line with an argument that is
a Texinfo "indicating" command [...] You may also use the '@asis'
command as an argument to '@table'. '@asis' is a command that does
nothing;
Documentation for Indicating commands does not list @bullet.
---
docs/yap.tex | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/yap.tex b/docs/yap.tex
index 162a184..df40c71 100644
--- a/docs/yap.tex
+++ b/docs/yap.tex
@@ -15820,7 +15820,7 @@ be lost.
We next discuss several issues on trying to make Prolog programs run
fast in YAP. We assume two different programming styles:
-@table @bullet
+@table @asis
@item Execution of @emph{deterministic} programs often
boils down to a recursive loop of the form:
@example
--
1.8.1.4

429
yap.spec
View file

@ -1,429 +0,0 @@
# BEAM is experimantal and some interpreter code unimplemented. See
# README.EAM.html for more details.
%global use_eam 0
Name: yap
Version: 6.2.2
Release: 19%{?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: %{url}%{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
# fix non-x86 build with recent gcc
Patch8: yap-6.2.0-gprof-macro.patch
# Fix compilation of PLStream package on PPC
Patch9: yap-6.2.0-Remove-feature-macro.patch
# Reported to upstream <yap-users@lists.sourceforge.net>
Patch10: yap-6.2.2-Off-by-one-error-when-initializing-yap_flags.patch
# yap 6.2.2 does not work on PPC (bug #790625)
# Reported to upstream <yap-users@lists.sourceforge.net>
Patch11: yap-6.2.2-Texinfo-5-does-not-allow-bullet-as-table-indicator.patch
# Fix regression with GCC 5.0
# <https://sourceforge.net/p/yap/mailman/message/33405667/>
Patch12: yap-6.2.2-Friend-function-template-defined-in-a-class-cannot-b.patch
BuildRequires: autoconf
# Update config.sub to support aarch64, bug #926852
BuildRequires: automake
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
%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 .macro
%patch9 -p1 -b .remove_feature_macro
%patch10 -p1 -b .initialization
%patch11 -p1 -b .texinfo5
%patch12 -p1 -b .gcc5
# 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
# Add soname to library
sed -i -e 's/\(-soname=\$DYNYAPLIB\)/\1.%{version}/' configure.in
# Update config.sub to support aarch64/ppc64le, bug #926852
cp -p %{_datadir}/automake-*/config.{sub,guess} .
cp -p %{_datadir}/automake-*/config.{sub,guess} packages/jpl
# 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@\)\(.*\)/\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"
sed -i -e '/mode: texinfo/ s/\(coding: \)latin-1/\1utf-8/' "${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||')
# Private malloc does not work on AArch64, bug #1142068
%configure \
%ifarch aarch64 %{power64}
--enable-use-malloc \
%else
--disable-use-malloc \
%endif
--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
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
%files
%doc Artistic changes* COPYING GIT README TO_DO
%if %{use_eam}
%doc README.EAM.html
%endif
%{_bindir}/yap
%{_datadir}/Yap
%{_libdir}/Yap
%{_libdir}/libYap.so.*
%{_infodir}/*
%files devel
%{_libdir}/libYap.so
%{_includedir}/Yap
%files docs
%doc LGPL/pillow/doc/pillow_doc_html/*
%doc LGPL/pillow/doc/article.ps.gz
%doc %{documentation}/*
%changelog
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 6.2.2-19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Thu Jan 12 2017 Igor Gnatenko <ignatenko@redhat.com> - 6.2.2-18
- Rebuild for readline 7.x
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 6.2.2-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Wed Dec 16 2015 Peter Robinson <pbrobinson@fedoraproject.org> 6.2.2-16
- Disable private malloc on power64 too
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.2.2-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Wed Apr 15 2015 Petr Pisar <ppisar@redhat.com> - 6.2.2-14
- Disable private malloc on AArch64 (bug #1142068)
* Thu Feb 12 2015 Petr Pisar <ppisar@redhat.com> - 6.2.2-13
- Fix regression with GCC 5.0
* Wed Aug 20 2014 Kevin Fenzi <kevin@scrye.com> - 6.2.2-12
- Rebuild for rpm bug 1131892
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.2.2-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.2.2-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Mon May 19 2014 Jaromir Capik <jcapik@redhat.com> - 6.2.2-9
- Replacing ppc64 with the power64 macro
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.2.2-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Thu Mar 28 2013 Petr Pisar <ppisar@redhat.com> - 6.2.2-7
- Update config.sub to support aarch64 (bug #926852)
- Adjust to Texinfo 5
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.2.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Mon Jan 07 2013 Petr Pisar <ppisar@redhat.com> - 6.2.2-5
- Fix off-by-one error when initializing yap_flags
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.2.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Thu Feb 23 2012 Petr Pisar <ppisar@redhat.com> - 6.2.2-3
- yap 6.2.2 does not work on PPC (bug #790625)
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.2.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Fri Dec 09 2011 Petr Pisar <ppisar@redhat.com> - 6.2.2-1
- 6.2.2 bump
* Wed Dec 07 2011 Petr Pisar <ppisar@redhat.com> - 6.2.0-6
- Fix building on PowerPC (bug #751144)
* Wed Oct 26 2011 Marcela Mašláňová <mmaslano@redhat.com> - 6.2.0-5.2
- rebuild with new gmp without compat lib
* Wed Oct 12 2011 Peter Schiffer <pschiffe@redhat.com> - 6.2.0-5.1
- rebuild with new gmp
* Thu Jun 23 2011 Dan Horák <dan@danny.cz> - 6.2.0-5
- fix non-x86 builds with recent gcc
* Wed Mar 23 2011 Dan Horák <dan@danny.cz> - 6.2.0-4
- rebuilt for mysql 5.5.10 (soname bump in libmysqlclient)
* Wed Mar 23 2011 Petr Pisar <ppisar@redhat.com> - 6.2.0-3
- Rebuild against mysql 5.5.10
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.2.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Tue Jan 04 2011 Petr Pisar <ppisar@redhat.com> - 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 <ppisar@redhat.com> - 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 <rel-eng@lists.fedoraproject.org> - 5.1.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Mon Jun 15 2009 Gerard Milmeister <gemi@bluewin.ch> - 5.1.3-1
- new release 5.1.3
* Sun Mar 01 2009 Ralf Corsépius <corsepiu@fedoraproject.org> - 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 <tcallawa@redhat.com> - 5.1.1-11
- fix license tag
* Thu Apr 10 2008 Gerard Milmeister <gemi@bluewin.ch> - 5.1.1-10
- enable rpm_opt_flags
- patch for incorrect open call with O_CREAT
* Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 5.1.1-9
- Autorebuild for GCC 4.3
* Sat Oct 20 2007 Gerard Milmeister <gemi@bluewin.ch> - 5.1.1-8
- fix library path for 64-bit platforms
* Wed Aug 29 2007 Gerard Milmeister <gemi@bluewin.ch> - 5.1.1-7
- replaced ld -shared with gcc -shared
* Wed Aug 29 2007 Fedora Release Engineering <rel-eng at fedoraproject dot org> - 5.1.1-6
- Rebuild for selinux ppc32 issue.
* Thu Jul 5 2007 Gerard Milmeister <gemi@bluewin.ch> - 5.1.1-5
- also build libYap.so
* Fri May 11 2007 Gerard Milmeister <gemi@bluewin.ch> - 5.1.1-3
- remove -fstack-protector from optflags in order to enable
loading of .so modules
* Mon Aug 28 2006 Gerard Milmeister <gemi@bluewin.ch> - 5.1.1-2
- Rebuild for FE6
* Mon May 1 2006 Gerard Milmeister <gemi@bluewin.ch> - 5.1.1-1
- new version 5.1.1
- split off devel and docs packages
* Fri Feb 17 2006 Gerard Milmeister <gemi@bluewin.ch> - 5.0.1-2
- Rebuild for Fedora Extras 5
* Tue Oct 25 2005 Gerard Milmeister <gemi@bluewin.ch> - 5.0.1-1
- New Version 5.0.1
* Wed Sep 7 2005 Gerard Milmeister <gemi@bluewin.ch> - 5.0.0-1
- New Version 5.0.0
* Sat Jun 18 2005 Gerard Milmeister <gemi@bluewin.ch> - 4.5.5-5
- Use %%{_prefix}/lib for x86_64
* Sat Jun 18 2005 Gerard Milmeister <gemi@bluewin.ch> - 4.5.5-4
- Fix for non-i386 compilers
* Sat Jun 18 2005 Gerard Milmeister <gemi@bluewin.ch> - 4.5.5-3
- Compiler fix for FC4
* Wed Apr 6 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
- rebuilt
* Sat Feb 12 2005 Gerard Milmeister <gemi@bluewin.ch> - 0:4.5.5-1
- New Version 4.5.5
* Mon Nov 29 2004 Gerard Milmeister <gemi@bluewin.ch> - 0:4.5.3-0.fdr.1
- New Version 4.5.3
* Sat Mar 13 2004 Gerard Milmeister <gemi@bluewin.ch> - 0:4.5.2-0.fdr.1
- New Version 4.5.2
* Sat Nov 22 2003 Gerard Milmeister <gemi@bluewin.ch> - 0:4.4.3-0.fdr.1
- First Fedora release