Index: head/games/doomlegacy/Makefile =================================================================== --- head/games/doomlegacy/Makefile (revision 365564) +++ head/games/doomlegacy/Makefile (revision 365565) @@ -1,75 +1,66 @@ # Created by: Alexander G. Chetirbock # $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@FreeBSD.org +MAINTAINER= games@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 .if exists(/usr/include/netipx/ipx.h) OPTIONS_DEFINE+= IPX IPX_DESC= IPX protocol support .endif ASM_BUILD_DEPENDS= nasm:${PORTSDIR}/devel/nasm ASM_MAKE_ENV= USEASM=1 OLD_DEPENDENCIES=1 .include post-patch: .SILENT - ${REINPLACE_CMD} -e 's| ${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 Index: head/games/doomlegacy/distinfo =================================================================== --- head/games/doomlegacy/distinfo (revision 365564) +++ head/games/doomlegacy/distinfo (revision 365565) @@ -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 Index: head/games/doomlegacy/files/patch-Makefile =================================================================== --- head/games/doomlegacy/files/patch-Makefile (revision 365564) +++ head/games/doomlegacy/files/patch-Makefile (revision 365565) @@ -1,73 +1,50 @@ ---- 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 +CC?=gcc 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 - Index: head/games/doomlegacy/files/patch-sdl+i_system.c =================================================================== --- head/games/doomlegacy/files/patch-sdl+i_system.c (revision 365564) +++ head/games/doomlegacy/files/patch-sdl+i_system.c (revision 365565) @@ -1,75 +1,11 @@ ---- 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 - /*For meminfo*/ - # include --# include --# include --# include --# include -+# include - # endif - #endif +@@ -508,6 +508,8 @@ void I_SysInit(void) -@@ -516,6 +513,8 @@ void I_SysInit() - // Enable unicode key conversion SDL_EnableUNICODE(1); + // Enable key auto repeat + SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL); // 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)