pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
doomlegacy: Improve package
Module Name: pkgsrc-wip
Committed By: Michael Baeuerle <michael.baeuerle%stz-e.de@localhost>
Pushed By: micha
Date: Thu Jun 13 13:57:47 2019 +0200
Changeset: 1e705465fe53ba2db40247ff5421cfda1ef6b02e
Modified Files:
doomlegacy/DESCR
doomlegacy/Makefile
doomlegacy/PLIST
doomlegacy/distinfo
doomlegacy/patches/patch-src_Makefile
doomlegacy/patches/patch-src_doomtype.h
doomlegacy/patches/patch-src_sdl_i__system.c
Added Files:
doomlegacy/MESSAGE.doomlegacy
Log Message:
doomlegacy: Improve package
- Debug mode disabled
- Installation message added
- DOOMWADDIR set to share/doom
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=1e705465fe53ba2db40247ff5421cfda1ef6b02e
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
doomlegacy/DESCR | 5 +-
doomlegacy/MESSAGE.doomlegacy | 10 ++++
doomlegacy/Makefile | 18 ++++++--
doomlegacy/PLIST | 2 +-
doomlegacy/distinfo | 6 +--
doomlegacy/patches/patch-src_Makefile | 69 ++++++++++++++++++++++++++--
doomlegacy/patches/patch-src_doomtype.h | 26 +++++++----
doomlegacy/patches/patch-src_sdl_i__system.c | 4 +-
8 files changed, 114 insertions(+), 26 deletions(-)
diffs:
diff --git a/doomlegacy/DESCR b/doomlegacy/DESCR
index d65f46563e..ea813f3f13 100644
--- a/doomlegacy/DESCR
+++ b/doomlegacy/DESCR
@@ -1,5 +1,6 @@
-This is one of the most popular Doom source ports. It enhances Doom with things
-like TCP/IP networking, OpenGL renderer, Heretic support and much more.
+This is one of the most popular Doom source ports.
+It enhances Doom with things like Free Look, OpenGL renderer, Heretic support,
+TCP/IP networking and much more.
Doom Legacy can play Doom, Boom, Marine's Best Friend (MBF), and Heretic maps.
In addition to the original games by id Software and Raven Software, there are
diff --git a/doomlegacy/MESSAGE.doomlegacy b/doomlegacy/MESSAGE.doomlegacy
new file mode 100644
index 0000000000..665e264622
--- /dev/null
+++ b/doomlegacy/MESSAGE.doomlegacy
@@ -0,0 +1,10 @@
+===========================================================================
+$NetBSD$
+
+Note: The location of the ${PKGNAME} WAD directory has been set to
+
+ ${DOOMWADDIR_CONF}
+
+This is the pkgsrc standard Doom WAD directory location (shared with other
+Doom packages).
+===========================================================================
diff --git a/doomlegacy/Makefile b/doomlegacy/Makefile
index 709cfd1bb0..160f97b095 100644
--- a/doomlegacy/Makefile
+++ b/doomlegacy/Makefile
@@ -31,18 +31,24 @@ MAKE_FLAGS+= OS=NETBSD
.elif ${OPSYS} == "Darwin"
MAKE_FLAGS+= OS=MAC
.else
-# All other Unix variants (should work for GNU/Linux, OpenBSD and SunOS)
+# Other Unix (should work for GNU/Linux, OpenBSD and SunOS)
MAKE_FLAGS+= OS=LINUX
.endif
-MAKE_FLAGS+= HAVE_MIXER=1 DEBUG=1
+MAKE_FLAGS+= HAVE_MIXER=1 DEBUG=0
.include "../../mk/endian.mk"
.if ${MACHINE_ENDIAN} == "big"
-CFLAGS+= -D__BIG_ENDIAN__=1
+CFLAGS+= -D__BIG_ENDIAN__
.endif
-INSTALLATION_DIRS= bin share/doc/doomlegacy share/doomlegacy
+# DOOMWADDIR is intentionally shared with other Doom packages
+DOOMWADDIR?= share/doom
+INSTALLATION_DIRS= bin share/doc/doomlegacy ${DOOMWADDIR}
+
+MESSAGE_SRC+= MESSAGE.doomlegacy
+MESSAGE_SUBST+= PKGNAME=${PKGNAME:C/-.*//}
+MESSAGE_SUBST+= DOOMWADDIR_CONF="${PREFIX}/${DOOMWADDIR}"
do-install:
cd ${WRKSRC} && \
@@ -52,7 +58,9 @@ do-install:
${DESTDIR}${PREFIX}/share/doc/doomlegacy; \
cd ${WRKDIR}/doomlegacy_${VERS} && \
${INSTALL_DATA} legacy.wad \
- ${DESTDIR}${PREFIX}/share/doomlegacy/legacy.wad
+ ${DESTDIR}${PREFIX}/${DOOMWADDIR}/legacy.wad
+
+DEPENDS+= doom1-[0-9]*:../../games/doom1
BUILDLINK_API_DEPENDS.SDL_mixer+= SDL_mixer>=1.2.7
.include "../../audio/SDL_mixer/buildlink3.mk"
diff --git a/doomlegacy/PLIST b/doomlegacy/PLIST
index 853cc457d7..4ace64ff14 100644
--- a/doomlegacy/PLIST
+++ b/doomlegacy/PLIST
@@ -2,4 +2,4 @@
bin/doomlegacy
share/doc/doomlegacy/legacy.css
share/doc/doomlegacy/whatsnew.html
-share/doomlegacy/legacy.wad
+share/doom/legacy.wad
diff --git a/doomlegacy/distinfo b/doomlegacy/distinfo
index 5bc2c4c978..70a14563fa 100644
--- a/doomlegacy/distinfo
+++ b/doomlegacy/distinfo
@@ -9,7 +9,7 @@ RMD160 (doomlegacy_1.47.2_source.tar.bz2) = 661f0fa2bdc58a2f5f9582f36817ddd9d48d
SHA512 (doomlegacy_1.47.2_source.tar.bz2) = e2e182c18dd24c14e954f791c58e44119457bb74af4bb079c16219406176536f9fd414afd6c9fa0e956a6062b5a346bbf19ebf4c0d2d300e2e66b2eb01cf53fd
Size (doomlegacy_1.47.2_source.tar.bz2) = 2276199 bytes
SHA1 (patch-Makefile) = a1aea57169fc1325182dcc2afeeaa953353f2823
-SHA1 (patch-src_Makefile) = f0b431aff892469982ed1a6e5d562ff0fb60c996
-SHA1 (patch-src_doomtype.h) = 856bce16ef7e08db28f6090a6506c6a9d58493bc
+SHA1 (patch-src_Makefile) = 37375b1728cd13ec55ce48b333e6817d0d974c88
+SHA1 (patch-src_doomtype.h) = 09d0942116ce512d9cd46e5b6f1d4fc3f9e97420
SHA1 (patch-src_i__tcp.c) = 1c0c6017d24640217e29ed238e210850329d0e75
-SHA1 (patch-src_sdl_i__system.c) = a89c3356f15c5c79e02a36fd137491e6e3faf384
+SHA1 (patch-src_sdl_i__system.c) = 17524680559b81ae755d781f63f3c5d34e1f14b6
diff --git a/doomlegacy/patches/patch-src_Makefile b/doomlegacy/patches/patch-src_Makefile
index f6f5dc1f47..34d8a4917f 100644
--- a/doomlegacy/patches/patch-src_Makefile
+++ b/doomlegacy/patches/patch-src_Makefile
@@ -1,26 +1,42 @@
$NetBSD$
Add NetBSD to OS list.
+Honor environment variables CFLAGS, LDFLAGS and LIBS
--- src/Makefile.orig 2018-07-16 09:17:06.000000000 +0000
+++ src/Makefile
-@@ -449,7 +449,7 @@ endif
+@@ -449,13 +449,14 @@ endif
endif
-OS_LIST:=LINUX FREEBSD WIN32 WIN7 WIN98 OS2 DOS MAC
+OS_LIST:=LINUX FREEBSD NETBSD WIN32 WIN7 WIN98 OS2 DOS MAC
- OPTS:=
+-OPTS:=
++# Do not reset OPTS (take CFLAGS value from environment as base)
++OPTS=$(CFLAGS)
-@@ -479,6 +479,14 @@ ifeq ($(OS), FREEBSD)
+ ifeq ($(OS), LINUX)
+ LINUX=1
+- OPTS:=-DLINUX
++ OPTS+=-DLINUX
+ #Known Compiler symbols
+ # linux __linux __linux__
+ # AIX defines: _AIX
+@@ -474,15 +475,23 @@ else
+ ifeq ($(OS), FREEBSD)
+ # Has some linking differences from the rest of Linux-like OS.
+ FREEBSD=1
+- OPTS:=-DLINUX -DFREEBSD
++ OPTS+=-DLINUX -DFREEBSD
+ #Known Compiler symbols
# __FreeBSD__ __FreeBSD_kernel__ __DragonFly__
# SDL_platform.h for FreeBSD defines: __FREEBSD__
else
+ifeq ($(OS), NETBSD)
+ # Uses statvfs(5).
+ NETBSD=1
-+ OPTS:=-DLINUX -DNETBSD
++ OPTS+=-DLINUX -DNETBSD
+ #Known Compiler symbols
+ # __NetBSD__
+ # SDL_platform.h for FreeBSD defines: __NETBSD__
@@ -28,7 +44,36 @@ Add NetBSD to OS list.
ifeq ($(OS), WIN32)
WIN32=1
DOSFILE=1
-@@ -545,6 +553,7 @@ endif
+- OPTS:=-DWIN32
++ OPTS+=-DWIN32
+ # if have windows > Win98, and want large memory reports
+ ifdef WIN_LARGE_MEM
+ OPTS+=-DWIN_LARGE_MEM
+@@ -500,7 +509,7 @@ ifeq ($(OS), WIN7)
+ # This does NOT YET make a version customized to Win7/8.
+ WIN32=1
+ DOSFILE=1
+- OPTS:=-DWIN32
++ OPTS+=-DWIN32
+ # probably want large memory reports
+ OPTS+=-DWIN_LARGE_MEM
+ #Known Compiler symbols
+@@ -511,12 +520,12 @@ ifeq ($(OS), WIN98)
+ # If Win98 differences occur, this category can isolate them.
+ WIN32=1
+ DOSFILE=1
+- OPTS:=-DWIN32
++ OPTS+=-DWIN32
+ else
+ ifeq ($(OS), OS2)
+ OS2=1
+ DOSFILE=1
+- OPTS:=-D__OS2__
++ OPTS+=-D__OS2__
+ #Known Compiler symbols
+ # __OS2__
+ else
+@@ -545,15 +554,19 @@ endif
endif
endif
endif
@@ -36,3 +81,17 @@ Add NetBSD to OS list.
export DOSFILE
# all OPTINC need to have -I. because of how includes are written
+ # however the order of -I may be important, so it is left to each SMIF.
+ OPTINC:=
+-LIBS:=
+-LDFLAGS:=
++# Do not reset LIBS (take value from environment as base)
++#LIBS:=
++# Do not reset LDFLAGS (take value from environment as base)
++#LDFLAGS:=
+ INSTALL_SUPPL:=
+
++# Note: External CFLAGS are now part of OPTS and appended later
+ CFLAGS:=
+ # Machine architecture.
+ ifdef ARCH
diff --git a/doomlegacy/patches/patch-src_doomtype.h b/doomlegacy/patches/patch-src_doomtype.h
index 010e049912..823567fc86 100644
--- a/doomlegacy/patches/patch-src_doomtype.h
+++ b/doomlegacy/patches/patch-src_doomtype.h
@@ -2,14 +2,24 @@ $NetBSD$
Use limits.h for NetBSD too.
---- src/doomtype.h.orig 2019-06-12 09:36:08.000000000 +0000
+--- src/doomtype.h.orig 2018-07-16 09:17:06.000000000 +0000
+++ src/doomtype.h
-@@ -168,7 +168,7 @@ int strlwr(char *n);
- // Predefined with some OS.
- #ifdef __WIN32__
+@@ -165,17 +165,8 @@ int strlwr(char *n);
+ #endif
+
+
+-// Predefined with some OS.
+-#ifdef __WIN32__
++// For pkgsrc: All POSIX comformant OS should have limits.h
#include <limits.h>
-#elif defined( MACOS_DI ) || defined( __MACH__ ) || defined( FREEBSD )
-+#elif defined( MACOS_DI ) || defined( __MACH__ ) || defined( FREEBSD ) || defined( NETBSD )
- #include <limits.h>
- #else
- // Linux GNU, which also includes limits.h
+-#include <limits.h>
+-#else
+-// Linux GNU, which also includes limits.h
+-// obsolete header file
+-#include <values.h>
+-//#include <limits.h>
+-#endif
+
+ // [WDJ] This is very dangerous considering 32 bit and 64 bit systems,
+ // should use stdint.h values instead.
diff --git a/doomlegacy/patches/patch-src_sdl_i__system.c b/doomlegacy/patches/patch-src_sdl_i__system.c
index c3086979f0..e19ae005b3 100644
--- a/doomlegacy/patches/patch-src_sdl_i__system.c
+++ b/doomlegacy/patches/patch-src_sdl_i__system.c
@@ -9,7 +9,7 @@ Use statvfs(5) for NetBSD.
# include <sys/types.h>
# include <sys/sysctl.h>
-# elif defined( __MACH__ )
-+# elif defined( NETBSD ) || defined( __MACH__ )
++# elif defined( __MACH__ ) || defined( NETBSD )
# include <sys/statvfs.h>
# else
# include <sys/vfs.h>
@@ -18,7 +18,7 @@ Use statvfs(5) for NetBSD.
goto guess;
-# elif defined( __MACH__ )
-+# elif defined( NETBSD ) || defined( __MACH__ )
++# elif defined( __MACH__ ) || defined( NETBSD )
struct statvfs stfs;
if (statvfs(".", &stfs) == -1)
goto guess;
Home |
Main Index |
Thread Index |
Old Index