Date: Mon, 11 Sep 2006 16:44:03 -0300 From: "Alejandro Pulver" <alepulver@FreeBSD.org> To: "FreeBSD gnats submit" <FreeBSD-gnats-submit@FreeBSD.org> Subject: ports/103156: [UPDATE] games/doomlegacy: improve wrapper script Message-ID: <1158003843.22530@phobos.mars.bsd> Resent-Message-ID: <200609111950.k8BJoMOs019598@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 103156 >Category: ports >Synopsis: [UPDATE] games/doomlegacy: improve wrapper script >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Mon Sep 11 19:50:22 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Alejandro Pulver >Release: FreeBSD 6.1-RELEASE-p1 i386 >Organization: >Environment: System: FreeBSD 6.1-RELEASE-p1 #3: Mon Jun 19 14:49:35 ART 2006 root@phobos.mars.bsd:/usr/obj/usr/src/sys/ATHLON-PHOBOS >Description: - Bump PORTREVISION. - Install wrapper script as PORTNAME (easier to find for users). - Do not use /usr/local, /usr/X11R6, /usr/local/include/SDL11 and -lSDL-1.1 directly. Use variables/command output instead. - Improve wrapper script: only create ~/.legacy once, do not symlink WAD files since it looks in DOOMWADDIR (environment variable). - Remove ONLY_FOR_ARCHS=i386 (builds at least on amd64). >How-To-Repeat: >Fix: --- doomlegacy.diff begins here --- Index: Makefile =================================================================== RCS file: /home/pcvs/ports/games/doomlegacy/Makefile,v retrieving revision 1.10 diff -u -r1.10 Makefile --- Makefile 17 Nov 2005 11:51:50 -0000 1.10 +++ Makefile 11 Sep 2006 19:43:38 -0000 @@ -6,10 +6,9 @@ PORTNAME= doomlegacy PORTVERSION= 142 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= games -MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} -MASTER_SITE_SUBDIR= ${PORTNAME} +MASTER_SITES= SF DISTNAME= legacy_${PORTVERSION}_src DISTFILES= ${DISTNAME}${EXTRACT_SUFX} ${WADFILE} EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} @@ -19,8 +18,6 @@ EXTRACT_DEPENDS=unzip:${PORTSDIR}/archivers/unzip -ONLY_FOR_ARCHS= i386 - USE_GL= yes USE_GMAKE= yes USE_SDL= mixer sdl @@ -40,6 +37,14 @@ 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|${X11BASE}|' \ + ${WRKSRC}/${MAKEFILE} + pre-build: cd ${WRKSRC}/linux_x/sndserv && ${GMAKE} clean @@ -53,7 +58,7 @@ ${INSTALL} -c -s -o root -g kmem -m 2555 ${WRKDIR}/bin/lsdldoom \ ${DATADIR} ${INSTALL_DATA} ${WRKDIR}/bin/legacy.dat ${DATADIR} - ${INSTALL_SCRIPT} ${WRKDIR}/legacy ${PREFIX}/bin + ${INSTALL_SCRIPT} ${WRKDIR}/legacy ${PREFIX}/bin/${PORTNAME} post-install: .ifndef(NOPORTDOCS) @@ -67,7 +72,7 @@ .include <bsd.port.pre.mk> -.if defined(WITH_X86_ASM) +.if defined(WITH_X86_ASM) && ${ARCH} == "i386" BUILD_DEPENDS+= nasm:${PORTSDIR}/devel/nasm MAKE_ARGS+= USEASM=1 .endif Index: pkg-plist =================================================================== RCS file: /home/pcvs/ports/games/doomlegacy/pkg-plist,v retrieving revision 1.5 diff -u -r1.5 pkg-plist --- pkg-plist 17 Nov 2005 11:51:50 -0000 1.5 +++ pkg-plist 11 Sep 2006 19:43:38 -0000 @@ -1,4 +1,4 @@ -bin/legacy +bin/doomlegacy %%DATADIR%%/legacy.dat %%DATADIR%%/llsndserv %%DATADIR%%/lsdldoom Index: files/legacy.in =================================================================== RCS file: /home/pcvs/ports/games/doomlegacy/files/legacy.in,v retrieving revision 1.1 diff -u -r1.1 legacy.in --- files/legacy.in 17 Nov 2005 11:51:51 -0000 1.1 +++ files/legacy.in 11 Sep 2006 19:43:38 -0000 @@ -1,20 +1,20 @@ #!/bin/sh # The executable needs to run from a directory with the Doom Legacy data -# files, libraries and executables, and Doom WAD files. So we mirror the Doom -# Legacy and Doom (WAD files) data directory to ~/.legacy, and create symlinks -# to the data files. +# files, libraries and executables. So we mirror the Doom Legacy data +# directory to ~/.legacy, and create symlinks to the data files. -cd %%DATADIR%% || exit 1 +DOOMWADDIR="%%DMDIR%%"; export DOOMWADDIR -mkdir -p ~/.legacy -find * -type f -exec ln -sf %%DATADIR%%/{} ~/.legacy/{} \; || exit 1 - -cd %%DMDIR%% || exit 1 - -find * -type d -exec mkdir -p ~/.legacy/{} \; || exit 1 -find * -type f -exec ln -sf %%DMDIR%%/{} ~/.legacy/{} \; || exit 1 +if [ -d ~/.legacy ] +then + echo "Using existing ~/.legacy directory." +else + echo "Creating ~/.legacy directory." + cd %%DATADIR%% || exit 1 + find * -type d -exec mkdir -p ~/.legacy/{} \; + find * -type f -exec ln -sf %%DATADIR%%/{} ~/.legacy/{} \; +fi cd ~/.legacy || exit 1 - -exec ./lsdldoom -nocheckwadversion $* +exec ./lsdldoom -nocheckwadversion "$@" --- doomlegacy.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1158003843.22530>