3 # - maybe separate other prolog packages to rpm subpackages
6 %bcond_without java # Java bindings (so far, JPL only works with Sun Java and IBM Java)
7 %bcond_without tests # make check
10 %ifnarch %{x8664} i586 i686 pentium3 pentium4 athlon
14 # packages use SWI-Prolog own linker which doesn't understand -gdwarf* and
15 # some -march= options passed to it by gcc
16 # No poin in building debug packages without debug info
17 %define _enable_debug_packages 0
19 Summary: SWI Prolog Language
20 Summary(pl.UTF-8): Język SWI Prolog
25 Group: Development/Languages
26 #Source0Download: http://www.swi-prolog.org/download/stable
27 Source0: http://www.swi-prolog.org/download/stable/src/%{name}-%{version}.tar.gz
28 # Source0-md5: b1f8c8504880c427016af22366970156
29 Patch0: %{name}-clib-configure.patch
30 Patch1: %{name}-xpce-install.patch
31 Patch2: %{name}-format.patch
32 URL: http://www.swi-prolog.org/
33 BuildRequires: autoconf >= 2.50
34 BuildRequires: automake
35 BuildRequires: db-devel
36 BuildRequires: fontconfig-devel
37 BuildRequires: freetype-devel
38 BuildRequires: gmp-devel >= 4.2.0
39 %{?with_java:BuildRequires: jdk}
40 BuildRequires: libjpeg-devel
41 BuildRequires: ncurses-devel
42 BuildRequires: openssl-devel
43 BuildRequires: pkgconfig
44 BuildRequires: readline-devel >= 4.2
45 BuildRequires: unixODBC-devel
46 BuildRequires: uriparser-devel
47 BuildRequires: xorg-lib-libICE-devel
48 BuildRequires: xorg-lib-libSM-devel
49 BuildRequires: xorg-lib-libX11-devel
50 BuildRequires: xorg-lib-libXaw-devel
51 BuildRequires: xorg-lib-libXext-devel
52 BuildRequires: xorg-lib-libXft-devel
53 BuildRequires: xorg-lib-libXinerama-devel
54 BuildRequires: xorg-lib-libXmu-devel
55 BuildRequires: xorg-lib-libXpm-devel
56 BuildRequires: xorg-lib-libXrender-devel
57 BuildRequires: xorg-lib-libXt-devel
58 BuildRequires: zlib-devel
59 Requires: gmp >= 4.2.0
62 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
64 %define no_install_post_chrpath 1
67 ISO/Edinburgh-style Prolog compiler including modules, autoload,
68 libraries, Garbage-collector, stack-expandor, C/C++-interface,
69 GNU-readline interface, very fast compiler. Including packages clib
70 (Unix process control and sockets), cpp (C++ interface), sgml (reading
71 XML/SGML), sgml/RDF (reading RDF into triples) and XPCE (Graphics UI
72 toolkit, integrated editor (Emacs-clone) and source-level debugger).
74 %description -l pl.UTF-8
75 Kompilator języka PROLOG w stylu Edinburgh wraz z modułami,
76 bibliotekami, garbage collectorrem, interfejsem C, interfejsami do GNU
77 readline, GNU Emacsa i X11 przy użyciu XPCE.
80 Summary: Dynamic, bidirectional interface between SWI-Prolog and Java
81 Summary(pl.UTF-8): Dynamiczny, dwukierunkowy interfejs pomiędzy SWI-Prologiem a Javą
82 Group: Development/Languages
83 Requires: %{name} = %{version}-%{release}
87 JPL 3.x is a dynamic, bidirectional interface between SWI-Prolog 5.2.0
88 or later and Java 2 runtimes (see JPL 3.x Objectives). It offers two
90 * Java API (Java-calls-Prolog): this interface comprises public Java
91 classes which support:
92 + constructing Java representations of Prolog terms and queries
93 + calling queries within SWI-Prolog engines
94 + retrieving (as Java representations of Prolog terms) any
95 bindings created by a call
96 * Prolog API (Prolog-calls-Java): this interface comprises Prolog
97 library predicates which support:
98 + creating instances (objects) of Java classes (built-in and
100 + calling methods of Java objects (and static methods of classes),
101 perhaps returning values or object references
102 + getting and setting the values of fields of Java objects and
105 Calls to the two APIs can be nested, e.g. Java code can call Prolog
106 predicates which call Java methods which call Prolog predicates etc.
108 %description jpl -l pl.UTF-8
109 JPL 3.x to dynamiczny, dwukierunkowy interfejs pomiędzy SWI-Prologiem
110 5.2.0 i późniejszymi a środowiskami uruchomieniowymi Javy 2 (więcej w
111 dokumencie JPL 3.x Objectives). Oferuje dwa API:
112 - API Javy (wywołania Prologu z Javy) - ten interfejs obejmuje klasy
113 publiczne Javy obsługujące:
114 - tworzenie reprezentacji wyrażeń i zapytań Prologu w Javie
115 - wywoływanie zapytań wewnątrz silników SWI-Prologu
116 - odtwarzanie (jako reprezentacji wyrażeń Prologu w Javie)
117 wszelkich dowiązań utworzonych przez wywołanie
118 - API Prologu (wywołania Javy z Prologu) - ten interfejs obejmuje
119 predykaty biblioteki Prologu obsługującą:
120 - tworzenie instancji (obiektów) klas Javy (wbudowanych i
121 zdefiniowanych przez użytkownika)
122 - wywołania metod obiektów (i statycznych metod klas) Javy, także
123 zwracających wartości lub referencje do obiektów
124 - pobieranie i ustawianie wartości pól obiektów i klas Javy
126 Wywołania obu API mogą być zagnieżdżane, np. kod w Javie może wywołać
127 predykaty Prologu wywołujące metody Javy, które wywołują predykaty
131 Summary: XPCE - GUI Toolkit for (SWI-)Prolog
132 Summary(pl.UTF-8): XPCE - toolkit graficzny dla (SWI-)Prologu
133 Group: Development/Languages
134 Requires: %{name} = %{version}-%{release}
138 Graphical User Interface (GUI) toolkit for Prolog and other
139 dynamically typed languages. Provides Object Oriented programming to
140 Prolog as well as a high-level portable GUI toolkit for (SWI-)Prolog.
141 Also available for Quintus and SICStus Prolog.
143 %description xpce -l pl.UTF-8
144 Zestaw Graficzny Interfejsu Użytkownika (GUI) dla Prologu i innych
145 dynamicznie wpisywanych języków. Udostępnia obiektowo zorientowane
146 programowanie dla Prologu jak także jako wysoko dostępny przenośny
147 zestaw GUI dla (SWI-)Prologu. Dostępne także dla Quintus i SICStus
156 %{__mv} src/Tests/core/test_d_break.pl{,disabled}
159 # packages use SWI-Prolog own linker which doesn't understand -gdwarf* and
160 # some -march= options passed to it by gcc
161 CFLAGS=$(echo %{rpmcflags} | sed 's|-march=[^ ]*||')
165 cp -f /usr/share/automake/config.sub .
172 # the packages are written in Prolog itself
173 PATH="$(pwd)/src:$PATH"; export PATH
174 LD_LIBRARY_PATH="$(pwd)/lib/%{_target_cpu}-linux"; export LD_LIBRARY_PATH
179 # see packages/configure for default packages list and their order
180 for i in clib cpp odbc table xpce/src sgml RDF semweb http chr \
181 clpqr nlp ssl tipc pldoc plunit %{?with_java:jpl} \
182 zlib R protobufs PDT utf8proc \
185 cp -f /usr/share/automake/config.sub .
188 grep -q AC_CONFIG_HEADER configure.in && %{__autoheader}
189 # ac_cv_prog_uudecode_base64=no is a hack to compile Test.class instead of
190 # using included one which fails with Sun/Oracle JDK 1.6 [needed for jpl]
192 ac_cv_prog_uudecode_base64=no
198 %{?with_tests:%{__make} -C src check}
201 rm -rf $RPM_BUILD_ROOT
203 %{__make} -j1 install -C src \
204 DESTDIR=$RPM_BUILD_ROOT
206 LD_LIBRARY_PATH="$RPM_BUILD_ROOT%{_libdir}/swipl-%{version}/lib/%{_target_cpu}-linux"; export LD_LIBRARY_PATH
208 for i in clib cpp odbc table xpce/src sgml RDF semweb http chr \
209 clpqr nlp ssl tipc pldoc plunit %{?with_java:jpl} \
212 PATH=$RPM_BUILD_ROOT%{_bindir}:$PATH \
213 %{__make} -j1 install -C packages/$i \
214 PLBASE=$RPM_BUILD_ROOT%{_libdir}/swipl-%{version} \
215 prefix=$RPM_BUILD_ROOT%{_prefix} \
216 bindir=$RPM_BUILD_ROOT%{_bindir} \
217 mandir=$RPM_BUILD_ROOT%{_mandir}/man1
221 %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/swipl-%{version}/{customize,xpce/{COPYING,README}}
223 %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/swipl-%{version}/demo
226 rm -rf $RPM_BUILD_ROOT
229 %defattr(644,root,root,755)
230 %doc README ReleaseNotes/relnotes-* customize
231 %attr(755,root,root) %{_bindir}/swipl*
232 %dir %{_libdir}/swipl-%{version}
233 %{_libdir}/swipl-%{version}/Makefile
234 %attr(755,root,root) %{_libdir}/swipl-%{version}/bin
235 %{_libdir}/swipl-%{version}/boot*
236 %dir %{_libdir}/swipl-%{version}/lib
237 %dir %{_libdir}/swipl-%{version}/lib/*-linux
238 %attr(755,root,root) %{_libdir}/swipl-%{version}/lib/*-linux/*.so*
239 %{_libdir}/swipl-%{version}/lib/*-linux/*.a
240 %{_libdir}/swipl-%{version}/library
242 %exclude %{_libdir}/swipl-%{version}/lib/*-linux/libjpl.so
243 %exclude %{_libdir}/swipl-%{version}/library/jpl.pl
245 %{_libdir}/swipl-%{version}/include
246 %{_libdir}/swipl-%{version}/do*
247 %{_libdir}/swipl-%{version}/*.rc
248 %{_libdir}/swipl-%{version}/swipl.home
249 %{_pkgconfigdir}/swipl.pc
250 %{_mandir}/man1/swipl*.1*
253 %defattr(644,root,root,755)
254 %doc packages/xpce/{EXTENDING,INFO,README,README-4.8,README.CXX,README.alpha,README.customise}
255 %attr(755,root,root) %{_bindir}/xpce-client
256 %dir %{_libdir}/swipl-%{version}/xpce
257 %{_libdir}/swipl-%{version}/xpce/Defaults*
258 %attr(755,root,root) %{_libdir}/swipl-%{version}/xpce/bin
259 %{_libdir}/swipl-%{version}/xpce/appl-help
260 %{_libdir}/swipl-%{version}/xpce/bitmaps
261 %{_libdir}/swipl-%{version}/xpce/man
262 %{_libdir}/swipl-%{version}/xpce/pl
263 %{_libdir}/swipl-%{version}/xpce/prolog
267 %defattr(644,root,root,755)
268 %attr(755,root,root) %{_libdir}/swipl-%{version}/lib/*-linux/libjpl.so
269 %{_libdir}/swipl-%{version}/lib/jpl.jar
270 %{_libdir}/swipl-%{version}/library/jpl.pl