From 91d09eea75c1443c1d776f4d22193cbde18da491 Mon Sep 17 00:00:00 2001 From: Kevin Daudt Date: Tue, 5 May 2020 05:18:21 +0000 Subject: community/gringo: fix buildscript for python3 --- community/gringo/APKBUILD | 4 +- community/gringo/sconscript-to-python3.patch | 76 ++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 community/gringo/sconscript-to-python3.patch diff --git a/community/gringo/APKBUILD b/community/gringo/APKBUILD index 81d53f11dd..1ba8638e90 100644 --- a/community/gringo/APKBUILD +++ b/community/gringo/APKBUILD @@ -13,6 +13,7 @@ install="" subpackages="" source="https://downloads.sourceforge.net/project/potassco/gringo/${pkgver}/gringo-${pkgver}-source.tar.gz 010_include_cmath.patch + sconscript-to-python3.patch " builddir="$srcdir"/$pkgname-$pkgver-source @@ -29,4 +30,5 @@ package() { } sha512sums="0b227f5a639eda512382b4b17adcacb394e010a7297c7cac379ee08679ce60299c6091f272472f376c40f935e8e956b181af83b5bc0a12d881a5bd7211b1dcf7 gringo-4.5.4-source.tar.gz -426b9d578bfa3a8b10963f5084b2f9879c20b9843795518c484335e51c5de2b62b8d69fb96be829c015511d30d428af1ef3cdfa0b9cc3cfb1fac2581eb60f236 010_include_cmath.patch" +426b9d578bfa3a8b10963f5084b2f9879c20b9843795518c484335e51c5de2b62b8d69fb96be829c015511d30d428af1ef3cdfa0b9cc3cfb1fac2581eb60f236 010_include_cmath.patch +cd46f2309a750bd51b698084bcf01ef477c9cff1569f19d0d1d141806a6da522c2ba1a2ce30ac9b3d1df5d7772fb012c3aad6000cd6e2454bd6be87da954a64f sconscript-to-python3.patch" diff --git a/community/gringo/sconscript-to-python3.patch b/community/gringo/sconscript-to-python3.patch new file mode 100644 index 0000000000..7cf28af90a --- /dev/null +++ b/community/gringo/sconscript-to-python3.patch @@ -0,0 +1,76 @@ +diff --git a/SConscript b/SConscript +index f12973d..f812a87 100644 +--- a/SConscript ++++ b/SConscript +@@ -93,7 +93,7 @@ def CheckMyFun(context, name, code, header): + + def CheckLibs(context, name, libs, header): + context.Message("Checking for C++ library {0}... ".format(name)) +- libs = [libs] if isinstance(libs, types.StringTypes) else libs ++ libs = [libs] if isinstance(libs, (str,)) else libs + for lib in libs: + if os.path.isabs(lib): + context.env.Append(LIBS=File(lib)) +@@ -171,21 +171,21 @@ DEFS = {} + failure = False + + if not conf.CheckBison(): +- print 'error: no usable bison version found' ++ print('error: no usable bison version found') + failure = True + + if not conf.CheckRe2c(): +- print 'error: no usable re2c version found' ++ print('error: no usable re2c version found') + failure = True + + if not conf.CheckCXX(): +- print 'error: no usable C++ compiler found' +- print "Please check the log file for further information: " + log_file ++ print('error: no usable C++ compiler found') ++ print("Please check the log file for further information: " + log_file) + Exit(1) + + if not conf.CheckSHCXX(): +- print 'error: no usable (shared) C++ compiler found' +- print "Please check the log file for further information: " + log_file ++ print('error: no usable (shared) C++ compiler found') ++ print("Please check the log file for further information: " + log_file) + Exit(1) + + with_python = False +@@ -241,7 +241,7 @@ if env['WITH_TBB'] == "auto": + with_tbb = True + elif env['WITH_TBB']: + if not claspConf.CheckLibs("tbb", env['WITH_TBB'], 'tbb/tbb.h'): +- print 'error: tbb library not found' ++ print('error: tbb library not found') + failure = True + else: + with_tbb = True +@@ -249,7 +249,7 @@ if with_tbb: + DEFS["WITH_THREADS"] = 1 + if claspConf.CheckNeedRT(): + if not claspConf.CheckLibWithHeader('rt', 'time.h', 'C++'): +- print 'error: rt library not found' ++ print('error: rt library not found') + failure = True + + claspEnv = claspConf.Finish() +@@ -267,14 +267,14 @@ if env['WITH_CPPUNIT']: + elif testConf.CheckLibs("cppunit", env['WITH_CPPUNIT'], 'cppunit/TestFixture.h'): + with_cppunit = True + else: +- print 'error: cppunit library not found' ++ print('error: cppunit library not found') + failure = True + testEnv = testConf.Finish() + + # {{{1 Check configuration + + if failure: +- print "Please check the log file for further information: " + log_file ++ print("Please check the log file for further information: " + log_file) + Exit(1) + + # {{{1 Opts: Library -- cgit v1.2.3