diff --git a/srcpkgs/deutex/patches/32ebc7c-freedoom.patch b/srcpkgs/deutex/patches/32ebc7c-freedoom.patch new file mode 100644 index 00000000000..4a39c42df72 --- /dev/null +++ b/srcpkgs/deutex/patches/32ebc7c-freedoom.patch @@ -0,0 +1,18 @@ +commit 32ebc7c39452d7595f0275f5290d07c7961c4f0e +Author: Mike Swanson +Date: Sat Jan 11 19:18:38 2014 -0800 + + Recognise the Freedoom IWAD names + +--- src/deutex.c ++++ src/deutex.c +@@ -1087,6 +1087,9 @@ int main (int argc, char *argv_non_const[]) + "doom2", /* Doom II */ + "plutonia", /* Final Doom */ + "tnt", /* Final Doom */ ++ "freedoom1", /* Freedoom: Phase 1 */ ++ "freedoom2", /* Freedoom: Phase 2 */ ++ "freedm" /* FreeDM */ + "heretic", /* Heretic */ + "hexen", /* Hexen */ + "strife1", /* Strife */ diff --git a/srcpkgs/deutex/patches/f4f4176-segfault.patch b/srcpkgs/deutex/patches/f4f4176-segfault.patch new file mode 100644 index 00000000000..692c7a9eaca --- /dev/null +++ b/srcpkgs/deutex/patches/f4f4176-segfault.patch @@ -0,0 +1,59 @@ +commit f4f4176747a1288201a54070fc121ef588fc887b +Author: André Majorel +Date: Wed Mar 15 13:58:44 2006 +0100 + + Check for not-logging before writing to the log file + + Fixes a segfault when the $CWD is on a read-only filesystem. + +--- src/log.c ++++ src/log.c +@@ -40,10 +40,10 @@ int lopen (void) + { + if (logfp == &nolog) + return 1; +- if (logfp == NULL) ++ if (logfp == NULL || logfp == &nolog) + { + logfp = fopen (logfile, "w"); +- if (logfp == NULL) ++ if (logfp == NULL || logfp == &nolog) + { + /* Can't use Warning(), we would loop. */ + fflush (stdout); +@@ -65,7 +65,7 @@ int lopen (void) + */ + void lputc (char c) + { +- if (logfp == NULL) ++ if (logfp == NULL || logfp == &nolog) + return; + fputc (c, logfp); + fflush (logfp); /* We don't want a segfault to truncate the log */ +@@ -77,7 +77,7 @@ void lputc (char c) + */ + void lputs (const char *str) + { +- if (logfp == NULL) ++ if (logfp == NULL || logfp == &nolog) + return; + fputs (str, logfp); + fflush (logfp); /* We don't want a segfault to truncate the log */ +@@ -91,7 +91,7 @@ void lprintf (const char *fmt, ...) + { + va_list list; + +- if (logfp == NULL) ++ if (logfp == NULL || logfp == &nolog) + return; + va_start (list, fmt); + vlprintf (fmt, list); +@@ -104,7 +104,7 @@ void lprintf (const char *fmt, ...) + */ + void vlprintf (const char *fmt, va_list list) + { +- if (logfp == NULL) ++ if (logfp == NULL || logfp == &nolog) + return; + vfprintf (logfp, fmt, list); + fflush (logfp); /* We don't want a segfault to truncate the log */ diff --git a/srcpkgs/deutex/patches/fix-cross-compile.patch b/srcpkgs/deutex/patches/fix-cross-compile.patch new file mode 100644 index 00000000000..41a58c883d9 --- /dev/null +++ b/srcpkgs/deutex/patches/fix-cross-compile.patch @@ -0,0 +1,11 @@ +--- configure.orig ++++ configure +@@ -272,7 +272,7 @@ + # does the C compiler actually work ? + # + printf "checking whether the C compiler works..." +-( ++echo || ( + cd "$tmpdir" + echo 'main (int argc, char *argv[]) { return 0; }' >$cbasename + if diff --git a/srcpkgs/deutex/patches/fix-musl.patch b/srcpkgs/deutex/patches/fix-musl.patch new file mode 100644 index 00000000000..9dd2fce9b70 --- /dev/null +++ b/srcpkgs/deutex/patches/fix-musl.patch @@ -0,0 +1,11 @@ +--- src/log.c.orig ++++ src/log.c +@@ -28,7 +28,7 @@ + + + static FILE *logfp = NULL; +-static FILE nolog; ++static int nolog; + + + /* diff --git a/srcpkgs/deutex/template b/srcpkgs/deutex/template new file mode 100644 index 00000000000..bd3eb6e770d --- /dev/null +++ b/srcpkgs/deutex/template @@ -0,0 +1,31 @@ +# Template file for 'deutex' +pkgname=deutex +version=4.4.902 +revision=1 +build_style=gnu-makefile +short_desc="WAD composer for DOOM and others" +maintainer="beefcurtains " +license="GPL-2" +homepage="http://www.teaser.fr/~amajorel/deutex/" +distfiles="https://github.com/chungy/${pkgname}/archive/v${version}.tar.gz" +checksum=969d2b901261c41e5125ffb2ecb8ecbe0b804956f0cf2220e96994f6be0f9f67 + +do_configure() { + ./configure --cc "${CC}" --cflags "${CFLAGS}" \ + --ldflags "${LDFLAGS}" --prefix /usr \ + --inttypes yes +} + +do_install() { + vbin deusf + vbin deutex + vlicense LICENCE + ln -s deutex.6 deusf.6 + vman deutex.6 + vman deusf.6 + vdoc README + rm -f docsrc/{README,deutex.6} + for doc in $(echo docsrc/*); do + vdoc $doc + done +}