Source: mapnik
Version: 3.1.0+ds-7
Severity: normal
Tags: patch
X-Debbugs-Cc: bdr...@debian.org
Dear Maintainer,
mapnik fails to build on Ubuntu with Python 3.12 due to the Scons
version in the package. I applied the attached patch to Ubuntu to use
the scons Debian package.
--
Benjamin Drung
Debian & Ubuntu Developer
diff -Nru mapnik-3.1.0+ds/debian/changelog mapnik-3.1.0+ds/debian/changelog
--- mapnik-3.1.0+ds/debian/changelog2024-03-02 13:14:12.0 +0100
+++ mapnik-3.1.0+ds/debian/changelog2024-03-19 16:40:34.0 +0100
@@ -1,3 +1,10 @@
+mapnik (3.1.0+ds-7ubuntu1) noble; urgency=medium
+
+ * Use scons from the Debian package (for Python 3.12 support)
+ * Cherry-pick SConstruct upstream changes for Scons >= 4.1.0
+
+ -- Benjamin Drung Tue, 19 Mar 2024 16:40:34 +0100
+
mapnik (3.1.0+ds-7) unstable; urgency=medium
* Add dpkg-dev (>= 1.22.5) to build dependencies for t64 changes.
diff -Nru mapnik-3.1.0+ds/debian/control mapnik-3.1.0+ds/debian/control
--- mapnik-3.1.0+ds/debian/control 2024-03-02 13:14:02.0 +0100
+++ mapnik-3.1.0+ds/debian/control 2024-03-19 16:39:54.0 +0100
@@ -31,6 +31,7 @@
libxml2-dev,
pkgconf,
python3,
+ scons,
zlib1g-dev
Standards-Version: 4.6.2
Vcs-Browser: https://salsa.debian.org/debian-gis-team/mapnik
diff -Nru mapnik-3.1.0+ds/debian/patches/series
mapnik-3.1.0+ds/debian/patches/series
--- mapnik-3.1.0+ds/debian/patches/series 2023-11-16 19:00:05.0
+0100
+++ mapnik-3.1.0+ds/debian/patches/series 2024-03-19 16:40:34.0
+0100
@@ -1,7 +1,7 @@
libxml2.patch
-Stop-using-custom-OrderedDict.patch
proj.patch
gcc-13.patch
boost-1.81.patch
boost-1.83-1.patch
boost-1.83-2.patch
+Upgrade-to-Scons-4.1.0.patch
diff -Nru mapnik-3.1.0+ds/debian/patches/Stop-using-custom-OrderedDict.patch
mapnik-3.1.0+ds/debian/patches/Stop-using-custom-OrderedDict.patch
--- mapnik-3.1.0+ds/debian/patches/Stop-using-custom-OrderedDict.patch
2022-02-08 15:30:11.0 +0100
+++ mapnik-3.1.0+ds/debian/patches/Stop-using-custom-OrderedDict.patch
1970-01-01 01:00:00.0 +0100
@@ -1,156 +0,0 @@
-Description: Stop using custom OrderedDict
- OrdredDict is in the standard library for all supported Python versions
- (2.7 and 3.5+) and has improvements over the ActiveState recipe version
- of OrderedDict we have been using. Switch to importing from collections
- instead of getting it from SCons.Util (tests already did this).
- .
- At the same time, reorganize the Util.py imports - import Iterable
- from collections.abc if possible (it is deprecated to import
- it from collections, will stop working in 3.8); try getting the
- User{Dict,List,String} from collections if possible - that is, try the
- 3.x way first.
-Author: Mats Wichmann
-Origin: https://github.com/SCons/scons/commit/3fa7141ec7b39
-Forwarded: https://github.com/mapnik/mapnik/pull/4294
-Applied-Upstream:
https://github.com/mapnik/mapnik/commit/7da9009e7b0b9429890f6f13fee837ac320f
-
a/scons/scons-local-3.0.1/SCons/Action.py
-+++ b/scons/scons-local-3.0.1/SCons/Action.py
-@@ -107,6 +107,7 @@ import sys
- import subprocess
- import itertools
- import inspect
-+from collections import OrderedDict
-
- import SCons.Debug
- from SCons.Debug import logInstanceCreation
-@@ -1289,7 +1290,7 @@ class ListAction(ActionBase):
- return result
-
- def get_varlist(self, target, source, env, executor=None):
--result = SCons.Util.OrderedDict()
-+result = OrderedDict()
- for act in self.list:
- for var in act.get_varlist(target, source, env, executor):
- result[var] = True
a/scons/scons-local-3.0.1/SCons/Tool/javac.py
-+++ b/scons/scons-local-3.0.1/SCons/Tool/javac.py
-@@ -34,6 +34,7 @@ __revision__ = "src/engine/SCons/Tool/ja
-
- import os
- import os.path
-+from collections import OrderedDict
-
- import SCons.Action
- import SCons.Builder
-@@ -70,7 +71,7 @@ def emit_java_classes(target, source, en
- if isinstance(entry, SCons.Node.FS.File):
- slist.append(entry)
- elif isinstance(entry, SCons.Node.FS.Dir):
--result = SCons.Util.OrderedDict()
-+result = OrderedDict()
- dirnode = entry.rdir()
- def find_java_files(arg, dirpath, filenames):
- java_files = sorted([n for n in filenames
a/scons/scons-local-3.0.1/SCons/Util.py
-+++ b/scons/scons-local-3.0.1/SCons/Util.py
-@@ -37,21 +37,18 @@ import pprint
- PY3 = sys.version_info[0] == 3
-
- try:
-+from collections import UserDict, UserList, UserString
-+except ImportError:
- from UserDict import UserDict
--except ImportError as e:
--from collections import UserDict
--
--try:
- from UserList import UserList
--except ImportError as e:
--from collections import UserList
--
--from collections import Iterable
-+from UserString import UserString
-
- try: