From: Adrian Bunk Date: Sat, 19 Nov 2022 10:33:48 +0000 (+0000) Subject: Import gringo_5.4.1-3.1.debian.tar.xz X-Git-Tag: archive/raspbian/5.4.1-3.1+rpi1^2~7^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=61b9a6d89d8ad171fed91dd11fd5aba00a2e4dd0;p=gringo.git Import gringo_5.4.1-3.1.debian.tar.xz [dgit import tarball gringo 5.4.1-3.1 gringo_5.4.1-3.1.debian.tar.xz] --- 61b9a6d89d8ad171fed91dd11fd5aba00a2e4dd0 diff --git a/NEWS b/NEWS new file mode 100644 index 0000000..f10a4de --- /dev/null +++ b/NEWS @@ -0,0 +1,12 @@ +gringo (5.1.0-1) unstable; urgency=medium + + The gringo and reify programs drop direct support for smodels output + format and use the new asp intermediate format (aspif) instead. The + clasp solver automatically supports aspif starting with version 3.2.0 + and later. If you need to ground a logic program to smodels format, + you can translate aspif to smodels format with the lpconvert tool, + which is part of this package. See also + + for a detailed description of the asp intermediate format. + + -- Thomas Krennwallner Sun, 11 Dec 2016 09:51:56 +0100 diff --git a/TODO b/TODO new file mode 100644 index 0000000..1475306 --- /dev/null +++ b/TODO @@ -0,0 +1,9 @@ +* gringo TODO list + +** upstream renamed gringo to clingo + +** add clingo C api header files and library archive + +** add pyclingo python module + +** add luaclingo lua module diff --git a/changelog b/changelog new file mode 100644 index 0000000..b1a6000 --- /dev/null +++ b/changelog @@ -0,0 +1,696 @@ +gringo (5.4.1-3.1) unstable; urgency=low + + * Non-maintainer upload. + * Build using the default gcc. (Closes: #1023682) + * Add patch from Lukas Märdian to use the system catch/catch2. + (Closes: #1017161) + * Fix the testsuite for Python no longer supporting 'rU' in open(). + * Remove the symbols file. (Closes: #963054, #1015422) + + -- Adrian Bunk Sat, 19 Nov 2022 12:33:48 +0200 + +gringo (5.4.1-3) unstable; urgency=medium + + * debian/symbols: fix symbols for g++-10 >= 10.2.1 + * Bug fix: "non-standard gcc/g++ used for build (gcc-9)", thanks to + Matthias Klose (Closes: #978514). + + -- Thomas Krennwallner Mon, 28 Dec 2020 12:50:01 +0000 + +gringo (5.4.1-2) unstable; urgency=medium + + * Upload to unstable + * debian/symbols: fix symbols for g++-10 >= 10.2.1 + + -- Thomas Krennwallner Sun, 27 Dec 2020 17:29:03 +0000 + +gringo (5.4.1-1) experimental; urgency=medium + + * New upstream version 5.4.1 + * debian/patch: add bump-version-5.4.1.patch + * drop python3.8-compat.patch, already applied upstream + * compile with g++-10 + * debian/symbols: fix symbols for g++-10 >= 10.2.1 + * debian/control: set debhelper-compat version to 13 + * debian/control: bump Standards-Version to 4.5.1 + * debian/control: build with system-wide liblua5.4-dev + + -- Thomas Krennwallner Sun, 27 Dec 2020 14:55:45 +0000 + +gringo (5.4.0-2) unstable; urgency=medium + + * Upload to unstable + * debian/symbols: fix symbols for missing architectures + + -- Thomas Krennwallner Fri, 03 Apr 2020 06:56:49 -0400 + +gringo (5.4.0-1) experimental; urgency=medium + + * New upstream version 5.4.0 + * install libclingo.so.3.0 instead of libclingo.so.2.0 + * generate symbols for libclingo.so.3 + * refresh gringo-python3-utf8.patch, python3.8-compat.patch, and + link-libatomic-check.patch + * drop gringo-python37-async.patch, already applied upstream + * add highlight.js 9.12.0 to missing-sources + + -- Thomas Krennwallner Mon, 30 Mar 2020 06:25:20 -0400 + +gringo (5.3.0-13) unstable; urgency=medium + + * Upload to unstable + * debian/symbols: fix symbols for g++-9 >= 9.2.0 on armel and powerpc + + -- Thomas Krennwallner Wed, 11 Mar 2020 20:57:01 -0400 + +gringo (5.3.0-12) experimental; urgency=medium + + * debian/symbols: fix symbols for g++-9 >= 9.2.0 + * debian/{rules,install}: drop libatomic hacks, stop confusing build + target with build directory + * debian/patches: refresh python3.8-compat and gringo-python37-async + * link-libatomic-check.patch: add libatomic checks to CMakeLists.txt + + -- Thomas Krennwallner Wed, 11 Mar 2020 07:31:40 -0400 + +gringo (5.3.0-11) experimental; urgency=medium + + * add support for python3.8, thanks to Steve Langasek + * compile with gcc-9 and g++-9 + * debian/control: bump Standards-Version to 4.5.0 (no changes required) + * renamed debian/{NEWS,TODO}.Debian to debian/{NEWS,TODO} + Lintian tag incorrect-packaging-filename + * setup debhelper-compat 12. + Lintian tag package-uses-old-debhelper-compat-version + * debian/control: set Rules-Requires-Root to no + * debian/symbols: fix symbols for g++-9 >= 9.2.0 + * Bug fix: "gringo needs a new upstream, and fixes for python3.8", + thanks to Matthias Klose (Closes: #951842). + * Bug fix: "gringo ftbfs with Python 3.8", thanks to Matthias Klose + (Closes: #951707). + * Bug fix: "non-standard gcc/g++ used for build (gcc-8)", thanks to + Matthias Klose (Closes: #944178). + + -- Thomas Krennwallner Mon, 09 Mar 2020 13:31:25 +0100 + +gringo (5.3.0-10) unstable; urgency=medium + + * Fix FTBFS on buster. + * debian/control: add Build-Depends on g++-8 >= 8.2.0-21 + * debian/symbols: add alpha and x32 symbols + + -- Thomas Krennwallner Sat, 02 Mar 2019 08:49:10 +0100 + +gringo (5.3.0-9) unstable; urgency=medium + + * Upload to unstable. + + -- Thomas Krennwallner Fri, 01 Mar 2019 06:27:37 +0100 + +gringo (5.3.0-8) experimental; urgency=medium + + * debian/symbols: fix symbols + + -- Thomas Krennwallner Thu, 28 Feb 2019 05:25:47 +0100 + +gringo (5.3.0-7) experimental; urgency=medium + + * Bug fix: "new symbols", thanks to Sjoerd Simons (Closes: #923228). + * debian/control: bump Standards-Version to 4.3.0 + * debian/symbols: fix FTBFS on powerpcspe + + -- Thomas Krennwallner Wed, 27 Feb 2019 05:24:41 +0100 + +gringo (5.3.0-6) unstable; urgency=medium + + * debian/symbols: fix symbols for g++-8 >= 8.2.0-10 + * Upload to unstable. + + -- Thomas Krennwallner Fri, 14 Dec 2018 08:09:08 +0100 + +gringo (5.3.0-5) experimental; urgency=medium + + * Bug fix: "gringo FTBFS: symbol differences", thanks to Adrian Bunk + (Closes: #916266). + * debian/symbols: fix FTBFS for g++-8 >= 8.2.0-10 + * debian/control: Build-Depends on g++-8 >= 8.2.0-10 + + -- Thomas Krennwallner Thu, 13 Dec 2018 08:22:24 +0100 + +gringo (5.3.0-4) unstable; urgency=medium + + * debian/tests/gringo{0,1,3,4}: fix integer atom mappings + * NEWS.Debian: fix link to aspif description + + -- Thomas Krennwallner Thu, 22 Nov 2018 07:26:25 +0100 + +gringo (5.3.0-3) unstable; urgency=medium + + * debian/upstream/metadata: add DEP-12 upstream metadata + * debian/symbols: fix symbols for version 5.3.0 of libclingo.so.2 + * Upload to unstable. + + -- Thomas Krennwallner Wed, 21 Nov 2018 04:54:38 +0100 + +gringo (5.3.0-2) experimental; urgency=medium + + * debian/symbols: fix symbols for version 5.3.0 of libclingo.so.2 + + -- Thomas Krennwallner Thu, 15 Nov 2018 07:30:26 +0100 + +gringo (5.3.0-1) experimental; urgency=medium + + * New upstream version 5.3.0 + * drop upstream applied gringo-makefile.patch + * refresh gringo-python37-async.patch with fcef335 from upstream + * install libclingo.so.2.0 + * debian/symbols: update to libclingo.so.2.0 + + -- Thomas Krennwallner Sun, 11 Nov 2018 08:56:35 +0100 + +gringo (5.2.3-5) unstable; urgency=medium + + * debian/symbols: batchpatch alpha, mips, mips64el symbols for g++-8 + + -- Thomas Krennwallner Thu, 08 Nov 2018 04:35:55 +0100 + +gringo (5.2.3-4) unstable; urgency=medium + + * Bug fix: "Please update symbols for riscv64", thanks to Manuel + A. Fernandez Montecelo (Closes: #912269). + * debian/symbols: batchpatch symbols for g++-8 + * Upload to unstable. + + -- Thomas Krennwallner Wed, 07 Nov 2018 04:07:00 +0100 + +gringo (5.2.3-3) experimental; urgency=medium + + * debian/control: bump Standards-Version to 4.2.1 + * Bug fix: "gringo build-depends on legacy compiler g++-7", thanks to + Matthias Klose (Closes: #912582). + - debian/control: Build-Depends on g++-8 + * debian/symbols: update amd64 symbols for g++-8 + * Bug fix: "gringo ftbfs with Python 3.7", thanks to Matthias Klose + (Closes: #912552). + - debian/control: Build-Depends on python3.7 + - gringo-python37-async.patch: rename async keyword to async_ + + -- Thomas Krennwallner Sun, 04 Nov 2018 08:34:30 +0100 + +gringo (5.2.3-2) unstable; urgency=medium + + * debian/symbols: batchpatch symbols + + -- Thomas Krennwallner Tue, 03 Jul 2018 06:23:44 +0200 + +gringo (5.2.3-1) unstable; urgency=medium + + * New upstream version 5.2.3 + * debian/watch: force three-digit version + * debian/control: bump Standards-Version to 4.1.4 + * debian/TODO.Debian: refresh TODO list + * gringo-makefile.patch: drop Makefile + * debian/symbols: update amd64 symbols + + -- Thomas Krennwallner Sat, 30 Jun 2018 13:27:28 +0200 + +gringo (5.2.2-6) unstable; urgency=medium + + * Team upload + * Added build-dependency python3-distutils in order to fix FTBFS. Thanks + to Adrian Bunk for the patch (closes: #896791) + * Added debian/gbp.conf with pristine-tar=True + + -- Ralf Treinen Thu, 03 May 2018 08:30:23 +0200 + +gringo (5.2.2-5) unstable; urgency=medium + + * fix FTBFS with gringo-python3-utf8.patch + * debian/rules: report ctest logs in case of error + + -- Thomas Krennwallner Mon, 05 Feb 2018 07:39:21 +0100 + +gringo (5.2.2-4) unstable; urgency=medium + + * setup build environment for python3 + + debian/control: setup Build-Depends for python3 + + debian/rules: force PYTHON_EXECUTABLE to /usr/bin/python3 + * FTBFS: dh_auto_test needs LD_LIBRARY_PATH for libclingo + + -- Thomas Krennwallner Sun, 04 Feb 2018 21:35:05 +0100 + +gringo (5.2.2-3) unstable; urgency=medium + + * add dep8 testsuite + + debian/rules: build, run, and output upstream tests + + debian/tests: add dep8 tests + * debian/symbols: add ia64, update templinst archs + + -- Thomas Krennwallner Sun, 04 Feb 2018 09:22:41 +0100 + +gringo (5.2.2-2) unstable; urgency=medium + + * update debian/control and debian/compat + + update Vcs-Git and Vcs-Browser for salsa + + bump Standards-Version to 4.1.3 + + bump debhelper compatibility version to 11 + * debian/symbols: update amd64 symbols + + -- Thomas Krennwallner Sat, 03 Feb 2018 15:17:29 +0100 + +gringo (5.2.2-1) unstable; urgency=medium + + * New upstream version 5.2.2 + * drop upstream applied gringo-remove-wrong-assertion.patch + * debian/symbols: add arm64 kfreebsd-amd64 kfreebsd-i386 symbols + pkgkde-symbolshelper batchpatch -v 1 + + -- Thomas Krennwallner Fri, 10 Nov 2017 08:08:58 +0100 + +gringo (5.2.1-4) unstable; urgency=medium + + * debian/symbols: fix FTBFS on armel + + -- Thomas Krennwallner Sat, 04 Nov 2017 14:55:24 +0100 + +gringo (5.2.1-3) unstable; urgency=medium + + * add patch from upstream commit 02c6d85 to fix wrong assertion + * debian/control: Build-Depends to cmake >= 3.1.0 + + -- Thomas Krennwallner Sat, 04 Nov 2017 11:14:23 +0100 + +gringo (5.2.1-2) unstable; urgency=medium + + * Use pkgkde-symbolshelper to manage C++ symbols + * debian/rules: use pkgkde_symbolshelper dh addon + * debian/control: Build-Depends on pkg-kde-tools + * debian/symbols: use pkgkde-symbolshelper to create C++ symbols + + -- Thomas Krennwallner Fri, 03 Nov 2017 06:42:20 +0100 + +gringo (5.2.1-1) unstable; urgency=medium + + * New upstream version 5.2.1 + * debian/TODO.Debian: list todo items + * debian/copyright: gringo switched to MIT, and so does the packaging + * debian/compat: bump debhelper compat level to 10 + * debian/control: use cmake instead of scons + - force g++-7 + - bump Standards-Version to 4.1.1 + - fix Homepage URI + * debian/patches: drop various upstream applied patches + - gringo-alpha-fpu-getcw.patch + - gringo-broken-std-exception_ptr.patch + - gringo-fix-body-literals-as-auxiliary.patch + - reproducible-build.patch + * debian/install: add libclingo library + * debian/gringo.links: add ldconfig symlinks for libclingo.so.1.0 + * debian/symbols: add libclingo.so.1 symbols + * debian/rules: use cmake without rpath and force g++-7 + * Bug fix: "FTBFS: cat: build/release.log: No such file or directory", + thanks to Lucas Nussbaum (Closes: #880287). + + -- Thomas Krennwallner Wed, 01 Nov 2017 15:30:25 +0100 + +gringo (5.1.0-5) unstable; urgency=medium + + * Bug fix: "FTBFS: libgringo/src/python.cc:348:46: error: + '*(Gringo::{anonymous}::Object (*)(Gringo::{anonymous}::Reference, + Gringo::{anonymous}::Reference))Gringo::{anonymous}::createId' is + not a valid template argument for type + 'Gringo::{anonymous}::Object + (&)(Gringo::{anonymous}::Reference, + Gringo::{anonymous}::Reference)'", thanks to Lucas Nussbaum + (Closes: #871100). + - debian/control: Build-Depends on g++-6 + - debian/rules: set CONFIGPARMS to CXX='g++-6' + * debian/copyright: use https instead of http + * debian/control: Bump Standards-Version to 4.0.1 + + -- Thomas Krennwallner Thu, 17 Aug 2017 07:18:37 +0200 + +gringo (5.1.0-4) unstable; urgency=medium + + * fix FTBFS on alpha: do not define FPU_SWITCH_DOUBLE on alpha, + _FPU_GETCW and friends are undefined on this arch + + -- Thomas Krennwallner Tue, 20 Dec 2016 05:10:36 +0100 + +gringo (5.1.0-3) unstable; urgency=medium + + * debian/rules: fix FTBFS on architectures that require -latomic + + -- Thomas Krennwallner Fri, 16 Dec 2016 08:13:33 +0100 + +gringo (5.1.0-2) unstable; urgency=medium + + * debian/rules: fix C++11 threads + - link with libatomic on architectures that need it + - disable threads and define BROKEN_STD_EXCEPTION_PTR on armel + * gringo-broken-std-exception_ptr.patch: add support for armel + + -- Thomas Krennwallner Thu, 15 Dec 2016 06:49:16 +0100 + +gringo (5.1.0-1) unstable; urgency=medium + + * New upstream version 5.1.0 + * debian/copyright: update copyright year and github source + * debian/control + - Build-Depends on g++ >= 4:6.1.1 replaces libtbb-dev + - point Homepage to https://www.potassco.org + - use https for Vcs-* + - add Breaks clasp (<< 3.2.1-1) + * debian/rules + - build lpconvert + - drop libtbb-dev and use c++11 multi-threading + - disable threads on powerpc,powerpcspe,m68k,mips,mipsel,sh4 + * drop already applied upstream patches: gringo-include-math.patch, + gringo-solve-multi.patch, gringo-translate-minmax.patch + * gringo-fix-body-literals-as-auxiliary.patch: add upstream patch + cherry-picked from d6cfb89df6bbf138ca3e259d71ca7050b322b5d5 + + -- Thomas Krennwallner Sun, 11 Dec 2016 13:12:35 +0100 + +gringo (4.5.4-4) unstable; urgency=medium + + * Bug fix: "please make the build reproducible", thanks to + Reiner Herrmann (Closes: #844096). + + -- Thomas Krennwallner Wed, 07 Dec 2016 08:27:20 +0100 + +gringo (4.5.4-3) unstable; urgency=medium + + * Fix gringo-multi-solver.patch: this fixes an FTBFS on architectures + that have WITH_THREAD=0, i.e., all architectures except amd64 and + ppc64. + + -- Thomas Krennwallner Mon, 02 May 2016 07:18:34 +0200 + +gringo (4.5.4-2) unstable; urgency=medium + + * Bug fix: "FTBFS: error: 'pow' is not a member of 'std'", thanks to + Martin Michlmayr (Closes: #822383). + * Add patch to fix random python multithreading segfaults (upstream bug 117) + * Add patch to fix #min/#max translation bug (upstream bug 119) + * Build with liblua5.3 + * Bump Standards-Version to 3.9.8 + + -- Thomas Krennwallner Sun, 01 May 2016 08:47:29 +0200 + +gringo (4.5.4-1) unstable; urgency=medium + + * Imported Upstream version 4.5.4 + + -- Thomas Krennwallner Sat, 19 Dec 2015 14:07:05 +0100 + +gringo (4.5.3-1) unstable; urgency=medium + + * Imported Upstream version 4.5.3 + + -- Thomas Krennwallner Sat, 26 Sep 2015 09:31:03 +0200 + +gringo (4.5.1-1) unstable; urgency=medium + + * Imported Upstream version 4.5.1 + * Add reify.1 manpage + + -- Thomas Krennwallner Mon, 13 Jul 2015 09:01:56 +0200 + +gringo (4.5.0-1) unstable; urgency=medium + + * Bump Standards-Version to 3.9.6. + * Imported Upstream version 4.5.0 + * debian/control: Add Breaks: aspcud (<= 1.9.0-2). Add reify description. + * debian/copyright: Update copyright information, remove outdated files. + * debian/docs: Remove NOTES. + * debian/install: Install reify. + * debian/rules: Build reify. + + -- Thomas Krennwallner Sat, 11 Jul 2015 09:36:10 +0200 + +gringo (4.4.0-1) unstable; urgency=low + + * New upstream release. + * debian/control: Remove Suggests on potassco-guide. + * debian/control: Fix Vcs fields to use anonscm.debian.org. + * Setup git repository to use git-buildpackage. + * Import upstream sources with git-import-orig --pristine-tar. + + -- Thomas Krennwallner Mon, 18 Aug 2014 17:10:34 +0200 + +gringo (4.3.0-2) unstable; urgency=low + + * Bug fix: "non-standard gcc/g++ used for build (gcc-4.8)", thanks to + Matthias Klose (Closes: #751317). + * Build with system-wide liblua5.2-dev. + + -- Thomas Krennwallner Thu, 12 Jun 2014 09:16:31 +0200 + +gringo (4.3.0-1) unstable; urgency=low + + * New upstream release. + + -- Thomas Krennwallner Wed, 26 Feb 2014 13:06:29 +0100 + +gringo (4.2.1-4) unstable; urgency=low + + * Bug fix: "add ppc64el to architecture list for libtbb-dev to fix + FTBFS", thanks to Logan Rosen (Closes: #735005). + + -- Thomas Krennwallner Sun, 12 Jan 2014 19:22:44 +0100 + +gringo (4.2.1-3) unstable; urgency=low + + * debian/control: Breaks aspcud <= 2012.10.24-6 after discussion with + upstream. + Remove spurious Build-Depends on libboost-filesystem-dev and + libboost-system-dev. + + -- Thomas Krennwallner Wed, 18 Dec 2013 09:42:59 +0100 + +gringo (4.2.1-2) unstable; urgency=low + + * debian/control: FTBFS on ia64 sparc powerpc, Build-Depends is now + g++-4.8 >= 4.8.0. + * debian/rules: Set CXX to g++-4.8. + + -- Thomas Krennwallner Tue, 17 Dec 2013 07:07:54 +0100 + +gringo (4.2.1-1) unstable; urgency=low + + gringo 4.2 adds support for {i,o,}clingo again. + + * New upstream release. + * debian/watch: Back to watching all releases of gringo. + * debian/rules: Add scons, python, tbb, and hardening support. + * debian/install: Install gringo and clingo. + * debian/gringo.links: Symlink clingo binary and manpage to {i,o}clingo. + * debian/gringo.manpages: Remove iclingo manpage. + * debian/control: Build-Depends on bison, scons, g++ >= 4.8.0, + libpython2.7-dev, libtbb-dev. + Bump Standards-Version to 3.9.5. + + -- Thomas Krennwallner Mon, 16 Dec 2013 16:28:42 +0100 + +gringo (3.0.5-1) unstable; urgency=low + + * New upstream release. + * debian/copyright: Update copyright years. + * debian/compat: Bump to version 9. + * debian/control: + - Remove DM-Upload-Allowed. + - Build-Depends on debhelper >= 9. + * debian/watch: Only watch upstream gringo >= 3. + * debian/patches/gringo-clang-gcc.patch debian/patches/gringo-cond.patch + debian/patches/gringo-domain-fwd-decl.patch + debian/patches/gringo-unpool-pred.patch debian/patches/series: Remove + already applied patches. + + -- Thomas Krennwallner Tue, 21 May 2013 19:04:24 +0200 + +gringo (3.0.4-4) unstable; urgency=low + + * Apply upstream patches from subversion r6200 and r6237 for fixing + potassco bugs 75 and 76, resp. + * debian/patches/gringo-cond.patch: New file originally from + http://sourceforge.net/p/potassco/code/6291/tree/tags/gringo-3.0.4/patches/patch-cond.diff?format=raw. + * debian/patches/gringo-unpool-pred.patch: New file originally from + http://sourceforge.net/p/potassco/code/6291/tree/tags/gringo-3.0.4/patches/patch-unpool-pred.diff?format=raw. + * debian/control: Bump Standards-Version to 3.9.4. + + -- Thomas Krennwallner Thu, 22 Nov 2012 10:40:56 +0100 + +gringo (3.0.4-3) unstable; urgency=low + + * Bug fix: "please build-depend on unversionend boost libraries", thanks + to Ralf Treinen (Closes: #672933). + + -- Thomas Krennwallner Wed, 23 May 2012 15:25:09 +0200 + +gringo (3.0.4-2) unstable; urgency=low + + * debian/patches/gringo-clang-gcc.patch: New file originally from + https://potassco.svn.sourceforge.net/svnroot/potassco/tags/gringo-3.0.4/patches/patch-clang.diff. + * Bug fix: "ftbfs with GCC-4.7", thanks to Matthias Klose (Closes: + #667193). + * debian/control: Bump Standards-Version to 3.9.3. + + -- Thomas Krennwallner Tue, 10 Apr 2012 16:48:52 +0200 + +gringo (3.0.4-1ubuntu1~oneiric1) oneiric; urgency=low + + * Upload to ppa:~tkren/asp. + + -- Thomas Krennwallner Fri, 27 Jan 2012 08:08:04 +0100 + +gringo (3.0.4-1) unstable; urgency=low + + * New upstream release. + + -- Thomas Krennwallner Thu, 26 Jan 2012 14:59:59 +0100 + +gringo (3.0.3-7) unstable; urgency=low + + * debian/copyright: Fix comma-separated-files-in-dep5-copyright, + obsolete-field-in-dep5-copyright and unversioned-copyright-format-uri + lintian warnings. + * Bug fix: "FTBFS: clone_allocator.hpp:34:27: error: invalid use of + incomplete type ", thanks to Lucas Nussbaum + (Closes: #652787). + * debian/patches/gringo-domain-fwd-decl.patch: New file. + * debian/control: Build-Depends on re2c to recreate parser.cpp from + parser.r2c, add boost version libboost-*N.MM-dev. + * debian/rules: Add override_dh_auto_configure and remove parser.cpp and + converter.cpp to force recreation of re2c lexer files. + + -- Thomas Krennwallner Sun, 25 Dec 2011 18:44:20 +0100 + +gringo (3.0.3-6) unstable; urgency=low + + * debian/control: Setup as Debian Science project. + - Set Maintainer to Debian Science Maintainers and Uploaders to Thomas + Krennwallner. + - Set DM-Upload-Allowed to yes. + - Convert bzr repository to git and use Vcs-Git and Vcs-Browser + accordingly. + - Build-Depends on debhelper >= 8.0.0. + * debian/rules: Add override_dh_auto_build to get rid off + debian/patches/gringo-makefile.patch. + * debian/patches/gringo-makefile.patch debian/patches/series: Remove + debian/patches/gringo-makefile.patch. + + -- Thomas Krennwallner Mon, 05 Sep 2011 13:21:51 +0200 + +gringo (3.0.3-5~natty1) natty; urgency=low + + * debian/watch: Fix lintian debian-watch-contains-dh_make-template. + * debian/control: Lower Priority to extra and bump Standards-Version to + 3.9.2. + + -- Thomas Krennwallner Fri, 29 Apr 2011 07:11:12 +0200 + +gringo (3.0.3-4) unstable; urgency=low + + * debian/control: Combine gringo, clingo, and iclingo binary packages + into gringo. + + Conflicts and Replaces clingo and iclingo. + * debian/copyright: Convert to DEP-5 format and add missing licenses. + * debian/rules: Add override_dh_installchangelogs for CHANGES file. + * debian/install: Install gringo, clingo and iclingo. + * Refresh debian/patches/gringo-makefile.patch; do not install anything + here. + + -- Thomas Krennwallner Tue, 22 Feb 2011 09:38:26 +0100 + +gringo (3.0.3-3) unstable; urgency=low + + * Initial upload (Closes: #605879) + + -- Thomas Krennwallner Sun, 05 Dec 2010 18:01:28 +0100 + +gringo (3.0.3-2) unstable; urgency=low + + * Upload to mentors.debian.net. + + -- Thomas Krennwallner Sat, 20 Nov 2010 09:43:35 +0100 + +gringo (3.0.3-1~maverick1) maverick; urgency=low + + * New upstream release. + + * Fix changelog entries. + + -- Thomas Krennwallner Fri, 12 Nov 2010 05:53:36 +0100 + +gringo (3.0.2-2~maverick1) maverick; urgency=low + + * Tag distro-series. + + * Fix Standards-Version and Priority. + + * Suggest potassco-guide. + + * Fix missing changelog. + + * Add additional authors to copyright. + + -- Thomas Krennwallner Sun, 10 Oct 2010 08:50:01 +0200 + +gringo (3.0.2-1) lucid; urgency=low + + * New upstream release. + + -- Thomas Krennwallner Mon, 04 Oct 2010 22:03:12 +0200 + +gringo (3.0.1-2) lucid; urgency=low + + * Build with system-wide liblua5.1-dev. + + -- Thomas Krennwallner Wed, 28 Jul 2010 06:15:10 +0200 + +gringo (3.0.1-1) lucid; urgency=low + + * New upstream release. + + -- Thomas Krennwallner Tue, 27 Jul 2010 06:00:34 +0200 + +gringo (2.0.5-6) lucid; urgency=low + + * Switch to dpkg-source 3.0 (quilt) format. + + * Fix lintian warning debhelper-but-no-misc-depends: add ${misc:Depends} to potassco-guide. + + -- Thomas Krennwallner Sun, 06 Jun 2010 18:18:22 +0200 + +gringo (2.0.5-5) lucid; urgency=low + + * Added watch file. + + * Added Vcs-Bzr to control. + + -- Thomas Krennwallner Tue, 01 Jun 2010 14:47:13 +0200 + +gringo (2.0.5-4) lucid; urgency=low + + * Set Architecture of all binary packages to "any". + + -- Thomas Krennwallner Fri, 28 May 2010 09:21:58 +0200 + +gringo (2.0.5-3) lucid; urgency=low + + * Set Architecture of all binary packages to "all". + + -- Thomas Krennwallner Fri, 28 May 2010 07:04:46 +0200 + +gringo (2.0.5-2) lucid; urgency=low + + * Moved to Ubuntu PPA. + + -- Thomas Krennwallner Wed, 26 May 2010 00:33:32 +0200 + +gringo (2.0.5-1) unstable; urgency=low + + * Initial release. + + -- Thomas Krennwallner Thu, 04 Mar 2010 19:47:14 +0100 diff --git a/control b/control new file mode 100644 index 0000000..b8cafb4 --- /dev/null +++ b/control @@ -0,0 +1,54 @@ +Source: gringo +Section: interpreters +Priority: optional +Maintainer: Debian Science Maintainers +Uploaders: Thomas Krennwallner +Build-Depends: debhelper-compat (= 13), + dpkg-dev (>= 1.16.1~), + pkg-kde-tools, + cmake (>= 3.1.0), + catch, + catch2, + re2c, + bison, + liblua5.4-dev, + python3 (>= 3.8.2), + libpython3-dev (>= 3.8.2), + python3-distutils (>= 3.8.2) +Rules-Requires-Root: no +Standards-Version: 4.5.1 +Vcs-Git: https://salsa.debian.org/science-team/gringo.git +Vcs-Browser: https://salsa.debian.org/science-team/gringo +Homepage: https://www.potassco.org/clingo/ + +Package: gringo +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Recommends: clasp +Replaces: clingo, iclingo +Conflicts: clingo, iclingo +Breaks: + aspcud (<= 1.9.0-2), + clasp (<< 3.2.1-1) +Description: grounding tools for (disjunctive) logic programs + Current answer set solvers work on variable-free programs. Hence, a + grounder is needed that, given an input program with first-order + variables, computes an equivalent ground (variable-free) program. + . + This package contains the following tools: + . + - gringo: a grounder that, given an input program with first-order + variables, computes an equivalent ground (variable-free) program in + aspif format. Its output can be processed further with answer set + solver clasp. Starting with gringo series 5, its output is no longer + directly compatible with solvers like smodels or cmodels reading + smodels format. Use lpconvert for translating aspif format to + smodels format. + - clingo: combines both gringo and clasp into a monolithic system. + This way it offers more control over the grounding and solving + process than gringo and clasp can offer individually: multi-shot + solving. + - lpconvert: converter between gringo's aspif and smodels format. + - reify: small utility that reifies logic programs given in aspif + format. It produces a set of facts, which can be processed further + with gringo. diff --git a/copyright b/copyright new file mode 100644 index 0000000..9c6d2c6 --- /dev/null +++ b/copyright @@ -0,0 +1,35 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: gringo +Upstream-Contact: Roland Kaminski +Source: https://github.com/potassco/clingo/releases + + +Files: * +Copyright: 2017, Roland Kaminski +License: MIT + + +Files: debian/* +Copyright: 2010-2017, Thomas Krennwallner +License: MIT + + +License: MIT + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + . + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/docs b/docs new file mode 100644 index 0000000..b9de7ba --- /dev/null +++ b/docs @@ -0,0 +1,2 @@ +README.md +examples diff --git a/gbp.conf b/gbp.conf new file mode 100644 index 0000000..cec628c --- /dev/null +++ b/gbp.conf @@ -0,0 +1,2 @@ +[DEFAULT] +pristine-tar = True diff --git a/gringo.links b/gringo.links new file mode 100644 index 0000000..b6bd93e --- /dev/null +++ b/gringo.links @@ -0,0 +1,6 @@ +usr/bin/clingo usr/bin/iclingo +usr/bin/clingo usr/bin/oclingo +usr/lib/libclingo.so.3.0 usr/lib/libclingo.so.3 +usr/lib/libclingo.so.3 usr/lib/libclingo.so +usr/share/man/man1/clingo.1 usr/share/man/man1/iclingo.1 +usr/share/man/man1/clingo.1 usr/share/man/man1/oclingo.1 diff --git a/gringo.manpages b/gringo.manpages new file mode 100644 index 0000000..8d0e373 --- /dev/null +++ b/gringo.manpages @@ -0,0 +1,4 @@ +gringo.1 +clingo.1 +reify.1 +lpconvert.1 diff --git a/install b/install new file mode 100644 index 0000000..66d3e5b --- /dev/null +++ b/install @@ -0,0 +1,5 @@ +build.dir/hardening_mt/bin/gringo usr/bin/ +build.dir/hardening_mt/bin/clingo usr/bin/ +build.dir/hardening_mt/bin/reify usr/bin/ +build.dir/hardening_mt/bin/lpconvert usr/bin/ +build.dir/hardening_mt/bin/libclingo.so.3.0 usr/lib/ diff --git a/missing-sources/doc/py/js/highlight.js b/missing-sources/doc/py/js/highlight.js new file mode 100644 index 0000000..795cc28 --- /dev/null +++ b/missing-sources/doc/py/js/highlight.js @@ -0,0 +1,816 @@ +/* +Syntax highlighting with language autodetection. +https://highlightjs.org/ +*/ + +(function(factory) { + + // Find the global object for export to both the browser and web workers. + var globalObject = typeof window === 'object' && window || + typeof self === 'object' && self; + + // Setup highlight.js for different environments. First is Node.js or + // CommonJS. + if(typeof exports !== 'undefined') { + factory(exports); + } else if(globalObject) { + // Export hljs globally even when using AMD for cases when this script + // is loaded with others that may still expect a global hljs. + globalObject.hljs = factory({}); + + // Finally register the global hljs with AMD. + if(typeof define === 'function' && define.amd) { + define([], function() { + return globalObject.hljs; + }); + } + } + +}(function(hljs) { + // Convenience variables for build-in objects + var ArrayProto = [], + objectKeys = Object.keys; + + // Global internal variables used within the highlight.js library. + var languages = {}, + aliases = {}; + + // Regular expressions used throughout the highlight.js library. + var noHighlightRe = /^(no-?highlight|plain|text)$/i, + languagePrefixRe = /\blang(?:uage)?-([\w-]+)\b/i, + fixMarkupRe = /((^(<[^>]+>|\t|)+|(?:\n)))/gm; + + var spanEndTag = ''; + + // Global options used when within external APIs. This is modified when + // calling the `hljs.configure` function. + var options = { + classPrefix: 'hljs-', + tabReplace: null, + useBR: false, + languages: undefined + }; + + + /* Utility functions */ + + function escape(value) { + return value.replace(/&/g, '&').replace(//g, '>'); + } + + function tag(node) { + return node.nodeName.toLowerCase(); + } + + function testRe(re, lexeme) { + var match = re && re.exec(lexeme); + return match && match.index === 0; + } + + function isNotHighlighted(language) { + return noHighlightRe.test(language); + } + + function blockLanguage(block) { + var i, match, length, _class; + var classes = block.className + ' '; + + classes += block.parentNode ? block.parentNode.className : ''; + + // language-* takes precedence over non-prefixed class names. + match = languagePrefixRe.exec(classes); + if (match) { + return getLanguage(match[1]) ? match[1] : 'no-highlight'; + } + + classes = classes.split(/\s+/); + + for (i = 0, length = classes.length; i < length; i++) { + _class = classes[i] + + if (isNotHighlighted(_class) || getLanguage(_class)) { + return _class; + } + } + } + + function inherit(parent) { // inherit(parent, override_obj, override_obj, ...) + var key; + var result = {}; + var objects = Array.prototype.slice.call(arguments, 1); + + for (key in parent) + result[key] = parent[key]; + objects.forEach(function(obj) { + for (key in obj) + result[key] = obj[key]; + }); + return result; + } + + /* Stream merging */ + + function nodeStream(node) { + var result = []; + (function _nodeStream(node, offset) { + for (var child = node.firstChild; child; child = child.nextSibling) { + if (child.nodeType === 3) + offset += child.nodeValue.length; + else if (child.nodeType === 1) { + result.push({ + event: 'start', + offset: offset, + node: child + }); + offset = _nodeStream(child, offset); + // Prevent void elements from having an end tag that would actually + // double them in the output. There are more void elements in HTML + // but we list only those realistically expected in code display. + if (!tag(child).match(/br|hr|img|input/)) { + result.push({ + event: 'stop', + offset: offset, + node: child + }); + } + } + } + return offset; + })(node, 0); + return result; + } + + function mergeStreams(original, highlighted, value) { + var processed = 0; + var result = ''; + var nodeStack = []; + + function selectStream() { + if (!original.length || !highlighted.length) { + return original.length ? original : highlighted; + } + if (original[0].offset !== highlighted[0].offset) { + return (original[0].offset < highlighted[0].offset) ? original : highlighted; + } + + /* + To avoid starting the stream just before it should stop the order is + ensured that original always starts first and closes last: + + if (event1 == 'start' && event2 == 'start') + return original; + if (event1 == 'start' && event2 == 'stop') + return highlighted; + if (event1 == 'stop' && event2 == 'start') + return original; + if (event1 == 'stop' && event2 == 'stop') + return highlighted; + + ... which is collapsed to: + */ + return highlighted[0].event === 'start' ? original : highlighted; + } + + function open(node) { + function attr_str(a) {return ' ' + a.nodeName + '="' + escape(a.value).replace('"', '"') + '"';} + result += '<' + tag(node) + ArrayProto.map.call(node.attributes, attr_str).join('') + '>'; + } + + function close(node) { + result += ''; + } + + function render(event) { + (event.event === 'start' ? open : close)(event.node); + } + + while (original.length || highlighted.length) { + var stream = selectStream(); + result += escape(value.substring(processed, stream[0].offset)); + processed = stream[0].offset; + if (stream === original) { + /* + On any opening or closing tag of the original markup we first close + the entire highlighted node stack, then render the original tag along + with all the following original tags at the same offset and then + reopen all the tags on the highlighted stack. + */ + nodeStack.reverse().forEach(close); + do { + render(stream.splice(0, 1)[0]); + stream = selectStream(); + } while (stream === original && stream.length && stream[0].offset === processed); + nodeStack.reverse().forEach(open); + } else { + if (stream[0].event === 'start') { + nodeStack.push(stream[0].node); + } else { + nodeStack.pop(); + } + render(stream.splice(0, 1)[0]); + } + } + return result + escape(value.substr(processed)); + } + + /* Initialization */ + + function expand_mode(mode) { + if (mode.variants && !mode.cached_variants) { + mode.cached_variants = mode.variants.map(function(variant) { + return inherit(mode, {variants: null}, variant); + }); + } + return mode.cached_variants || (mode.endsWithParent && [inherit(mode)]) || [mode]; + } + + function compileLanguage(language) { + + function reStr(re) { + return (re && re.source) || re; + } + + function langRe(value, global) { + return new RegExp( + reStr(value), + 'm' + (language.case_insensitive ? 'i' : '') + (global ? 'g' : '') + ); + } + + function compileMode(mode, parent) { + if (mode.compiled) + return; + mode.compiled = true; + + mode.keywords = mode.keywords || mode.beginKeywords; + if (mode.keywords) { + var compiled_keywords = {}; + + var flatten = function(className, str) { + if (language.case_insensitive) { + str = str.toLowerCase(); + } + str.split(' ').forEach(function(kw) { + var pair = kw.split('|'); + compiled_keywords[pair[0]] = [className, pair[1] ? Number(pair[1]) : 1]; + }); + }; + + if (typeof mode.keywords === 'string') { // string + flatten('keyword', mode.keywords); + } else { + objectKeys(mode.keywords).forEach(function (className) { + flatten(className, mode.keywords[className]); + }); + } + mode.keywords = compiled_keywords; + } + mode.lexemesRe = langRe(mode.lexemes || /\w+/, true); + + if (parent) { + if (mode.beginKeywords) { + mode.begin = '\\b(' + mode.beginKeywords.split(' ').join('|') + ')\\b'; + } + if (!mode.begin) + mode.begin = /\B|\b/; + mode.beginRe = langRe(mode.begin); + if (!mode.end && !mode.endsWithParent) + mode.end = /\B|\b/; + if (mode.end) + mode.endRe = langRe(mode.end); + mode.terminator_end = reStr(mode.end) || ''; + if (mode.endsWithParent && parent.terminator_end) + mode.terminator_end += (mode.end ? '|' : '') + parent.terminator_end; + } + if (mode.illegal) + mode.illegalRe = langRe(mode.illegal); + if (mode.relevance == null) + mode.relevance = 1; + if (!mode.contains) { + mode.contains = []; + } + mode.contains = Array.prototype.concat.apply([], mode.contains.map(function(c) { + return expand_mode(c === 'self' ? mode : c) + })); + mode.contains.forEach(function(c) {compileMode(c, mode);}); + + if (mode.starts) { + compileMode(mode.starts, parent); + } + + var terminators = + mode.contains.map(function(c) { + return c.beginKeywords ? '\\.?(' + c.begin + ')\\.?' : c.begin; + }) + .concat([mode.terminator_end, mode.illegal]) + .map(reStr) + .filter(Boolean); + mode.terminators = terminators.length ? langRe(terminators.join('|'), true) : {exec: function(/*s*/) {return null;}}; + } + + compileMode(language); + } + + /* + Core highlighting function. Accepts a language name, or an alias, and a + string with the code to highlight. Returns an object with the following + properties: + + - relevance (int) + - value (an HTML string with highlighting markup) + + */ + function highlight(name, value, ignore_illegals, continuation) { + + function subMode(lexeme, mode) { + var i, length; + + for (i = 0, length = mode.contains.length; i < length; i++) { + if (testRe(mode.contains[i].beginRe, lexeme)) { + return mode.contains[i]; + } + } + } + + function endOfMode(mode, lexeme) { + if (testRe(mode.endRe, lexeme)) { + while (mode.endsParent && mode.parent) { + mode = mode.parent; + } + return mode; + } + if (mode.endsWithParent) { + return endOfMode(mode.parent, lexeme); + } + } + + function isIllegal(lexeme, mode) { + return !ignore_illegals && testRe(mode.illegalRe, lexeme); + } + + function keywordMatch(mode, match) { + var match_str = language.case_insensitive ? match[0].toLowerCase() : match[0]; + return mode.keywords.hasOwnProperty(match_str) && mode.keywords[match_str]; + } + + function buildSpan(classname, insideSpan, leaveOpen, noPrefix) { + var classPrefix = noPrefix ? '' : options.classPrefix, + openSpan = ''; + + return openSpan + insideSpan + closeSpan; + } + + function processKeywords() { + var keyword_match, last_index, match, result; + + if (!top.keywords) + return escape(mode_buffer); + + result = ''; + last_index = 0; + top.lexemesRe.lastIndex = 0; + match = top.lexemesRe.exec(mode_buffer); + + while (match) { + result += escape(mode_buffer.substring(last_index, match.index)); + keyword_match = keywordMatch(top, match); + if (keyword_match) { + relevance += keyword_match[1]; + result += buildSpan(keyword_match[0], escape(match[0])); + } else { + result += escape(match[0]); + } + last_index = top.lexemesRe.lastIndex; + match = top.lexemesRe.exec(mode_buffer); + } + return result + escape(mode_buffer.substr(last_index)); + } + + function processSubLanguage() { + var explicit = typeof top.subLanguage === 'string'; + if (explicit && !languages[top.subLanguage]) { + return escape(mode_buffer); + } + + var result = explicit ? + highlight(top.subLanguage, mode_buffer, true, continuations[top.subLanguage]) : + highlightAuto(mode_buffer, top.subLanguage.length ? top.subLanguage : undefined); + + // Counting embedded language score towards the host language may be disabled + // with zeroing the containing mode relevance. Usecase in point is Markdown that + // allows XML everywhere and makes every XML snippet to have a much larger Markdown + // score. + if (top.relevance > 0) { + relevance += result.relevance; + } + if (explicit) { + continuations[top.subLanguage] = result.top; + } + return buildSpan(result.language, result.value, false, true); + } + + function processBuffer() { + result += (top.subLanguage != null ? processSubLanguage() : processKeywords()); + mode_buffer = ''; + } + + function startNewMode(mode) { + result += mode.className? buildSpan(mode.className, '', true): ''; + top = Object.create(mode, {parent: {value: top}}); + } + + function processLexeme(buffer, lexeme) { + + mode_buffer += buffer; + + if (lexeme == null) { + processBuffer(); + return 0; + } + + var new_mode = subMode(lexeme, top); + if (new_mode) { + if (new_mode.skip) { + mode_buffer += lexeme; + } else { + if (new_mode.excludeBegin) { + mode_buffer += lexeme; + } + processBuffer(); + if (!new_mode.returnBegin && !new_mode.excludeBegin) { + mode_buffer = lexeme; + } + } + startNewMode(new_mode, lexeme); + return new_mode.returnBegin ? 0 : lexeme.length; + } + + var end_mode = endOfMode(top, lexeme); + if (end_mode) { + var origin = top; + if (origin.skip) { + mode_buffer += lexeme; + } else { + if (!(origin.returnEnd || origin.excludeEnd)) { + mode_buffer += lexeme; + } + processBuffer(); + if (origin.excludeEnd) { + mode_buffer = lexeme; + } + } + do { + if (top.className) { + result += spanEndTag; + } + if (!top.skip) { + relevance += top.relevance; + } + top = top.parent; + } while (top !== end_mode.parent); + if (end_mode.starts) { + startNewMode(end_mode.starts, ''); + } + return origin.returnEnd ? 0 : lexeme.length; + } + + if (isIllegal(lexeme, top)) + throw new Error('Illegal lexeme "' + lexeme + '" for mode "' + (top.className || '') + '"'); + + /* + Parser should not reach this point as all types of lexemes should be caught + earlier, but if it does due to some bug make sure it advances at least one + character forward to prevent infinite looping. + */ + mode_buffer += lexeme; + return lexeme.length || 1; + } + + var language = getLanguage(name); + if (!language) { + throw new Error('Unknown language: "' + name + '"'); + } + + compileLanguage(language); + var top = continuation || language; + var continuations = {}; // keep continuations for sub-languages + var result = '', current; + for(current = top; current !== language; current = current.parent) { + if (current.className) { + result = buildSpan(current.className, '', true) + result; + } + } + var mode_buffer = ''; + var relevance = 0; + try { + var match, count, index = 0; + while (true) { + top.terminators.lastIndex = index; + match = top.terminators.exec(value); + if (!match) + break; + count = processLexeme(value.substring(index, match.index), match[0]); + index = match.index + count; + } + processLexeme(value.substr(index)); + for(current = top; current.parent; current = current.parent) { // close dangling modes + if (current.className) { + result += spanEndTag; + } + } + return { + relevance: relevance, + value: result, + language: name, + top: top + }; + } catch (e) { + if (e.message && e.message.indexOf('Illegal') !== -1) { + return { + relevance: 0, + value: escape(value) + }; + } else { + throw e; + } + } + } + + /* + Highlighting with language detection. Accepts a string with the code to + highlight. Returns an object with the following properties: + + - language (detected language) + - relevance (int) + - value (an HTML string with highlighting markup) + - second_best (object with the same structure for second-best heuristically + detected language, may be absent) + + */ + function highlightAuto(text, languageSubset) { + languageSubset = languageSubset || options.languages || objectKeys(languages); + var result = { + relevance: 0, + value: escape(text) + }; + var second_best = result; + languageSubset.filter(getLanguage).forEach(function(name) { + var current = highlight(name, text, false); + current.language = name; + if (current.relevance > second_best.relevance) { + second_best = current; + } + if (current.relevance > result.relevance) { + second_best = result; + result = current; + } + }); + if (second_best.language) { + result.second_best = second_best; + } + return result; + } + + /* + Post-processing of the highlighted markup: + + - replace TABs with something more useful + - replace real line-breaks with '
' for non-pre containers + + */ + function fixMarkup(value) { + return !(options.tabReplace || options.useBR) + ? value + : value.replace(fixMarkupRe, function(match, p1) { + if (options.useBR && match === '\n') { + return '
'; + } else if (options.tabReplace) { + return p1.replace(/\t/g, options.tabReplace); + } + return ''; + }); + } + + function buildClassName(prevClassName, currentLang, resultLang) { + var language = currentLang ? aliases[currentLang] : resultLang, + result = [prevClassName.trim()]; + + if (!prevClassName.match(/\bhljs\b/)) { + result.push('hljs'); + } + + if (prevClassName.indexOf(language) === -1) { + result.push(language); + } + + return result.join(' ').trim(); + } + + /* + Applies highlighting to a DOM node containing code. Accepts a DOM node and + two optional parameters for fixMarkup. + */ + function highlightBlock(block) { + var node, originalStream, result, resultNode, text; + var language = blockLanguage(block); + + if (isNotHighlighted(language)) + return; + + if (options.useBR) { + node = document.createElementNS('http://www.w3.org/1999/xhtml', 'div'); + node.innerHTML = block.innerHTML.replace(/\n/g, '').replace(//g, '\n'); + } else { + node = block; + } + text = node.textContent; + result = language ? highlight(language, text, true) : highlightAuto(text); + + originalStream = nodeStream(node); + if (originalStream.length) { + resultNode = document.createElementNS('http://www.w3.org/1999/xhtml', 'div'); + resultNode.innerHTML = result.value; + result.value = mergeStreams(originalStream, nodeStream(resultNode), text); + } + result.value = fixMarkup(result.value); + + block.innerHTML = result.value; + block.className = buildClassName(block.className, language, result.language); + block.result = { + language: result.language, + re: result.relevance + }; + if (result.second_best) { + block.second_best = { + language: result.second_best.language, + re: result.second_best.relevance + }; + } + } + + /* + Updates highlight.js global options with values passed in the form of an object. + */ + function configure(user_options) { + options = inherit(options, user_options); + } + + /* + Applies highlighting to all
..
blocks on a page. + */ + function initHighlighting() { + if (initHighlighting.called) + return; + initHighlighting.called = true; + + var blocks = document.querySelectorAll('pre code'); + ArrayProto.forEach.call(blocks, highlightBlock); + } + + /* + Attaches highlighting to the page load event. + */ + function initHighlightingOnLoad() { + addEventListener('DOMContentLoaded', initHighlighting, false); + addEventListener('load', initHighlighting, false); + } + + function registerLanguage(name, language) { + var lang = languages[name] = language(hljs); + if (lang.aliases) { + lang.aliases.forEach(function(alias) {aliases[alias] = name;}); + } + } + + function listLanguages() { + return objectKeys(languages); + } + + function getLanguage(name) { + name = (name || '').toLowerCase(); + return languages[name] || languages[aliases[name]]; + } + + /* Interface definition */ + + hljs.highlight = highlight; + hljs.highlightAuto = highlightAuto; + hljs.fixMarkup = fixMarkup; + hljs.highlightBlock = highlightBlock; + hljs.configure = configure; + hljs.initHighlighting = initHighlighting; + hljs.initHighlightingOnLoad = initHighlightingOnLoad; + hljs.registerLanguage = registerLanguage; + hljs.listLanguages = listLanguages; + hljs.getLanguage = getLanguage; + hljs.inherit = inherit; + + // Common regexps + hljs.IDENT_RE = '[a-zA-Z]\\w*'; + hljs.UNDERSCORE_IDENT_RE = '[a-zA-Z_]\\w*'; + hljs.NUMBER_RE = '\\b\\d+(\\.\\d+)?'; + hljs.C_NUMBER_RE = '(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)'; // 0x..., 0..., decimal, float + hljs.BINARY_NUMBER_RE = '\\b(0b[01]+)'; // 0b... + hljs.RE_STARTERS_RE = '!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~'; + + // Common modes + hljs.BACKSLASH_ESCAPE = { + begin: '\\\\[\\s\\S]', relevance: 0 + }; + hljs.APOS_STRING_MODE = { + className: 'string', + begin: '\'', end: '\'', + illegal: '\\n', + contains: [hljs.BACKSLASH_ESCAPE] + }; + hljs.QUOTE_STRING_MODE = { + className: 'string', + begin: '"', end: '"', + illegal: '\\n', + contains: [hljs.BACKSLASH_ESCAPE] + }; + hljs.PHRASAL_WORDS_MODE = { + begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/ + }; + hljs.COMMENT = function (begin, end, inherits) { + var mode = hljs.inherit( + { + className: 'comment', + begin: begin, end: end, + contains: [] + }, + inherits || {} + ); + mode.contains.push(hljs.PHRASAL_WORDS_MODE); + mode.contains.push({ + className: 'doctag', + begin: '(?:TODO|FIXME|NOTE|BUG|XXX):', + relevance: 0 + }); + return mode; + }; + hljs.C_LINE_COMMENT_MODE = hljs.COMMENT('//', '$'); + hljs.C_BLOCK_COMMENT_MODE = hljs.COMMENT('/\\*', '\\*/'); + hljs.HASH_COMMENT_MODE = hljs.COMMENT('#', '$'); + hljs.NUMBER_MODE = { + className: 'number', + begin: hljs.NUMBER_RE, + relevance: 0 + }; + hljs.C_NUMBER_MODE = { + className: 'number', + begin: hljs.C_NUMBER_RE, + relevance: 0 + }; + hljs.BINARY_NUMBER_MODE = { + className: 'number', + begin: hljs.BINARY_NUMBER_RE, + relevance: 0 + }; + hljs.CSS_NUMBER_MODE = { + className: 'number', + begin: hljs.NUMBER_RE + '(' + + '%|em|ex|ch|rem' + + '|vw|vh|vmin|vmax' + + '|cm|mm|in|pt|pc|px' + + '|deg|grad|rad|turn' + + '|s|ms' + + '|Hz|kHz' + + '|dpi|dpcm|dppx' + + ')?', + relevance: 0 + }; + hljs.REGEXP_MODE = { + className: 'regexp', + begin: /\//, end: /\/[gimuy]*/, + illegal: /\n/, + contains: [ + hljs.BACKSLASH_ESCAPE, + { + begin: /\[/, end: /\]/, + relevance: 0, + contains: [hljs.BACKSLASH_ESCAPE] + } + ] + }; + hljs.TITLE_MODE = { + className: 'title', + begin: hljs.IDENT_RE, + relevance: 0 + }; + hljs.UNDERSCORE_TITLE_MODE = { + className: 'title', + begin: hljs.UNDERSCORE_IDENT_RE, + relevance: 0 + }; + hljs.METHOD_GUARD = { + // excludes method names from keyword processing + begin: '\\.\\s*' + hljs.UNDERSCORE_IDENT_RE, + relevance: 0 + }; + + return hljs; +})); diff --git a/patches/bump-version-5.4.1.patch b/patches/bump-version-5.4.1.patch new file mode 100644 index 0000000..3ab01ae --- /dev/null +++ b/patches/bump-version-5.4.1.patch @@ -0,0 +1,28 @@ +From: Thomas Krennwallner +Date: Sun, 27 Dec 2020 14:52:06 +0000 +Subject: bump CLINGO_VERSION to 5.4.1 + +Last-Update: 2020-12-27 +Forwarded: no + +upstream forgot to bump revision+1 +--- + libclingo/clingo.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libclingo/clingo.h b/libclingo/clingo.h +index 51fa165..3d83976 100644 +--- a/libclingo/clingo.h ++++ b/libclingo/clingo.h +@@ -113,9 +113,9 @@ extern "C" { + //! Minor version number. + #define CLINGO_VERSION_MINOR 4 + //! Revision number. +-#define CLINGO_VERSION_REVISION 0 ++#define CLINGO_VERSION_REVISION 1 + //! String representation of version. +-#define CLINGO_VERSION "5.4.0" ++#define CLINGO_VERSION "5.4.1" + + //! Signed integer type used for aspif and solver literals. + typedef int32_t clingo_literal_t; diff --git a/patches/gringo-manpages.patch b/patches/gringo-manpages.patch new file mode 100644 index 0000000..034401a --- /dev/null +++ b/patches/gringo-manpages.patch @@ -0,0 +1,265 @@ +From: Thomas Krennwallner +Date: Wed, 7 Dec 2016 07:50:31 +0100 +Subject: Add gringo.1, clingo.1, lpconvert.1, and reify.1 manpages + +=================================================================== +--- + clingo.1 | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + gringo.1 | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + lpconvert.1 | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ + reify.1 | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 4 files changed, 225 insertions(+) + create mode 100644 clingo.1 + create mode 100644 gringo.1 + create mode 100644 lpconvert.1 + create mode 100644 reify.1 + +diff --git a/clingo.1 b/clingo.1 +new file mode 100644 +index 0000000..ba04b34 +--- /dev/null ++++ b/clingo.1 +@@ -0,0 +1,58 @@ ++.\" Hey, EMACS: -*- nroff -*- ++.\" First parameter, NAME, should be all caps ++.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection ++.\" other parameters are allowed: see man(7), man(1) ++.TH CLINGO 1 "December 11, 2016" ++.\" Please adjust this date whenever revising the manpage. ++.\" ++.\" Some roff macros, for reference: ++.\" .nh disable hyphenation ++.\" .hy enable hyphenation ++.\" .ad l left justify ++.\" .ad b justify to both left and right margins ++.\" .nf disable filling ++.\" .fi enable filling ++.\" .br insert line break ++.\" .sp insert n+1 empty lines ++.\" for manpage-specific macros, see man(7) ++.SH NAME ++clingo \- a combination of clasp and gringo ++.SH SYNOPSIS ++.B clingo ++[\fIOPTION\fR]... \fR[\fIFILE\fR]... ++.SH DESCRIPTION ++This manual page documents briefly the ++.B clingo ++command. ++.PP ++.\" TeX users may be more comfortable with the \fB\fP and ++.\" \fI\fP escape sequences to invode bold face and italics, ++.\" respectively. ++\fBclingo\fP stands for clasp on gringo and combines both systems in a ++monolithic way. Its input language is that of gringo and its output ++corresponds to that of clasp. This way it offers more control over the ++grounding and solving process than gringo and clasp can offer ++individually: multi-shot solving. ++.SH OPTIONS ++These programs follow the usual GNU command line syntax, with long ++options starting with two dashes (`-'). ++A summary of options is included below. ++For a complete description, see the potassco-guide at ++https://sourceforge.net/projects/potassco/files/guide/. ++.TP ++.B \-h, \-\-help ++Show summary of options. ++.TP ++.B \-v, \-\-version ++Show version of program. ++.SH SEE ALSO ++.BR clasp (1), ++.BR gringo (1), ++.BR lpconvert (1), ++.BR reify (1) ++.br ++.SH AUTHOR ++clingo was written by Roland Kaminski ++.PP ++This manual page was written by Thomas Krennwallner , ++for the Debian project (and may be used by others). +diff --git a/gringo.1 b/gringo.1 +new file mode 100644 +index 0000000..7587e8e +--- /dev/null ++++ b/gringo.1 +@@ -0,0 +1,60 @@ ++.\" Hey, EMACS: -*- nroff -*- ++.\" First parameter, NAME, should be all caps ++.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection ++.\" other parameters are allowed: see man(7), man(1) ++.TH GRINGO 1 "December 11, 2016" ++.\" Please adjust this date whenever revising the manpage. ++.\" ++.\" Some roff macros, for reference: ++.\" .nh disable hyphenation ++.\" .hy enable hyphenation ++.\" .ad l left justify ++.\" .ad b justify to both left and right margins ++.\" .nf disable filling ++.\" .fi enable filling ++.\" .br insert line break ++.\" .sp insert n+1 empty lines ++.\" for manpage-specific macros, see man(7) ++.SH NAME ++gringo \- a grounder for non-ground logic programs ++.SH SYNOPSIS ++.B gringo ++[\fIOPTION\fR]... \fR[\fIFILE\fR]... ++.SH DESCRIPTION ++This manual page documents briefly the ++.B gringo ++command. ++.PP ++.\" TeX users may be more comfortable with the \fB\fP and ++.\" \fI\fP escape sequences to invode bold face and italics, ++.\" respectively. ++\fBgringo\fP is a grounder that, given an input program with first-order ++variables, computes an equivalent ground (variable-free) program in ++aspif format. Its output can be processed further with answer set solver ++clasp. Starting with gringo series 5, its output is no longer directly ++compatible with solvers like smodels or cmodels reading smodels format. ++Use the \fBlpconvert\fP converter for translating aspif format to ++smodels format. ++.SH OPTIONS ++These programs follow the usual GNU command line syntax, with long ++options starting with two dashes (`-'). ++A summary of options is included below. ++For a complete description, see the potassco-guide at ++https://sourceforge.net/projects/potassco/files/guide/. ++.TP ++.B \-h, \-\-help ++Show summary of options. ++.TP ++.B \-v, \-\-version ++Show version of program. ++.SH SEE ALSO ++.BR clasp (1), ++.BR clingo (1), ++.BR lpconvert (1), ++.BR reify (1) ++.br ++.SH AUTHOR ++gringo was written by Roland Kaminski ++.PP ++This manual page was written by Thomas Krennwallner , ++for the Debian project (and may be used by others). +diff --git a/lpconvert.1 b/lpconvert.1 +new file mode 100644 +index 0000000..f5d931e +--- /dev/null ++++ b/lpconvert.1 +@@ -0,0 +1,53 @@ ++.\" Hey, EMACS: -*- nroff -*- ++.\" First parameter, NAME, should be all caps ++.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection ++.\" other parameters are allowed: see man(7), man(1) ++.TH LPCONVERT 1 "December 11, 2016" ++.\" Please adjust this date whenever revising the manpage. ++.\" ++.\" Some roff macros, for reference: ++.\" .nh disable hyphenation ++.\" .hy enable hyphenation ++.\" .ad l left justify ++.\" .ad b justify to both left and right margins ++.\" .nf disable filling ++.\" .fi enable filling ++.\" .br insert line break ++.\" .sp insert n+1 empty lines ++.\" for manpage-specific macros, see man(7) ++.SH NAME ++lpconvert \- converter between gringo's aspif and smodels format ++.SH SYNOPSIS ++.B lpconvert ++\fR[\fIOPTION\fR]... \fR[\fIFILE\fR]... ++.SH DESCRIPTION ++This manual page documents briefly the ++.B lpconvert ++command. ++.PP ++.\" TeX users may be more comfortable with the \fB\fP and ++.\" \fI\fP escape sequences to invode bold face and italics, ++.\" respectively. ++\fBlpconvert\fP is a converter between gringo's aspif and smodels ++format. ++.SH OPTIONS ++These programs follow the usual GNU command line syntax, with long ++options starting with two dashes (`-'). A summary of options is ++included below. For a complete description, see the potassco-guide ++https://sourceforge.net/projects/potassco/files/guide/2.0/. ++.TP ++.B \-h, \-\-help ++Show summary of options. ++.TP ++.B \-v, \-\-version ++Show version of program. ++.SH SEE ALSO ++.BR clasp (1), ++.BR gringo (1), ++.BR reify (1) ++.br ++.SH AUTHOR ++lpconvert was written by Roland Kaminski ++.PP ++This manual page was written by Thomas Krennwallner , ++for the Debian project (and may be used by others). +diff --git a/reify.1 b/reify.1 +new file mode 100644 +index 0000000..aea2db7 +--- /dev/null ++++ b/reify.1 +@@ -0,0 +1,54 @@ ++.\" Hey, EMACS: -*- nroff -*- ++.\" First parameter, NAME, should be all caps ++.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection ++.\" other parameters are allowed: see man(7), man(1) ++.TH REIFY 1 "December 11, 2016" ++.\" Please adjust this date whenever revising the manpage. ++.\" ++.\" Some roff macros, for reference: ++.\" .nh disable hyphenation ++.\" .hy enable hyphenation ++.\" .ad l left justify ++.\" .ad b justify to both left and right margins ++.\" .nf disable filling ++.\" .fi enable filling ++.\" .br insert line break ++.\" .sp insert n+1 empty lines ++.\" for manpage-specific macros, see man(7) ++.SH NAME ++reify \- a small utility that reifies logic programs ++.SH SYNOPSIS ++.B reify ++\fR[\fIOPTION\fR]... ++.SH DESCRIPTION ++This manual page documents briefly the ++.B reify ++command. ++.PP ++.\" TeX users may be more comfortable with the \fB\fP and ++.\" \fI\fP escape sequences to invode bold face and italics, ++.\" respectively. ++\fBreify\fP is a small utility that reifies logic programs given in ++aspif format by reading standard input. It produces a set of facts, ++which can be processed further with gringo. ++.SH OPTIONS ++These programs follow the usual GNU command line syntax, with long ++options starting with two dashes (`-'). A summary of options is ++included below. For a complete description, see the potassco-guide ++https://sourceforge.net/projects/potassco/files/guide/2.0/. ++.TP ++.B \-h, \-\-help ++Show summary of options. ++.TP ++.B \-v, \-\-version ++Show version of program. ++.SH SEE ALSO ++.BR clasp (1), ++.BR gringo (1), ++.BR lpconvert (1) ++.br ++.SH AUTHOR ++reify was written by Roland Kaminski ++.PP ++This manual page was written by Thomas Krennwallner , ++for the Debian project (and may be used by others). diff --git a/patches/gringo-python3-utf8.patch b/patches/gringo-python3-utf8.patch new file mode 100644 index 0000000..d5908cc --- /dev/null +++ b/patches/gringo-python3-utf8.patch @@ -0,0 +1,28 @@ +From: Thomas Krennwallner +Date: Mon, 5 Feb 2018 06:31:16 +0000 +Subject: Fix testsuite for python3 when reading utf-8 scripts + +=================================================================== +--- + app/clingo/tests/run.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/app/clingo/tests/run.py b/app/clingo/tests/run.py +index 640ae0f..687089d 100755 +--- a/app/clingo/tests/run.py ++++ b/app/clingo/tests/run.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/python3 + + import re + import os +@@ -134,7 +134,7 @@ if parse_ret.action == "run": + for f in sorted(files): + if f.endswith(".lp"): + b = os.path.join(root, f[:-3]) +- with open(b + ".lp", 'rU') as inst_file: ++ with open(b + ".lp", 'rU', encoding='utf-8') as inst_file: + inst = inst_file.read() + if (not with_python and re.search(r"#script[ ]*\(python\)", inst)) or \ + (not with_lua and re.search(r"#script[ ]*\(lua\)", inst)) or \ diff --git a/patches/link-libatomic-check.patch b/patches/link-libatomic-check.patch new file mode 100644 index 0000000..ec832be --- /dev/null +++ b/patches/link-libatomic-check.patch @@ -0,0 +1,59 @@ +From: Thomas Krennwallner +Date: Wed, 11 Mar 2020 06:50:20 -0400 +Subject: link with libatomic on architectures that require it + +Last-Update: 2020-03-11 +Forwarded: no + +clingo requires c++11 threads with 64bit __atomic_exchange, we need to +link with libatomic on armel, powerpc, powerpcspe, m68k, mips, mipsel, +and sh4, see also https://gcc.gnu.org/wiki/Atomic and +https://gcc.gnu.org/wiki/Atomic/GCCMM/LIbrary + +This patch was shamelessly adapted from +https://github.com/potassco/clasp/blob/master/CMakeLists.txt +https://github.com/potassco/clasp/commit/fe3e176e2813956000bb947479de2c3d80fe34be +--- + CMakeLists.txt | 29 +++++++++++++++++++++++++++++ + 1 file changed, 29 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 243469a..df92db8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -17,6 +17,35 @@ include(CMakeDependentOption) + list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") + include(clingo_functions) + ++# Add libatomic if necessary ++include (CheckCXXSourceCompiles) ++set (OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS}) ++set (OLD_CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES}) ++find_package(Threads REQUIRED) ++list(APPEND CMAKE_REQUIRED_FLAGS "-std=c++11") ++list(APPEND CMAKE_REQUIRED_LIBRARIES Threads::Threads) ++check_cxx_source_compiles(" ++#include ++#include ++std::atomic x (0); ++int main() { ++ uint64_t i = x.load(std::memory_order_relaxed); ++ return 0; ++} ++" CLINGO_HAS_WORKING_LIBATOMIC) ++set (CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS}) ++set (CMAKE_REQUIRED_LIBRARIES ${OLD_CMAKE_REQUIRED_LIBRARIES}) ++if (NOT CLINGO_HAS_WORKING_LIBATOMIC) ++ # clingo requires c++11 threads with 64bit __atomic_exchange, we ++ # need to link with libatomic on armel, powerpc, powerpcspe, m68k, ++ # mips, mipsel, and sh4, see also https://gcc.gnu.org/wiki/Atomic ++ # https://gcc.gnu.org/wiki/Atomic/GCCMM/LIbrary ++ check_library_exists(atomic __atomic_fetch_add_4 "" CLINGO_HAS_LIBATOMIC) ++ if (CLINGO_HAS_LIBATOMIC) ++ set_property(TARGET Threads::Threads APPEND PROPERTY INTERFACE_LINK_LIBRARIES "atomic") ++ endif() ++endif() ++ + # Enable folders in IDEs like Visual Studio + set_property(GLOBAL PROPERTY USE_FOLDERS ON) + diff --git a/patches/series b/patches/series new file mode 100644 index 0000000..e57e45f --- /dev/null +++ b/patches/series @@ -0,0 +1,6 @@ +gringo-manpages.patch +gringo-python3-utf8.patch +link-libatomic-check.patch +bump-version-5.4.1.patch +use-system-catch-for-glibc-2.34-compat.patch +testsuite-python-open-rU.patch diff --git a/patches/testsuite-python-open-rU.patch b/patches/testsuite-python-open-rU.patch new file mode 100644 index 0000000..add2ef7 --- /dev/null +++ b/patches/testsuite-python-open-rU.patch @@ -0,0 +1,39 @@ +Description: Fix the testsuite for Python no longer supporting 'rU' in open() +Author: Adrian Bunk + +--- gringo-5.4.1.orig/app/clingo/tests/run.py ++++ gringo-5.4.1/app/clingo/tests/run.py +@@ -115,7 +115,7 @@ if parse_ret.action == "normalize": + args = [clingo, "0", parse_ret.file, "-Wnone"] + b = os.path.splitext(parse_ret.file)[0] + if os.path.exists(b + ".cmd"): +- with open(b + ".cmd", 'rU') as cmd_file: ++ with open(b + ".cmd", 'r') as cmd_file: + for x in cmd_file: + args.extend(x.strip().split()) + args.extend(extra_argv) +@@ -134,7 +134,7 @@ if parse_ret.action == "run": + for f in sorted(files): + if f.endswith(".lp"): + b = os.path.join(root, f[:-3]) +- with open(b + ".lp", 'rU', encoding='utf-8') as inst_file: ++ with open(b + ".lp", 'r', encoding='utf-8') as inst_file: + inst = inst_file.read() + if (not with_python and re.search(r"#script[ ]*\(python\)", inst)) or \ + (not with_lua and re.search(r"#script[ ]*\(lua\)", inst)) or \ +@@ -147,13 +147,13 @@ if parse_ret.action == "run": + + args = [clingo, "0", b + ".lp", "-Wnone"] + if os.path.exists(b + ".cmd"): +- with open(b + ".cmd", 'rU') as cmd_file: ++ with open(b + ".cmd", 'r') as cmd_file: + for x in cmd_file: + args.extend(x.strip().split()) + args.extend(extra_argv) + out, err = sp.Popen(args, stderr=sp.PIPE, stdout=sp.PIPE, universal_newlines=True).communicate() + norm = normalize(out) +- with open(b + ".sol", 'rU') as sol_file: ++ with open(b + ".sol", 'r') as sol_file: + sol = reorder(sol_file.read()) + if norm != sol: + failed+= 1 diff --git a/patches/use-system-catch-for-glibc-2.34-compat.patch b/patches/use-system-catch-for-glibc-2.34-compat.patch new file mode 100644 index 0000000..44d803c --- /dev/null +++ b/patches/use-system-catch-for-glibc-2.34-compat.patch @@ -0,0 +1,348 @@ +Description: Fix 'catch' & 'catch2' compatibility with glibc-2.34 + The gringo package contains several embedded copies of the 'catch' (CTest) + library. All of those copies are outdated and incompatible with glibc-2.34. + This patch updates the test sources to use the system provided versions of + 'catch' and 'catch2' instead, to fix this issue. + C.f.: https://github.com/catchorg/Catch2/issues/2178 +Author: Lukas Märdian +Origin: vendor, Ubuntu +Bug: https://github.com/potassco/libpotassco/issues/12 (only catch1 part) +Last-Update: 2022-01-18 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- gringo-5.4.1.orig/clasp/libpotassco/tests/main.cpp ++++ gringo-5.4.1/clasp/libpotassco/tests/main.cpp +@@ -16,4 +16,4 @@ int enableDebugHeap() { + static int eh = enableDebugHeap(); + #endif + #define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file +-#include "catch.hpp" ++#include +--- gringo-5.4.1.orig/clasp/libpotassco/tests/test_application.cpp ++++ gringo-5.4.1/clasp/libpotassco/tests/test_application.cpp +@@ -18,7 +18,7 @@ + // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + // IN THE SOFTWARE. +-#include "catch.hpp" ++#include + #include + #include + #include +--- gringo-5.4.1.orig/clasp/libpotassco/tests/test_aspif.cpp ++++ gringo-5.4.1/clasp/libpotassco/tests/test_aspif.cpp +@@ -24,7 +24,7 @@ + #ifdef _MSC_VER + #pragma warning (disable : 4996) + #endif +-#include "catch.hpp" ++#include + #include "test_common.h" + #include + #include +--- gringo-5.4.1.orig/clasp/libpotassco/tests/test_options.cpp ++++ gringo-5.4.1/clasp/libpotassco/tests/test_options.cpp +@@ -18,7 +18,7 @@ + // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + // IN THE SOFTWARE. +-#include "catch.hpp" ++#include + #include + #include + #include +--- gringo-5.4.1.orig/clasp/libpotassco/tests/test_smodels.cpp ++++ gringo-5.4.1/clasp/libpotassco/tests/test_smodels.cpp +@@ -22,7 +22,7 @@ + // IN THE SOFTWARE. + // + +-#include "catch.hpp" ++#include + #include "test_common.h" + #include + #include +--- gringo-5.4.1.orig/clasp/libpotassco/tests/test_string_convert.cpp ++++ gringo-5.4.1/clasp/libpotassco/tests/test_string_convert.cpp +@@ -18,7 +18,7 @@ + // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + // IN THE SOFTWARE. +-#include "catch.hpp" ++#include + #include + #include + #include +--- gringo-5.4.1.orig/clasp/libpotassco/tests/test_text.cpp ++++ gringo-5.4.1/clasp/libpotassco/tests/test_text.cpp +@@ -22,7 +22,7 @@ + // IN THE SOFTWARE. + // + +-#include "catch.hpp" ++#include + #include "test_common.h" + #include + #include +--- gringo-5.4.1.orig/clasp/libpotassco/tests/test_value.cpp ++++ gringo-5.4.1/clasp/libpotassco/tests/test_value.cpp +@@ -18,7 +18,7 @@ + // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + // IN THE SOFTWARE. +-#include "catch.hpp" ++#include + #include + #include + #include +--- gringo-5.4.1.orig/clasp/tests/clause_creator_test.cpp ++++ gringo-5.4.1/clasp/tests/clause_creator_test.cpp +@@ -24,7 +24,7 @@ + #include + #include + #include +-#include "catch.hpp" ++#include + namespace Clasp { namespace Test { + using namespace Clasp::mt; + +--- gringo-5.4.1.orig/clasp/tests/clause_test.cpp ++++ gringo-5.4.1/clasp/tests/clause_test.cpp +@@ -24,7 +24,7 @@ + #include + #include + #include +-#include "catch.hpp" ++#include + #ifdef _MSC_VER + #pragma warning (disable : 4267) // conversion from 'size_t' to unsigned int + #pragma once +--- gringo-5.4.1.orig/clasp/tests/cli_test.cpp ++++ gringo-5.4.1/clasp/tests/cli_test.cpp +@@ -26,7 +26,7 @@ + #include + #include + #include +-#include "catch.hpp" ++#include + namespace Clasp { + static bool operator==(const ScheduleStrategy& lhs, const ScheduleStrategy& rhs) { + return lhs.type == rhs.type && lhs.base == rhs.base && lhs.len == rhs.len && lhs.grow == rhs.grow; +--- gringo-5.4.1.orig/clasp/tests/decision_heuristic_test.cpp ++++ gringo-5.4.1/clasp/tests/decision_heuristic_test.cpp +@@ -27,7 +27,7 @@ + #include + #include + #include "lpcompare.h" +-#include "catch.hpp" ++#include + namespace Clasp { namespace Test { + using namespace Clasp::Asp; + ///////////////////////////////////////////////////////////////////////////////////////// +--- gringo-5.4.1.orig/clasp/tests/dependency_graph_test.cpp ++++ gringo-5.4.1/clasp/tests/dependency_graph_test.cpp +@@ -24,7 +24,7 @@ + #include + #include + #include "lpcompare.h" +-#include "catch.hpp" ++#include + namespace Clasp { namespace Test { + using namespace Clasp::Asp; + +--- gringo-5.4.1.orig/clasp/tests/dlp_builder_test.cpp ++++ gringo-5.4.1/clasp/tests/dlp_builder_test.cpp +@@ -26,7 +26,7 @@ + #include + #include "lpcompare.h" + #include +-#include "catch.hpp" ++#include + using namespace std; + namespace Clasp { namespace Test { + using namespace Clasp::Asp; +--- gringo-5.4.1.orig/clasp/tests/enumerator_test.cpp ++++ gringo-5.4.1/clasp/tests/enumerator_test.cpp +@@ -28,7 +28,7 @@ + #include + #include "lpcompare.h" + #include +-#include "catch.hpp" ++#include + using namespace std; + namespace Clasp { namespace Test { + using namespace Clasp::Asp; +--- gringo-5.4.1.orig/clasp/tests/facade_test.cpp ++++ gringo-5.4.1/clasp/tests/facade_test.cpp +@@ -35,7 +35,7 @@ + #endif + #include "lpcompare.h" + #include +-#include "catch.hpp" ++#include + namespace Clasp { namespace Test { + using namespace Clasp::mt; + +--- gringo-5.4.1.orig/clasp/tests/literal_test.cpp ++++ gringo-5.4.1/clasp/tests/literal_test.cpp +@@ -22,7 +22,7 @@ + // IN THE SOFTWARE. + // + #include +-#include "catch.hpp" ++#include + namespace Clasp { namespace Test { + + static bool testBin(const Literal& p) { +--- gringo-5.4.1.orig/clasp/tests/minimize_test.cpp ++++ gringo-5.4.1/clasp/tests/minimize_test.cpp +@@ -28,7 +28,7 @@ + #include + #include + #include +-#include "catch.hpp" ++#include + namespace Clasp { namespace Test { + namespace { + struct BranchAndBoundTest { +--- gringo-5.4.1.orig/clasp/tests/parser_test.cpp ++++ gringo-5.4.1/clasp/tests/parser_test.cpp +@@ -29,7 +29,7 @@ + #include + #include + #include "lpcompare.h" +-#include "catch.hpp" ++#include + namespace Clasp { namespace Test { + + template +--- gringo-5.4.1.orig/clasp/tests/program_builder_test.cpp ++++ gringo-5.4.1/clasp/tests/program_builder_test.cpp +@@ -27,7 +27,7 @@ + #include + #include + #include "lpcompare.h" +-#include "catch.hpp" ++#include + using namespace std; + namespace Clasp { namespace Test { + using namespace Clasp::Asp; +--- gringo-5.4.1.orig/clasp/tests/rule_test.cpp ++++ gringo-5.4.1/clasp/tests/rule_test.cpp +@@ -27,7 +27,7 @@ + #include + #include "lpcompare.h" + #include +-#include "catch.hpp" ++#include + namespace Potassco { + static bool operator==(const LitSpan& lhs, const LitSpan& rhs) { + return lhs.size == rhs.size && std::equal(begin(lhs), end(lhs), begin(rhs)); +--- gringo-5.4.1.orig/clasp/tests/satelite_test.cpp ++++ gringo-5.4.1/clasp/tests/satelite_test.cpp +@@ -27,7 +27,7 @@ + #include + #include + #include +-#include "catch.hpp" ++#include + #ifdef _MSC_VER + #pragma warning (disable : 4267) // conversion from 'size_t' to unsigned int + #pragma once +--- gringo-5.4.1.orig/clasp/tests/solver_test.cpp ++++ gringo-5.4.1/clasp/tests/solver_test.cpp +@@ -25,7 +25,7 @@ + #include + #include + #include +-#include "catch.hpp" ++#include + namespace Clasp { namespace Test { + using namespace Clasp::mt; + struct TestingConstraint : public Constraint { +--- gringo-5.4.1.orig/clasp/tests/test_main.cpp ++++ gringo-5.4.1/clasp/tests/test_main.cpp +@@ -22,7 +22,7 @@ + // IN THE SOFTWARE. + // + #define CATCH_CONFIG_RUNNER +-#include "catch.hpp" ++#include + #if defined (_MSC_VER) && _MSC_VER >= 1200 + #include + #endif +--- gringo-5.4.1.orig/clasp/tests/unfounded_check_test.cpp ++++ gringo-5.4.1/clasp/tests/unfounded_check_test.cpp +@@ -26,7 +26,7 @@ + #include + #include "lpcompare.h" + #include +-#include "catch.hpp" ++#include + namespace Clasp { namespace Test { + using namespace Clasp::Asp; + +--- gringo-5.4.1.orig/clasp/tests/weight_constraint_test.cpp ++++ gringo-5.4.1/clasp/tests/weight_constraint_test.cpp +@@ -24,7 +24,7 @@ + #include + #include + #include +-#include "catch.hpp" ++#include + using namespace std; + + namespace Clasp { namespace Test { +--- gringo-5.4.1.orig/libclingo/tests/main.cc ++++ gringo-5.4.1/libclingo/tests/main.cc +@@ -23,4 +23,4 @@ + // }}} + + #define CATCH_CONFIG_MAIN +-#include "catch.hpp" ++#include +--- gringo-5.4.1.orig/libclingo/tests/tests.hh ++++ gringo-5.4.1/libclingo/tests/tests.hh +@@ -23,7 +23,7 @@ + // }}} + + #include "clingo.hh" +-#include "catch.hpp" ++#include + + namespace Clingo { namespace Test { + +--- gringo-5.4.1.orig/libgringo/tests/main.cc ++++ gringo-5.4.1/libgringo/tests/main.cc +@@ -22,4 +22,4 @@ + + // }}} + #define CATCH_CONFIG_MAIN +-#include "catch.hpp" ++#include +--- gringo-5.4.1.orig/libgringo/tests/tests.hh ++++ gringo-5.4.1/libgringo/tests/tests.hh +@@ -25,7 +25,7 @@ + #ifndef _GRINGO_TEST_TESTS_HH + #define _GRINGO_TEST_TESTS_HH + +-#include "catch.hpp" ++#include + #include "gringo/utility.hh" + #include "gringo/logger.hh" + #include "gringo/base.hh" +--- gringo-5.4.1.orig/libreify/tests/main.cc ++++ gringo-5.4.1/libreify/tests/main.cc +@@ -1,2 +1,2 @@ + #define CATCH_CONFIG_MAIN +-#include "catch.hpp" ++#include + +--- gringo-5.4.1.orig/libreify/tests/program.cc ++++ gringo-5.4.1/libreify/tests/program.cc +@@ -1,4 +1,4 @@ +-#include "catch.hpp" ++#include + #include + #include + diff --git a/rules b/rules new file mode 100755 index 0000000..b3aa2ad --- /dev/null +++ b/rules @@ -0,0 +1,57 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# use custom hardening config flags for compiling clasp +CONFIG=hardening +CONFIGPARMS = -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -LAH -DCMAKE_SKIP_RPATH=YES -DCLINGO_MANAGE_RPATH=OFF -DLIB_POTASSCO_BUILD_APP=ON -DLIB_POTASSCO_BUILD_TESTS=ON -DCLASP_BUILD_APP=OFF -DCLASP_BUILD_TESTS=OFF -DCLASP_BUILD_EXAMPLES=OFF -DCLINGO_BUILD_EXAMPLES=ON -DCLINGO_BUILD_TESTS=ON -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3 +TOPBUILDDIR = build.dir/$(CONFIG)_mt +ROOTDIR = $(shell pwd) + +# +# export CXXFLAGS and LDFLAGS for cmake +# +# default to -O3 -Wall -DNDEBUG and enable all hardening flags +# +DEB_CXXFLAGS_MAINT_APPEND = -O3 -Wall +DEB_CPPFLAGS_MAINT_APPEND = -DNDEBUG +DEB_LDFLAGS_MAINT_APPEND = + +export DEB_BUILD_MAINT_OPTIONS = hardening=+all + +DPKG_EXPORT_BUILDFLAGS = 1 +include /usr/share/dpkg/buildflags.mk + +# inject CPPFLAGS to CXXFLAGS +CXXFLAGS += $(CPPFLAGS) + +%: + dh $@ --with pkgkde_symbolshelper + +# configure with cmake +override_dh_auto_configure: + dh_auto_configure --builddirectory=$(TOPBUILDDIR) -- $(CONFIGPARMS) + +# build binaries in $(TOPBUILDDIR) +override_dh_auto_build: + dh_auto_build --builddirectory=$(TOPBUILDDIR) + +override_dh_auto_clean: + dh_auto_clean --builddirectory=$(TOPBUILDDIR) + +# run and output test results +override_dh_auto_test: +ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) + dh_auto_test --builddirectory=$(TOPBUILDDIR) -- -e LD_LIBRARY_PATH="$(ROOTDIR)/$(TOPBUILDDIR)/bin:$(LD_LIBRARY_PATH)" &&\ + { EXIT_CODE=$$? ; echo "Exit $$EXIT_CODE" ; test -d $(TOPBUILDDIR)/Testing/Temporary && tail -n +1 -v -- $(TOPBUILDDIR)/Testing/Temporary/* ; exit $$EXIT_CODE ; } ||\ + { EXIT_CODE=$$? ; echo "Exit $$EXIT_CODE" ; test -d $(TOPBUILDDIR)/Testing/Temporary && tail -n +1 -v -- $(TOPBUILDDIR)/Testing/Temporary/* ; exit $$EXIT_CODE ; } +endif + +# install CHANGES.md as changelog +override_dh_installchangelogs: + dh_installchangelogs CHANGES.md + +override_dh_shlibdeps: + dh_shlibdeps -l$(shell pwd)/$(TOPBUILDDIR)/bin diff --git a/source/format b/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/tests/control b/tests/control new file mode 100644 index 0000000..dd164fd --- /dev/null +++ b/tests/control @@ -0,0 +1,2 @@ +Tests: gringo0, gringo1, gringo2, gringo3, gringo4, gringo5, gringo6, gringo7 +Depends: @ diff --git a/tests/gringo0 b/tests/gringo0 new file mode 100755 index 0000000..bc3875b --- /dev/null +++ b/tests/gringo0 @@ -0,0 +1,18 @@ +#!/bin/bash +# gringo: ground and exit in 0 +# Author: Thomas Krennwallner +# Date: 2018-02-04 + +set -o pipefail + +diff -y <(gringo <<<'a :- not b. b :- not a.') - < +# Date: 2018-02-04 + +set -o pipefail + +diff -y <(gringo <<<'a|b:-not c. c|d:-not a.') - < +# Date: 2018-02-04 + +set -o pipefail + +clingo /usr/share/doc/gringo/examples/gringo/gbie/{gbie1.lp,instances/unsat_01.lp} + +result=$? +test $result -eq 20 diff --git a/tests/gringo3 b/tests/gringo3 new file mode 100755 index 0000000..6143a83 --- /dev/null +++ b/tests/gringo3 @@ -0,0 +1,24 @@ +#!/bin/bash +# gringo+lpconvert: ground and exit in 0 +# Author: Thomas Krennwallner +# Date: 2018-02-04 + +set -o pipefail + +diff -y <(gringo <<<'a :- not b. b :- not a.' | lpconvert) - < +# Date: 2018-02-04 + +set -o pipefail + +diff -y <(gringo <<<'a|b. a :- b. b :- a.' | reify | sort) - < +# Date: 2018-02-04 + +set -o pipefail + +clingo /usr/share/doc/gringo/examples/clingo/cannot/{cannot-lua,example}.lp + +result=$? +test $result -eq 30 diff --git a/tests/gringo6 b/tests/gringo6 new file mode 100755 index 0000000..cd9d5fd --- /dev/null +++ b/tests/gringo6 @@ -0,0 +1,11 @@ +#!/bin/bash +# clingo+py: cannot example +# Author: Thomas Krennwallner +# Date: 2018-02-04 + +set -o pipefail + +clingo /usr/share/doc/gringo/examples/clingo/cannot/{cannot-py,example}.lp + +result=$? +test $result -eq 30 diff --git a/tests/gringo7 b/tests/gringo7 new file mode 100755 index 0000000..78d0440 --- /dev/null +++ b/tests/gringo7 @@ -0,0 +1,11 @@ +#!/bin/bash +# clingo+py: solve-async example +# Author: Thomas Krennwallner +# Date: 2018-02-04 + +set -o pipefail + +clingo /usr/share/doc/gringo/examples/clingo/solve-async/{solve-async-py,program}.lp + +result=$? +test $result -eq 20 diff --git a/upstream/metadata b/upstream/metadata new file mode 100644 index 0000000..bed9b23 --- /dev/null +++ b/upstream/metadata @@ -0,0 +1,33 @@ +Bug-Database: https://github.com/potassco/clingo/issues +Bug-Submit: https://github.com/potassco/clingo/issues/new +Changelog: https://github.com/potassco/clingo/blob/master/CHANGES.md +Contact: https://sourceforge.net/p/potassco/mailman/potassco-users/ +FAQ: https://potassco.org/doc/faq/ +Name: clingo +Other-References: https://potassco.org/doc/ +Reference: + - Author: Martin Gebser and Roland Kaminski and Benjamin Kaufmann and Torsten Schaub + Title: Multi-shot ASP solving with clingo + Journal: Theory and Practice of Logic Programming + Year: 2018 + Pages: 1–56 + DOI: 10.1017/S1471068418000054 + URL: https://arxiv.org/abs/1705.09811 + - Author: Martin Gebser and Roland Kaminski and Benjamin Kaufmann and Torsten Schaub + Title: 'Clingo = ASP + Control: Preliminary Report' + Journal: CoRR + Year: 2014 + Number: abs/1405.3694 + Pages: 9 + URL: https://arxiv.org/abs/1405.3694 + - Author: Martin Gebser and Roland Kaminski and Benjamin Kaufmann and Arne König and Torsten Schaub + Title: Advances in gringo Series 3 + Booktitle: Logic Programming and Nonmonotonic Reasoning. International Conference on Logic Programming and Nonmonotonic Reasoning (LPNMR 2011) + Editor: James P. Delgrande and Wolfgang Faber + Year: 2011 + Number: 6645 + Pages: 345–351 + Type: inproceedings + URL: https://arxiv.org/abs/1405.3694 +Repository: https://github.com/potassco/clingo.git +Repository-Browse: https://github.com/potassco/clingo diff --git a/watch b/watch new file mode 100644 index 0000000..74d1f5a --- /dev/null +++ b/watch @@ -0,0 +1,7 @@ +# watch control file for uscan + +# Compulsory line, this is a version 4 file +version=4 + +opts=filenamemangle=s/.+\/v(\d\.\d\.\d)\.tar\.gz/gringo-$1\.tar\.gz/ \ + https://github.com/potassco/gringo/tags .*/v(\d\.\d\.\d)\.tar\.gz