summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog24
-rw-r--r--debian/patches/common-objects.patch16
-rw-r--r--debian/patches/libphysfs-3.0.1.patch43
-rw-r--r--debian/patches/python3.patch179
-rw-r--r--debian/patches/series3
-rwxr-xr-xdebian/rules3
6 files changed, 265 insertions, 3 deletions
diff --git a/debian/changelog b/debian/changelog
index 8ca0d49..26e46ed 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,27 @@
+d2x-rebirth (0.58.1-1.3) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Avoid defining objects twice; this allows building with GCC 10.
+ Closes: #966188.
+
+ -- Stephen Kitt <skitt@debian.org> Sun, 02 Aug 2020 11:43:10 +0200
+
+d2x-rebirth (0.58.1-1.2) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Allow building with Python 3. Closes: #947559.
+
+ -- Stephen Kitt <skitt@debian.org> Sun, 02 Feb 2020 18:18:43 +0100
+
+d2x-rebirth (0.58.1-1.1) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Add patch from Markus Koschany to fix FTBFS with libphysfs 3.0.1.
+ (Closes: #881589)
+ * Stop manually setting xz compression, that is now the default.
+
+ -- Adrian Bunk <bunk@debian.org> Sat, 09 Dec 2017 16:16:38 +0200
+
d2x-rebirth (0.58.1-1) unstable; urgency=low
* New upstream release [July 2013].
diff --git a/debian/patches/common-objects.patch b/debian/patches/common-objects.patch
new file mode 100644
index 0000000..0b785cf
--- /dev/null
+++ b/debian/patches/common-objects.patch
@@ -0,0 +1,16 @@
+Description: Avoid defining objects twice
+Author: Stephen Kitt <skitt@debian.org>
+
+This allows building with -fno-common (the GCC 10 default).
+
+--- a/texmap/ntmap.c
++++ b/texmap/ntmap.c
+@@ -55,7 +55,7 @@
+ int Lighting_on=1; // initialize to no lighting
+ int Tmap_flat_flag = 0; // 1 = render texture maps as flat shaded polygons.
+ int Current_seg_depth; // HACK INTERFACE: how far away the current segment (& thus texture) is
+-int Max_perspective_depth;
++extern int Max_perspective_depth;
+ int Max_flat_depth;
+
+ // These variables are the interface to assembler. They get set for each texture map, which is a real waste of time.
diff --git a/debian/patches/libphysfs-3.0.1.patch b/debian/patches/libphysfs-3.0.1.patch
new file mode 100644
index 0000000..082b8e9
--- /dev/null
+++ b/debian/patches/libphysfs-3.0.1.patch
@@ -0,0 +1,43 @@
+From: Markus Koschany <apo@debian.org>
+Bug-Debian: https://bugs.debian.org/881589
+
+Index: d2x-rebirth-0.58.1/include/physfsrwops.h
+===================================================================
+--- d2x-rebirth-0.58.1.orig/include/physfsrwops.h
++++ d2x-rebirth-0.58.1/include/physfsrwops.h
+@@ -44,7 +44,7 @@ extern "C" {
+ * @return A valid SDL_RWops structure on success, NULL on error. Specifics
+ * of the error can be gleaned from PHYSFS_getLastError().
+ */
+-__EXPORT__ SDL_RWops *PHYSFSRWOPS_openRead(const char *fname);
++PHYSFS_DECL SDL_RWops *PHYSFSRWOPS_openRead(const char *fname);
+
+ /**
+ * Open a platform-independent filename for writing, and make it accessible
+@@ -56,7 +56,7 @@ __EXPORT__ SDL_RWops *PHYSFSRWOPS_openRe
+ * @return A valid SDL_RWops structure on success, NULL on error. Specifics
+ * of the error can be gleaned from PHYSFS_getLastError().
+ */
+-__EXPORT__ SDL_RWops *PHYSFSRWOPS_openWrite(const char *fname);
++PHYSFS_DECL SDL_RWops *PHYSFSRWOPS_openWrite(const char *fname);
+
+ /**
+ * Open a platform-independent filename for appending, and make it accessible
+@@ -68,7 +68,7 @@ __EXPORT__ SDL_RWops *PHYSFSRWOPS_openWr
+ * @return A valid SDL_RWops structure on success, NULL on error. Specifics
+ * of the error can be gleaned from PHYSFS_getLastError().
+ */
+-__EXPORT__ SDL_RWops *PHYSFSRWOPS_openAppend(const char *fname);
++PHYSFS_DECL SDL_RWops *PHYSFSRWOPS_openAppend(const char *fname);
+
+ /**
+ * Make a SDL_RWops from an existing PhysicsFS file handle. You should
+@@ -80,7 +80,7 @@ __EXPORT__ SDL_RWops *PHYSFSRWOPS_openAp
+ * @return A valid SDL_RWops structure on success, NULL on error. Specifics
+ * of the error can be gleaned from PHYSFS_getLastError().
+ */
+-__EXPORT__ SDL_RWops *PHYSFSRWOPS_makeRWops(PHYSFS_file *handle);
++PHYSFS_DECL SDL_RWops *PHYSFSRWOPS_makeRWops(PHYSFS_file *handle);
+
+ #ifdef __cplusplus
+ }
diff --git a/debian/patches/python3.patch b/debian/patches/python3.patch
new file mode 100644
index 0000000..8c67f17
--- /dev/null
+++ b/debian/patches/python3.patch
@@ -0,0 +1,179 @@
+--- a/SConstruct
++++ b/SConstruct
+@@ -12,19 +12,8 @@
+ def get(self,name,value=None):
+ return self.ARGUMENTS.get('%s_%s' % (self.prefix, name), self.ARGUMENTS.get(name,value))
+
+-# endianess-checker
+-def checkEndian():
+- import struct
+- array = struct.pack('cccc', '\x01', '\x02', '\x03', '\x04')
+- i = struct.unpack('i', array)
+- if i == struct.unpack('<i', array):
+- return "little"
+- elif i == struct.unpack('>i', array):
+- return "big"
+- return "unknown"
+-
+ class DXXCommon:
+- __endian = checkEndian()
++ __endian = sys.byteorder
+ class UserSettings:
+ def __init__(self,ARGUMENTS):
+ # Paths for the Videocore libs/includes on the Raspberry Pi
+@@ -57,7 +46,7 @@
+ builddir_suffix = ARGUMENTS.get('builddir_suffix', None)
+ default_builddir = builddir_prefix or ''
+ if builddir_prefix is not None or builddir_suffix is not None:
+- if os.environ.has_key('CC'):
++ if 'CC' in os.environ:
+ default_builddir += '%s-' % os.path.basename(os.environ['CC'])
+ for a in (
+ ('debug', 'dbg'),
+@@ -131,7 +120,7 @@
+ flags = self.__pkg_config_sdl[cmd]
+ except KeyError as e:
+ if (program.user_settings.verbosebuild != 0):
+- print "%s: reading SDL settings from `%s`" % (program.PROGRAM_NAME, cmd)
++ print("%s: reading SDL settings from `%s`" % (program.PROGRAM_NAME, cmd))
+ self.__pkg_config_sdl[cmd] = env.backtick(cmd)
+ flags = self.__pkg_config_sdl[cmd]
+ env.MergeFlags(flags)
+@@ -156,31 +145,31 @@
+ self.env.Append(CPPDEFINES = ['NETWORK'])
+ # Get traditional compiler environment variables
+ for cc in ['CC', 'CXX']:
+- if os.environ.has_key(cc):
++ if cc in os.environ:
+ self.env[cc] = os.environ[cc]
+ for flags in ['CFLAGS', 'CXXFLAGS']:
+- if os.environ.has_key(flags):
++ if flags in os.environ:
+ self.env[flags] += SCons.Util.CLVar(os.environ[flags])
+
+ def check_endian(self):
+ # set endianess
+ if (self.__endian == "big"):
+- print "%s: BigEndian machine detected" % self.PROGRAM_NAME
++ print("%s: BigEndian machine detected" % self.PROGRAM_NAME)
+ self.asm = 0
+ self.env.Append(CPPDEFINES = ['WORDS_BIGENDIAN'])
+ elif (self.__endian == "little"):
+- print "%s: LittleEndian machine detected" % self.PROGRAM_NAME
++ print("%s: LittleEndian machine detected" % self.PROGRAM_NAME)
+
+ def check_platform(self):
+ # windows or *nix?
+ if sys.platform == 'win32':
+- print "%s: compiling on Windows" % self.PROGRAM_NAME
++ print("%s: compiling on Windows" % self.PROGRAM_NAME)
+ platform = self.Win32PlatformSettings
+ elif sys.platform == 'darwin':
+- print "%s: compiling on Mac OS X" % self.PROGRAM_NAME
++ print("%s: compiling on Mac OS X" % self.PROGRAM_NAME)
+ platform = self.DarwinPlatformSettings
+ else:
+- print "%s: compiling on *NIX" % self.PROGRAM_NAME
++ print("%s: compiling on *NIX" % self.PROGRAM_NAME)
+ platform = self.LinuxPlatformSettings
+ self.platform_settings = platform(self.user_settings)
+ # Acquire environment object...
+@@ -194,15 +183,15 @@
+ # opengl or software renderer?
+ if (self.user_settings.opengl == 1) or (self.user_settings.opengles == 1):
+ if (self.user_settings.opengles == 1):
+- print "%s: building with OpenGL ES" % self.PROGRAM_NAME
++ print("%s: building with OpenGL ES" % self.PROGRAM_NAME)
+ env.Append(CPPDEFINES = ['OGLES'])
+ else:
+- print "%s: building with OpenGL" % self.PROGRAM_NAME
++ print("%s: building with OpenGL" % self.PROGRAM_NAME)
+ env.Append(CPPDEFINES = ['OGL'])
+
+ # assembler code?
+ if (self.user_settings.asm == 1) and (self.user_settings.opengl == 0):
+- print "%s: including: ASSEMBLER" % self.PROGRAM_NAME
++ print("%s: including: ASSEMBLER" % self.PROGRAM_NAME)
+ env.Replace(AS = 'nasm')
+ env.Append(ASCOM = ' -f ' + str(self.platform_settings.osasmdef) + ' -d' + str(self.platform_settings.osdef) + ' -Itexmap/ ')
+ self.common_sources += asm_sources
+@@ -211,12 +200,12 @@
+
+ # SDL_mixer support?
+ if (self.user_settings.sdlmixer == 1):
+- print "%s: including SDL_mixer" % self.PROGRAM_NAME
++ print("%s: including SDL_mixer" % self.PROGRAM_NAME)
+ env.Append(CPPDEFINES = ['USE_SDLMIXER'])
+
+ # debug?
+ if (self.user_settings.debug == 1):
+- print "%s: including: DEBUG" % self.PROGRAM_NAME
++ print("%s: including: DEBUG" % self.PROGRAM_NAME)
+ env.Append(CPPFLAGS = ['-g'])
+ else:
+ env.Append(CPPDEFINES = ['NDEBUG', 'RELEASE'])
+@@ -244,7 +233,7 @@
+
+ # Raspberry Pi?
+ if (self.user_settings.raspberrypi == 1):
+- print "using Raspberry Pi vendor libs in %s" % self.user_settings.rpi_vc_path
++ print("using Raspberry Pi vendor libs in %s" % self.user_settings.rpi_vc_path)
+ env.Append(CPPDEFINES = ['RPI', 'WORDS_NEED_ALIGNMENT'])
+ env.Append(CPPPATH = [
+ self.user_settings.rpi_vc_path+'/include',
+@@ -317,7 +306,7 @@
+ self.env.Append(CPPDEFINES = [('DXX_VERSION_MAJORi', str(self.VERSION_MAJOR)), ('DXX_VERSION_MINORi', str(self.VERSION_MINOR)), ('DXX_VERSION_MICROi', str(self.VERSION_MICRO))])
+
+ def banner(self):
+- print '\n===== ' + self.PROGRAM_NAME + self.VERSION_STRING + ' =====\n'
++ print('\n===== ' + self.PROGRAM_NAME + self.VERSION_STRING + ' =====\n')
+
+ def process_user_settings(self):
+ DXXCommon.process_user_settings(self)
+@@ -330,7 +319,7 @@
+ else:
+ env.Append(FRAMEWORKS = ['OpenGL'])
+ else:
+- print "%s: building with Software Renderer" % self.PROGRAM_NAME
++ print("%s: building with Software Renderer" % self.PROGRAM_NAME)
+ self.common_sources += self.arch_sdl_sources
+
+ # SDL_mixer support?
+@@ -587,10 +576,10 @@
+ ]
+ DXXProgram.__init__(self)
+
+- sources_use_udp = [os.path.join(srcdir, 'main/net_udp.c')]
++ sources_use_udp = [os.path.join('', 'main/net_udp.c')]
+
+ # SDL_mixer sound implementation
+- arch_sdlmixer = [os.path.join(srcdir, f) for f in [
++ arch_sdlmixer = [os.path.join('', f) for f in [
+ 'arch/sdl/digi_mixer.c',
+ 'arch/sdl/digi_mixer_music.c',
+ 'arch/sdl/jukebox.c'
+@@ -598,21 +587,21 @@
+ ]
+
+ # for opengl
+- arch_ogl_sources = [os.path.join(srcdir, f) for f in [
++ arch_ogl_sources = [os.path.join('', f) for f in [
+ 'arch/ogl/gr.c',
+ 'arch/ogl/ogl.c',
+ ]
+ ]
+
+ # for non-ogl
+- arch_sdl_sources = [os.path.join(srcdir, f) for f in [
++ arch_sdl_sources = [os.path.join('', f) for f in [
+ 'arch/sdl/gr.c',
+ 'texmap/tmapflat.c'
+ ]
+ ]
+
+ # assembler related
+- asm_sources = [os.path.join(srcdir, f) for f in [
++ asm_sources = [os.path.join('', f) for f in [
+ 'texmap/tmap_ll.asm',
+ 'texmap/tmap_flt.asm',
+ 'texmap/tmapfade.asm',
diff --git a/debian/patches/series b/debian/patches/series
index e09e40a..83ec5be 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,6 @@
debian.patch
homepath.patch
spelling.patch
+libphysfs-3.0.1.patch
+python3.patch
+common-objects.patch
diff --git a/debian/rules b/debian/rules
index 0adb695..01ce32c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -36,9 +36,6 @@ override_dh_auto_install:
override_dh_installchangelogs:
dh_installchangelogs CHANGELOG.txt
-override_dh_builddeb:
- dh_builddeb -- -Zxz
-
## http://wiki.debian.org/onlyjob/get-orig-source
PKD = $(abspath $(dir $(MAKEFILE_LIST)))
PKG = $(word 2,$(shell dpkg-parsechangelog -l$(PKD)/changelog | grep ^Source))
bgstack15