1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-26 05:02:18 +00:00

- Bump PORTREVISION.

- Install wrapper script as PORTNAME (easier to find for users).
- Rename directory from ~/.legacy to ~/.doomlegacy.
- 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 ~/.doomlegacy once, do not symlink WAD
  files since it looks in DOOMWADDIR (environment variable).
- Remove ONLY_FOR_ARCHS=i386 (builds at least on amd64).

PR:		ports/103156
Approved by:	maintainer (timeout)
This commit is contained in:
Alejandro Pulver 2006-09-18 19:58:07 +00:00
parent 64eb82663b
commit 839718038b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=173358
3 changed files with 27 additions and 22 deletions

View File

@ -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 @@ COMMENT= DooM Legacy: popular DooM clone!
EXTRACT_DEPENDS=unzip:${PORTSDIR}/archivers/unzip
ONLY_FOR_ARCHS= i386
USE_GL= yes
USE_GMAKE= yes
USE_SDL= mixer sdl
@ -40,6 +37,14 @@ DATADIR= ${PREFIX}/lib/${PORTNAME}
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 @@ do-install:
${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 @@ post-install:
.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

View File

@ -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 ~/.doomlegacy, and create symlinks to the data files.
DOOMWADDIR="%%DMDIR%%"; export DOOMWADDIR
if [ -d ~/.doomlegacy ]
then
echo "Using existing ~/.doomlegacy directory."
else
echo "Creating ~/.doomlegacy directory."
cd %%DATADIR%% || exit 1
find * -type d -exec mkdir -p ~/.doomlegacy/{} \;
find * -type f -exec ln -sf %%DATADIR%%/{} ~/.doomlegacy/{} \;
fi
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
cd ~/.legacy || exit 1
exec ./lsdldoom -nocheckwadversion $*
cd ~/.doomlegacy || exit 1
exec ./lsdldoom -nocheckwadversion "$@"

View File

@ -1,4 +1,4 @@
bin/legacy
bin/doomlegacy
%%DATADIR%%/legacy.dat
%%DATADIR%%/llsndserv
%%DATADIR%%/lsdldoom