freebsd-ports/games/linux-ssamtfe/Makefile

120 lines
3.8 KiB
Makefile
Raw Normal View History

2013-02-20 21:15:40 +01:00
# Created by: Alexander Logvinov <ports@logvinov.com>
# $FreeBSD$
PORTNAME= ssamtfe
PORTVERSION= 1.05b3
PORTREVISION= 1
CATEGORIES= games linux
MASTER_SITES= http://home.coc-ag.de/dressler-ro/liflg/files/final/ \
http://bsd-geek.de/FreeBSD/distfiles/
PKGNAMEPREFIX= linux-
DISTFILES= ${PORTNAME:S|ssam|serious.sam.|}_${PORTVERSION:S|b|beta|}-english-2.run
MAINTAINER= ports@FreeBSD.org
COMMENT= Serious Sam: The First Encounter
2013-02-20 21:15:40 +01:00
OPTIONS_DEFINE= VORBIS DOCS
OPTIONS_DEFAULT= VORBIS
- Replace Mk/bsd.linux-apps.mk and Mk/bsd.linux-rpm.mk with Mk/Uses/linux.mk. - Replace USE_LINUX=yes with USES+=linux and USE_LINUX=(.*) with USES+=linux:\1 in all ports. - Replace USE_LINUX_APPS with USE_LINUX in all ports. - Use INSTALL_SCRIPT instead of INSTALL_PROGRAM to install scripts in some ports. - When USE_LINUX_RPM is defined, simplify the way DISTFILES and EXTRACT_ONLY are defined. - Remove BRANDELF_DIRS and BRANDELF_FILES handling. In the very rare cases that it is still necessary ports can run ${BRANDELF} from post-patch. - Remove AUTOMATIC_PLIST handling. Only one port used it. - Fix Linux MASTER_SITES. - Replace OVERRIDE_LINUX_BASE_PORT and OVERRIDE_LINUX_NONBASE_PORTS with default versions framework. - bsd.port.mk: - Move Linux related bits to Uses/linux.mk, except USE_LINUX_PREFIX. - Put USE_LINUX_PREFIX handling after USES processing. - Define DOCSDIR, DATADIR, etc. after handling USE_LINUX_PREFIX so it can give these variables a different default value. - When a package needs to run Linux ldconfig check before installation if Linux support is enabled. - emulators/linux_base-*: - Use USES=linux and remove duplication. - Remove files/lp. FreeBSD or CUPS lp(1) should work. - Remove files/yp.conf. No longer seems to be used. - Remove pkg-deinstall and move pkg-install into pkg-plist. - Update pkg-descr and pkg-message. - Fix handling of ldconfig cache in pkg-plist. - devel/fb-adb: Use a Linux shell to run a Linux script but patch the script to use FreeBSD mkdir so mkdir -p $path creates $path and not /compat/linux/$path. PR: 211645 Exp-run by: antoine Approved by: portmgr (antoine)
2016-09-05 21:23:42 +02:00
USES= linux
USE_LINUX= xorglibs
NO_BUILD= yes
RESTRICTED= Redistribution is limited, see license
PORTDOCS= README.liflg ShellSymbols.txt changes.txt notes.txt
SUB_FILES= pkg-message
2014-03-08 15:35:25 +01:00
.if !defined(CDROM_MOUNT)
IGNORE= ${PKGNAME} requires CDROM_MOUNT set to mount point of CD
.endif
2013-02-20 21:15:40 +01:00
.include <bsd.port.options.mk>
2013-02-20 21:15:40 +01:00
.if ${PORT_OPTIONS:MVORBIS}
- Replace Mk/bsd.linux-apps.mk and Mk/bsd.linux-rpm.mk with Mk/Uses/linux.mk. - Replace USE_LINUX=yes with USES+=linux and USE_LINUX=(.*) with USES+=linux:\1 in all ports. - Replace USE_LINUX_APPS with USE_LINUX in all ports. - Use INSTALL_SCRIPT instead of INSTALL_PROGRAM to install scripts in some ports. - When USE_LINUX_RPM is defined, simplify the way DISTFILES and EXTRACT_ONLY are defined. - Remove BRANDELF_DIRS and BRANDELF_FILES handling. In the very rare cases that it is still necessary ports can run ${BRANDELF} from post-patch. - Remove AUTOMATIC_PLIST handling. Only one port used it. - Fix Linux MASTER_SITES. - Replace OVERRIDE_LINUX_BASE_PORT and OVERRIDE_LINUX_NONBASE_PORTS with default versions framework. - bsd.port.mk: - Move Linux related bits to Uses/linux.mk, except USE_LINUX_PREFIX. - Put USE_LINUX_PREFIX handling after USES processing. - Define DOCSDIR, DATADIR, etc. after handling USE_LINUX_PREFIX so it can give these variables a different default value. - When a package needs to run Linux ldconfig check before installation if Linux support is enabled. - emulators/linux_base-*: - Use USES=linux and remove duplication. - Remove files/lp. FreeBSD or CUPS lp(1) should work. - Remove files/yp.conf. No longer seems to be used. - Remove pkg-deinstall and move pkg-install into pkg-plist. - Update pkg-descr and pkg-message. - Fix handling of ldconfig cache in pkg-plist. - devel/fb-adb: Use a Linux shell to run a Linux script but patch the script to use FreeBSD mkdir so mkdir -p $path creates $path and not /compat/linux/$path. PR: 211645 Exp-run by: antoine Approved by: portmgr (antoine)
2016-09-05 21:23:42 +02:00
USE_LINUX+= libvorbis
PLIST_SUB+= VORBIS=""
.else
PLIST_SUB+= VORBIS="@comment "
.endif
# Gold Edition
.if exists(${CDROM_MOUNT}/Install/1_00c.gro)
GOLD= yes
GRO_FILES= ExtraTools music
PLIST_SUB+= GOLD="" NORMAL="@comment "
.else
GRO_FILES= ExtraTools a music scripts
PLIST_SUB+= GOLD="@comment " NORMAL=""
.endif
do-extract:
@${MKDIR} ${WRKSRC}/Data
@cd ${WRKSRC} && ${SED} -e '1,/exit $$res/d' ${_DISTDIR}/${DISTFILES} |\
${GUNZIP_CMD} -q | ${TAR} xf -
.for file in SeriousSamPatch105_USA_linux bins
@${TAR} jx -C ${WRKSRC}/Data -f ${WRKSRC}/${file}.tar.bz2
.endfor
post-patch:
@${REINPLACE_CMD} -e "s|^\(GAMEDIR=\).*|\1\"${DATADIR}\"|" \
-e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/bin/${PORTNAME}
do-install:
.if !exists(${CDROM_MOUNT}/Install/Mods/SeriousSamTbn.tex)
@${ECHO_CMD} "${PKGNAME} requires a retail First Encounter disc"
@${FALSE}
.endif
@${MKDIR} ${STAGEDIR}${DATADIR}
.for gro in ${GRO_FILES}
${INSTALL_DATA} "${CDROM_MOUNT}/Install/1_00_${gro}.gro" ${STAGEDIR}${DATADIR}/1_00_${gro}.gro
.endfor
.if defined(GOLD)
.for gro in "" _scripts
${INSTALL_DATA} "${CDROM_MOUNT}/Install/1_00c${gro}.gro" ${STAGEDIR}${DATADIR}/1_00c${gro}.gro
.endfor
.endif
.for gro in 1_00_ExtraTools 1_04_patch
${INSTALL_DATA} ${WRKSRC}/Data/${gro}.gro ${STAGEDIR}${DATADIR}/${gro}.gro
.endfor
.for dir in Controls Data Levels Demos Mods Scripts VirtualTrees
@cd ${CDROM_MOUNT}/Install && \
${FIND} ${dir} -type d -exec \
${MKDIR} "${STAGEDIR}${DATADIR}/{}" \; && \
${FIND} ${dir} -type f -exec \
${INSTALL_DATA} "${CDROM_MOUNT}/Install/{}" "${STAGEDIR}${DATADIR}/{}" \;
.endfor
.for dir in Controls Data Help Players SaveGame Scripts Temp
@cd ${WRKSRC}/Data && \
${FIND} ${dir} -type d -exec \
${MKDIR} "${STAGEDIR}${DATADIR}/{}" \; && \
${FIND} ${dir} -type f -exec \
${INSTALL_DATA} "${WRKSRC}/Data/{}" "${STAGEDIR}${DATADIR}/{}" \;
.endfor
@${MKDIR} ${STAGEDIR}${DATADIR}/Bin
@cd ${WRKSRC}/Data && \
${FIND} Bin -type f -exec \
${INSTALL_PROGRAM} "${WRKSRC}/Data/{}" "${STAGEDIR}${DATADIR}/{}" \;
${BRANDELF} -t Linux ${STAGEDIR}${DATADIR}/Bin/ssam_*
${INSTALL_PROGRAM} ${WRKSRC}/bin/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
2013-02-20 21:15:40 +01:00
.if ${PORT_OPTIONS:MVORBIS}
${LN} -fs ${LINUXBASE}/usr/lib/libvorbisfile.so.3 ${STAGEDIR}${DATADIR}/Bin/libvorbisfile.so
.endif
# This looks like an attempt of duplicating what USES=dos2unix does,
# but I don't have the CDROM to test.
@${FIND} -E ${STAGEDIR}${DATADIR} -type f \
-iregex ".*\.(ctl|txt|lst|ini|cfg|des|reg)" \
-exec ${SH} -c "${SED} "s/`printf '\r'`//" '{}' \
>${WRKDIR}/tmp.txt; ${MV} ${WRKDIR}/tmp.txt '{}'" \;
@${ECHO} SERIOUS_MHZ=2000 > ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf.sample
.if !exists(${PREFIX}/etc/${PORTNAME}.conf)
${INSTALL_DATA} ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf.sample ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf
.endif
2013-02-20 21:15:40 +01:00
.if ${PORT_OPTIONS:MDOCS}
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} -p ${WRKSRC}/README.liflg ${STAGEDIR}${DOCSDIR}
.for i in ${PORTDOCS:NREADME.liflg}
${LN} -sf ${DATADIR}/Help/${i} ${STAGEDIR}${DOCSDIR}/${i}
.endfor
.endif
2013-02-20 21:15:40 +01:00
.include <bsd.port.mk>