diff --git a/JavaConfig.java b/JavaConfig.java new file mode 100644 index 0000000..c5d0f02 --- /dev/null +++ b/JavaConfig.java @@ -0,0 +1,153 @@ +/* JavaConfig - tool for getting paths for current java environment. + * © 2011, 2012, 2014, 2017 Petr Písař + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +class JavaConfig { + private static String output = ""; + + + /* + * Append text to output with proper padding or terminates if text is null. + * @param text String to append. + */ + private static void concatenate(String text) { + if (text == null) { + System.exit(2); + } + output = (output.equals("") ? "" : output + " " ) + text; + } + + + /* + * Show usage message and terminates program with given @exit_code. + * @param exit_code code to return + * */ + private static void usage(int exitCode) { + System.out.print( + "JavaConfig [OPTIONS]\n" + + " --home Output path to Java home\n" + + " --libs-only-L Output -L linker flags\n" + + " --version Output Java version on first separate line\n" + ); + System.exit(exitCode); + } + + + /* + * @Return path to Java home or null in case of error. + */ + public static String home() { + return System.getProperty("java.home"); + } + + + /* + * @Return formated libary search path as -L compiler flag, + * null if error occured. + * */ + public static String libsOnlyL() { + String value; + String architecture = System.getProperty("os.arch"); + String home = home(); + String filesep = System.getProperty("file.separator"); + String paths[]; + + /* The java.library.path works up to JDK 1.6. */ + if (null == (value = System.getProperty("java.library.path"))) { + return null; + } + + /* The java.library.path does not work since JDK 1.7. See + * . + * The "client" subdirectory is need on AArch64 since JDK 1.8. See + * . */ + if (null == architecture || null == home || null == filesep) { + return null; + } + + /* Experimental 32-bit ARM openjdk variant uses lib/aarch32. See + * . */ + if (architecture.contentEquals("arm") && home.contains("aarch32")) { + architecture = "aarch32"; + } + + value = value + ":" + + home + filesep + "lib" + filesep + architecture + ":" + + home + filesep + "lib" + filesep + architecture + filesep + "server" + + ":" + + home + filesep + "lib" + filesep + architecture + filesep + "client"; + + + /* Convert the colon-delimited paths to LDFLAGS format */ + paths = value.split(":"); + + for (int i = 0; i < paths.length; i++) { + if (paths[i].equals("")) { + continue; + } + + if (i == 0) { + value = "-L" + paths[i]; + } else { + value = value + " -L" + paths[i]; + } + } + value = value + " -Wl,-rpath," + home + filesep + "lib" + architecture + + filesep + "server"; + + return value; + } + + + /* + * @Return version of Java home or null in case of error. + */ + public static String version() { + return System.getProperty("java.version"); + } + + + /* + * Entry point to this class. + */ + public static void main(String argv[]) { + if (argv.length < 1) { + usage(1); + } + + for (int i = 0; i < argv.length; i++) { + if (argv[i].equals("--home")) { + concatenate(home()); + } else if (argv[i].equals("--libs-only-L")) { + concatenate(libsOnlyL()); + } else if (argv[i].equals("--version")) { + /* pkg-config prints version on first line */ + String version = version(); + if (null == version) { + System.exit(2); + } + System.out.println(version); + } else { + usage(1); + } + } + + if (!output.equals("")) { + System.out.println(output); + } + System.exit(0); + } +} diff --git a/licenses.txt b/licenses.txt deleted file mode 100644 index bab9088..0000000 --- a/licenses.txt +++ /dev/null @@ -1,221 +0,0 @@ -The swipl project is released under the BSD-2-Clause license. Exceptions are -noted below. The status of each file is indicated with the following codes: - -BD = in the swi-prolog-bdb package -CL = in the swi-prolog-cli package -CP = in the swi-prolog-core-packages package -CR = in the swi-prolog-core package -DC = in the swi-prolog-doc package -FL = in the swi-prolog-full package -JV = in the swi-prolog-java pacakge -MN = in the main package, swi-prolog -NP = not packaged; these files do not influence the package License field -OD = in the swi-prolog-odbc package -TS = in the swi-prolog-test package -WN = in the swi-prolog-win package - -bcrypt-Solar-Designer ---------------------- -CL packages/ssl/crypt_blowfish.{c,h} - -Beerware --------- -CP packages/clib/md5passwd.c - -Brian-Gladman-3-Clause OR GPL-1.0-or-later ------------------------------------------- -CP packages/clib/sha1/brg_endian.h -CP packages/clib/sha1/brg_types.h -CP packages/clib/sha1/hmac.{c,h} -CP packages/clib/sha1/pwd2key.{c,h} -CP packages/clib/sha1/sha* -CR src/pl-termhash.{c,h} - -BSD-2-Clause AND BSD-3-Clause ------------------------------ -CL packages/libedit/libedit4pl.c - -BSD-2-Clause AND FBM AND HPND-Pbmplus -------------------------------------- -WN packages/xpce/src/img/gifwrite.c - -BSD-2-Clause AND GPL-2.0-or-later ---------------------------------- -TS src/Tests/core/test_coroutining.pl - -BSD-2-Clause AND IJG --------------------- -WN packages/xpce/src/img/jdatadst.c -WN packages/xpce/src/img/jdatasrc.c - -BSD-2-Clause AND LicenseRef-Fedora-Public-Domain ------------------------------------------------- -CR library/aggregate.pl -WN packages/xpce/src/gra/colour.c - -BSD-2-Clause AND MIT --------------------- -CP packages/http/http_stream.pl -CP packages/http/multipart.c - -BSD-2-Clause AND Unicode-DFS-2016 ---------------------------------- -CR library/blocks.pl - -BSD-2-Clause OR Artistic-2.0 ----------------------------- -CP library/ugraphs.pl - -BSD-3-Clause ------------- -CP packages/clib/bsd-crypt.c -NP packages/libedit/libedit/* -NP packages/odbc/cmake/FindODBC.cmake -NP packages/protobufs/interop/google/protobuf/unittest* -CL packages/tipc/tipcutils/tipc-config.c -NP packages/xpce/cmake/FindFontConfig.cmake -CR src/libbf/mersenne-twister.{c,h} - -CC-BY-SA-3.0 ------------- -DC man/main.doc -WN packages/xpce/man/course/doc.doc -WN packages/xpce/man/info/titlepage.def - -dtoa ----- -CR src/os/dtoa.c - -Free for non-commercial use ---------------------------- -NP bench/unify.pl (removed from tarball) -NP bench/simple_analyzer.pl (removed from tarball) - -GFDL-1.3-no-invariants-or-later -------------------------------- -CP packages/sweep/sweep.texi - -GPL-1.0-or-later OR Artistic-1.0-Perl -------------------------------------- -CP packages/nlp/double_metaphone.c - -GPL-2.0-or-later ----------------- -NP repackage.sh (not included in the upstream tarball) -NP packages/xpce/man/info/texinfo.tex - -GPL-2.0-or-later WITH Bison-exception-2.2 AND LicenseRef-Fedora-Public-Domain ------------------------------------------------------------------------------ -WN packages/xpce/src/gnu/getdate.c - -GPL-2.0-or-later with SWI-exception ------------------------------------ -CP packages/clpqr/* -CP packages/http/http_server_health.pl -TS src/Tests/compile/test_autoload.pl -TS tests/library/test_pio.pl - -GPL-3.0-or-later ----------------- -CP packages/sweep/emacs-module.h - -Knuth-CTAN ----------- -DC man/name.bst -WN packages/xpce/TeX/name.bst - -LGPL-2.0-only -------------- -NP cmake/TestSignalType.cmake - -LGPL-2.0-or-later ------------------ -CP packages/nlp/isub.c - -LGPL-2.1-or-later ------------------ -TS src/Tests/core/test_arith.pl -TS src/Tests/core/test_bips.pl -TS src/Tests/core/test_dcg.pl -TS src/Tests/core/test_sort.pl -TS src/Tests/core/test_subsumes.pl - -LicenseRef-Fedora-Public-Domain -------------------------------- -NP bench/programs/derive.pl -NP bench/programs/divide10.pl -NP bench/programs/eval.pl -NP bench/programs/fib.pl -NP bench/programs/log10.pl -NP bench/programs/nreverse.pl -NP bench/programs/ops8.pl -NP bench/programs/qsort.pl -NP bench/programs/queens_clpfd.pl -NP bench/programs/query.pl -NP bench/programs/serialise.pl -NP bench/programs/sieve.pl -NP bench/programs/times10.pl -CR library/dialect/bim.pl -NP packages/clib/demo/* -NP packages/cpp/likes.cpp -NP packages/http/examples/demo_body.pl -NP packages/http/examples/demo_daemon.pl -CP packages/semweb/murmur.{c,h} -NP packages/ssl/https.pl -NP packages/stomp/examples/* -NP packages/swipy/tests/russel.pl -WN packages/xpce/man/course/bib.pl -WN packages/xpce/man/course/fam.pl -WN packages/xpce/man/course/ftp.pl -WN packages/xpce/man/course/learner.pl -WN packages/xpce/man/course/lib/prompt.pl -WN packages/xpce/man/info/dialog.pl -WN packages/xpce/man/info/which.pl -WN packages/xpce/man/info/window.pl -WN packages/xpce/man/reference/class/image.doc -WN packages/xpce/man/userguide/examples/graphedit.pl -WN packages/xpce/src/gnu/getdate-source.y -WN packages/xpce/src/gnu/y.tab -NP scripts/swipl-bt -CR src/pl-hash.{c,h} -CR src/libtai/* -NP src/tools/functions.pm -NP src/tools/update-deps - -LPPL-1.3c ---------- -DC man/bk9.clo -DC man/swipl.cls - -MIT ---- -NP bench/programs/chat_parser.pl -NP packages/http/web/js/jquery* -CP packages/mqi/python/* -NP packages/pcre/cmake/FindPCRE.cmake -NP packages/swipy/test_xsb_janus.pl -NP packages/swipy/xsb_tests/* -CR src/libbf/cutils.{c,h} -CR src/libbf/libbf.{c,h} - -MIT AND Unicode-DFS-2015 ------------------------- -CP packages/utf8proc/* - -Spencer-99 AND TCL AND PostgreSQL ---------------------------------- -WN packages/xpce/src/rgx/* - -W3C ---- -CP packages/sgml/DTD/* - -X11 ---- -NP packages/xpce/deps/xpm/* - -Zlib ----- -CP packages/clib/md5.{c,h} -CP packages/semweb/md5.{c,h} -CR src/minizip/* diff --git a/pl.spec b/pl.spec index 322ecbd..0fc08b7 100644 --- a/pl.spec +++ b/pl.spec @@ -1,93 +1,230 @@ +# TESTING NOTE: The tests can be run by executing ctest in the build directory. +# However, some tests are guaranteed to fail when built by koji: +# - Those that require a network: http:http, semweb:load, ssl:ssl +# - Those that require JNI: jpl:prolog_in_java, jpl:java_in_prolog +# Also, the zlib:zlib test requires a Unicode locale (via the LC_ALL or LANG +# environment variables). For example: +# export LC_ALL=C.UTF-8 + +%global separate_xpce 1 + # Name of the architecture-specific lib directory %global swipl_arch %{_target_cpu}-linux -Name: pl -Version: 10.0.0 -Release: %autorelease -Summary: ISO/Edinburgh-style Prolog interpreter +Name: pl +Version: 9.2.9 +Release: %autorelease +Summary: SWI-Prolog - Edinburgh compatible Prolog compiler +#LICENSE: BSD-2-Clause +#library/ugraphs.pl BSD-2-Clause AND (GPL-2.0-or-later WITH +# SWI-Prolog extra clause or Artistic-2.0) +#library/unicode/blocks.pl BSD-2-Clause AND Unicode-DFS-2016 +#man/main.doc CC-BY-SA-3.0 +#man/swipl.cls LPPL-1.3a +#packages/bdb/bdb4pl.doc Sleepycat (due to linking with libdb) +#packages/clib/bsd-crypt.c BSD-3-Clause +#packages/clib/clib.doc (BSD-3-Clause OR GPL-1.0-or-later) AND +# BSD-3-Clause +#packages/clib/md5.c Zlib +#packages/clib/md5.h Zlib +#packages/clib/md5passwd.c Beerware +#packages/clib/sha1/brg_endian.h Brian-Gladman-3-Clause OR GPL-1.0+ +#packages/clib/sha1/brg_types.h Brian-Gladman-3-Clause OR GPL-1.0+ +#packages/clib/sha1/hmac.c Brian-Gladman-3-Clause OR GPL-1.0+ +#packages/clib/sha1/hmac.h Brian-Gladman-3-Clause OR GPL-1.0+ +#packages/clib/sha1/pwd2key.c Brian-Gladman-3-Clause OR GPL-1.0+ +#packages/clib/sha1/pwd2key.h Brian-Gladman-3-Clause OR GPL-1.0+ +#packages/clib/sha1/sha1.c Brian-Gladman-3-Clause OR GPL-1.0+ +#packages/clib/sha1/sha1.h Brian-Gladman-3-Clause OR GPL-1.0+ +#packages/clib/sha1/sha1b.c Brian-Gladman-3-Clause OR GPL-1.0+ +#packages/clib/sha1/sha2.c Brian-Gladman-3-Clause OR GPL-1.0+ +#packages/clib/sha1/sha2.h Brian-Gladman-3-Clause OR GPL-1.0+ +#packages/clib/sha1/sha2b.c Brian-Gladman-3-Clause OR GPL-1.0+ +#packages/clpqr/clpq.pl GPL-2.0-or-later with SWI exception +#packages/clpqr/clpq/bb_q.pl GPL-2.0-or-later with SWI exception +#packages/clpqr/clpq/bv_q.pl GPL-2.0-or-later with SWI exception +#packages/clpqr/clpq/fourmotz_q.pl GPL-2.0-or-later with SWI exception +#packages/clpqr/clpq/ineq_q.pl GPL-2.0-or-later with SWI exception +#packages/clpqr/clpq/itf_q.pl GPL-2.0-or-later with SWI exception +#packages/clpqr/clpq/nf_q.pl GPL-2.0-or-later with SWI exception +#packages/clpqr/clpq/store_q.pl GPL-2.0-or-later with SWI exception +#packages/clpqr/clpqr/class.pl GPL-2.0-or-later with SWI exception +#packages/clpqr/clpqr/clpq.pl GPL-2.0-or-later with SWI exception +#packages/clpqr/clpqr/dump.pl GPL-2.0-or-later with SWI exception +#packages/clpqr/clpqr/geler.pl GPL-2.0-or-later with SWI exception +#packages/clpqr/clpqr/itf.pl GPL-2.0-or-later with SWI exception +#packages/clpqr/clpqr/ordering.pl GPL-2.0-or-later with SWI exception +#packages/clpqr/clpqr/project.pl GPL-2.0-or-later with SWI exception +#packages/clpqr/clpqr/redund.pl GPL-2.0-or-later with SWI exception +#packages/clpqr/clpr.pl GPL-2.0-or-later with SWI exception +#packages/clpqr/clpr/bb_r.pl GPL-2.0-or-later with SWI exception +#packages/clpqr/clpr/bv_r.pl GPL-2.0-or-later with SWI exception +#packages/clpqr/clpr/fourmotz_r.pl GPL-2.0-or-later with SWI exception +#packages/clpqr/clpr/ineq_r.pl GPL-2.0-or-later with SWI exception +#packages/clpqr/clpr/itf_r.pl GPL-2.0-or-later with SWI exception +#packages/clpqr/clpr/nf_r.pl GPL-2.0-or-later with SWI exception +#packages/clpqr/clpr/store_r.pl GPL-2.0-or-later with SWI exception +#packages/http/http_server_health.pl GPL-2.0-or-later with SWI exception +#packages/mqi/python/ MIT +#packages/nlp/double_metaphone.c GPL-1.0-or-later OR Artistic-1.0-Perl +#packages/nlp/isub.c LGPL-2.0-or-later +#packages/plunit/swi.pl BSD-2-Clause and (GPL-2.0-or-later WITH +# SWI-Prolog extra clause OR Artistic-2.0) +#packages/protobufs/interop/google/ BSD-3-Clause +#packages/semweb/md5.c Zlib +#packages/semweb/md5.h Zlib +#packages/semweb/murmur.c LicenseRef-Fedora-Public-Domain +#packages/semweb/murmur.h LicenseRef-Fedora-Public-Domain +#packages/tipc/tipcutils/tipc-config.c BSD-3-Clause +#packages/utf8proc/pgsql/utf8proc_pgsql.c MIT +#packages/utf8proc/ruby/utf8proc_native.c MIT +#packages/utf8proc/ruby/utf8proc_rb.c MIT +#packages/utf8proc/utf8proc.c MIT +#packages/utf8proc/utf8proc.doc MIT AND Unicode-DFS-2015 +#packages/utf8proc/utf8proc.h MIT +#packages/utf8proc/utf8proc_data.c Unicode-DFS-2015 +#packages/xpce/src/gnu/getdate-source.y LicenseRef-Fedora-Public-Domain +#packages/xpce/src/gnu/getdate.c LicenseRef-Fedora-Public-Domain AND +# GPL-2.0-or-later WITH Bison-exception-2.2 +#packages/xpce/src/gnu/y.tab LicenseRef-Fedora-Public-Domain +#packages/xpce/src/img/gifwrite.c Part is FBM +#packages/xpce/src/rgx/ Spencer-99 AND TCL +#packages/xpce/src/x11/xdnd.h GPL-2.0-or-later +#scripts/swipl-bt LicenseRef-Fedora-Public-Domain +#src/minizip/ Zlib +#src/os/dtoa.c dtoa +#src/pl-hash.c LicenseRef-Fedora-Public-Domain +#src/pl-hash.h LicenseRef-Fedora-Public-Domain +#src/swipl-ld.1 LGPL-2.0-or-later +#src/tools/functions.pm LicenseRef-Fedora-Public-Domain -# For the license breakdown, see licenses.txt, Source2 -License: BSD-2-Clause -URL: https://www.swi-prolog.org/ -VCS: git:https://github.com/SWI-Prolog/swipl.git -# Source0: %%{url}download/stable/src/swipl-%%{version}.tar.gz +# Not compiled into a binary package: +#External: JavaConfig.java GPL-3.0-or-later +#External: repackage.sh GPL-2.0-or-later +#bench/chat_parser.pl MIT +#packages/RDF/configure FSFUL +#packages/clib/configure FSFUL +#packages/clpqr/.fileheader GPL-2.0-or-later with SWI exception +#packages/clpqr/configure FSFUL +#packages/cpp/configure FSFUL +#packages/http/examples/calc.pl LicenseRef-Fedora-Public-Domain +#packages/http/web/js/jquery* MIT +#packages/nlp/configure FSFUL +#packages/pcre/cmake/FindPCRE.cmake MIT +#packages/protobufs/configure FSFUL +#packages/sgml/configure FSFUL +#packages/ssl/configure FSFUL +#packages/stomp/examples/ping.pl LicenseRef-Fedora-Public-Domain +#packages/stomp/examples/pong.pl LicenseRef-Fedora-Public-Domain +#packages/stomp/examples/simple.pl LicenseRef-Fedora-Public-Domain +#packages/swipl-win/README.md LGPL-2.1-only +#packages/utf8proc/LICENSE MIT AND Unicode-DFS-2015 +#packages/utf8proc/data_generator.rb MIT AND Unicode-DFS-2015 +#packages/utf8proc/ruby/gem/LICENSE MIT AND Unicode-DFS-2015 +#packages/xpce/TeX/name.bst LicenseRef-Bibtex +#packages/xpce/man/info/texinfo.tex GPL-2.0-or-later +#packages/xpce/src/configure FSFUL +#packages/xpce/src/msw/simx.h SGI-B-2.0 +#packages/xpce/src/msw/xpm.h SGI-B-2.0 +#packages/zlib/configure FSFUL +#src/libbf/cutils.c MIT +#src/libbf/cutils.h MIT +#src/libbf/libbf.c MIT +#src/libbf/libbf.h MIT +#src/libbf/mersenne-twister.c BSD-3-Clause +#src/libbf/mersenne-twister.h BSD-3-Clause +#src/Tests/ BSD-2-Clause AND GPL-2.0-or-later WITH +# SWI-Prolog extra clause +#src/tools/update-deps LicenseRef-Fedora-Public-Domain +# Removed from repackaged tar ball, see +# : +#bench/unify.pl Free for non-commercial +#bench/simple_analyzer.pl Free for non-commercial +License: BSD-2-Clause AND BSD-3-Clause AND (Brian-Gladman-3-Clause OR GPL-1.0-or-later) AND Beerware AND CC-BY-SA-3.0 AND (GPL-1.0-or-later OR Artistic-1.0-Perl) AND GPL-2.0-or-later AND GPL-2.0-or-later WITH SWI-Exception AND (GPL-2.0-or-later WITH SWI-Exception OR Artistic-2.0) AND LGPL-2.0-or-later AND LicenseRef-Fedora-Public-Domain AND LPPL-1.3a AND MIT AND Sleepycat AND Unicode-DFS-2015 AND Unicode-DFS-2016 AND Zlib AND dtoa +URL: https://www.swi-prolog.org/ +VCS: git:https://github.com/SWI-Prolog/swipl.git +# Source0: %%{url}/download/stable/src/swipl-%%{version}.tar.gz # To create the repackaged archive, use ./repackage.sh %%{version} -Source0: swipl-%{version}_repackaged.tar.gz -Source1: repackage.sh -Source2: licenses.txt +Source0: swipl-%{version}_repackaged.tar.gz +Source1: %{url}download/xpce/doc/userguide/userguide.html.tgz +Source2: JavaConfig.java +Source3: repackage.sh # Use JNI for Java binding -Patch0: swipl-8.2.1-Fix-JNI.patch +Patch0: swipl-8.2.1-Fix-JNI.patch # Upstream installation paths differ from distribution ones -Patch1: swipl-8.2.0-Remove-files-locations-from-swipl-1-manual.patch +Patch1: swipl-8.2.0-Remove-files-locations-from-swipl-1-manual.patch # Unbundle libstemmer -Patch2: swipl-8.2.0-unbundle-libstemmer.patch -# Expose inclpr plugin dependency on the math library to RPM -Patch3: swipl-9.2.7-inclpr-math.patch +Patch2: swipl-8.2.0-unbundle-libstemmer.patch # Use zlib-ng directly rather than via the zlib compatibility interface -Patch4: swipl-9.2.9-zlib-ng.patch -# Fix detection of the secure_getenv function -Patch5: swipl-10.0.0-secure-getenv.patch +Patch3: swipl-9.2.9-zlib-ng.patch # See https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86} BuildRequires: cmake -BuildRequires: fdupes BuildRequires: findutils BuildRequires: gcc-c++ BuildRequires: ninja-build # Base -BuildRequires: cmake(zlib-ng) -BuildRequires: libatomic +BuildRequires: gmp-devel BuildRequires: pkgconfig -BuildRequires: pkgconfig(gmp) +BuildRequires: pkgconfig(libedit) BuildRequires: pkgconfig(libpcre2-posix) BuildRequires: pkgconfig(libtcmalloc) BuildRequires: pkgconfig(ncurses) +%if 0%{?el8} +# on el8 readline isn't picked up by pkgconfig +BuildRequires: readline-devel +%else BuildRequires: pkgconfig(readline) +%endif # archive BuildRequires: pkgconfig(libarchive) -# bdb -BuildRequires: libdb-devel -# crypt -BuildRequires: libxcrypt-devel # http BuildRequires: js-jquery -# jpl -%ifarch %{java_arches} -BuildRequires: java-25-devel -BuildRequires: mvn(junit:junit) -BuildRequires: mvn(org.hamcrest:hamcrest) -%endif +# XPCE +BuildRequires: pkgconfig(ice) +BuildRequires: pkgconfig(libjpeg) +BuildRequires: pkgconfig(sm) +BuildRequires: pkgconfig(x11) +BuildRequires: pkgconfig(xft) +BuildRequires: pkgconfig(xinerama) +BuildRequires: pkgconfig(xpm) +BuildRequires: pkgconfig(xt) +# Freetype support in XPCE +BuildRequires: pkgconfig(fontconfig) +BuildRequires: pkgconfig(freetype2) +BuildRequires: pkgconfig(xaw7) +BuildRequires: pkgconfig(xext) +BuildRequires: pkgconfig(xmu) +BuildRequires: pkgconfig(xrandr) +# bdb +BuildRequires: libdb-devel # mqi / swiplserver BuildRequires: python3-devel -# nlp -BuildRequires: libstemmer-devel # ODBC BuildRequires: pkgconfig(odbc) # SSL BuildRequires: openssl BuildRequires: pkgconfig(openssl) +# jpl +%ifarch %{java_arches} +BuildRequires: java-devel +BuildRequires: mvn(junit:junit) +BuildRequires: mvn(org.hamcrest:hamcrest) +%endif +# nlp +BuildRequires: libstemmer-devel # sweep BuildRequires: emacs-devel -# term -BuildRequires: pkgconfig(libedit) # uuid BuildRequires: pkgconfig(ossp-uuid) # win -BuildRequires: cmake(Qt6) -# XPCE -BuildRequires: cmake(SDL3) -BuildRequires: cmake(SDL3_image) -BuildRequires: pkgconfig(cairo) -BuildRequires: pkgconfig(pango) -BuildRequires: pkgconfig(fontconfig) -BuildRequires: pkgconfig(libjpeg) -BuildRequires: pkgconfig(xpm) -BuildRequires: texinfo-tex +BuildRequires: pkgconfig(Qt6) # yaml BuildRequires: pkgconfig(yaml-0.1) - +# zlib +BuildRequires: pkgconfig(zlib-ng) # Doc building # Gated to Fedora as EL is currently missing tex(a4wide.sty) %if 0%{?fedora} @@ -95,290 +232,128 @@ BuildRequires: tex(latex) BuildRequires: tex(a4wide.sty) BuildRequires: tex(tabulary.sty) %endif - -%global _desc %{expand:SWI-Prolog is a fast and powerful ISO/Edinburgh-style Prolog compiler with a -rich set of built-in predicates. It offers a fast, robust and small -environment which enables substantial applications to be developed with it. - -SWI-Prolog additionally offers: - -* A powerful module system -* Garbage collection -* Unicode character set handling -* Unbounted integer and rational number arithmetic -* Multithreading support -* A powerful C/C++ interface -* GNU Readline interface} - -%description -%_desc - -%package -n swi-prolog -Summary: ISO/Edinburgh-style Prolog interpreter -BuildArch: noarch -Requires: swi-prolog-doc = %{version}-%{release} -Requires: swi-prolog-cli = %{version}-%{release} -Requires: swi-prolog-win = %{version}-%{release} - -# This can be removed when F45 reaches EOL -Obsoletes: pl < 9.2.9-2 -Provides: pl = %{version}-%{release} -Obsoletes: pl-devel < 9.2.9-2 -Provides: pl-devel = %{version}-%{release} -Obsoletes: pl-compat-yap-devel < 9.2.9-2 -Provides: pl-compat-yap-devel = %{version}-%{release} - -%description -n swi-prolog -%_desc - -This is a metapackage, which installs the SWI-Prolog suite, except Java, ODBC, -Berkeley DB support and tests. - -%package -n swi-prolog-full -Summary: ISO/Edinburgh-style Prolog interpreter - full suite -BuildArch: noarch -Requires: swi-prolog = %{version}-%{release} -Requires: swi-prolog-bdb = %{version}-%{release} -Requires: swi-prolog-java = %{version}-%{release} -Requires: swi-prolog-odbc = %{version}-%{release} -Requires: swi-prolog-win = %{version}-%{release} - -%description -n swi-prolog-full -%_desc - -This is a metapackage, which installs the full SWI-Prolog suite, except tests. - -%package -n swi-prolog-core -# NOTE: There is no swi-prolog-core-devel package. Instead, the header files -# and other development files are included in this package. It is a Prolog -# compiler, and therefore is a development package itself. -License: %{shrink: - BSD-2-Clause AND - (Brian-Gladman-3-Clause OR GPL-1.0-or-later) AND - BSD-3-Clause AND - dtoa AND - LicenseRef-Fedora-Public-Domain AND - MIT AND - Unicode-DFS-2016 AND - Zlib - } -Summary: ISO/Edinburgh-style Prolog interpreter - core system -Recommends: swi-prolog-bdb%{?_isa} = %{version}-%{release} -Recommends: swi-prolog-core-packages%{?_isa} = %{version}-%{release} -Recommends: swi-prolog-doc = %{version}-%{release} -Recommends: swi-prolog-java%{?_isa} = %{version}-%{release} -Recommends: swi-prolog-odbc%{?_isa} = %{version}-%{release} +# http +Requires: js-jquery # Old version of minizip is bundled -Provides: bundled(minizip) = 1.3.1 +Provides: bundled(minizip) = 1.2.11 -%description -n swi-prolog-core -%_desc - -This package contains the core SWI-Prolog system. - -%package -n swi-prolog-core-packages -License: %{shrink: - BSD-2-Clause AND - Beerware AND - (Brian-Gladman-3-Clause OR GPL-1.0-or-later) AND - (BSD-2-Clause OR Artistic-2.0) AND - BSD-3-Clause AND - GFDL-1.3-no-invariants-or-later AND - (GPL-1.0-or-later OR Artistic-1.0-Perl) AND - GPL-2.0-or-later WITH SWI-exception AND - GPL-3.0-or-later AND - LGPL-2.0-or-later AND - LicenseRef-Fedora-Public-Domain AND - MIT AND - Unicode-DFS-2016 AND - W3C AND - Zlib - } -Summary: ISO/Edinburgh-style Prolog interpreter - core packages -Requires: swi-prolog-core%{?_isa} = %{version}-%{release} -Requires: js-jquery -Requires: texlive-base -Recommends: swi-prolog-bdb%{?_isa} = %{version}-%{release} -Recommends: swi-prolog-doc = %{version}-%{release} -Recommends: swi-prolog-java%{?_isa} = %{version}-%{release} -Recommends: swi-prolog-odbc%{?_isa} = %{version}-%{release} - -# packages/clib and packages/semweb both contain an MD5 implementation # See https://fedoraproject.org/wiki/Bundled_Libraries_Virtual_Provides Provides: bundled(md5-deutsch) -# An old version of ut8proc is bundled, not fully compatible with the 2.x -# versions available in Fedora -Provides: bundled(utf8proc) = 1.1.6 +# This can be removed when F40 reaches EOL +%ifnarch %{java_arches} +Obsoletes: pl-java < 8.4.3-2 +%endif -%description -n swi-prolog-core-packages -%_desc +%description +ISO/Edinburgh-style Prolog compiler including modules, auto-load, +libraries, Garbage-collector, stack-expandor, C/C++-interface, +GNU-readline interface, very fast compiler. Including packages clib +(Unix process control and sockets), cpp (C++ interface), sgml (reading +XML/SGML), sgml/RDF (reading RDF into triples). +%if %{separate_xpce} +XPCE (Graphics UI toolkit, integrated editor (Emacs-clone) and source-level +debugger) is available in %{name}-xpce package. +%else +Also XPCE (Graphics UI toolkit, integrated editor (Emacs-clone) and +source-level debugger) is included. +%endif -This package contains the core SWI-Prolog packages. -%package -n swi-prolog-cli -License: BSD-2-Clause AND BSD-3-Clause AND bcrypt-Solar-Designer -Summary: ISO/Edinburgh-style Prolog interpreter - command line interface -Requires: swi-prolog-core%{?_isa} = %{version}-%{release} -Requires: swi-prolog-core-packages%{?_isa} = %{version}-%{release} -Recommends: swi-prolog-bdb%{?_isa} = %{version}-%{release} -Recommends: swi-prolog-doc = %{version}-%{release} -Recommends: swi-prolog-java%{?_isa} = %{version}-%{release} -Recommends: swi-prolog-odbc%{?_isa} = %{version}-%{release} +%package devel +Summary: Development files for SWI Prolog +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: gcc +Requires: pkgconfig%{?_isa} +Requires: readline-devel%{?_isa} -# This can be removed when F47 reaches EOL -Obsoletes: swi-prolog-nox < 10.0.0 -Provides: swi-prolog-nox = %{version}-%{release} +%description devel +Development files for SWI Prolog. -%description -n swi-prolog-cli -%_desc -This package contains a SWI-Prolog installation with a command line interface -but no GUI components. +%package compat-yap-devel +Summary: Development files for building YAP applications against SWI Prolog +License: BSD-2-Clause +Requires: %{name}-devel%{?_isa} = %{version}-%{release} -%package -n swi-prolog-win -License: %{shrink: - BSD-2-Clause AND - CC-BY-SA-3.0 AND - FBM AND - GPL-2.0-or-later WITH Bison-exception-2.2 AND - HPND-Pbmplus AND - IJG AND - Knuth-CTAN AND - LicenseRef-Fedora-Public-Domain AND - PostgreSQL AND - Spencer-99 AND - TCL - } -Summary: ISO/Edinburgh-style Prolog interpreter - with GUI support -Requires: swi-prolog-cli%{?_isa} = %{version}-%{release} -Requires: hicolor-icon-theme -Requires: shared-mime-info%{?_isa} +%description compat-yap-devel +This package enables building YAP (Yet Another Prolog) applications +against the SWI Prolog implementation. -# This can be removed when F45 reaches EOL -Obsoletes: pl-xpce < 9.2.9-2 -Provides: pl-xpce = %{version}-%{release} -# This can be removed when F47 reaches EOL -Obsoletes: swi-prolog-x < 10.0.0 -Provides: swi-prolog-x = %{version}-%{release} +%package doc +Summary: Documentation for SWI Prolog +License: BSD-2-Clause +# This must be architecture dependent because some files live in %%{_libdir} +# because they are used by built-in documentation system. +Requires: %{name}%{?_isa} = %{version}-%{release} -%description -n swi-prolog-win -%_desc +%description doc +%{summary}. -This package contains XPCE, an object-oriented symbolic programming -environment for user interfaces. Although XPCE was designed to be -language-independent, it has gained the most popularity with Prolog. XPCE -follows a rather unique approach for developing GUI applications, as follows: + +%package odbc +Summary: SWI-Prolog ODBC interface +License: BSD-2-Clause +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description odbc +The value of RDMS for Prolog is often over-estimated, as Prolog itself can +manage substantial amounts of data. Nevertheless a Prolog/RDMS interface +provides advantages if data is already provided in an RDMS, data must be +shared with other applications, there are strong persistency requirements +or there is too much data to fit in memory. + +The popularity of ODBC makes it possible to design a single +foreign-language module that provides RDMS access for a wide variety of +databases on a wide variety of platforms. The SWI-Prolog RDMS interface is +closely modeled after the ODBC API. This API is rather low-level, but +defaults and dynamic typing provided by Prolog give the user quite simple +access to RDMS, while the interface provides the best possible performance +given the RDMS independency constraint. + + +%if %{separate_xpce} +%package xpce +License: BSD-2-Clause AND GPL-2.0-or-later AND GPL-2.0-or-later WITH Bison-exception-2.2 AND LicenseRef-Fedora-Public-Domain AND Spencer-99 AND TCL AND FBM +Summary: A toolkit for developing graphical applications in Prolog +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description xpce +XPCE is a toolkit for developing graphical applications in Prolog and other +interactive and dynamically typed languages. XPCE follows a rather unique +approach of for developing GUI applications, as follows: - Add object layer to Prolog - High level of abstraction - Exploit rapid Prolog development cycle - Platform independent programs - -%ifarch %{java_arches} -%package -n swi-prolog-java -Summary: Bidirectional interface between SWI-Prolog and Java -Requires: swi-prolog-cli%{?_isa} = %{version}-%{release} -Requires: java-25-headless -Requires: javapackages-tools - -# This can be removed when F45 reaches EOL -Obsoletes: pl-jpl < 9.2.9-2 -Provides: pl-jpl = %{version}-%{release} - -%description -n swi-prolog-java -%_desc - -This package provides JPL, a library using the SWI-Prolog foreign interface -and the Java Native Interface to provide a bidirectional interface between -Java and Prolog. Prolog can be embedded in Java, and Java can be embedded in -Prolog. It provides a reentrant bidirectional interface in both cases. %endif -%package -n swi-prolog-odbc -Summary: SWI-Prolog ODBC interface -Requires: swi-prolog-cli%{?_isa} = %{version}-%{release} -# This can be removed when F45 reaches EOL -Obsoletes: pl-odbc < 9.2.9-2 -Provides: pl-odbc = %{version}-%{release} +%ifarch %{java_arches} +%package jpl +License: BSD-2-Clause +Summary: A bidirectional Prolog/Java interface for SWI Prolog +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: java-headless +Requires: javapackages-tools -%description -n swi-prolog-odbc -%_desc +%description jpl +JPL is a library using the SWI-Prolog foreign interface and the Java Native +Interface providing a bidirectional interface between Java and Prolog +that can be used to embed Prolog in Java as well as for embedding Java +in Prolog. In both setups it provides a re-entrant bidirectional interface. +%endif -The value of RDMS for Prolog is often overestimated, as Prolog itself can -manage substantial amounts of data. Nevertheless a Prolog/RDMS interface -provides advantages if data is already provided in an RDMS, data must be -shared with other applications, there are strong persistence requirements or -there is too much data to fit in memory. - -The popularity of ODBC makes it possible to design a single foreign-language -module that provides RDMS access for a wide variety of databases on a wide -variety of platforms. The SWI-Prolog RDMS interface is closely modeled after -the ODBC API. This API is rather low-level, but defaults and dynamic typing -provided by Prolog give the user quite simple access to RDMS, while the -interface provides the best possible performance given the RDMS independence -constraint. - -%package -n swi-prolog-bdb -Summary: SWI-Prolog Berkeley DB interface -Requires: swi-prolog-cli%{?_isa} = %{version}-%{release} - -%description -n swi-prolog-bdb -%_desc - -This package provides a foreign language extension to the Berkeley DB (libdb) -embedded database. - -%package -n swi-prolog-doc -License: %{shrink: - BSD-2-Clause AND - CC-BY-SA-3.0 AND - Knuth-CTAN AND - LPPL-1.3c - } -Summary: Documentation and examples for SWI-Prolog -BuildArch: noarch -Requires: swi-prolog-core = %{version}-%{release} - -# This can be removed when F45 reaches EOL -Obsoletes: pl-doc < 9.2.9-2 -Provides: pl-doc = %{version}-%{release} - -%description -n swi-prolog-doc -%_desc - -This package provides documentation and examples. - -%package -n swi-prolog-test -License: %{shrink: - BSD-2-Clause AND - GPL-2.0-or-later AND - GPL-2.0-or-later WITH SWI-exception AND - LGPL-2.1-or-later - } -Summary: Tests and checks for SWI-Prolog -BuildArch: noarch -Requires: swi-prolog-cli = %{version}-%{release} - -%description -n swi-prolog-test -%_desc - -This package provides a set of prepared tests and checks for installed -SWI-Prolog systems. This package is intended for SWI-Prolog development and -is of no use for ordinary users. If you are not sure if you need this -package, you do not. %prep %global docdir doc-install %autosetup -N -n swipl-%{version} %patch -P0 -p1 -b .jni %autopatch -p1 -m1 -cp -p %{SOURCE2} . -%conf # Fix the installation path on 64-bit systems if [ "%{_lib}" = "lib64" ]; then sed -e 's,lib\(/\${SWIPL_INSTALL_DIR}\),lib64\1,' \ @@ -386,6 +361,16 @@ if [ "%{_lib}" = "lib64" ]; then -i cmake/LocationsPostPorts.cmake fi +# Unpack the XPCE user guide +mkdir %{docdir}-xpce +pushd %{docdir}-xpce +tar -xzf %{SOURCE1} +mv UserGuide xpce-UserGuide +popd + +# Get the Java config sources +cp -p %{SOURCE2} . + # Adjustments to take into account the new location of JNI stuff sed -i 's#LIBDIR#%{_libdir}#g' packages/jpl/jpl.pl sed -i.jni -e 's#LIBDIR#"%{_libdir}/swipl-jpl"#g' packages/jpl/src/main/java/org/jpl7/JPL.java @@ -395,16 +380,9 @@ sed -i.jni -e 's#LIBDIR#"%{_libdir}/swipl-jpl"#g' packages/jpl/src/main/java/org cp -p packages/jpl/jpl.pl packages/jpl/jpl.pl.install cp -p packages/jpl/jpl.pl.jni packages/jpl/jpl.pl -# Do not use the bundled libedit -rm -fr packages/libedit/libedit - # Do not use the bundled libstemmer rm -fr packages/nlp/libstemmer_c -# Do not use the bundled texinfo.tex -rm packages/xpce/man/info/texinfo.tex -ln -s %{_texmf_main}/tex/texinfo/texinfo.tex packages/xpce/man/info - # Avoid a clash on doc names cp -p customize/README.md README-customize.md @@ -413,9 +391,12 @@ cd packages/mqi/python %pyproject_buildrequires %build +export LC_ALL=C.UTF-8 %ifarch %{java_arches} -export JAVA_HOME=%{java_home} -export LD_LIBRARY_PATH=%{java_home}/lib/server +javac JavaConfig.java +JAVA_HOME=$(java JavaConfig --home) +JAVA_LIBS=$(java JavaConfig --libs-only-L) +export LD_LIBRARY_PATH=$JAVA_HOME/lib/server %else # Processed by packages/configure export DISABLE_PKGS="jpl" @@ -426,13 +407,10 @@ export DISABLE_PKGS="jpl" -DBUILD_PDF_DOCUMENTATION:BOOL=%{?fedora:ON}%{!?fedora:OFF} \ -DCMAKE_INSTALL_LIBDIR:PATH=%{_libdir} \ -DCPACK_GENERATOR:STRING=RPM \ - -DINSTALL_TESTS:BOOL=ON \ + -DGET0SIG_CONST_T:STRING=const \ -DJQUERYDIR:PATH=%{_datadir}/javascript/jquery/latest \ - -DSKIP_SSL_TESTS:BOOL=ON \ -DSWIPL_INSTALL_IN_LIB:BOOL=ON \ - -DSWIPL_INSTALL_IN_SHARE:BOOL=ON \ - -DSWIPL_VERSIONED_DIR:BOOL=OFF \ - -DSYSTEM_LIBEDIT:BOOL=ON \ + -DSWIPL_VERSIONED_DIR:BOOL=ON \ -DUSE_TCMALLOC:BOOL=ON \ -G Ninja @@ -453,37 +431,12 @@ cp -p packages/jpl/jpl.pl.install packages/jpl/jpl.pl # See for file layout %cmake_install -# Scripts with shebang should be executable -chmod 0755 \ - %{buildroot}%{_datadir}/swipl/doc/packages/examples/http/linux-init-script \ - %{buildroot}%{_datadir}/swipl/doc/packages/examples/jpl/java/zahed/run.sh \ - %{buildroot}%{_datadir}/swipl/doc/packages/examples/pldoc/man_server.pl \ - %{buildroot}%{_datadir}/swipl/doc/packages/examples/protobufs/interop/test_read.py \ - %{buildroot}%{_datadir}/swipl/doc/packages/examples/protobufs/interop/test_write.py \ - %{buildroot}%{_datadir}/swipl/doc/packages/examples/stomp/server-loop.sh \ - %{buildroot}%{_libdir}/swipl/customize/edit \ - %{buildroot}%{_libdir}/swipl/test/xsb/delay_tests/*.sh \ - %{buildroot}%{_libdir}/swipl/test/xsb/ptq/*.sh \ - %{buildroot}%{_libdir}/swipl/test/xsb/wfs_tests/*.sh +# Script with shebang should be executable +chmod 0755 %{buildroot}%{_libdir}/swipl-%{version}/library/dialect/sicstus/swipl-lfr.pl +chmod 0755 %{buildroot}%{_libdir}/swipl-%{version}/customize/edit # Some XPCE files do not get installed cp -p packages/xpce/man/*.1 %{buildroot}%{_mandir}/man1 -cp -a packages/xpce/man/course %{buildroot}%{_libdir}/swipl/xpce/man - -# Let LaTeX know about the style file -mkdir -p %{buildroot}%{_texmf_main}/tex/latex/swi-prolog -ln -s %{_libdir}/swipl/library/ext/pldoc/pldoc/pldoc.sty \ - %{buildroot}%{_texmf_main}/tex/latex/swi-prolog/pldoc.sty - -# Install the sweep info file -mkdir -p %{buildroot}%{_infodir} -cd packages/sweep -makeinfo sweep.texi -cp -p sweep.info %{buildroot}%{_infodir} -cd - - -# Fix the pkgconfig file -sed -i 's,/usr//usr,/usr,' %{buildroot}%{_datadir}/pkgconfig/swipl.pc %ifarch %{java_arches} # Move the JPL JNI stuff to where the Java packaging guidelines @@ -491,239 +444,164 @@ sed -i 's,/usr//usr,/usr,' %{buildroot}%{_datadir}/pkgconfig/swipl.pc jpl_ver=$(sed -n 's/.*JPL_VERSION \([.[:digit:]]*\).*/\1/p' packages/jpl/CMakeLists.txt) mkdir -p %{buildroot}%{_libdir}/swipl-jpl -mv %{buildroot}%{_libdir}/swipl/lib/%{swipl_arch}/libjpl.so \ +mv %{buildroot}%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/libjpl.so \ %{buildroot}%{_libdir}/swipl-jpl mkdir -p %{buildroot}%{_jnidir} -mv %{buildroot}%{_libdir}/swipl/lib/jpl.jar %{buildroot}%{_jnidir} -ln -s ../../lib/java/jpl.jar %{buildroot}%{_libdir}/swipl-jpl +mv %{buildroot}%{_libdir}/swipl-%{version}/lib/jpl.jar %{buildroot}%{_jnidir} +ln -s ../lib/jpl.jar %{buildroot}%{_libdir}/swipl-jpl # Original locations are referenced by internal libraries and examples cd %{buildroot}%{_libdir} -ln -s ../../../swipl-jpl/libjpl.so swipl/lib/%{swipl_arch}/libjpl.so -ln -s ../../swipl-jpl/jpl.jar swipl/lib/jpl.jar +ln -s ../../../swipl-jpl/libjpl.so swipl-%{version}/lib/%{swipl_arch}/libjpl.so +ln -s ../../swipl-jpl/jpl.jar swipl-%{version}/lib/jpl.jar cd - %endif # Remove stuff we do not want to package -rm %{buildroot}%{_libdir}/swipl/{LICENSE,README.md} -rm %{buildroot}%{_libdir}/swipl/customize/README.md -rm %{buildroot}%{_libdir}/swipl/lib/swiplserver/LICENSE -find %{buildroot}%{_libdir} -name .gitignore -delete - -# Move the desktop files to where we really want them -mkdir -p %{buildroot}%{_datadir}/applications -mkdir -p %{buildroot}%{_datadir}/icons/hicolor/64x64/apps -mkdir -p %{buildroot}%{_datadir}/icons/hicolor/96x96/apps -mkdir -p %{buildroot}%{_datadir}/mime/packages -mv %{buildroot}%{_libdir}/swipl/desktop/*.desktop \ - %{buildroot}%{_datadir}/applications -mv %{buildroot}%{_libdir}/swipl/desktop/swipl.png \ - %{buildroot}%{_datadir}/icons/hicolor/64x64/apps -mv %{buildroot}%{_libdir}/swipl/desktop/swipl-cli.png \ - %{buildroot}%{_datadir}/icons/hicolor/96x96/apps -mv %{buildroot}%{_libdir}/swipl/desktop/prolog-mime.xml \ - %{buildroot}%{_datadir}/mime/packages -rmdir %{buildroot}%{_libdir}/swipl/desktop - -# Link duplicates -%fdupes %{buildroot}%{_datadir}/swipl -%fdupes %{buildroot}%{_libdir}/swipl +rm %{buildroot}%{_libdir}/swipl-%{version}/{LICENSE,README.md} +rm %{buildroot}%{_libdir}/swipl-%{version}/customize/README.md +rm %{buildroot}%{_libdir}/swipl-%{version}/lib/swiplserver/LICENSE +%ifnarch ppc64le %check +export LC_ALL=C.UTF-8 # Test with the original jpl.pl, since the new version refers to paths that # don't exist; then switch back. cp -p packages/jpl/jpl.pl.jni packages/jpl/jpl.pl %ctest cp -p packages/jpl/jpl.pl.install packages/jpl/jpl.pl - -%files -n swi-prolog - -%files -n swi-prolog-full - -%files -n swi-prolog-core -%license LICENSE licenses.txt -%doc README.md README-customize.md -%{_bindir}/swipl -%{_bindir}/swipl-ld -%{_libdir}/cmake/swipl/ -%dir %{_libdir}/swipl/ -%{_libdir}/swipl/ABI -%dir %{_libdir}/swipl/bin/ -%{_libdir}/swipl/bin/swipl.home -%dir %{_libdir}/swipl/bin/%{swipl_arch}/ -%{_libdir}/swipl/bin/%{swipl_arch}/swipl -%{_libdir}/swipl/bin/%{swipl_arch}/swipl-ld -%{_libdir}/swipl/boot/ -%{_libdir}/swipl/boot.prc -%{_libdir}/swipl/cmake/ -%{_libdir}/swipl/customize/ -%{_libdir}/swipl/demo/ -%dir %{_libdir}/swipl/include/ -%{_libdir}/swipl/include/SWI-Prolog.h -%{_libdir}/swipl/include/SWI-Stream.h -%{_libdir}/swipl/include/Yap/ -%{_libdir}/swipl/include/sicstus/ -%dir %{_libdir}/swipl/library/ -%{_libdir}/swipl/library/*.pl -%{_libdir}/swipl/library/*.qlf -%{_libdir}/swipl/library/build/ -%{_libdir}/swipl/library/clp/ -%{_libdir}/swipl/library/dcg/ -%{_libdir}/swipl/library/dialect/ -%{_libdir}/swipl/library/iri_scheme/ -%{_libdir}/swipl/library/lynx/ -%{_libdir}/swipl/library/theme/ -%{_libdir}/swipl/library/unicode/ -%{_libdir}/swipl/swipl.home -%{_libdir}/libswipl.so.10{,.*} -%{_libdir}/libswipl.so -%{_mandir}/man1/swipl* -%{_datadir}/pkgconfig/swipl.pc -%{_infodir}/sweep.info* - -%files -n swi-prolog-core-packages -%{_libdir}/swipl/bin/latex2html -%{_libdir}/swipl/include/SWI-cpp.h -%{_libdir}/swipl/include/SWI-cpp2* -%dir %{_libdir}/swipl/lib/ -%{_libdir}/swipl/lib/swiplserver/ -%dir %{_libdir}/swipl/lib/%{swipl_arch}/ -%{_libdir}/swipl/lib/%{swipl_arch}/cgi.so -%{_libdir}/swipl/lib/%{swipl_arch}/crypt.so -%{_libdir}/swipl/lib/%{swipl_arch}/double_metaphone.so -%{_libdir}/swipl/lib/%{swipl_arch}/files.so -%{_libdir}/swipl/lib/%{swipl_arch}/hashstream.so -%{_libdir}/swipl/lib/%{swipl_arch}/http_stream.so -%{_libdir}/swipl/lib/%{swipl_arch}/inclpr.so -%{_libdir}/swipl/lib/%{swipl_arch}/isub.so -%{_libdir}/swipl/lib/%{swipl_arch}/janus.so -%{_libdir}/swipl/lib/%{swipl_arch}/json.so -%{_libdir}/swipl/lib/%{swipl_arch}/mallocinfo.so -%{_libdir}/swipl/lib/%{swipl_arch}/md54pl.so -%{_libdir}/swipl/lib/%{swipl_arch}/memfile.so -%{_libdir}/swipl/lib/%{swipl_arch}/ntriples.so -%{_libdir}/swipl/lib/%{swipl_arch}/pdt_console.so -%{_libdir}/swipl/lib/%{swipl_arch}/porter_stem.so -%{_libdir}/swipl/lib/%{swipl_arch}/process.so -%{_libdir}/swipl/lib/%{swipl_arch}/prolog_stream.so -%{_libdir}/swipl/lib/%{swipl_arch}/protobufs.so -%{_libdir}/swipl/lib/%{swipl_arch}/rdf_db.so -%{_libdir}/swipl/lib/%{swipl_arch}/readutil.so -%{_libdir}/swipl/lib/%{swipl_arch}/redis4pl.so -%{_libdir}/swipl/lib/%{swipl_arch}/rlimit.so -%{_libdir}/swipl/lib/%{swipl_arch}/sched.so -%{_libdir}/swipl/lib/%{swipl_arch}/sgml2pl.so -%{_libdir}/swipl/lib/%{swipl_arch}/sha4pl.so -%{_libdir}/swipl/lib/%{swipl_arch}/snowball.so -%{_libdir}/swipl/lib/%{swipl_arch}/socket.so -%{_libdir}/swipl/lib/%{swipl_arch}/streaminfo.so -%{_libdir}/swipl/lib/%{swipl_arch}/sweep-module.so -%{_libdir}/swipl/lib/%{swipl_arch}/syslog.so -%{_libdir}/swipl/lib/%{swipl_arch}/table.so -%{_libdir}/swipl/lib/%{swipl_arch}/test_cpp.so -%{_libdir}/swipl/lib/%{swipl_arch}/test_ffi.so -%{_libdir}/swipl/lib/%{swipl_arch}/tex.so -%{_libdir}/swipl/lib/%{swipl_arch}/time.so -%{_libdir}/swipl/lib/%{swipl_arch}/turtle.so -%{_libdir}/swipl/lib/%{swipl_arch}/uid.so -%{_libdir}/swipl/lib/%{swipl_arch}/unicode4pl.so -%{_libdir}/swipl/lib/%{swipl_arch}/unix.so -%{_libdir}/swipl/lib/%{swipl_arch}/uri.so -%{_libdir}/swipl/lib/%{swipl_arch}/uuid.so -%{_libdir}/swipl/lib/%{swipl_arch}/websocket.so -%{_libdir}/swipl/lib/%{swipl_arch}/zlib4pl.so -%dir %{_libdir}/swipl/library/ext/ -%{_libdir}/swipl/library/ext/PDT/ -%{_libdir}/swipl/library/ext/RDF/ -%{_libdir}/swipl/library/ext/chr/ -%{_libdir}/swipl/library/ext/clib/ -%{_libdir}/swipl/library/ext/clpqr -%{_libdir}/swipl/library/ext/http/ -%{_libdir}/swipl/library/ext/inclpr/ -%{_libdir}/swipl/library/ext/json/ -%{_libdir}/swipl/library/ext/ltx2htm/ -%{_libdir}/swipl/library/ext/mqi/ -%{_libdir}/swipl/library/ext/nlp/ -%{_libdir}/swipl/library/ext/paxos/ -%{_libdir}/swipl/library/ext/pengines/ -%{_libdir}/swipl/library/ext/pldoc/ -%{_libdir}/swipl/library/ext/plunit/ -%{_libdir}/swipl/library/ext/protobufs/ -%{_libdir}/swipl/library/ext/redis/ -%{_libdir}/swipl/library/ext/semweb/ -%{_libdir}/swipl/library/ext/sgml/ -%{_libdir}/swipl/library/ext/stomp/ -%{_libdir}/swipl/library/ext/sweep/ -%{_libdir}/swipl/library/ext/swipy/ -%{_libdir}/swipl/library/ext/table/ -%{_libdir}/swipl/library/ext/utf8proc/ -%{_libdir}/swipl/library/ext/zlib/ -%{_libdir}/swipl/library/http/ -%{_libdir}/swipl/library/protobufs/ -%{_libdir}/swipl/library/semweb/ -%{_texmf_main}/tex/latex/swi-prolog/ - -%files -n swi-prolog-cli -%{_libdir}/swipl/app/ -%{_libdir}/swipl/lib/%{swipl_arch}/archive4pl.so -%{_libdir}/swipl/lib/%{swipl_arch}/crypto4pl.so -%{_libdir}/swipl/lib/%{swipl_arch}/libedit4pl.so -%{_libdir}/swipl/lib/%{swipl_arch}/pcre4pl.so -%{_libdir}/swipl/lib/%{swipl_arch}/ssl4pl.so -%{_libdir}/swipl/lib/%{swipl_arch}/tipc.so -%{_libdir}/swipl/lib/%{swipl_arch}/yaml4pl.so -%{_libdir}/swipl/library/ext/archive/ -%{_libdir}/swipl/library/ext/libedit/ -%{_libdir}/swipl/library/ext/pcre/ -%{_libdir}/swipl/library/ext/ssl/ -%{_libdir}/swipl/library/ext/tipc/ -%{_libdir}/swipl/library/ext/yaml/ - -%files -n swi-prolog-win -%doc packages/xpce/{CUSTOMISE,EXTENDING,README}.md -%{_bindir}/swipl-win -%{_datadir}/applications/swipl.desktop -%{_datadir}/applications/swipl-win.desktop -%{_datadir}/icons/hicolor/64x64/apps/swipl.png -%{_datadir}/icons/hicolor/96x96/apps/swipl-cli.png -%{_datadir}/mime/packages/prolog-mime.xml -%{_libdir}/swipl/bin/%{swipl_arch}/swipl-win -%{_libdir}/swipl/lib/%{swipl_arch}/pl2xpce.so -%{_libdir}/swipl/swipl.rc -%{_libdir}/swipl/swipl-win.rc -%{_libdir}/swipl/xpce/ -%{_mandir}/man1/xpce-client.1* - -%ifarch %{java_arches} -%files -n swi-prolog-java -%doc packages/jpl/README.md -%{_jnidir}/jpl.jar -%{_libdir}/swipl/lib/jpl*jar -%{_libdir}/swipl/lib/%{swipl_arch}/libjpl.so -%{_libdir}/swipl/library/ext/jpl/ -%{_libdir}/swipl-jpl/ %endif -%files -n swi-prolog-odbc -%doc packages/odbc/README -%{_libdir}/swipl/lib/%{swipl_arch}/odbc4pl.so -%{_libdir}/swipl/library/ext/cql/ -%{_libdir}/swipl/library/ext/odbc/ +%files +%license LICENSE +%doc README.md README-customize.md +%{_mandir}/man1/swipl* +%{_bindir}/swipl +%{_bindir}/swipl-ld +%{_libdir}/libswipl.so.9* +%dir %{_libdir}/swipl-%{version}/ +%dir %{_libdir}/swipl-%{version}/bin/ +%{_libdir}/swipl-%{version}/bin/latex2html +%{_libdir}/swipl-%{version}/bin/swipl.home +%dir %{_libdir}/swipl-%{version}/bin/%{swipl_arch}/ +%{_libdir}/swipl-%{version}/bin/%{swipl_arch}/swipl +%{_libdir}/swipl-%{version}/bin/%{swipl_arch}/swipl-ld +%{_libdir}/swipl-%{version}/app/ +%{_libdir}/swipl-%{version}/boot* +%{_libdir}/swipl-%{version}/customize/ +%{_libdir}/swipl-%{version}/demo/ +%dir %{_libdir}/swipl-%{version}/lib/ +%dir %{_libdir}/swipl-%{version}/lib/%{swipl_arch} +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/archive4pl.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/bdb4pl.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/cgi.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/crypto4pl.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/crypt.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/double_metaphone.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/files.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/hashstream.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/http_stream.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/inclpr.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/isub.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/janus.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/json.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/libedit4pl.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/mallocinfo.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/md54pl.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/memfile.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/ntriples.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/pcre4pl.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/pdt_console.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/porter_stem.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/process.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/prolog_stream.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/protobufs.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/rdf_db.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/readline4pl.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/readutil.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/redis4pl.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/rlimit.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/sched.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/sgml2pl.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/sha4pl.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/snowball.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/socket.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/ssl4pl.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/streaminfo.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/sweep-module.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/syslog.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/table.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/tex.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/time.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/tipc.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/turtle.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/uid.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/unicode4pl.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/unix.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/uri.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/uuid.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/websocket.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/yaml4pl.so +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/zlib4pl.so +%{_libdir}/swipl-%{version}/lib/swiplserver/ +%{_libdir}/swipl-%{version}/library/ +%{_libdir}/swipl-%{version}/swipl.home -%files -n swi-prolog-bdb -%doc packages/bdb/README.md -%{_libdir}/swipl/lib/%{swipl_arch}/bdb4pl.so -%{_libdir}/swipl/library/ext/bdb/ +# Exclude the files that are in the sub-packages +%ifarch %{java_arches} +# JPL +%exclude %{_libdir}/swipl-%{version}/library/ext/jpl +%endif +# ODBC +%exclude %{_libdir}/swipl-%{version}/library/ext/odbc -%files -n swi-prolog-doc +%if %{separate_xpce} +%files xpce +%doc packages/xpce/CUSTOMISE.md packages/xpce/README.md +%{_bindir}/swipl-win +%{_libdir}/swipl-%{version}/bin/%{swipl_arch}/swipl-win +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/pl2xpce.so +%{_libdir}/swipl-%{version}/swipl.rc +%{_libdir}/swipl-%{version}/swipl-win.rc +%{_libdir}/swipl-%{version}/xpce/ +%{_mandir}/man1/xpce* +%endif + +%files devel +%{_libdir}/libswipl.so +%{_libdir}/swipl-%{version}/cmake/ +%dir %{_libdir}/swipl-%{version}/include/ +%{_libdir}/swipl-%{version}/include/sicstus/ +%{_libdir}/swipl-%{version}/include/SWI* +%{_libdir}/cmake/swipl/ +%{_datadir}/pkgconfig/swipl.pc + +%files compat-yap-devel +%{_libdir}/swipl-%{version}/include/Yap/ + +%files doc +%{_libdir}/swipl-%{version}/doc/ %if 0%{?fedora} %doc %{_vpath_builddir}/man/SWI-Prolog-%{version}.pdf %endif -%{_datadir}/swipl/ +%doc %{docdir}-xpce/* + +%files odbc +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/odbc4pl.so +%{_libdir}/swipl-%{version}/library/ext/odbc +%doc packages/odbc/{demo,ChangeLog,README} + +%ifarch %{java_arches} +%files jpl +%doc packages/jpl/docs/* packages/jpl/src/examples +%{_jnidir}/jpl.jar +%{_libdir}/swipl-%{version}/lib/jpl*jar +%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/libjpl.so +%{_libdir}/swipl-%{version}/library/ext/jpl/ +%{_libdir}/swipl-jpl/ +%endif -%files -n swi-prolog-test -%{_libdir}/swipl/test/ %changelog %autochangelog diff --git a/sources b/sources index b17c9c0..03aeff4 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ -SHA512 (swipl-10.0.0_repackaged.tar.gz) = d8f85ceed3ccfcc7b44535d3384bc8fd9ddaff1dce5405382433328e2b873a52a232bab7dfee5adc28882413b03da623565f2dfb312fede13e316545d96c31ee +SHA512 (userguide.html.tgz) = baa16d8f06a666e77ef45aaf7708e877710bfcb8fc0fb519bc70c54619c45def2d2ab4feaa0f1a1875b2a2270e8907551b63582da1b4beaa5b50f013a41d7ab9 +SHA512 (swipl-9.2.9_repackaged.tar.gz) = 57f0e043c6f0985106c68a2bba3a558ee3eb19ecaa145d5968d963da005f3d1fe0ef62ba43f299b067bda3bb6e4212a9e121926a4d8452df9aa8cbbecf6b27e2 diff --git a/swipl-10.0.0-secure-getenv.patch b/swipl-10.0.0-secure-getenv.patch deleted file mode 100644 index d0e6869..0000000 --- a/swipl-10.0.0-secure-getenv.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- swipl-10.0.0/packages/libedit/libedit/src/CMakeLists.txt.orig 2025-11-30 01:13:23.000000000 -0700 -+++ swipl-10.0.0/packages/libedit/libedit/src/CMakeLists.txt 2025-12-05 15:40:03.894414328 -0700 -@@ -116,7 +116,10 @@ check_symbol_exists(unvis "vis.h" HAVE_U - check_symbol_exists(endpwent "pwd.h" HAVE_ENDPWENT) - check_symbol_exists(getpwuid_r "pwd.h" HAVE_GETPW_R_POSIX) - check_symbol_exists(isascii "ctype.h" HAVE_ISASCII) -+set(OLD_CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}) -+list(APPEND CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE) - check_symbol_exists(secure_getenv "stdlib.h" HAVE_SECURE_GETENV) -+set(CMAKE_REQUIRED_DEFINITIONS ${OLD_CMAKE_REQUIRED_DEFINITIONS}) - check_symbol_exists(wcsdup "wchar.h" HAVE_WCSDUP) - - include(CheckIncludeFile) diff --git a/swipl-8.2.0-Remove-files-locations-from-swipl-1-manual.patch b/swipl-8.2.0-Remove-files-locations-from-swipl-1-manual.patch index 4c40729..49d5dc0 100644 --- a/swipl-8.2.0-Remove-files-locations-from-swipl-1-manual.patch +++ b/swipl-8.2.0-Remove-files-locations-from-swipl-1-manual.patch @@ -17,7 +17,7 @@ diff --git a/src/swipl.1.in b/src/swipl.1.in index e6eeda5..81c5abb 100644 --- a/src/swipl.1.in +++ b/src/swipl.1.in -@@ -449,38 +449,6 @@ to find the local installation directory +@@ -396,38 +396,6 @@ to find the local installation directory .I ~/.config/swi-prolog/init.pl Personal initialisation files consulted by SWI-Prolog on startup. The exact location depends on the OS. @@ -56,7 +56,7 @@ index e6eeda5..81c5abb 100644 .SH SEE ALSO .PP The SWI-Prolog web-home at -@@ -490,9 +458,6 @@ Jan\ Wielemaker +@@ -437,9 +405,6 @@ Jan\ Wielemaker .IR "SWI-Prolog Reference Manual" " at" .I http://www.swi-prolog.org/pldoc/index.html .PP diff --git a/swipl-8.2.1-Fix-JNI.patch b/swipl-8.2.1-Fix-JNI.patch index 23f6749..08b105c 100644 --- a/swipl-8.2.1-Fix-JNI.patch +++ b/swipl-8.2.1-Fix-JNI.patch @@ -18,7 +18,7 @@ diff --git a/packages/jpl/jpl.pl b/packages/jpl/jpl.pl index 024dd79..ffeccd9 100644 --- a/packages/jpl/jpl.pl +++ b/packages/jpl/jpl.pl -@@ -3823,7 +3823,8 @@ prolog:error_message(java_exception(Ex)) +@@ -3960,7 +3960,8 @@ prolog:error_message(java_exception(Ex)) :- multifile user:file_search_path/2. :- dynamic user:file_search_path/2. @@ -28,7 +28,7 @@ index 024dd79..ffeccd9 100644 classpath(DirOrJar) :- getenv('CLASSPATH', ClassPath), -@@ -3992,7 +3993,7 @@ add_jpl_to_classpath :- +@@ -4140,7 +4141,7 @@ add_jpl_to_classpath :- libjpl(File) :- ( current_prolog_flag(unix, true) diff --git a/swipl-9.2.7-inclpr-math.patch b/swipl-9.2.7-inclpr-math.patch deleted file mode 100644 index 2a87408..0000000 --- a/swipl-9.2.7-inclpr-math.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- swipl-9.2.7/packages/inclpr/CMakeLists.txt.orig 2023-12-11 03:16:08.000000000 -0700 -+++ swipl-9.2.7/packages/inclpr/CMakeLists.txt 2024-09-18 09:37:46.320423903 -0600 -@@ -15,6 +15,7 @@ swipl_plugin(inclpr_priv - swipl_plugin(inclpr - NOINDEX - C_SOURCES inclpr.c -+ C_LIBS m - PL_LIBS inclpr.pl) - - swipl_examples(benchmarks.pl)