From 5fb04e6c8fab736e68b9a1d990b8ec7f049a469e19770476f98a5a27b9a24cd0 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 1 Jan 2018 18:58:32 +0000 Subject: [PATCH 1/4] Accepting request 560959 from home:avindra - update to 5.1.0 * General - The -overwrite option now works. - Levels are extracted/inserted in a way to preserve GL nodes. - Inserting pictures with a height of 1 pixel no longer causes a malloc error, and allows the operation of rebuilding a Doom 1 or 2 IWAD. - texture lump file names can now be overridden. * Graphics - DeuTex supports reading and writing sprite offsets based on PNG grab chunks in a manner compatible with SLADE and ZDoom. wadinfo.txt overrides these offsets unless -pngoffsets is used. - includes 5.0.0 * Removed features - DeuSF. - -man troff format generation. - WinTex options. - -fullsnd: now the only mode. - MS-DOS and OS/2 compatibility. - Incomplete (and conditioned out) Rise of the Triad support. * File format support - PNG support added, creating an optional dependency on libpng 1.6. If compiled in, it is the default extraction format, PPM otherwise. - Au and VOC sound formats removed. WAV is the only supported format for extraction and creation. - Full sound lumps from the WAD are always extracted. - MIDI files can be included just by being named *.mid, and are extracted to the same file name extension. * General - Log file support has been removed, in favor of the user doing a shell redirection (eg, with > or 2>) instead. - Arch-vile sprites are now extracted and inserted using literal names for sprites with the [ and ] characters in names (was illegal in DOS), and sprite names with \ are now altered to use ^ on-disk, matching the ZDoom PK3 standard. - Graphics with a height > 128 are now inserted into Doom WAD files correctly. - UDMF (Universal Doom Map Format) support. * Build systems, code standards - Real Autoconf+Automake build system to replace the barely-functioning imitation one. ./configure, make, and related environment variables work as should be expected. - MS-DOS and OS/2 batch files removed. - A malloc.h include was removed to allow compilation on MacOS, and is not needed by current Unix systems in general. - Major cleanup, linting and refactoring - C99-style cleanups to use (u)intN_t types, bool, true, false throughout the code, replacing old defines. - AsciiDoc now used for documentation - cleanup with spec-cleaner - remove patches obsoleted by upstream cleanup and refactoring * deutex-automake.diff * deutex-braces.diff * deutex-init-stdfp.diff - check_types removed (b76fafa6fee9a64929e7b1087ac36ea3ce39e27d) * deutex-soundbuf.diff - rebase deutex-proto.diff - rebase deutex-nolimit.diff - renumber patches OBS-URL: https://build.opensuse.org/request/show/560959 OBS-URL: https://build.opensuse.org/package/show/games:tools/deutex?expand=0&rev=3 --- deutex-4.4.902.tar.gz | 3 -- deutex-5.1.0.tar.xz | 3 ++ deutex-5.1.0.tar.xz.sig | 16 ++++++ deutex-automake.diff | 75 ---------------------------- deutex-braces.diff | 105 ---------------------------------------- deutex-init-stdfp.diff | 35 -------------- deutex-nolimit.diff | 24 ++++----- deutex-proto.diff | 30 ++++++------ deutex-soundbuf.diff | 23 --------- deutex.changes | 65 +++++++++++++++++++++++++ deutex.spec | 43 ++++++---------- 11 files changed, 127 insertions(+), 295 deletions(-) delete mode 100644 deutex-4.4.902.tar.gz create mode 100644 deutex-5.1.0.tar.xz create mode 100644 deutex-5.1.0.tar.xz.sig delete mode 100644 deutex-automake.diff delete mode 100644 deutex-braces.diff delete mode 100644 deutex-init-stdfp.diff delete mode 100644 deutex-soundbuf.diff diff --git a/deutex-4.4.902.tar.gz b/deutex-4.4.902.tar.gz deleted file mode 100644 index 8721fa4..0000000 --- a/deutex-4.4.902.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:faed02b5b286044e28c71a82c72243408dc89a8d14677500b5eea607f048afe8 -size 263351 diff --git a/deutex-5.1.0.tar.xz b/deutex-5.1.0.tar.xz new file mode 100644 index 0000000..685adbb --- /dev/null +++ b/deutex-5.1.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c1de33b25aa9f2e5f56007b6a20059f2a3721d93a31fc8636dcd042e30a89343 +size 163292 diff --git a/deutex-5.1.0.tar.xz.sig b/deutex-5.1.0.tar.xz.sig new file mode 100644 index 0000000..027bd5a --- /dev/null +++ b/deutex-5.1.0.tar.xz.sig @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCAAdFiEEmUWc4ncAN/9VZutLhkmzdgeggEIFAlmNchYACgkQhkmzdgeg +gELN3w/8CJ9xsiB8jST7j9Y7EDKClYwtaxwFrs5sKul/y44ti1/a5cjrK6TM11bu +F9Yql93kb5dgEfxOzriDVeif03Jj9Gsp4YTGMqv70nrKQ8MV+FHSgw8aKqm5eFfE +GWvGLkoTv0gnAof/fx3xrWmWQC+k7rJDmd2snUaXMpmzl5LfPIbbViQL1Gc8pTtu +JZEN+F1KIOf0eSI6nq5wEbvUkSMmacm8SxSq8zD1MmeXtlRY7v9e0d72ISGnHvhB +//55ZwQSuxtbgyAfz7UkY3keScwDpQIn29uhbERcwtiKdziyVBpZfD4AQARnK2v/ +jjyoXTIUH6Fal1xi7fWR2sS0+HxQ9YQm1NBsqErpNWnGG5WKBBfuvGoGGtWTGdad +bQOnZfgaUHHuehC+0DuttHYg2K2p7qZ0lCteK1b5XeETCF38PN6NU4mOdH762KhI +v6CFcSGNKPPxhWPuaWnnawWr3V0Q6W6zYG/Ud7tZaUvfyU6KdbHiQGjlnMz3k4uB +MgbOpf0zaHeyJ80ZBBVw6L1mBdwOS4QGt7IfVwkMTLzp0IF6W2Oa0znyJuxpFjIW +u3Ti8uwCydMDFndH/A53S7ofZiiribb0I6x0+mqg7SPJ+O7wLXLe91ZIcl1enrRQ +uIkom6dU3Cr9HbobEhCNA24SXfxyvTaDfO/wYTgA0JXbrlBQO1w= +=NWOV +-----END PGP SIGNATURE----- diff --git a/deutex-automake.diff b/deutex-automake.diff deleted file mode 100644 index 8e1f21f..0000000 --- a/deutex-automake.diff +++ /dev/null @@ -1,75 +0,0 @@ ---- - Makefile.am | 37 +++++++++++++++++++++++++++++++++++++ - configure.ac | 9 +++++++++ - src/deutex.h | 2 +- - 3 files changed, 47 insertions(+), 1 deletion(-) - -Index: deutex-4.4.902/Makefile.am -=================================================================== ---- /dev/null -+++ deutex-4.4.902/Makefile.am -@@ -0,0 +1,37 @@ -+# -*- Makefile -*- -+ -+AM_CFLAGS = -Wall -Wpointer-arith -Wstrict-prototypes -+ -+bin_PROGRAMS = deusf deutex -+ -+deutex_SOURCES = \ -+ src/color.c \ -+ src/compose.c \ -+ src/deutex.c \ -+ src/endianio.c \ -+ src/endianm.c \ -+ src/extract.c \ -+ src/gifcodec.c \ -+ src/ident.c \ -+ src/listdir.c \ -+ src/lists.c \ -+ src/log.c \ -+ src/lzw.c \ -+ src/merge.c \ -+ src/mkwad.c \ -+ src/picture.c \ -+ src/sound.c \ -+ src/sscript.c \ -+ src/substit.c \ -+ src/text.c \ -+ src/texture.c \ -+ src/tools.c \ -+ src/usedidx.c \ -+ src/version.c \ -+ src/wadio.c -+deutex_CFLAGS = ${AM_CFLAGS} -DDeuTex -+ -+deusf_SOURCES = ${deutex_SOURCES} -+deusf_CFLAGS = ${AM_CFLAGS} -DDeuSF -+ -+man_MANS = deutex.6 -Index: deutex-4.4.902/configure.ac -=================================================================== ---- /dev/null -+++ deutex-4.4.902/configure.ac -@@ -0,0 +1,9 @@ -+AC_INIT([deutex], [4.4.902]) -+AC_CONFIG_HEADERS([config.h]) -+AM_INIT_AUTOMAKE([-Wall foreign subdir-objects]) -+AC_PROG_CC -+AC_PROG_INSTALL -+AC_CHECK_HEADERS([inttypes.h]) -+AC_CHECK_FUNCS([snprintf]) -+AC_CONFIG_FILES([Makefile]) -+AC_OUTPUT -Index: deutex-4.4.902/src/deutex.h -=================================================================== ---- deutex-4.4.902.orig/src/deutex.h -+++ deutex-4.4.902/src/deutex.h -@@ -100,7 +100,7 @@ extern const char deutex_version[]; - #endif - - /* Fixed-size types */ --#ifdef HAVE_INTTYPES -+#ifdef HAVE_INTTYPES_H - # include - #endif - diff --git a/deutex-braces.diff b/deutex-braces.diff deleted file mode 100644 index c55b703..0000000 --- a/deutex-braces.diff +++ /dev/null @@ -1,105 +0,0 @@ -From: Jan Engelhardt - -Fix build warnings. - -src/mkwad.c: In function "WADRreadBytes": -src/mkwad.c:386:6: warning: suggest explicit braces to avoid ambiguous "else" -src/mkwad.c: In function "WADRreadShort": -src/mkwad.c:405:6: warning: suggest explicit braces to avoid ambiguous "else" -src/mkwad.c: In function "WADRreadLong": -src/mkwad.c:417:6: warning: suggest explicit braces to avoid ambiguous "else" -src/mkwad.c: In function "WADRreadEntry2": -src/mkwad.c:492:6: warning: suggest explicit braces to avoid ambiguous "else" -src/color.c: In function "COLinit": -src/color.c:224:6: warning: suggest explicit braces to avoid ambiguous "else" - ---- - src/color.c | 3 ++- - src/mkwad.c | 12 ++++++++---- - 2 files changed, 10 insertions(+), 5 deletions(-) - -Index: deutex-4.4.902/src/color.c -=================================================================== ---- deutex-4.4.902.orig/src/color.c -+++ deutex-4.4.902/src/color.c -@@ -221,12 +221,13 @@ void COLinit( UInt8 invR, UInt8 invG, UI - const char *name = NULL; - /*Int16 R,G,B;*/ - if(COLok!=FALSE) Bug("PL02", "COLok"); -- if(Colsz< 256*sizeof(struct PIXEL)) -+ if(Colsz< 256*sizeof(struct PIXEL)) { - if (lumpname == NULL) - ProgError ("PL03", "%s: wrong size for PLAYPAL", fname (pathname)); - else - ProgError ("PL04", "%s: %s: wrong size for PLAYPAL", - fname (pathname), lump_name (lumpname)); -+ } - COLok=TRUE; - COLpal= (struct PIXEL *)Malloc(256*sizeof(struct PIXEL)); - for(i=0;i< NCOLOURS;i++) -Index: deutex-4.4.902/src/mkwad.c -=================================================================== ---- deutex-4.4.902.orig/src/mkwad.c -+++ deutex-4.4.902/src/mkwad.c -@@ -383,7 +383,7 @@ iolen_t WADRreadBytes (struct WADINFO *i - { - long ofs = ftell (info->fd); - iolen_t result = WADRreadBytes2 (info, buffer, nbytes); -- if (result != nbytes) -+ if (result != nbytes) { - if (ferror (info->fd)) - ProgError ("WR43", "%s: read error (got %lu/%lu bytes)", - fnameofs (info->filename, ofs), -@@ -394,6 +394,7 @@ iolen_t WADRreadBytes (struct WADINFO *i - fnameofs (info->filename, ofs), - (unsigned long) result, - (unsigned long) nbytes); -+ } - - return nbytes; - } -@@ -402,11 +403,12 @@ Int16 WADRreadShort(struct WADINFO *info - { Int16 res; - long ofs = ftell (info->fd); - if (!(info->ok&WADR_READ)) Bug("WR51", "WadRdS"); -- if (wad_read_i16 (info->fd, &res)) -+ if (wad_read_i16 (info->fd, &res)) { - if (ferror (info->fd)) - ProgError ("WR53", "%s: read error", fnameofs (info->filename, ofs)); - else - ProgError ("WR55", "%s: unexpected EOF", fnameofs (info->filename, ofs)); -+ } - return res; - } - -@@ -414,11 +416,12 @@ Int32 WADRreadLong(struct WADINFO *info) - { Int32 res; - long ofs = ftell (info->fd); - if (!(info->ok&WADR_READ)) Bug("WR61", "WadRdL"); -- if (wad_read_i32 (info->fd, &res)) -+ if (wad_read_i32 (info->fd, &res)) { - if (ferror (info->fd)) - ProgError ("WR63", "%s: read error", fnameofs (info->filename, ofs)); - else - ProgError ("WR65", "%s: unexpected EOF", fnameofs (info->filename, ofs)); -+ } - return res; - } - -@@ -489,7 +492,7 @@ char *WADRreadEntry2 (struct WADINFO *in - buffer = Malloc (size); - WADRseek (info, start); - actual_size = WADRreadBytes2 (info, buffer, size); -- if (actual_size < size) -+ if (actual_size < size) { - if (ferror (info->fd)) - ProgError ("WR78", "%s: Lump %s: read error at byte %ld", - fnameofs (info->filename, start + actual_size), -@@ -500,6 +503,7 @@ char *WADRreadEntry2 (struct WADINFO *in - fnameofs (info->filename, start + actual_size), - lump_name (info->dir[n].name), - (long) actual_size); -+ } - *psize = actual_size; - return buffer; - } diff --git a/deutex-init-stdfp.diff b/deutex-init-stdfp.diff deleted file mode 100644 index 407903b..0000000 --- a/deutex-init-stdfp.diff +++ /dev/null @@ -1,35 +0,0 @@ -From: Jan Engelhardt -Date: 2010-08-23 12:14:04 +0200 - -Stderr needs to be initialized first, otherwise ProgError will -crash when called from a check_types that does detect a size -mismatch. - ---- - src/deutex.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -Index: deutex-4.4.902/src/deutex.c -=================================================================== ---- deutex-4.4.902.orig/src/deutex.c -+++ deutex-4.4.902/src/deutex.c -@@ -975,9 +975,6 @@ int main (int argc, char *argv_non_const - "\t+------------------------------------+\n\n"); - #endif - -- /* Sanity checks */ -- check_types (); -- - /* - ** default parameters - */ -@@ -1017,6 +1014,9 @@ int main (int argc, char *argv_non_const - PrintInit(FALSE); - PrintVerbosity(2); - -+ /* Sanity checks */ -+ check_types(); -+ - /* Do a second pass through argv to catch options like --help that - shouldn't cause the creation of a log file. */ - { diff --git a/deutex-nolimit.diff b/deutex-nolimit.diff index a3f94ed..934f4d3 100644 --- a/deutex-nolimit.diff +++ b/deutex-nolimit.diff @@ -6,16 +6,16 @@ Permit reading of WADs with more than 4096 entries. src/mkwad.c | 2 -- 1 file changed, 2 deletions(-) -Index: deutex-4.4.902/src/mkwad.c +Index: a/src/mkwad.c =================================================================== ---- deutex-4.4.902.orig/src/mkwad.c -+++ deutex-4.4.902/src/mkwad.c -@@ -125,8 +125,6 @@ void WADRopenR(struct WADINFO *info, con - ntry = WADRreadLong(info); - if(ntry<=0) - ProgError("WR09", "%s: zero entries", fname (wadin)); -- if(ntry>=0x2000) -- ProgError("WR11", "%s: too many entries", fname (wadin)); - info->dirpos= dirpos= WADRreadLong(info); - if((dirpos<0)||(dirpos>0x10000000L)) - ProgError("WR13", "%s: invalid directory offset %08lX", +--- a/src/mkwad.c ++++ b/src/mkwad.c +@@ -105,8 +105,6 @@ void WADRopenR(struct WADINFO *info, const char *wadin) + ntry = WADRreadLong(info); + if (ntry <= 0) + ProgError("WR09", "%s: zero entries", fname(wadin)); +- if (ntry >= 0x2000) +- ProgError("WR11", "%s: too many entries", fname(wadin)); + info->dirpos = dirpos = WADRreadLong(info); + if ((dirpos < 0) || (dirpos > 0x10000000L)) + ProgError("WR13", "%s: invalid directory offset %08lX", diff --git a/deutex-proto.diff b/deutex-proto.diff index 6ec744f..ed0fe09 100644 --- a/deutex-proto.diff +++ b/deutex-proto.diff @@ -7,25 +7,25 @@ src/deutex.c:1611:13: warning: function declaration is not a prototype src/deutex.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -Index: deutex-4.4.902/src/deutex.c +Index: a/src/deutex.c =================================================================== ---- deutex-4.4.902.orig/src/deutex.c -+++ deutex-4.4.902/src/deutex.c -@@ -105,7 +105,7 @@ const char *logfile - static char anon[1] = { '\0' }; +--- a/src/deutex.c ++++ b/src/deutex.c +@@ -76,7 +76,7 @@ const char *palette_lump = "PLAYPAL"; + static char anon[1] = { '\0' }; typedef void (*comfun_t) (int argc, const char *argv[]); --static void opt_widths (); -+static void opt_widths (void); - static int is_prefix (const char *s1, const char *s2); - static void call_opt (comfun_t func, ...); +-static void opt_widths(); ++static void opt_widths(void); + static int is_prefix(const char *s1, const char *s2); + static void call_opt(comfun_t func, ...); -@@ -1608,7 +1608,7 @@ void COMmanopt(int argc, const char *arg +@@ -1212,7 +1212,7 @@ void COMformat(int argc, const char *argv[]) /* - * opt_widths - make a pass through Com and compute widths per section + * opt_widths - make a pass through Com and compute widths per section */ --static void opt_widths () -+static void opt_widths (void) +-static void opt_widths() ++static void opt_widths(void) { - comdef_t *d; - comdef_t *current_section = NULL; + comdef_t *d; + comdef_t *current_section = NULL; diff --git a/deutex-soundbuf.diff b/deutex-soundbuf.diff deleted file mode 100644 index 399d70b..0000000 --- a/deutex-soundbuf.diff +++ /dev/null @@ -1,23 +0,0 @@ -From: Jan Engelhardt - -I: Statement might potentially overflow a destination buffer, where a size -larger than the actual buffer was specified -E: deutex destbufferoverflow src/sound.c:315:11 - ---- - src/sound.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: deutex-4.4.902/src/sound.c -=================================================================== ---- deutex-4.4.902.orig/src/sound.c -+++ deutex-4.4.902/src/sound.c -@@ -312,7 +312,7 @@ char *SNDloadVocFile(char *file, Int32 - ProgError("VR12", "%s: bad magic", fname (file)); - if(fseek(fp,headv.block1,SEEK_SET)) - ProgError("VR13", "%s: bad header", fname (file)); -- if(fread(&blockv,sizeof(struct VOCHEAD),1,fp)!=1) -+ if(fread(&blockv,sizeof(struct VOCBLOCK1),1,fp)!=1) - ProgError("VR14", "%s: read error in first block", fname (file)); - if(blockv.type!=1) - ProgError("VR15", "%s: first block is not sound", fname (file)); diff --git a/deutex.changes b/deutex.changes index cef8a01..1084d8e 100644 --- a/deutex.changes +++ b/deutex.changes @@ -1,3 +1,68 @@ +------------------------------------------------------------------- +Mon Jan 1 07:58:11 UTC 2018 - avindra@opensuse.org + +- update to 5.1.0 + * General + - The -overwrite option now works. + - Levels are extracted/inserted in a way to preserve GL nodes. + - Inserting pictures with a height of 1 pixel no longer causes + a malloc error, and allows the operation of rebuilding a + Doom 1 or 2 IWAD. + - texture lump file names can now be overridden. + * Graphics + - DeuTex supports reading and writing sprite offsets based on + PNG grab chunks in a manner compatible with SLADE and ZDoom. + wadinfo.txt overrides these offsets unless -pngoffsets is used. +- includes 5.0.0 + * Removed features + - DeuSF. + - -man troff format generation. + - WinTex options. + - -fullsnd: now the only mode. + - MS-DOS and OS/2 compatibility. + - Incomplete (and conditioned out) Rise of the Triad support. + * File format support + - PNG support added, creating an optional dependency on libpng + 1.6. If compiled in, it is the default extraction format, + PPM otherwise. + - Au and VOC sound formats removed. WAV is the only supported + format for extraction and creation. + - Full sound lumps from the WAD are always extracted. + - MIDI files can be included just by being named *.mid, and + are extracted to the same file name extension. + * General + - Log file support has been removed, in favor of the user + doing a shell redirection (eg, with > or 2>) instead. + - Arch-vile sprites are now extracted and inserted using + literal names for sprites with the [ and ] characters in + names (was illegal in DOS), and sprite names with \ are + now altered to use ^ on-disk, matching the ZDoom PK3 + standard. + - Graphics with a height > 128 are now inserted into Doom WAD + files correctly. + - UDMF (Universal Doom Map Format) support. + * Build systems, code standards + - Real Autoconf+Automake build system to replace the + barely-functioning imitation one. ./configure, make, and + related environment variables work as should be expected. + - MS-DOS and OS/2 batch files removed. + - A malloc.h include was removed to allow compilation on MacOS, + and is not needed by current Unix systems in general. + - Major cleanup, linting and refactoring + - C99-style cleanups to use (u)intN_t types, bool, true, + false throughout the code, replacing old defines. + - AsciiDoc now used for documentation +- cleanup with spec-cleaner +- remove patches obsoleted by upstream cleanup and refactoring + * deutex-automake.diff + * deutex-braces.diff + * deutex-init-stdfp.diff + - check_types removed (b76fafa6fee9a64929e7b1087ac36ea3ce39e27d) + * deutex-soundbuf.diff +- rebase deutex-proto.diff +- rebase deutex-nolimit.diff +- renumber patches + ------------------------------------------------------------------- Fri Jul 7 14:49:32 UTC 2017 - jengelh@inai.de diff --git a/deutex.spec b/deutex.spec index 1bc4215..6ce4840 100644 --- a/deutex.spec +++ b/deutex.spec @@ -1,7 +1,7 @@ # # spec file for package deutex # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,28 +17,22 @@ Name: deutex -Version: 4.4.902 +Version: 5.1.0 Release: 0 Summary: WAD composer for Doom and related games License: GPL-2.0+ Group: Development/Tools/Other -Url: http://www.teaser.fr/~amajorel/deutex/ - -# This prerelease tarball is unfortunately not linked from the homepage, -# but referenced from -# http://doom-editing.gamehourz.com/DeuTex-release-candidate-ftopict85808.html -Source: http://www.teaser.fr/~amajorel/deutex/fungus/%name-%version.tar.gz -Patch1: deutex-automake.diff -Patch2: deutex-braces.diff -Patch3: deutex-proto.diff -Patch4: deutex-init-stdfp.diff -Patch5: deutex-soundbuf.diff -Patch6: deutex-nolimit.diff -BuildRoot: %{_tmppath}/%{name}-%{version}-build +URL: http://www.teaser.fr/~amajorel/deutex/ +Source0: https://github.com/Doom-Utils/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.xz +Source1: https://github.com/Doom-Utils/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.xz.sig +Patch1: deutex-proto.diff +Patch2: deutex-nolimit.diff +BuildRequires: asciidoc BuildRequires: autoconf BuildRequires: automake BuildRequires: libtool -Provides: deusf = %version +BuildRequires: pkgconfig +Provides: deusf = %{version} %description DeuTex is a wad composer for Doom, Heretic, Hexen and Strife. It can @@ -53,24 +47,19 @@ such as merging wads, etc. %prep %setup -q -%patch -P 1 -P 2 -P 3 -P 4 -P 5 -P 6 -p1 +%patch -P 1 -P 2 -p1 %build -autoreconf -fi +autoreconf -fiv %configure -make CFLAGS="%optflags" %{?_smp_mflags} -iconv -f iso8859-1 -t utf-8 deutex.6.new; -iconv -f iso8859-1 -t utf-8 dtexman6.txt.new; -mv deutex.6.new deutex.6; -mv dtexman6.txt.new dtexman6.txt; +make CFLAGS="%{optflags}" %{?_smp_mflags} %install %make_install %files -%defattr(-,root,root) -%_bindir/* -%doc %_mandir/*/* -%doc dtexman6.txt CHANGES COPYING COPYING.LIB FAQ +%doc COPYING COPYING.LIB +%{_bindir}/%{name} +%{_mandir}/man6/%{name}.6%{ext_man} %changelog From 01054533a4db747ac2ac5d21727e2e4aa33eeb3e6afec3ea59dd58d8e036ca63 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 1 Jan 2018 19:21:51 +0000 Subject: [PATCH 2/4] - Add 0001-increase-array-size-for-char-tname-variable-51.patch, 0001-Fix-strict-aliasing-violations.patch OBS-URL: https://build.opensuse.org/package/show/games:tools/deutex?expand=0&rev=4 --- 0001-Fix-strict-aliasing-violations.patch | 98 +++++++++++++++++++ ...rray-size-for-char-tname-variable-51.patch | 30 ++++++ deutex-nolimit.diff | 14 ++- deutex-proto.diff | 18 +++- deutex.changes | 90 ++++++++--------- deutex.spec | 44 +++++---- 6 files changed, 212 insertions(+), 82 deletions(-) create mode 100644 0001-Fix-strict-aliasing-violations.patch create mode 100644 0001-increase-array-size-for-char-tname-variable-51.patch diff --git a/0001-Fix-strict-aliasing-violations.patch b/0001-Fix-strict-aliasing-violations.patch new file mode 100644 index 0000000..6634d85 --- /dev/null +++ b/0001-Fix-strict-aliasing-violations.patch @@ -0,0 +1,98 @@ +From 8531292e3e13f713188187e21565b81669c9e0c7 Mon Sep 17 00:00:00 2001 +From: Jan Engelhardt +Date: Mon, 1 Jan 2018 20:18:38 +0100 +Subject: [PATCH] Fix strict aliasing violations + +Type-punning causes unaligned pointers, and those cause crashes on +some processors, e.g. sparc64. + +deutex.c: In function 'COMhelp': +deutex.c:1130:13: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] + width1 = *((short *) &d->exec) + OPTINDENT; +deutex.c:1131:13: warning: + width2 = *((short *) &d->use); +deutex.c: In function 'opt_widths': +deutex.c:1236:17: warning: + *((short *) ¤t_section->com) = (short) width2r; +deutex.c:1237:17: warning: + if (*((short *) ¤t_section->com) != width2r) +deutex.c:1239:21: warning: + *((short *) ¤t_section->com) = SHRT_MAX; +deutex.c:1241:17: warning: + *((short *) ¤t_section->exec) = (short) width1t; +deutex.c:1242:17: warning: + if (*((short *) ¤t_section->exec) != width1t) +deutex.c:1244:21: warning: + *((short *) ¤t_section->exec) = SHRT_MAX; +deutex.c:1246:17: warning: + *((short *) ¤t_section->use) = (short) width2t; +deutex.c:1247:17: warning: + if (*((short *) ¤t_section->use) != width2t) +deutex.c:1249:21: warning: + *((short *) ¤t_section->use) = SHRT_MAX; +--- + src/deutex.c | 31 ++++++++++++++++++------------- + 1 file changed, 18 insertions(+), 13 deletions(-) + +diff --git a/src/deutex.c b/src/deutex.c +index 15ff8c3..f52608c 100644 +--- a/src/deutex.c ++++ b/src/deutex.c +@@ -1124,11 +1124,14 @@ void COMhelp(int argc, const char *argv[]) + /* Do a first pass on all the options for this section. Find out how + wide the left and right columns need to be. */ + if (d->type == SEC) { ++ uint16_t tmp; + if (section++) + putchar('\n'); + printf("%s:\n", d->help); +- width1 = *((short *) &d->exec) + OPTINDENT; +- width2 = *((short *) &d->use); ++ memcpy(&tmp, &d->exec, sizeof(tmp)); ++ width1 = tmp + OPTINDENT; ++ memcpy(&tmp, &d->use, sizeof(tmp)); ++ width2 = tmp; + if (width1 + 1 + width2 > TTYCOL) + width1 = TTYCOL - width2 - COLSPACING; + } +@@ -1229,24 +1232,26 @@ static void opt_widths() + - exec = maximum text width of the first column, + - use = maximum text width of second column. */ + if (current_section != NULL) { ++ uint16_t tmp; + current_section->argc = (char) width1r; + if (current_section->argc != width1r) + current_section->argc = CHAR_MAX; /* Can't happen */ + +- *((short *) ¤t_section->com) = (short) width2r; +- if (*((short *) ¤t_section->com) != width2r) ++ tmp = width2r; ++ if (tmp != width2r) + /* Can't happen */ +- *((short *) ¤t_section->com) = SHRT_MAX; ++ tmp = SHRT_MAX; ++ memcpy(¤t_section->com, &tmp, sizeof(tmp)); + +- *((short *) ¤t_section->exec) = (short) width1t; +- if (*((short *) ¤t_section->exec) != width1t) +- /* Can't happen */ +- *((short *) ¤t_section->exec) = SHRT_MAX; ++ tmp = width1t; ++ if (tmp != width1t) ++ tmp = SHRT_MAX; ++ memcpy(¤t_section->exec, &tmp, sizeof(tmp)); + +- *((short *) ¤t_section->use) = (short) width2t; +- if (*((short *) ¤t_section->use) != width2t) +- /* Can't happen */ +- *((short *) ¤t_section->use) = SHRT_MAX; ++ tmp = width2t; ++ if (tmp != width2t) ++ tmp = SHRT_MAX; ++ memcpy(¤t_section->use, &tmp, sizeof(tmp)); + } + } + +-- +2.15.1 + diff --git a/0001-increase-array-size-for-char-tname-variable-51.patch b/0001-increase-array-size-for-char-tname-variable-51.patch new file mode 100644 index 0000000..8295a6a --- /dev/null +++ b/0001-increase-array-size-for-char-tname-variable-51.patch @@ -0,0 +1,30 @@ +From 7024dd74a33780ef2dbdf614f4e52526cc3ab457 Mon Sep 17 00:00:00 2001 +From: Fabian Greffrath +Date: Mon, 18 Dec 2017 02:12:37 +0100 +Subject: [PATCH] increase array size for char "tname" variable (#51) + +In src/texture.c:466 the "t" variable is of type signed short, so the +theoretically lowest possible value is -32768, which takes 6 digits. +The "TEX" string literal takes another 3 digits, so together with the +'\0' string delimiter byte we need an array size of 10 bytes for the +"tname" variable to be able to store the full maximum length string. +--- + src/texture.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/texture.c b/src/texture.c +index 86c2396..3771c24 100644 +--- a/src/texture.c ++++ b/src/texture.c +@@ -393,7 +393,7 @@ void TXUreadTEXTURE(const char *texture1_name, const char *Data, + int16_t Xofs, Yofs, Pindex; /* x,y coordinate in texture space */ + /* patch name index in PNAMES table */ + int32_t MaxPindex; +- static char tname[8]; /*texture name */ ++ static char tname[10]; /*texture name */ + static char pname[8]; /*patch name */ + size_t header_size = 0; + size_t item_size = 0; +-- +2.15.1 + diff --git a/deutex-nolimit.diff b/deutex-nolimit.diff index 934f4d3..e69e35d 100644 --- a/deutex-nolimit.diff +++ b/deutex-nolimit.diff @@ -1,13 +1,14 @@ +From 4a59997a18cb1c5269b05ef3f7a2fcd3ba2f7552 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt -Date: 2017-07-07 16:45:59.059496819 +0200 +Date: Mon, 1 Jan 2018 19:34:40 +0100 +Subject: [PATCH] Drop limit of 4096 lumps -Permit reading of WADs with more than 4096 entries. --- - src/mkwad.c | 2 -- + src/mkwad.c | 2 -- 1 file changed, 2 deletions(-) -Index: a/src/mkwad.c -=================================================================== +diff --git a/src/mkwad.c b/src/mkwad.c +index 45db4cd..3ad607b 100644 --- a/src/mkwad.c +++ b/src/mkwad.c @@ -105,8 +105,6 @@ void WADRopenR(struct WADINFO *info, const char *wadin) @@ -19,3 +20,6 @@ Index: a/src/mkwad.c info->dirpos = dirpos = WADRreadLong(info); if ((dirpos < 0) || (dirpos > 0x10000000L)) ProgError("WR13", "%s: invalid directory offset %08lX", +-- +2.15.1 + diff --git a/deutex-proto.diff b/deutex-proto.diff index ed0fe09..ea9cc33 100644 --- a/deutex-proto.diff +++ b/deutex-proto.diff @@ -1,14 +1,19 @@ -From: Jan Engelhardt +From acd96b8c80a584d877845646ceac388feda46748 Mon Sep 17 00:00:00 2001 +From: Jan Engelhardt +Date: Mon, 1 Jan 2018 19:28:24 +0100 +Subject: [PATCH] build: fix gcc warnings abuot old K&R style function + declarations +Older gcc complain about the K&R-style prototype. Fix 'em. +(Forward ported from a deutex 4.4.x patch.) src/deutex.c:108:1: warning: function declaration is not a prototype src/deutex.c:1611:13: warning: function declaration is not a prototype - --- - src/deutex.c | 4 ++-- + src/deutex.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -Index: a/src/deutex.c -=================================================================== +diff --git a/src/deutex.c b/src/deutex.c +index 15ff8c3..505a352 100644 --- a/src/deutex.c +++ b/src/deutex.c @@ -76,7 +76,7 @@ const char *palette_lump = "PLAYPAL"; @@ -29,3 +34,6 @@ Index: a/src/deutex.c { comdef_t *d; comdef_t *current_section = NULL; +-- +2.15.1 + diff --git a/deutex.changes b/deutex.changes index 1084d8e..0f07801 100644 --- a/deutex.changes +++ b/deutex.changes @@ -1,58 +1,47 @@ +------------------------------------------------------------------- +Mon Jan 1 18:18:37 UTC 2018 - jengelh@inai.de + +- Add 0001-increase-array-size-for-char-tname-variable-51.patch, + 0001-Fix-strict-aliasing-violations.patch +- Explain some changelog entries better. + ------------------------------------------------------------------- Mon Jan 1 07:58:11 UTC 2018 - avindra@opensuse.org - update to 5.1.0 - * General - - The -overwrite option now works. - - Levels are extracted/inserted in a way to preserve GL nodes. - - Inserting pictures with a height of 1 pixel no longer causes - a malloc error, and allows the operation of rebuilding a - Doom 1 or 2 IWAD. - - texture lump file names can now be overridden. - * Graphics - - DeuTex supports reading and writing sprite offsets based on - PNG grab chunks in a manner compatible with SLADE and ZDoom. - wadinfo.txt overrides these offsets unless -pngoffsets is used. + * The -overwrite option now works. + * Levels are extracted/inserted in a way to preserve GL nodes. + * Inserting pictures with a height of 1 pixel no longer causes + a malloc error, and allows the operation of rebuilding a + Doom 1 or 2 IWAD. + * Texture lump file names can now be overridden. + * Support reading and writing sprite offsets based on PNG + "grAb" chunks (cf. grabpng package) in a manner compatible + with SLADE and ZDoom. wadinfo.txt overrides these offsets + unless -pngoffsets is used. - includes 5.0.0 - * Removed features - - DeuSF. - - -man troff format generation. - - WinTex options. - - -fullsnd: now the only mode. - - MS-DOS and OS/2 compatibility. - - Incomplete (and conditioned out) Rise of the Triad support. - * File format support - - PNG support added, creating an optional dependency on libpng - 1.6. If compiled in, it is the default extraction format, - PPM otherwise. - - Au and VOC sound formats removed. WAV is the only supported - format for extraction and creation. - - Full sound lumps from the WAD are always extracted. - - MIDI files can be included just by being named *.mid, and - are extracted to the same file name extension. - * General - - Log file support has been removed, in favor of the user - doing a shell redirection (eg, with > or 2>) instead. - - Arch-vile sprites are now extracted and inserted using - literal names for sprites with the [ and ] characters in - names (was illegal in DOS), and sprite names with \ are - now altered to use ^ on-disk, matching the ZDoom PK3 - standard. - - Graphics with a height > 128 are now inserted into Doom WAD - files correctly. - - UDMF (Universal Doom Map Format) support. - * Build systems, code standards - - Real Autoconf+Automake build system to replace the - barely-functioning imitation one. ./configure, make, and - related environment variables work as should be expected. - - MS-DOS and OS/2 batch files removed. - - A malloc.h include was removed to allow compilation on MacOS, - and is not needed by current Unix systems in general. - - Major cleanup, linting and refactoring - - C99-style cleanups to use (u)intN_t types, bool, true, - false throughout the code, replacing old defines. - - AsciiDoc now used for documentation -- cleanup with spec-cleaner + * Removed DeuSF program mode. + * Removed command line options used by WinTex. + * Removed MS-DOS and OS/2 support code. + * Removed the "-man" option from deutex. + * Removed incomplete Rise of the Triad support. + * PNG support added. This is the default extraction format now. + * Sun Audio (.au) and Creative .voc sound file format support + has been removed. RIFF WAVE is the only supported format. + * Full sound lumps from the WAD are always extracted (-fullsnd + option). + * MIDI files can be included just by being named *.mid, and are + extracted to the same file name extension. + * Log file support has been removed, in favor of the user doing + a shell redirection (e.g. with > or 2>) instead. + * Arch-vile sprites are now extracted and inserted using + literal names for sprites with the '[' and ']' characters in + names (were illegal in DOS), and sprite names with '\' are + now altered to use '^' on-disk, matching the ZDoom PK3 + standard. + * Graphics with a height > 128 and < 256 are now inserted into + Doom WAD files correctly. + * UDMF (Universal Doom Map Format) support. - remove patches obsoleted by upstream cleanup and refactoring * deutex-automake.diff * deutex-braces.diff @@ -97,4 +86,3 @@ Sat Nov 8 16:49:24 CET 2008 - prusnak@suse.cz Sun Dec 23 09:03:00 CET 2007 - claes.backstrom@fsfe.org - Initial package built from Fedora package (4.4.0-6) - diff --git a/deutex.spec b/deutex.spec index 6ce4840..598e8cd 100644 --- a/deutex.spec +++ b/deutex.spec @@ -22,44 +22,46 @@ Release: 0 Summary: WAD composer for Doom and related games License: GPL-2.0+ Group: Development/Tools/Other -URL: http://www.teaser.fr/~amajorel/deutex/ -Source0: https://github.com/Doom-Utils/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.xz -Source1: https://github.com/Doom-Utils/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.xz.sig -Patch1: deutex-proto.diff -Patch2: deutex-nolimit.diff +#Historic-Url: http://www.teaser.fr/~amajorel/deutex/ +URL: https://github.com/Doom-Utils/deutex + +Source: https://github.com/Doom-Utils/deutex/releases/download/v%version/%name-%version.tar.xz +Source2: https://github.com/Doom-Utils/deutex/releases/download/v%version/%name-%version.tar.xz.sig +Patch1: 0001-increase-array-size-for-char-tname-variable-51.patch +Patch2: 0001-Fix-strict-aliasing-violations.patch +Patch3: deutex-proto.diff +Patch4: deutex-nolimit.diff +BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: asciidoc -BuildRequires: autoconf BuildRequires: automake -BuildRequires: libtool BuildRequires: pkgconfig -Provides: deusf = %{version} %description -DeuTex is a wad composer for Doom, Heretic, Hexen and Strife. It can -be used to extract the lumps of a wad and save them as individual -files. Conversely, it can also build a wad from separate files. When -extracting a lump to a file, it does not just copy the raw data, it -converts it to an appropriate format (such as PPM for graphics, Sun -audio for samples, etc.). Conversely, when it reads files for -inclusion in pwads, it does the necessary conversions (for example, -from PPM to Doom picture format). In addition, DeuTex has functions -such as merging wads, etc. +DeuTex is a .wad file composer for Doom, Heretic, Hexen and Strife. +It can be used to extract the lumps of a WAD and save them as +individual files. Conversely, it can also build a WAD from separate +files. When extracting a lump to a file, it does not just copy the +raw data, it converts it to an appropriate format (such as PNG for +graphics, WAVE for audio samples, etc.). Conversely, when it reads +files for inclusion in PWADs, it does the necessary conversions (for +example, from PPM to Doom picture format). In addition, DeuTex has +functions such as merging WADs. %prep %setup -q -%patch -P 1 -P 2 -p1 +%patch -P 1 -P 2 -P 3 -P 4 -p1 %build autoreconf -fiv %configure -make CFLAGS="%{optflags}" %{?_smp_mflags} +make %{?_smp_mflags} %install %make_install %files +%_bindir/* +%_mandir/man6/%name.6%ext_man %doc COPYING COPYING.LIB -%{_bindir}/%{name} -%{_mandir}/man6/%{name}.6%{ext_man} %changelog From 173630e6292ce7b97e54035d0e083835c14998da7b80abee9227b7706f674472 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 1 Jan 2018 19:26:46 +0000 Subject: [PATCH 3/4] OBS-URL: https://build.opensuse.org/package/show/games:tools/deutex?expand=0&rev=5 --- 0001-Fix-strict-aliasing-violations.patch | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/0001-Fix-strict-aliasing-violations.patch b/0001-Fix-strict-aliasing-violations.patch index 6634d85..6dc1234 100644 --- a/0001-Fix-strict-aliasing-violations.patch +++ b/0001-Fix-strict-aliasing-violations.patch @@ -1,4 +1,4 @@ -From 8531292e3e13f713188187e21565b81669c9e0c7 Mon Sep 17 00:00:00 2001 +From e954d4e296383f6b48fac9f8bf7b413aa70b4cc1 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 1 Jan 2018 20:18:38 +0100 Subject: [PATCH] Fix strict aliasing violations @@ -35,7 +35,7 @@ deutex.c:1249:21: warning: 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/src/deutex.c b/src/deutex.c -index 15ff8c3..f52608c 100644 +index 15ff8c3..f14dc82 100644 --- a/src/deutex.c +++ b/src/deutex.c @@ -1124,11 +1124,14 @@ void COMhelp(int argc, const char *argv[]) @@ -48,9 +48,9 @@ index 15ff8c3..f52608c 100644 printf("%s:\n", d->help); - width1 = *((short *) &d->exec) + OPTINDENT; - width2 = *((short *) &d->use); -+ memcpy(&tmp, &d->exec, sizeof(tmp)); ++ memcpy(&tmp, d->exec, sizeof(tmp)); + width1 = tmp + OPTINDENT; -+ memcpy(&tmp, &d->use, sizeof(tmp)); ++ memcpy(&tmp, d->use, sizeof(tmp)); + width2 = tmp; if (width1 + 1 + width2 > TTYCOL) width1 = TTYCOL - width2 - COLSPACING; @@ -71,7 +71,7 @@ index 15ff8c3..f52608c 100644 /* Can't happen */ - *((short *) ¤t_section->com) = SHRT_MAX; + tmp = SHRT_MAX; -+ memcpy(¤t_section->com, &tmp, sizeof(tmp)); ++ memcpy(current_section->com, &tmp, sizeof(tmp)); - *((short *) ¤t_section->exec) = (short) width1t; - if (*((short *) ¤t_section->exec) != width1t) @@ -80,7 +80,7 @@ index 15ff8c3..f52608c 100644 + tmp = width1t; + if (tmp != width1t) + tmp = SHRT_MAX; -+ memcpy(¤t_section->exec, &tmp, sizeof(tmp)); ++ memcpy(current_section->exec, &tmp, sizeof(tmp)); - *((short *) ¤t_section->use) = (short) width2t; - if (*((short *) ¤t_section->use) != width2t) @@ -89,7 +89,7 @@ index 15ff8c3..f52608c 100644 + tmp = width2t; + if (tmp != width2t) + tmp = SHRT_MAX; -+ memcpy(¤t_section->use, &tmp, sizeof(tmp)); ++ memcpy(current_section->use, &tmp, sizeof(tmp)); } } From f03b9ea9090c186d7d28a62a315ad6fcba391437980754468967816c6208bfe3 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 9 Jan 2018 00:32:02 +0000 Subject: [PATCH 4/4] Accepting request 562640 from home:avindra @jengelh all of your patches are upstream now :) One minor difference with your "nolimit" fix, the upstream has chosen to emit a warning instead of an error: https://github.com/Doom-Utils/deutex/commit/f8b1336bbcb7bc387d3e856cc7c9f75697cd0f0b#diff-737f0ad7650b480ebdf2807f16ae18ca - update to 5.1.1 * Fixed: texture name array: the maximum possible string size is now supported. * Fixed: some warnings and errors with old versions of pkg-config and gcc * Fixed: Aliasing errors (caused crashes on some architectures, such as sparc64) * Can now build WADs with an arbitrary number of lumps. A warning is emitted when more than 4046 are included (vanilla Doom limit). - remove 0001-increase-array-size-for-char-tname-variable-51.patch * upstreamed in 7024dd74a33780ef2dbdf614f4e52526cc3ab457 - remove 0001-Fix-strict-aliasing-violations.patch * upstreamed in 85d821dd3c145be1a998ca2a704930caaad73030 - remove deutex-proto.diff * upstreamed in 07bd0a5083fc15db20bee9056511bd3e10dd1362 - remove deutex-nolimit.diff * fixed in f8b1336bbcb7bc387d3e856cc7c9f75697cd0f0b - remove deprecated BuildRoot option OBS-URL: https://build.opensuse.org/request/show/562640 OBS-URL: https://build.opensuse.org/package/show/games:tools/deutex?expand=0&rev=6 --- 0001-Fix-strict-aliasing-violations.patch | 98 ------------------- ...rray-size-for-char-tname-variable-51.patch | 30 ------ deutex-5.1.0.tar.xz | 3 - deutex-5.1.0.tar.xz.sig | 16 --- deutex-5.1.1.tar.xz | 3 + deutex-5.1.1.tar.xz.sig | 16 +++ deutex-nolimit.diff | 25 ----- deutex-proto.diff | 39 -------- deutex.changes | 22 +++++ deutex.spec | 8 +- 10 files changed, 42 insertions(+), 218 deletions(-) delete mode 100644 0001-Fix-strict-aliasing-violations.patch delete mode 100644 0001-increase-array-size-for-char-tname-variable-51.patch delete mode 100644 deutex-5.1.0.tar.xz delete mode 100644 deutex-5.1.0.tar.xz.sig create mode 100644 deutex-5.1.1.tar.xz create mode 100644 deutex-5.1.1.tar.xz.sig delete mode 100644 deutex-nolimit.diff delete mode 100644 deutex-proto.diff diff --git a/0001-Fix-strict-aliasing-violations.patch b/0001-Fix-strict-aliasing-violations.patch deleted file mode 100644 index 6dc1234..0000000 --- a/0001-Fix-strict-aliasing-violations.patch +++ /dev/null @@ -1,98 +0,0 @@ -From e954d4e296383f6b48fac9f8bf7b413aa70b4cc1 Mon Sep 17 00:00:00 2001 -From: Jan Engelhardt -Date: Mon, 1 Jan 2018 20:18:38 +0100 -Subject: [PATCH] Fix strict aliasing violations - -Type-punning causes unaligned pointers, and those cause crashes on -some processors, e.g. sparc64. - -deutex.c: In function 'COMhelp': -deutex.c:1130:13: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] - width1 = *((short *) &d->exec) + OPTINDENT; -deutex.c:1131:13: warning: - width2 = *((short *) &d->use); -deutex.c: In function 'opt_widths': -deutex.c:1236:17: warning: - *((short *) ¤t_section->com) = (short) width2r; -deutex.c:1237:17: warning: - if (*((short *) ¤t_section->com) != width2r) -deutex.c:1239:21: warning: - *((short *) ¤t_section->com) = SHRT_MAX; -deutex.c:1241:17: warning: - *((short *) ¤t_section->exec) = (short) width1t; -deutex.c:1242:17: warning: - if (*((short *) ¤t_section->exec) != width1t) -deutex.c:1244:21: warning: - *((short *) ¤t_section->exec) = SHRT_MAX; -deutex.c:1246:17: warning: - *((short *) ¤t_section->use) = (short) width2t; -deutex.c:1247:17: warning: - if (*((short *) ¤t_section->use) != width2t) -deutex.c:1249:21: warning: - *((short *) ¤t_section->use) = SHRT_MAX; ---- - src/deutex.c | 31 ++++++++++++++++++------------- - 1 file changed, 18 insertions(+), 13 deletions(-) - -diff --git a/src/deutex.c b/src/deutex.c -index 15ff8c3..f14dc82 100644 ---- a/src/deutex.c -+++ b/src/deutex.c -@@ -1124,11 +1124,14 @@ void COMhelp(int argc, const char *argv[]) - /* Do a first pass on all the options for this section. Find out how - wide the left and right columns need to be. */ - if (d->type == SEC) { -+ uint16_t tmp; - if (section++) - putchar('\n'); - printf("%s:\n", d->help); -- width1 = *((short *) &d->exec) + OPTINDENT; -- width2 = *((short *) &d->use); -+ memcpy(&tmp, d->exec, sizeof(tmp)); -+ width1 = tmp + OPTINDENT; -+ memcpy(&tmp, d->use, sizeof(tmp)); -+ width2 = tmp; - if (width1 + 1 + width2 > TTYCOL) - width1 = TTYCOL - width2 - COLSPACING; - } -@@ -1229,24 +1232,26 @@ static void opt_widths() - - exec = maximum text width of the first column, - - use = maximum text width of second column. */ - if (current_section != NULL) { -+ uint16_t tmp; - current_section->argc = (char) width1r; - if (current_section->argc != width1r) - current_section->argc = CHAR_MAX; /* Can't happen */ - -- *((short *) ¤t_section->com) = (short) width2r; -- if (*((short *) ¤t_section->com) != width2r) -+ tmp = width2r; -+ if (tmp != width2r) - /* Can't happen */ -- *((short *) ¤t_section->com) = SHRT_MAX; -+ tmp = SHRT_MAX; -+ memcpy(current_section->com, &tmp, sizeof(tmp)); - -- *((short *) ¤t_section->exec) = (short) width1t; -- if (*((short *) ¤t_section->exec) != width1t) -- /* Can't happen */ -- *((short *) ¤t_section->exec) = SHRT_MAX; -+ tmp = width1t; -+ if (tmp != width1t) -+ tmp = SHRT_MAX; -+ memcpy(current_section->exec, &tmp, sizeof(tmp)); - -- *((short *) ¤t_section->use) = (short) width2t; -- if (*((short *) ¤t_section->use) != width2t) -- /* Can't happen */ -- *((short *) ¤t_section->use) = SHRT_MAX; -+ tmp = width2t; -+ if (tmp != width2t) -+ tmp = SHRT_MAX; -+ memcpy(current_section->use, &tmp, sizeof(tmp)); - } - } - --- -2.15.1 - diff --git a/0001-increase-array-size-for-char-tname-variable-51.patch b/0001-increase-array-size-for-char-tname-variable-51.patch deleted file mode 100644 index 8295a6a..0000000 --- a/0001-increase-array-size-for-char-tname-variable-51.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 7024dd74a33780ef2dbdf614f4e52526cc3ab457 Mon Sep 17 00:00:00 2001 -From: Fabian Greffrath -Date: Mon, 18 Dec 2017 02:12:37 +0100 -Subject: [PATCH] increase array size for char "tname" variable (#51) - -In src/texture.c:466 the "t" variable is of type signed short, so the -theoretically lowest possible value is -32768, which takes 6 digits. -The "TEX" string literal takes another 3 digits, so together with the -'\0' string delimiter byte we need an array size of 10 bytes for the -"tname" variable to be able to store the full maximum length string. ---- - src/texture.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/texture.c b/src/texture.c -index 86c2396..3771c24 100644 ---- a/src/texture.c -+++ b/src/texture.c -@@ -393,7 +393,7 @@ void TXUreadTEXTURE(const char *texture1_name, const char *Data, - int16_t Xofs, Yofs, Pindex; /* x,y coordinate in texture space */ - /* patch name index in PNAMES table */ - int32_t MaxPindex; -- static char tname[8]; /*texture name */ -+ static char tname[10]; /*texture name */ - static char pname[8]; /*patch name */ - size_t header_size = 0; - size_t item_size = 0; --- -2.15.1 - diff --git a/deutex-5.1.0.tar.xz b/deutex-5.1.0.tar.xz deleted file mode 100644 index 685adbb..0000000 --- a/deutex-5.1.0.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c1de33b25aa9f2e5f56007b6a20059f2a3721d93a31fc8636dcd042e30a89343 -size 163292 diff --git a/deutex-5.1.0.tar.xz.sig b/deutex-5.1.0.tar.xz.sig deleted file mode 100644 index 027bd5a..0000000 --- a/deutex-5.1.0.tar.xz.sig +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQIzBAABCAAdFiEEmUWc4ncAN/9VZutLhkmzdgeggEIFAlmNchYACgkQhkmzdgeg -gELN3w/8CJ9xsiB8jST7j9Y7EDKClYwtaxwFrs5sKul/y44ti1/a5cjrK6TM11bu -F9Yql93kb5dgEfxOzriDVeif03Jj9Gsp4YTGMqv70nrKQ8MV+FHSgw8aKqm5eFfE -GWvGLkoTv0gnAof/fx3xrWmWQC+k7rJDmd2snUaXMpmzl5LfPIbbViQL1Gc8pTtu -JZEN+F1KIOf0eSI6nq5wEbvUkSMmacm8SxSq8zD1MmeXtlRY7v9e0d72ISGnHvhB -//55ZwQSuxtbgyAfz7UkY3keScwDpQIn29uhbERcwtiKdziyVBpZfD4AQARnK2v/ -jjyoXTIUH6Fal1xi7fWR2sS0+HxQ9YQm1NBsqErpNWnGG5WKBBfuvGoGGtWTGdad -bQOnZfgaUHHuehC+0DuttHYg2K2p7qZ0lCteK1b5XeETCF38PN6NU4mOdH762KhI -v6CFcSGNKPPxhWPuaWnnawWr3V0Q6W6zYG/Ud7tZaUvfyU6KdbHiQGjlnMz3k4uB -MgbOpf0zaHeyJ80ZBBVw6L1mBdwOS4QGt7IfVwkMTLzp0IF6W2Oa0znyJuxpFjIW -u3Ti8uwCydMDFndH/A53S7ofZiiribb0I6x0+mqg7SPJ+O7wLXLe91ZIcl1enrRQ -uIkom6dU3Cr9HbobEhCNA24SXfxyvTaDfO/wYTgA0JXbrlBQO1w= -=NWOV ------END PGP SIGNATURE----- diff --git a/deutex-5.1.1.tar.xz b/deutex-5.1.1.tar.xz new file mode 100644 index 0000000..9fba0e2 --- /dev/null +++ b/deutex-5.1.1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:92034232cb8911e7e1d53aa9f1236cc44995664f86f5d33cf2bfcd1ac7a21f7b +size 163584 diff --git a/deutex-5.1.1.tar.xz.sig b/deutex-5.1.1.tar.xz.sig new file mode 100644 index 0000000..5777a64 --- /dev/null +++ b/deutex-5.1.1.tar.xz.sig @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCAAdFiEEmUWc4ncAN/9VZutLhkmzdgeggEIFAlpS9mwACgkQhkmzdgeg +gEKweQ//dqMrjsxDs0NMDh5AUXZDP9bgSeQTYuFJTVfbm6ndhjibiVdY9DVXvPcc +xrYELmfykoBb5IU1hwn9WtVS06OaBfHQ9uNaucdFNJ/5SlNJqnDnyTgeJtdUf0bq +eOaol3CVwghFGUVT0EEi8mLkoqndXTaTETbFaIxICuSmrCbeUr8z+wkN27+opFoI +y3Cci1qSRqVm/HReOJUZcr1kBkGQYgyGU2Me03SbUrgsECBSdRWq64SgquSAkzC3 +cy7Ct35ARxs+Wc4pVVtwjgw2W2e1u7f08d7jzNit/nD5zLo9jXPao73q4K8lNCbT +F1OcWrb5czBorv1xnV6pGV1tXfgpznT3pfl7sHZA+CDR1DJHtqbcoRjo3nmCR9MT +nSYj436Pi0mr/tyeBgWZrlhm1Twal+5WEzUi/9t78QPKSH1vLGxA3XC7dmSmGno8 +i9zCd46C/Vx9I/6pQLOQOcdLIvdZosrQ46v9SiM+2C6zFUTkjxeYO20CcnORZsXB +Nx0vBzVOTnHNwJJeYCwtqMmuu+a4zozEASrJvcFTkTFArJ+Sa1sgOA+u5cH3qcce +J0yfVk7eNMILwADBG8/XKOiBNtnjP2+6aAc2Ad/fDjDN76Qtaq6AsTaEaQvZdQuH +P97gQvkLBRk/yPpBRsovxz3vpiMJnvLdpvSe4JGxh2yqUPIrVhE= +=zUkY +-----END PGP SIGNATURE----- diff --git a/deutex-nolimit.diff b/deutex-nolimit.diff deleted file mode 100644 index e69e35d..0000000 --- a/deutex-nolimit.diff +++ /dev/null @@ -1,25 +0,0 @@ -From 4a59997a18cb1c5269b05ef3f7a2fcd3ba2f7552 Mon Sep 17 00:00:00 2001 -From: Jan Engelhardt -Date: Mon, 1 Jan 2018 19:34:40 +0100 -Subject: [PATCH] Drop limit of 4096 lumps - ---- - src/mkwad.c | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/src/mkwad.c b/src/mkwad.c -index 45db4cd..3ad607b 100644 ---- a/src/mkwad.c -+++ b/src/mkwad.c -@@ -105,8 +105,6 @@ void WADRopenR(struct WADINFO *info, const char *wadin) - ntry = WADRreadLong(info); - if (ntry <= 0) - ProgError("WR09", "%s: zero entries", fname(wadin)); -- if (ntry >= 0x2000) -- ProgError("WR11", "%s: too many entries", fname(wadin)); - info->dirpos = dirpos = WADRreadLong(info); - if ((dirpos < 0) || (dirpos > 0x10000000L)) - ProgError("WR13", "%s: invalid directory offset %08lX", --- -2.15.1 - diff --git a/deutex-proto.diff b/deutex-proto.diff deleted file mode 100644 index ea9cc33..0000000 --- a/deutex-proto.diff +++ /dev/null @@ -1,39 +0,0 @@ -From acd96b8c80a584d877845646ceac388feda46748 Mon Sep 17 00:00:00 2001 -From: Jan Engelhardt -Date: Mon, 1 Jan 2018 19:28:24 +0100 -Subject: [PATCH] build: fix gcc warnings abuot old K&R style function - declarations - -Older gcc complain about the K&R-style prototype. Fix 'em. -(Forward ported from a deutex 4.4.x patch.) -src/deutex.c:108:1: warning: function declaration is not a prototype -src/deutex.c:1611:13: warning: function declaration is not a prototype ---- - src/deutex.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/deutex.c b/src/deutex.c -index 15ff8c3..505a352 100644 ---- a/src/deutex.c -+++ b/src/deutex.c -@@ -76,7 +76,7 @@ const char *palette_lump = "PLAYPAL"; - static char anon[1] = { '\0' }; - - typedef void (*comfun_t) (int argc, const char *argv[]); --static void opt_widths(); -+static void opt_widths(void); - static int is_prefix(const char *s1, const char *s2); - static void call_opt(comfun_t func, ...); - -@@ -1212,7 +1212,7 @@ void COMformat(int argc, const char *argv[]) - /* - * opt_widths - make a pass through Com and compute widths per section - */ --static void opt_widths() -+static void opt_widths(void) - { - comdef_t *d; - comdef_t *current_section = NULL; --- -2.15.1 - diff --git a/deutex.changes b/deutex.changes index 0f07801..33ee871 100644 --- a/deutex.changes +++ b/deutex.changes @@ -1,3 +1,25 @@ +------------------------------------------------------------------- +Tue Jan 9 00:09:12 UTC 2018 - avindra@opensuse.org + +- update to 5.1.1 + * Fixed: texture name array: the maximum possible string size is + now supported. + * Fixed: some warnings and errors with old versions of pkg-config + and gcc + * Fixed: Aliasing errors (caused crashes on some architectures, + such as sparc64) + * Can now build WADs with an arbitrary number of lumps. A warning + is emitted when more than 4046 are included (vanilla Doom limit). +- remove 0001-increase-array-size-for-char-tname-variable-51.patch + * upstreamed in 7024dd74a33780ef2dbdf614f4e52526cc3ab457 +- remove 0001-Fix-strict-aliasing-violations.patch + * upstreamed in 85d821dd3c145be1a998ca2a704930caaad73030 +- remove deutex-proto.diff + * upstreamed in 07bd0a5083fc15db20bee9056511bd3e10dd1362 +- remove deutex-nolimit.diff + * fixed in f8b1336bbcb7bc387d3e856cc7c9f75697cd0f0b +- remove deprecated BuildRoot option + ------------------------------------------------------------------- Mon Jan 1 18:18:37 UTC 2018 - jengelh@inai.de diff --git a/deutex.spec b/deutex.spec index 598e8cd..caa202c 100644 --- a/deutex.spec +++ b/deutex.spec @@ -17,7 +17,7 @@ Name: deutex -Version: 5.1.0 +Version: 5.1.1 Release: 0 Summary: WAD composer for Doom and related games License: GPL-2.0+ @@ -27,11 +27,6 @@ URL: https://github.com/Doom-Utils/deutex Source: https://github.com/Doom-Utils/deutex/releases/download/v%version/%name-%version.tar.xz Source2: https://github.com/Doom-Utils/deutex/releases/download/v%version/%name-%version.tar.xz.sig -Patch1: 0001-increase-array-size-for-char-tname-variable-51.patch -Patch2: 0001-Fix-strict-aliasing-violations.patch -Patch3: deutex-proto.diff -Patch4: deutex-nolimit.diff -BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: asciidoc BuildRequires: automake BuildRequires: pkgconfig @@ -49,7 +44,6 @@ functions such as merging WADs. %prep %setup -q -%patch -P 1 -P 2 -P 3 -P 4 -p1 %build autoreconf -fiv