Control: tags -1 + patch

adding patches, however the package still ftbfs with:

[...]
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x1b): undefined reference to `main'
/usr/bin/ld: CMakeFiles/test_reify.dir/program.cc.o: in function `Reify::Test::CATCH2_INTERNAL_TEST_0()': /usr/src/gringo-5.4.1-3.1ubuntu1/libreify/tests/program.cc:18:(.text+0x409): undefined reference to `Catch::StringRef::StringRef(char const*)' /usr/bin/ld: /usr/src/gringo-5.4.1-3.1ubuntu1/libreify/tests/program.cc:18:(.text+0x448): undefined reference to `Catch::Section::Section(Catch::SourceLineInfo const&, Catch::StringRef, char const*)' /usr/bin/ld: /usr/src/gringo-5.4.1-3.1ubuntu1/libreify/tests/program.cc:18:(.text+0x450): undefined reference to `Catch::Section::operator bool() const'
[...]
collect2: error: ld returned 1 exit status
make[4]: *** [libreify/tests/CMakeFiles/test_reify.dir/build.make:118: bin/test_reify] Error 1

plus made a try at the new upstream, although the tests still hang:

See
https://launchpad.net/~doko/+archive/ubuntu/ppa/+sourcepub/15720531/+listing-archive-extra
diff -Nru gringo-5.4.1/debian/changelog gringo-5.4.1/debian/changelog
--- gringo-5.4.1/debian/changelog	2024-01-19 20:38:31.000000000 +0100
+++ gringo-5.4.1/debian/changelog	2024-01-25 12:22:34.000000000 +0100
@@ -1,3 +1,12 @@
+gringo (5.4.1-3.1ubuntu1) noble; urgency=medium
+
+  * Fix build with Python 3.12. Closes: #1061316.
+  * Fix build with new catch2 version. Closes: #1054688.
+  * Explicitly mention the build system.
+  * Add override_dh_auto_install target.
+
+ -- Matthias Klose <d...@ubuntu.com>  Thu, 25 Jan 2024 12:22:34 +0100
+
 gringo (5.4.1-3.1build1) noble; urgency=medium
 
   * No-change rebuild with Python 3.12 as default
diff -Nru gringo-5.4.1/debian/patches/python3.12.diff gringo-5.4.1/debian/patches/python3.12.diff
--- gringo-5.4.1/debian/patches/python3.12.diff	1970-01-01 01:00:00.000000000 +0100
+++ gringo-5.4.1/debian/patches/python3.12.diff	2024-01-25 12:22:01.000000000 +0100
@@ -0,0 +1,11 @@
+--- a/cmake/python-site.py
++++ b/cmake/python-site.py
+@@ -1,4 +1,7 @@
+-from distutils.sysconfig import get_python_lib, get_config_vars
++try:
++    from setuptools.sysconfig import get_python_lib, get_config_vars
++except ImportError:
++    from distutils.sysconfig import get_python_lib, get_config_vars
+ import sys
+ if sys.argv[1] == "prefix":
+     print(get_python_lib(True, False, sys.argv[2] if len(sys.argv) > 2 else None))
diff -Nru gringo-5.4.1/debian/patches/series gringo-5.4.1/debian/patches/series
--- gringo-5.4.1/debian/patches/series	2022-11-19 11:33:48.000000000 +0100
+++ gringo-5.4.1/debian/patches/series	2024-01-25 12:21:04.000000000 +0100
@@ -4,3 +4,4 @@
 bump-version-5.4.1.patch
 use-system-catch-for-glibc-2.34-compat.patch
 testsuite-python-open-rU.patch
+python3.12.diff
diff -Nru gringo-5.4.1/debian/patches/use-system-catch-for-glibc-2.34-compat.patch gringo-5.4.1/debian/patches/use-system-catch-for-glibc-2.34-compat.patch
--- gringo-5.4.1/debian/patches/use-system-catch-for-glibc-2.34-compat.patch	2022-11-19 11:33:48.000000000 +0100
+++ gringo-5.4.1/debian/patches/use-system-catch-for-glibc-2.34-compat.patch	2024-01-25 12:22:34.000000000 +0100
@@ -300,7 +300,7 @@
 
  #define CATCH_CONFIG_MAIN
 -#include "catch.hpp"
-+#include <catch2/catch.hpp>
++#include <catch2/catch_all.hpp>
 --- gringo-5.4.1.orig/libclingo/tests/tests.hh
 +++ gringo-5.4.1/libclingo/tests/tests.hh
 @@ -23,7 +23,7 @@
@@ -308,7 +308,7 @@
  
  #include "clingo.hh"
 -#include "catch.hpp"
-+#include <catch2/catch.hpp>
++#include <catch2/catch_all.hpp>
  
  namespace Clingo { namespace Test {
  
@@ -319,7 +319,7 @@
  // }}}
  #define CATCH_CONFIG_MAIN
 -#include "catch.hpp"
-+#include <catch2/catch.hpp>
++#include <catch2/catch_all.hpp>
 --- gringo-5.4.1.orig/libgringo/tests/tests.hh
 +++ gringo-5.4.1/libgringo/tests/tests.hh
 @@ -25,7 +25,7 @@
@@ -327,7 +327,7 @@
  #define _GRINGO_TEST_TESTS_HH
  
 -#include "catch.hpp"
-+#include <catch2/catch.hpp>
++#include <catch2/catch_all.hpp>
  #include "gringo/utility.hh"
  #include "gringo/logger.hh"
  #include "gringo/base.hh"
@@ -336,13 +336,13 @@
 @@ -1,2 +1,2 @@
  #define CATCH_CONFIG_MAIN
 -#include "catch.hpp"
-+#include <catch2/catch.hpp>
++#include <catch2/catch_all.hpp>
 
 --- 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 <catch2/catch.hpp>
++#include <catch2/catch_all.hpp>
  #include <potassco/aspif_text.h>
  #include <reify/program.hh>
  
diff -Nru gringo-5.4.1/debian/rules gringo-5.4.1/debian/rules
--- gringo-5.4.1/debian/rules	2022-11-19 11:33:48.000000000 +0100
+++ gringo-5.4.1/debian/rules	2024-01-25 12:22:34.000000000 +0100
@@ -28,7 +28,7 @@
 CXXFLAGS += $(CPPFLAGS)
 
 %:
-	dh $@ --with pkgkde_symbolshelper
+	dh $@ --buildsystem=cmake --with pkgkde_symbolshelper
 
 # configure with cmake
 override_dh_auto_configure:
@@ -38,6 +38,9 @@
 override_dh_auto_build:
 	dh_auto_build --builddirectory=$(TOPBUILDDIR)
 
+override_dh_auto_install:
+	dh_auto_install --builddirectory=$(TOPBUILDDIR)
+
 override_dh_auto_clean:
 	dh_auto_clean --builddirectory=$(TOPBUILDDIR)
 

Reply via email to