svn commit: r365565 - in head/games/doomlegacy: . files

Alexey Dokuchaev danfe at FreeBSD.org
Thu Aug 21 15:54:32 UTC 2014


Author: danfe
Date: Thu Aug 21 15:54:30 2014
New Revision: 365565
URL: http://svnweb.freebsd.org/changeset/ports/365565
QAT: https://qat.redports.org/buildarchive/r365565/

Log:
  - Update to version 1.45 beta1
  - Transfer maintainership to games@
  
  I've managed to push some of the patches upstream, but not all.

Modified:
  head/games/doomlegacy/Makefile
  head/games/doomlegacy/distinfo
  head/games/doomlegacy/files/patch-Makefile
  head/games/doomlegacy/files/patch-sdl+i_system.c

Modified: head/games/doomlegacy/Makefile
==============================================================================
--- head/games/doomlegacy/Makefile	Thu Aug 21 15:14:18 2014	(r365564)
+++ head/games/doomlegacy/Makefile	Thu Aug 21 15:54:30 2014	(r365565)
@@ -2,35 +2,29 @@
 # $FreeBSD$
 
 PORTNAME=	doomlegacy
-DISTVERSION=	1.44_alpha4
-PORTREVISION=	1
+DISTVERSION=	1.45_beta1
 PORTEPOCH=	1
 CATEGORIES=	games
-MASTER_SITES=	http://doomlegacy.sourceforge.net/releases/ \
-		http://freebsd.nsu.ru/distfiles/:wad
-DISTNAME=	${PORTNAME}_${DISTVERSION}_src_r${SVN_REV}
-# legacy.wad is not included in distfile and must be regenerated manually
-# when needed (its contents change); luckily, it doesn't happen too often
-DISTFILES=	${DISTNAME}${EXTRACT_SUFX} legacy_wad${EXTRACT_SUFX}:wad
-DIST_SUBDIR=	${PORTNAME}
+MASTER_SITES=	SF/${PORTNAME}/${DISTVERSION:S,_,%20,}/
+DISTNAME=	${PORTNAME}_${DISTVERSION}_source
+DISTFILES=	${DISTNAME}${EXTRACT_SUFX} \
+		${PORTNAME}_${DISTVERSION}_common.zip
 
-MAINTAINER=	danfe at FreeBSD.org
+MAINTAINER=	games at FreeBSD.org
 COMMENT=	Improved and extended version of Doom
 
 LICENSE=	GPLv2
 
-USES=		gmake zip
+USES=		gmake tar:bzip2
 USE_GL=		glu
 USE_SDL=	mixer sdl
 
-CFLAGS+=	-DSVN_REV=\\\"${SVN_REV}\\\"
-WRKSRC=		${WRKDIR}/${PORTNAME}_${DISTVERSION}/src
+CFLAGS+=	-DSVN_REV=\\\"1107\\\"
+WRKSRC=		${WRKDIR}/${DISTNAME:S,_beta1,,}/src
 
 PLIST_FILES=	bin/${PORTNAME} share/doom/legacy.wad
 PORTDOCS=	*
 
-SVN_REV=	999
-
 OPTIONS_DEFINE=	DOCS
 OPTIONS_DEFINE_i386=	ASM
 
@@ -45,31 +39,28 @@ ASM_MAKE_ENV=		USEASM=1 OLD_DEPENDENCIES
 .include <bsd.port.options.mk>
 
 post-patch: .SILENT
-	${REINPLACE_CMD} -e 's|<malloc|<stdlib|' ${WRKSRC}/p_setup.c \
-		${WRKSRC}/r_data.c ${WRKSRC}/w_wad.c
-# Unbreak the build when using optimized assembly routines
-	${REINPLACE_CMD} -e 's|dc_transmap|dc_translucentmap| ; \
-		s|colormaps|reg_&|' ${WRKSRC}/tmap.nas
-# Ensure that gathered memory stats are printed correctly
-	${REINPLACE_CMD} -e 's|total, free|(int)total, (int)free|' \
-		${WRKSRC}/z_zone.c
-# Make local directory name less ambiguous; adjust default WAD search path
-	${REINPLACE_CMD} -e 's|\.legacy|.${PORTNAME}| ; \
-		/DEFWADS1/s|/.*|${DMDIR}"|' ${WRKSRC}/doomdef.h
+# Adjust default WAD search path
+	${REINPLACE_CMD} -e '/DEFWADS1/s|/.*|${DMDIR}"|' ${WRKSRC}/doomdef.h
 # Provide better support for relative paths (for `-iwad' switch)
 	${REINPLACE_CMD} -e "s|s\[0\] ==[^)]*|strchr(s, '/')|" \
-			${WRKSRC}/d_main.c
+		${WRKSRC}/d_main.c
 .if ! ${PORT_OPTIONS:MIPX}
 	${REINPLACE_CMD} -e '/USE_IPX/s|define|undef|' ${WRKSRC}/doomdef.h
 	${REINPLACE_CMD} -e 's| -lipx||' ${WRKSRC}/Makefile
 .endif
 
+pre-build:
+	${ECHO_CMD} MAKE_OPTIONS_PRESENT=1 HAVE_MIXER=1 | ${XARGS} -n 1 \
+		> ${BUILD_WRKSRC}/../make_options
+	${MAKE_CMD} -C ${BUILD_WRKSRC} dirs
+
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/../bin/doomlegacy ${STAGEDIR}${PREFIX}/bin
 	@${MKDIR} ${STAGEDIR}${DMDIR}
-	${INSTALL_DATA} ${WRKDIR}/legacy.wad ${STAGEDIR}${DMDIR}
+	${INSTALL_DATA} ${WRKDIR}/${PORTNAME}_1.45/legacy.wad \
+		${STAGEDIR}${DMDIR}
 	@${MKDIR} ${STAGEDIR}${DOCSDIR}
-	(cd ${WRKSRC}/_doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR})
+	(cd ${WRKSRC}/../docs && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR})
 
 .include "${.CURDIR}/../doom-data/Makefile.include"
 .include <bsd.port.mk>

Modified: head/games/doomlegacy/distinfo
==============================================================================
--- head/games/doomlegacy/distinfo	Thu Aug 21 15:14:18 2014	(r365564)
+++ head/games/doomlegacy/distinfo	Thu Aug 21 15:54:30 2014	(r365565)
@@ -1,4 +1,4 @@
-SHA256 (doomlegacy/doomlegacy_1.44_alpha4_src_r999.zip) = 51a41099168a113e13bd0bcbe0da7ed2dde1e9f23ddd3c23f6bedd911a4f4824
-SIZE (doomlegacy/doomlegacy_1.44_alpha4_src_r999.zip) = 2645943
-SHA256 (doomlegacy/legacy_wad.zip) = dd805018a60d3e1b54da88ad6d082ae6bb9f790447a3f8d8b8f227b9ffa22240
-SIZE (doomlegacy/legacy_wad.zip) = 338333
+SHA256 (doomlegacy_1.45_beta1_source.tar.bz2) = 6bf954c95896c6707db84a66a970552a3d04224cfec94972c87d7834532eb1d4
+SIZE (doomlegacy_1.45_beta1_source.tar.bz2) = 2064988
+SHA256 (doomlegacy_1.45_beta1_common.zip) = 54bb1731b986d2f41c9d03ae8d1e382e2253d361687856ce04199801a7c611cd
+SIZE (doomlegacy_1.45_beta1_common.zip) = 937242

Modified: head/games/doomlegacy/files/patch-Makefile
==============================================================================
--- head/games/doomlegacy/files/patch-Makefile	Thu Aug 21 15:14:18 2014	(r365564)
+++ head/games/doomlegacy/files/patch-Makefile	Thu Aug 21 15:54:30 2014	(r365565)
@@ -1,7 +1,7 @@
---- Makefile.orig
+--- Makefile.orig	2014-05-17 18:32:47 UTC
 +++ Makefile
-@@ -84,7 +84,7 @@
-   # std=c89, does not support // commments, no inline, no asm
+@@ -140,7 +140,7 @@ OPTLEV=-O3
+ #POLL_POINTER=-DPOLL_POINTER
  
  # gcc or g++
 -CC=gcc
@@ -9,65 +9,42 @@
  ifdef CC_WATCOM
    CC=WATCOMC
  endif
-@@ -135,9 +135,9 @@
-     LIBS := -lopengl32 -lglu32 -lwsock32 -lm
+@@ -263,9 +263,9 @@ ifeq ($(SMIF), SDL)
    else
      # default is Linux, for all unix SDL
--    OPTS := -DLINUX
-+    OPTS := -DLINUX -DFREEBSD
+     EXENAME:=doomlegacy
+-    OPTS:=-DLINUX
++    OPTS:=-DLINUX -DFREEBSD
      LDFLAGS=-L/usr/X11R6/lib
--    LIBS := -lGL -lGLU -lm
-+    LIBS := -lGL -lGLU -lm -lipx
+-    LIBS:=-lGL -lGLU -lm
++    LIBS:=-lGL -lGLU -lm -lipx
      # -L/usr/X11R6/lib is needed by Linux 2.4 and others that still have
      # the GLU libraries in an X11 directory.
      # -lm is needed for pow, powf, and other MATH1 functions.
-@@ -392,7 +392,7 @@
+@@ -599,7 +599,7 @@ ifdef CDMUS
  endif
  
  # compiler and linker flags
--CFLAGS = $(WFLAGS)
-+#CFLAGS = $(WFLAGS)
+-CFLAGS:=$(WFLAGS)
++#CFLAGS:=$(WFLAGS)
  
  ifdef PROFILEMODE
  # build with gprof profiling information
-@@ -405,7 +405,7 @@
+@@ -616,7 +616,7 @@ ifdef DEBUG
  else
  # build a normal optimized version
-   #CFLAGS += -O3
--  CFLAGS += $(OPTLEV) -fomit-frame-pointer
-+  #CFLAGS += $(OPTLEV) -fomit-frame-pointer
+   #CFLAGS+=-O3
+-  CFLAGS+=$(OPTLEV) -fomit-frame-pointer
++  #CFLAGS+=$(OPTLEV) -fomit-frame-pointer
  endif
  endif
  
-@@ -583,7 +583,7 @@
- 
- # executable
- $(BIN)/$(EXENAME): $(O) $(OBJS) $(MAINOBJ) versionstring
--#	 @mkdir $(BIN)
-+	@mkdir -p $(BIN)
- 	@echo Linking...
- 	$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(MAINOBJ) \
- 	-o $(BIN)/$(EXENAME) $(LIBS)
-@@ -651,7 +651,7 @@
- ../dep/main2.dep : i*.c m*.c p*.c
- ../dep/main3.dep : q*.c r*.c s*.c t*.c v*.c z*.c
+@@ -1002,7 +1002,7 @@ endif
+ ../dep/main_t.dep : t*.c
  # none: e*.c j*.c k*.c l*.c n*.c o*.c
--../dep/hardware.dep : hardware/*.c hardware/*/*.c
-+../dep/hardware.dep : hardware/*.c hardware/r_opengl/*.c
+ ../dep/hard1.dep : hardware/*.c
+-../dep/hard2.dep : hardware/*/*.c
++../dep/hard2.dep : hardware/r_opengl/*.c
  # $(INTERFACE).dep : $(INTERFACE)/*.c
  ../dep/djgppdos.dep : djgppdos/*.c
  ../dep/linux_x.dep : linux_x/*.c linux_x/musserv/*.c linux_x/sndserv/*.c
-@@ -673,11 +673,10 @@
- ../dep :
- 	@mkdir ../dep;
- 
--%.dep :
-+%.dep : ../dep
- 	@echo "Making dependencies $(@F)"
--	if test ! -d ../dep; then mkdir ../dep; fi
- 	$(CC) $(CFLAGS) -MM $^ > ../dep/$(@F)
--	sed --separate -e "s@^[a-zA-Z0-9_]*.o:@\$$(O)/&@" ../dep/$(@F) > sed.dep
-+	sed -e "s@^[a-zA-Z0-9_]*.o:@\$$(O)/&@" ../dep/$(@F) > sed.dep
- 	mv sed.dep ../dep/$(@F)
- endif
- 

Modified: head/games/doomlegacy/files/patch-sdl+i_system.c
==============================================================================
--- head/games/doomlegacy/files/patch-sdl+i_system.c	Thu Aug 21 15:14:18 2014	(r365564)
+++ head/games/doomlegacy/files/patch-sdl+i_system.c	Thu Aug 21 15:54:30 2014	(r365565)
@@ -1,18 +1,6 @@
---- sdl/i_system.c.orig
+--- sdl/i_system.c.orig	2014-05-16 20:11:49 UTC
 +++ sdl/i_system.c
-@@ -84,10 +84,7 @@
- #  include <sys/mount.h>
- /*For meminfo*/
- #  include <sys/types.h>
--#  include <kvm.h>
--#  include <nlist.h>
--#  include <sys/vmmeter.h>
--#  include <fcntl.h>
-+#  include <sys/sysctl.h>
- # endif
- #endif
- 
-@@ -516,6 +513,8 @@ void I_SysInit()
+@@ -508,6 +508,8 @@ void I_SysInit(void)
  
    // Enable unicode key conversion
    SDL_EnableUNICODE(1);
@@ -21,55 +9,3 @@
  
    // Initialize the joystick subsystem.
    I_JoystickInit();
-@@ -906,33 +905,19 @@ uint64_t I_GetFreeMem(uint64_t *total)
-   // LINUX covers all the unix-type OS's.
- 
- #ifdef FREEBSD
--    struct  vmmeter sum;
--    kvm_t *kd;
--    struct nlist namelist[]= {
--#define X_SUM   0
--	{"_cnt"},
--	{ NULL }
--    };
--    if ((kd = kvm_open(NULL, NULL, NULL, O_RDONLY, "kvm_open")) == NULL)
-+    unsigned page_count, free_count, pagesize;
-+    size_t len = sizeof(unsigned);
-+    if (sysctlbyname("vm.stats.vm.v_page_count", &page_count, &len, NULL, 0))
-       goto guess;
--
--    if (kvm_nlist(kd, namelist) != 0)
--    {
--	kvm_close (kd);
--	goto guess;
--    }
--    if (kvm_read(kd,namelist[X_SUM].n_value ,&sum, sizeof(sum)) != sizeof(sum))
--    {
--	kvm_close (kd);
--	goto guess;
--    }
--    kvm_close (kd);
--
--    *total = sum.v_page_count * sum.v_page_size;
--    return sum.v_free_count * sum.v_page_size;
-+    if (sysctlbyname("vm.stats.vm.v_free_count", &free_count, &len, NULL, 0))
-+      goto guess;
-+    if (sysctlbyname("hw.pagesize", &pagesize, &len, NULL, 0))
-+      goto guess;
-+    *total = (uint64_t)page_count * pagesize;
-+    return (uint64_t)free_count * pagesize;
- #elif defined(SOLARIS)
-     goto guess;
--#else
-+#endif
-     // Actual Linux
- 
- #define MEMINFO_FILE "/proc/meminfo"
-@@ -970,7 +955,6 @@ uint64_t I_GetFreeMem(uint64_t *total)
-   // make a conservative guess
-   *total = 32 << 20;
-   return   32 << 20;
--#endif // Unix flavors
- #elif defined(WIN32)
-   // windows
- #if defined(WIN_LARGE_MEM) && defined( _WIN32_WINNT ) && (_WIN32_WINNT >= 0x0500)


More information about the svn-ports-all mailing list