#
# TODO
-# - maybe separate other prolog packages to rpm subpackages
+# - maybe separate other prolog packages to rpm subpackages
#
# Conditional build:
%bcond_without java # Java bindings (so far, JPL only works with Sun Java and IBM Java)
%bcond_without tests # make check
#
-%ifnarch %{x8664} i586 i686 pentium3 pentium4 athlon
+%ifnarch %{x8664} i586 i686 pentium3 pentium4 athlon
%undefine with_java
%endif
+# packages use SWI-Prolog own linker which doesn't understand -gdwarf* and
+# some -march= options passed to it by gcc
+# No poin in building debug packages without debug info
+%define _enable_debug_packages 0
+
Summary: SWI Prolog Language
Summary(pl.UTF-8): Język SWI Prolog
Name: pl
-Version: 6.6.0
+Version: 7.2.3
Release: 1
License: LGPL v2.1+
Group: Development/Languages
#Source0Download: http://www.swi-prolog.org/download/stable
-Source0: http://www.swi-prolog.org/download/stable/src/%{name}-%{version}.tar.gz
-# Source0-md5: 75866dbdf361d883b3e441ccd00effda
+Source0: http://www.swi-prolog.org/download/stable/src/swi%{name}-%{version}.tar.gz
+# Source0-md5: 67c182f18310f115b49f1e2195499e0c
Patch0: %{name}-clib-configure.patch
Patch1: %{name}-xpce-install.patch
Patch2: %{name}-format.patch
+Patch3: %{name}-jni.patch
URL: http://www.swi-prolog.org/
BuildRequires: autoconf >= 2.50
BuildRequires: automake
Summary(pl.UTF-8): Dynamiczny, dwukierunkowy interfejs pomiędzy SWI-Prologiem a Javą
Group: Development/Languages
Requires: %{name} = %{version}-%{release}
-Requires: java-sun
+Requires: jdk
%description jpl
JPL 3.x is a dynamic, bidirectional interface between SWI-Prolog 5.2.0
Prolog.
%prep
-%setup -q
+%setup -q -n swi%{name}-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
+%patch3 -p1
+
+%{__mv} src/Tests/core/test_d_break.pl{,disabled}
%build
+# packages use SWI-Prolog own linker which doesn't understand -gdwarf* and
+# some -march= options passed to it by gcc
+CFLAGS=$(echo %{rpmcflags} | sed 's|-march=[^ ]*||')
+export CFLAGS
+
cd src
cp -f /usr/share/automake/config.sub .
%{__aclocal}
%{__autoconf}
-%configure
+%configure \
+ PLARCH=%{_target_platform}
%{__make}
cd ..
# the packages are written in Prolog itself
PATH="$(pwd)/src:$PATH"; export PATH
-LD_LIBRARY_PATH="$(pwd)/lib/%{_target_cpu}-linux"; export LD_LIBRARY_PATH
+LD_LIBRARY_PATH="$(pwd)/lib/%{_target_platform}"; export LD_LIBRARY_PATH
export CLASSPATH=.
-# packages use SWI-Prolog own linker which doesn't understand -gdwarf* and
-# some -march= options passed to it by gcc
-%undefine debuginfocflags
-CFLAGS=$(echo %{rpmcflags} | sed 's|-march=[^ ]*||')
-export CFLAGS
-
cd packages
wd=`pwd`
# see packages/configure for default packages list and their order
for i in clib cpp odbc table xpce/src sgml RDF semweb http chr \
clpqr nlp ssl tipc pldoc plunit %{?with_java:jpl} \
- zlib R protobufs PDT utf8proc \
+ zlib protobufs PDT utf8proc archive pengines cql \
inclpr ; do
cd $i
cp -f /usr/share/automake/config.sub .
%{__make} -j1 install -C src \
DESTDIR=$RPM_BUILD_ROOT
-LD_LIBRARY_PATH="$RPM_BUILD_ROOT%{_libdir}/swipl-%{version}/lib/%{_target_cpu}-linux"; export LD_LIBRARY_PATH
+LD_LIBRARY_PATH="$RPM_BUILD_ROOT%{_libdir}/swipl-%{version}/lib/%{_target_platform}"; export LD_LIBRARY_PATH
for i in clib cpp odbc table xpce/src sgml RDF semweb http chr \
clpqr nlp ssl tipc pldoc plunit %{?with_java:jpl} \
- zlib R protobufs \
+ zlib protobufs PDT utf8proc archive pengines cql \
inclpr ; do
PATH=$RPM_BUILD_ROOT%{_bindir}:$PATH \
%{__make} -j1 install -C packages/$i \
%attr(755,root,root) %{_libdir}/swipl-%{version}/bin
%{_libdir}/swipl-%{version}/boot*
%dir %{_libdir}/swipl-%{version}/lib
-%dir %{_libdir}/swipl-%{version}/lib/*-linux
-%attr(755,root,root) %{_libdir}/swipl-%{version}/lib/*-linux/*.so*
-%{_libdir}/swipl-%{version}/lib/*-linux/*.a
+%dir %{_libdir}/swipl-%{version}/lib/%{_target_platform}
+%attr(755,root,root) %{_libdir}/swipl-%{version}/lib/%{_target_platform}/*.so*
+%{_libdir}/swipl-%{version}/lib/%{_target_platform}/*.a
%{_libdir}/swipl-%{version}/library
%if %{with java}
-%exclude %{_libdir}/swipl-%{version}/lib/*-linux/libjpl.so
+%exclude %{_libdir}/swipl-%{version}/lib/%{_target_platform}/libjpl.so
%exclude %{_libdir}/swipl-%{version}/library/jpl.pl
%endif
%{_libdir}/swipl-%{version}/include
%files xpce
%defattr(644,root,root,755)
-%doc packages/xpce/{EXTENDING,INFO,README,README-4.8,README.CXX,README.alpha,README.customise}
+%doc packages/xpce/{EXTENDING,INFO,README,README.CXX,README.customise}
%attr(755,root,root) %{_bindir}/xpce-client
%dir %{_libdir}/swipl-%{version}/xpce
%{_libdir}/swipl-%{version}/xpce/Defaults*
%if %{with java}
%files jpl
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/swipl-%{version}/lib/*-linux/libjpl.so
+%attr(755,root,root) %{_libdir}/swipl-%{version}/lib/%{_target_platform}/libjpl.so
%{_libdir}/swipl-%{version}/lib/jpl.jar
%{_libdir}/swipl-%{version}/library/jpl.pl
%endif