aboutsummaryrefslogtreecommitdiff
path: root/games/torcs/Makefile
diff options
context:
space:
mode:
authorEric Anholt <anholt@FreeBSD.org>2003-05-05 22:31:28 +0000
committerEric Anholt <anholt@FreeBSD.org>2003-05-05 22:31:28 +0000
commit206eb1fef79ba596b1e097faf415a3ff24435572 (patch)
treefd86705743af1d2bd0946a2ab38f25e168296a0d /games/torcs/Makefile
parenta8a511ee7a87e9d4c48b9c588e3405f437a7c016 (diff)
downloadports-206eb1fef79ba596b1e097faf415a3ff24435572.tar.gz
ports-206eb1fef79ba596b1e097faf415a3ff24435572.zip
Notes
Diffstat (limited to 'games/torcs/Makefile')
-rw-r--r--games/torcs/Makefile119
1 files changed, 119 insertions, 0 deletions
diff --git a/games/torcs/Makefile b/games/torcs/Makefile
new file mode 100644
index 000000000000..d2396f7f2cba
--- /dev/null
+++ b/games/torcs/Makefile
@@ -0,0 +1,119 @@
+# New ports collection makefile for: torcs
+# Date created: Fri 25 avr 2003
+# Whom: thierry@pompo.net
+#
+# $FreeBSD$
+#
+
+PORTNAME= torcs
+PORTVERSION= 1.2.1
+CATEGORIES= games
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
+MASTER_SITE_SUBDIR= ${PORTNAME}
+DISTNAME= ${TARBALL}-src
+EXTRACT_SUFX= .tgz
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
+ ${EXTRADIST}
+EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} \
+ ${DISTNAME}-robots-base${EXTRACT_SUFX}
+
+MAINTAINER= ports@FreeBSD.org
+COMMENT= The Open Racing Car Simulator
+
+BUILD_DEPENDS= ${X11BASE}/lib/libplibsl.a:${PORTSDIR}/x11-toolkits/plib
+# doxygen would be required to build the doc (TODO?)
+LIB_DEPENDS= png.5:${PORTSDIR}/graphics/png
+.if !defined(WITHOUT_FREEGLUT)
+LIB_DEPENDS+= freeglut-1.3.0:${PORTSDIR}/x11-toolkits/freeglut
+.else
+USE_MESA= yes
+.endif
+RUN_DEPENDS= bash:${PORTSDIR}/shells/bash2
+
+GNU_CONFIGURE= yes
+INSTALLS_SHLIB= yes
+USE_GMAKE= yes
+USE_REINPLACE= yes
+REINPLACE_ARGS= -i ""
+CONFIGURE_ARGS= --x-includes=${X11BASE}/include --x-libraries=${X11BASE}/lib
+CONFIGURE_ENV= CPPFLAGS="-I${X11BASE}/include -I${LOCALBASE}/include ${CFLAGSD}" \
+ LDFLAGS="-L${LOCALBASE}/lib"
+ALL_TARGET= default
+
+WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
+TARBALL= ${PORTNAME:U}-${PORTVERSION}
+DATANAME= ${TARBALL}-data
+EXTRADIST= ${DATANAME}${EXTRACT_SUFX} \
+ ${DISTNAME}-robots-base${EXTRACT_SUFX} \
+ ${DATANAME}-tracks-base${EXTRACT_SUFX} \
+ ${DATANAME}-cars-extra${EXTRACT_SUFX} \
+ ${DATANAME}-cars-Patwo-Design${EXTRACT_SUFX}
+INSTDIR= ${PREFIX}/share/games/${PORTNAME}
+
+.if !defined(WITHOUT_BERNIW)
+DISTFILES+= ${DISTNAME}-robots-berniw${EXTRACT_SUFX}
+EXTRACT_ONLY+= ${DISTNAME}-robots-berniw${EXTRACT_SUFX}
+PLIST_SUB= BERNIW=""
+.else
+PLIST_SUB= BERNIW="@comment "
+.endif
+
+.if !defined(WITHOUT_K1999)
+DISTFILES+= ${DISTNAME}-robots-K1999${EXTRACT_SUFX}
+EXTRACT_ONLY+= ${DISTNAME}-robots-K1999${EXTRACT_SUFX}
+PLIST_SUB+= K1999=""
+.else
+PLIST_SUB+= K1999="@comment "
+.endif
+
+.if !defined(WITHOUT_FREEGLUT)
+CFLAGSD= -DFREEGLUT
+CONFIGURE_ENV+= USE_FREEGLUT=yes
+.endif
+
+2BCLEANED= Make-config src/libs/txml/gennmtab/gennmtab.o
+BASH2FIX= src/modules/telemetry/telemetry.sh src/tools/launcher/torcs.in \
+ Make-default.mk robotgen \
+
+pre-everything::
+ @${ECHO_MSG} ""
+ @${ECHO_MSG} " You might define these options:"
+ @${ECHO_MSG} ""
+ @${ECHO_MSG} " - WITHOUT_FREEGLUT: do not link against freeglut;"
+ @${ECHO_MSG} ""
+ @${ECHO_MSG} " - WITHOUT_BERNIW and WITHOUT_K1999: do not install optional"
+ @${ECHO_MSG} " robots."
+ @${ECHO_MSG} ""
+
+post-extract:
+.for SLAG in ${2BCLEANED}
+ @${RM} ${WRKSRC}/${SLAG}
+.endfor
+
+post-patch:
+.for file in ${BASH2FIX}
+ @${REINPLACE_CMD} -e "s|/bin/bash|${LOCALBASE}/bin/bash|g" \
+ ${WRKSRC}/${file}
+.endfor
+
+pre-install:
+ @${MKDIR} ${PREFIX}/share/games
+
+post-install:
+.for file in ${EXTRADIST}
+ @ cd ${INSTDIR} && \
+ ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${DISTDIR}/${file} \
+ ${EXTRACT_AFTER_ARGS}
+.endfor
+ @${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${INSTDIR}
+ @${CHMOD} -R go-w ${INSTDIR}
+ @${CHMOD} +x ${INSTDIR}/setup_linux.sh
+ @${ECHO_MSG} ""
+ @${ECHO_MSG} "*****************************************************************************"
+ @${ECHO_MSG} ""
+ @${ECHO_MSG} " TORCS has been installed as ${PREFIX}/bin/torcs."
+ @${ECHO_MSG} ""
+ @${ECHO_MSG} "*****************************************************************************"
+ @${ECHO_MSG} ""
+
+.include <bsd.port.mk>