| |
@@ -1,18 +1,20 @@
|
| |
- Name: gprolog
|
| |
+ Name: gprolog
|
| |
Version: 1.5.0
|
| |
Release: %autorelease
|
| |
- Summary: GNU Prolog is a free Prolog compiler
|
| |
+ Summary: GNU Prolog is a free Prolog compiler
|
| |
|
| |
- License: GPLv2+
|
| |
- URL: http://www.gprolog.org
|
| |
- Source: http://www.gprolog.org/gprolog-%{version}.tar.gz
|
| |
- Patch0: gprolog.make-print-submake-output.patch
|
| |
+ License: LGPLv3+ or GPLv2+
|
| |
+ URL: http://www.gprolog.org
|
| |
+ Source: http://www.gprolog.org/gprolog-%{version}.tar.gz
|
| |
+ Patch0: gprolog.make-print-submake-output.patch
|
| |
+ # Link binaries with Fedora ldflags
|
| |
+ Patch1: gprolog.link-with-fedora-flags.patch
|
| |
|
| |
- BuildRequires: gcc-c++
|
| |
- BuildRequires: gdb-headless
|
| |
- BuildRequires: make
|
| |
+ BuildRequires: gcc-c++
|
| |
+ BuildRequires: gdb-headless
|
| |
+ BuildRequires: make
|
| |
|
| |
- ExclusiveArch: x86_64 %{ix86} ppc alpha
|
| |
+ ExclusiveArch: x86_64 %{ix86} ppc alpha aarch64
|
| |
|
| |
Obsoletes: gprolog-examples < 1.4.0
|
| |
Provides: gprolog-examples = %{version}-%{release}
|
| |
@@ -43,10 +45,15 @@
|
| |
%prep
|
| |
%autosetup -p1
|
| |
|
| |
+ # For build reproducibility reasons, we do not want to insert today's date
|
| |
+ # into header files, but rather the date of the gprolog release.
|
| |
+ verdate=$(date +"%b %d %Y" -r VERSION)
|
| |
+ veryear=$(date +%Y -r VERSION)
|
| |
+ sed -i s/'`pl_date`'/"\"$verdate\""/';'s/'`pl_year`'/"$veryear"/ src/configure
|
| |
+
|
| |
%build
|
| |
- # This package fails to build with LTO due to undefined symbols. LTO
|
| |
- # was disabled in OpenSuSE as well, but with no real explanation why
|
| |
- # beyond the undefined symbols. It really shold be investigated further.
|
| |
+ # This package fails to build with LTO due to use of global register variables.
|
| |
+ # See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68384 for an explanation.
|
| |
# Disable LTO
|
| |
%define _lto_cflags %{nil}
|
| |
|
| |
@@ -57,12 +64,18 @@
|
| |
|
| |
# See http://lists.gnu.org/archive/html/bug-prolog/2016-08/msg00006.html
|
| |
# for the discussion on adding '--disable-regs'
|
| |
- ./configure \
|
| |
+ %configure \
|
| |
--with-install-dir=$RPM_BUILD_ROOT%{_libdir}/gprolog-%{version} \
|
| |
--without-links-dir --without-examples-dir \
|
| |
--with-doc-dir=dist-doc \
|
| |
--with-c-flags="$RPM_OPT_FLAGS" \
|
| |
+ %ifarch %{ix86}
|
| |
--disable-regs
|
| |
+ %endif
|
| |
+
|
| |
+ # Remove package notes flag from LDFLAGS
|
| |
+ # See https://bugzilla.redhat.com/show_bug.cgi?id=2051341
|
| |
+ sed -i 's/ -Wl,-dT.*\.ld//' EnginePl/gp_config.h
|
| |
|
| |
# _smp_flags seems to make trouble
|
| |
make
|
| |
@@ -81,14 +94,14 @@
|
| |
mkdir $RPM_BUILD_ROOT%{_bindir}
|
| |
cd $RPM_BUILD_ROOT%{_libdir}/gprolog-%{version}/bin
|
| |
for i in *; do
|
| |
- ln -s ../%{_lib}/gprolog-%{version}/bin/$i $RPM_BUILD_ROOT%{_bindir}/$i
|
| |
+ ln -s ../%{_lib}/gprolog-%{version}/bin/$i $RPM_BUILD_ROOT%{_bindir}/$i
|
| |
done
|
| |
)
|
| |
rm -f dist-doc/*.{chm,dvi,ps}
|
| |
rm -f dist-doc/compil-scheme.pdf
|
| |
rm -f dist-doc/debug-box.pdf
|
| |
|
| |
- for file in ChangeLog COPYING NEWS VERSION
|
| |
+ for file in ChangeLog COPYING NEWS README VERSION
|
| |
do
|
| |
rm -f $RPM_BUILD_ROOT%{_libdir}/gprolog-%{version}/$file
|
| |
done
|
| |
I also included a comment about why building with LTO doesn't work. It's an unresolved GCC issue. Scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=82643354.