]> git.pld-linux.org Git - packages/pl.git/blob - pl.spec
3c8b99b2a645a5e71545583ea25022d420fb3c4a
[packages/pl.git] / pl.spec
1 #
2 # TODO
3 #       - maybe separate other prolog packages to rpm subpackages
4 #
5 # Conditional build:
6 %bcond_without  java            # Java bindings (so far, JPL only works with Sun Java and IBM Java)
7 %bcond_without  tests           # make check
8 #
9
10 %ifnarch %{x8664} i586 i686 pentium3 pentium4 athlon
11 %undefine       with_java
12 %endif
13
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
18
19 Summary:        SWI Prolog Language
20 Summary(pl.UTF-8):      Język SWI Prolog
21 Name:           pl
22 Version:        6.6.6
23 Release:        1
24 License:        LGPL v2.1+
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
60 Obsoletes:      swi-pl
61 Obsoletes:      swi-prolog
62 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
63
64 %define         no_install_post_chrpath         1
65
66 %description
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).
73
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.
78
79 %package jpl
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}
84 Requires:       jdk
85
86 %description jpl
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
89 APIs:
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
99       user-defined)
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
103       classes
104
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.
107
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
125
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
128 Prologu itd.
129
130 %package xpce
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}
135 Obsoletes:      xpce
136
137 %description xpce
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.
142
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
148 Prolog.
149
150 %prep
151 %setup -q
152 %patch0 -p1
153 %patch1 -p1
154 %patch2 -p1
155
156 %{__mv} src/Tests/core/test_d_break.pl{,disabled}
157
158 %build
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=[^ ]*||')
162 export CFLAGS
163
164 cd src
165 cp -f /usr/share/automake/config.sub .
166 %{__aclocal}
167 %{__autoconf}
168 %configure
169 %{__make}
170 cd ..
171
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
175 export CLASSPATH=.
176
177 cd packages
178 wd=`pwd`
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 \
183                 inclpr ; do
184         cd $i
185         cp -f /usr/share/automake/config.sub .
186         %{__aclocal}
187         %{__autoconf}
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]
191         %configure \
192                 ac_cv_prog_uudecode_base64=no
193         %{__make}
194         cd $wd
195 done
196 cd ..
197
198 %{?with_tests:%{__make} -C src check}
199
200 %install
201 rm -rf $RPM_BUILD_ROOT
202
203 %{__make} -j1 install -C src \
204         DESTDIR=$RPM_BUILD_ROOT
205
206 LD_LIBRARY_PATH="$RPM_BUILD_ROOT%{_libdir}/swipl-%{version}/lib/%{_target_cpu}-linux"; export LD_LIBRARY_PATH
207
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} \
210                 zlib R protobufs \
211                 inclpr ; do
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
218 done
219
220 # packaged as doc
221 %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/swipl-%{version}/{customize,xpce/{COPYING,README}}
222 # no need to package
223 %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/swipl-%{version}/demo
224
225 %clean
226 rm -rf $RPM_BUILD_ROOT
227
228 %files
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
241 %if %{with java}
242 %exclude %{_libdir}/swipl-%{version}/lib/*-linux/libjpl.so
243 %exclude %{_libdir}/swipl-%{version}/library/jpl.pl
244 %endif
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*
251
252 %files xpce
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
264
265 %if %{with java}
266 %files jpl
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
271 %endif
This page took 0.03708 seconds and 2 git commands to generate.