From owner-svn-ports-all@FreeBSD.ORG Tue Nov 6 13:15:41 2012 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 11ABF2DC; Tue, 6 Nov 2012 13:15:41 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E7DCE8FC14; Tue, 6 Nov 2012 13:15:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qA6DFeLs066913; Tue, 6 Nov 2012 13:15:40 GMT (envelope-from danfe@svn.freebsd.org) Received: (from danfe@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qA6DFeLG066907; Tue, 6 Nov 2012 13:15:40 GMT (envelope-from danfe@svn.freebsd.org) Message-Id: <201211061315.qA6DFeLG066907@svn.freebsd.org> From: Alexey Dokuchaev Date: Tue, 6 Nov 2012 13:15:40 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r307068 - in head/games/doomlegacy: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Nov 2012 13:15:41 -0000 Author: danfe Date: Tue Nov 6 13:15:40 2012 New Revision: 307068 URL: http://svnweb.freebsd.org/changeset/ports/307068 Log: Overhaul the port to make it usable and up-to-date with the reality: - Update to version 1.44 alpha3 (unfortunately, for the sake of sane version number, have to bump PORTEPOCH) - Switch to unified SDL media interface (this is what all modern systems should use) and stop building and installing no longer required stuff; now both sound and music works as expected out of the box - Switch from kvm(3) kernel memory interface calls to obtain memory stats to sysctl(3) to avoid kmem group privileges (setgid bit) requirement - Get rid of wrapper script by providing better default value of DOOMWADDIR - Rename X86_ASM option to standard ASM (which already has nice description) - Change USE_GL knob value from umbrella "yes" to more specific "glu" - Adjust COMMENT and define LICENSE (GPLv2); really honor CC and CFLAGS - Utilize PORTDOCS and PLIST_FILES and thus purge pkg-plist - Trim Makefile header while I'm here per new world order - Provide better and cleaner port description Feature safe: yes Inspired by: http://lists.freebsd.org/pipermail/freebsd-questions/2012-August/244371.html Tested on: i386 only :( Added: head/games/doomlegacy/files/patch-Makefile (contents, props changed) head/games/doomlegacy/files/patch-sdl+i_system.c (contents, props changed) Deleted: head/games/doomlegacy/files/patch-byteptr.h head/games/doomlegacy/files/patch-i_sound.c head/games/doomlegacy/files/patch-i_tcp.c head/games/doomlegacy/files/patch-makefile head/games/doomlegacy/files/patch-sndserv_Makefile Modified: head/games/doomlegacy/Makefile head/games/doomlegacy/distinfo head/games/doomlegacy/pkg-descr Modified: head/games/doomlegacy/Makefile ============================================================================== --- head/games/doomlegacy/Makefile Tue Nov 6 12:49:10 2012 (r307067) +++ head/games/doomlegacy/Makefile Tue Nov 6 13:15:40 2012 (r307068) @@ -1,78 +1,71 @@ -# New ports collection makefile for: doomlegacy -# Date Created: 10 April 2002 -# Whom: Alexander G. Chetirbock -# +# Created by: Alexander G. Chetirbock # $FreeBSD$ PORTNAME= doomlegacy -PORTVERSION= 142 -PORTREVISION= 7 +DISTVERSION= 1.44_alpha3 +PORTEPOCH= 1 CATEGORIES= games -MASTER_SITES= SF/${PORTNAME}/DooM%20Legacy%20source%20code/1.42 -DISTNAME= legacy_${PORTVERSION}_src -DISTFILES= ${DISTNAME}${EXTRACT_SUFX} ${WADFILE} +MASTER_SITES= http://doomlegacy.sourceforge.net/releases/ \ + http://freebsd.nsu.ru/distfiles/legacy.wad:wad +DISTNAME= ${PORTNAME}_${DISTVERSION}_src_r${SVN_REV} +DISTFILES= ${DISTNAME}${EXTRACT_SUFX} legacy.wad:wad +DIST_SUBDIR= ${PORTNAME} EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} MAINTAINER= ports@FreeBSD.org -COMMENT= DooM Legacy: popular DooM clone! +COMMENT= Improved and extended version of Doom -EXTRACT_DEPENDS=unzip:${PORTSDIR}/archivers/unzip +LICENSE= GPLv2 -USE_GL= yes +USE_ZIP= yes +USE_GL= glu USE_GMAKE= yes USE_SDL= mixer sdl -MAKEFILE= makefile -MAKE_ENV= FREEBSD=1 FBSD_SDL=1 PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \ - PTHREAD_LIBS="${PTHREAD_LIBS}" -WRKSRC= ${WRKDIR}/doomlegacy_${PORTVERSION}_src - -OPTIONS_DEFINE= X86_ASM DOCS -OPTIONS_DEFAULT= X86_ASM -X86_ASM_DESC= Enable use of x86 assembly code -DATADIR= ${PREFIX}/lib/${PORTNAME} -SUB_FILES= legacy +MAKE_ENV= OLD_DEPENDENCIES=1 # since .dep file is removed +CFLAGS+= -DSVN_REV=\\\"${SVN_REV}\\\" +WRKSRC= ${WRKDIR}/${PORTNAME}_${DISTVERSION:S/.//}/src -WADFILE= legacy_dat.zip +PLIST_FILES= bin/${PORTNAME} share/doom/legacy.wad +PORTDOCS= * -.include "${.CURDIR}/../doom-data/Makefile.include" +SVN_REV= 845 + +OPTIONS_DEFINE= ASM DOCS +OPTIONS_DEFAULT= ASM .include -.if ${PORT_OPTIONS:MX86_ASM} && ${ARCH} == "i386" -BUILD_DEPENDS+= nasm:${PORTSDIR}/devel/nasm -MAKE_ARGS+= USEASM=1 +.if ${PORT_OPTIONS:MASM} && ${ARCH} == "i386" +BUILD_DEPENDS= nasm:${PORTSDIR}/devel/nasm +MAKE_ENV+= USEASM=1 .endif -post-extract: - @${UNZIP_CMD} -q ${DISTDIR}/${WADFILE} -d ${WRKDIR}/bin - post-patch: - @${REINPLACE_CMD} -e \ - 's|-I/usr/local/include/SDL11|`${SDL_CONFIG} --cflags`|; \ - s|-lSDL-1\.1|`${SDL_CONFIG} --libs`|; \ - s|/usr/local|${LOCALBASE}|; \ - s|/usr/X11R6|${LOCALBASE}|' \ - ${WRKSRC}/${MAKEFILE} - -pre-build: - @cd ${WRKSRC}/linux_x/sndserv && ${GMAKE} clean - -post-build: - @${LN} -sf ${WRKSRC}/linux_x/sndserv/linux/llsndserv ${WRKDIR}/bin + @${REINPLACE_CMD} -e 's| Modified: head/games/doomlegacy/distinfo ============================================================================== --- head/games/doomlegacy/distinfo Tue Nov 6 12:49:10 2012 (r307067) +++ head/games/doomlegacy/distinfo Tue Nov 6 13:15:40 2012 (r307068) @@ -1,4 +1,4 @@ -SHA256 (legacy_142_src.tar.gz) = f5d80aaafddb1a9525af72f118cc63f724f3542c9f58496ad5eabd334b8e2d98 -SIZE (legacy_142_src.tar.gz) = 1687954 -SHA256 (legacy_dat.zip) = 2904fb4e14f60b85aeb49b4fe046ac360156dbe79acb26b640507d00ab949dfb -SIZE (legacy_dat.zip) = 340934 +SHA256 (doomlegacy/doomlegacy_1.44_alpha3_src_r845.zip) = d5ac03ceab68f586ce7282fab1975bbbdbd83b093dd3fa55a8e5317892f61436 +SIZE (doomlegacy/doomlegacy_1.44_alpha3_src_r845.zip) = 2530660 +SHA256 (doomlegacy/legacy.wad) = 3670caff9432155487be2622b7e77ee6fe356f21fd09e8733bf95b58d2df5f5f +SIZE (doomlegacy/legacy.wad) = 952918 Added: head/games/doomlegacy/files/patch-Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/doomlegacy/files/patch-Makefile Tue Nov 6 13:15:40 2012 (r307068) @@ -0,0 +1,41 @@ +--- Makefile.orig ++++ Makefile +@@ -76,7 +76,7 @@ + # std=c89, does not support // commments, no inline, no asm + + # gcc or g++ +-CC=gcc ++CC?=gcc + + # End of User tunable settings + +@@ -116,9 +116,9 @@ + LIBS := -lopengl32 -lglu32 -lwsock32 -lm + else + # default is Linux, for all unix SDL +- OPTS := -DLINUX ++ OPTS := -DLINUX -DFREEBSD + LDFLAGS=-L/usr/X11R6/lib +- 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. +@@ -296,7 +296,7 @@ + + + # compiler and linker flags +-CFLAGS = $(WFLAGS) ++#CFLAGS = $(WFLAGS) + + ifdef PROFILEMODE + # build with gprof profiling information +@@ -309,7 +309,7 @@ + else + # build a normal optimized version + #CFLAGS += -O3 +- CFLAGS += $(OPTLEV) -fomit-frame-pointer ++ #CFLAGS += $(OPTLEV) -fomit-frame-pointer + endif + endif + Added: head/games/doomlegacy/files/patch-sdl+i_system.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/doomlegacy/files/patch-sdl+i_system.c Tue Nov 6 13:15:40 2012 (r307068) @@ -0,0 +1,54 @@ +--- sdl/i_system.c.orig ++++ sdl/i_system.c +@@ -83,10 +83,7 @@ + # include + /*For meminfo*/ + # include +-# include +-# include +-# include +-# include ++# include + # endif + #endif + +@@ -832,30 +829,16 @@ 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 long page_count, free_count, pagesize; ++ size_t len = sizeof(unsigned long); ++ 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 = page_count * pagesize; ++ return free_count * pagesize; + #elif defined(SOLARIS) + goto guess; + #else Modified: head/games/doomlegacy/pkg-descr ============================================================================== --- head/games/doomlegacy/pkg-descr Tue Nov 6 12:49:10 2012 (r307067) +++ head/games/doomlegacy/pkg-descr Tue Nov 6 13:15:40 2012 (r307068) @@ -1,12 +1,17 @@ -DooM Legacy is a DooM port. Some of the supported features are: - * VIDEO OPTIONS MENU - * TRANSLUCENCY ON SPRITES AND WALLS - * SETUP CONTROLS MENU - * LOOK UP AND DOWN (FREELOOK) - * CHASE-CAM : also called a 'third-person' view, or 'Tomb Raider' view. - * CONSOLE - * STATUS BAR OVERLAY - * SKINS +Doom Legacy is a source port of Doom available for various operating systems +which was originally written as a fork of DOSDoom introducing lots of useful +improvements yet retaining original feel of the game. It currently features: -WWW: http://legacy.newdoom.com/ -WWW: http://sourceforge.net/projects/doomlegacy + * TCP/IP multiplayer networking (including a master server for Internet + game searches) + * Nearly complete Boom and Heretic support + * OpenGL rendering + * Higher resolutions + * Console with support for key bindings (Quake-style) + * FraggleScript for scripting + * 3D floors, water, and coloured lighting + * Mouse aim and crosshairs + * Jumping + * 32 players (including support for custom skins) + +WWW: http://doomlegacy.sourceforge.net/