diff options
author | jylefort <jylefort@FreeBSD.org> | 2005-11-27 03:36:26 +0800 |
---|---|---|
committer | jylefort <jylefort@FreeBSD.org> | 2005-11-27 03:36:26 +0800 |
commit | 7dffb06d7cf24c2bac8649efdfa754345e9a522e (patch) | |
tree | cf0564266fb9a358577bdb46dd993624f94f7792 /games | |
parent | 1b7c6b569b9b5a20b758053e120eb308f16cc7e7 (diff) | |
download | freebsd-ports-gnome-7dffb06d7cf24c2bac8649efdfa754345e9a522e.tar.gz freebsd-ports-gnome-7dffb06d7cf24c2bac8649efdfa754345e9a522e.tar.zst freebsd-ports-gnome-7dffb06d7cf24c2bac8649efdfa754345e9a522e.zip |
Add linux-x-plane.
X-Plane is a popular commercial flight simulator. If you do not have an
X-Plane 8 DVD, the program acts as a demo and locks the controls after 6
minutes.
WWW: http://www.x-plane.com/
Diffstat (limited to 'games')
-rw-r--r-- | games/Makefile | 1 | ||||
-rw-r--r-- | games/linux-x-plane/Makefile | 121 | ||||
-rw-r--r-- | games/linux-x-plane/distinfo | 3 | ||||
-rw-r--r-- | games/linux-x-plane/files/x-plane-wrapper.in | 39 | ||||
-rw-r--r-- | games/linux-x-plane/pkg-descr | 5 | ||||
-rw-r--r-- | games/linux-x-plane/pkg-message | 13 |
6 files changed, 182 insertions, 0 deletions
diff --git a/games/Makefile b/games/Makefile index 80dfcba0f91c..f243a40760c2 100644 --- a/games/Makefile +++ b/games/Makefile @@ -344,6 +344,7 @@ SUBDIR += linux-ut2004-demo SUBDIR += linux-virtual-jay-peak SUBDIR += linux-warsow + SUBDIR += linux-x-plane SUBDIR += liquidwar SUBDIR += lm-solve SUBDIR += lmarbles diff --git a/games/linux-x-plane/Makefile b/games/linux-x-plane/Makefile new file mode 100644 index 000000000000..a9829d45389d --- /dev/null +++ b/games/linux-x-plane/Makefile @@ -0,0 +1,121 @@ +# New ports collection makefile for: linux-x-plane +# Date created: 25 Nov 2005 +# Whom: Jean-Yves Lefort <jylefort@FreeBSD.org> +# +# $FreeBSD$ +# + +PORTNAME= linux-x-plane +PORTVERSION= 8.16 +CATEGORIES= games linux +MASTER_SITES= http://66.111.223.52/ \ + ftp://ftp.x-plane.com/Web_Links/ +DISTNAME= XLIN${XPVERSION}b + +MAINTAINER= jylefort@FreeBSD.org +COMMENT= A commercial flight simulator + +RUN_DEPENDS= ${LINUXBASE}/lib/libgcc/libgcc_s.so.1:${PORTSDIR}/lang/linux-libgcc \ + ${LINUXBASE}/usr/lib/libopenal.so.0:${PORTSDIR}/audio/linux-openal \ + ${LINUXBASE}/usr/X11R6/lib/libGLU.so.1.3:${PORTSDIR}/graphics/linux_dri + +WRKSRC= ${WRKDIR}/X-System-${XPVERSION}-lin1 +USE_X_PREFIX= yes +USE_BZIP2= yes +USE_LINUX= yes +NO_BUILD= yes +RESTRICTED= "Redistribution prohibited" +ONLY_FOR_ARCHS= i386 + +XPVERSION= ${PORTVERSION:S|.||g} + +XDIR= ${PREFIX}/lib/x-plane +XDIR_REL= ${XDIR:S,^${PREFIX}/,,} + +PROGRAMS= Airfoil-Maker Briefer Plane-Maker World-Maker X-Plane + +PLIST= ${WRKDIR}/pkg-plist +PLIST_FILES= ${PROGRAMS:S|^|bin/|} libexec/x-plane-wrapper +PLIST_DIRS= ${XDIR_REL} + +SUB_FILES= x-plane-wrapper +SUB_LIST= XDIR="${XDIR}" PORTVERSION="${PORTVERSION}" XPVERSION="${XPVERSION}" + +DESKTOP_ENTRIES="X-Plane Airfoil Maker" \ + "Edit X-Plane airfoils" \ + "" \ + "Airfoil-Maker" \ + "Application;Game;" \ + false \ + \ + "X-Plane Briefer" \ + "Obtain a weather briefing for your flight" \ + "" \ + "Briefer" \ + "Application;Game;" \ + false \ + \ + "X-Plane Plane Maker" \ + "Edit X-Plane planes" \ + "" \ + "Plane-Maker" \ + "Application;Game;" \ + false \ + \ + "X-Plane World Maker" \ + "Edit X-Plane scenery" \ + "" \ + "World-Maker" \ + "Application;Game;" \ + \ + false \ + "X-Plane" \ + "Fly with X-Plane" \ + "" \ + "X-Plane" \ + "Application;Game;" \ + false + +.include <bsd.port.pre.mk> + +.if ${X_WINDOW_SYSTEM:L} != xfree86-3 +.if defined(WITH_NVIDIA_GL) +RUN_DEPENDS+= ${LINUXBASE}/usr/lib/libGL.so.1:${PORTSDIR}/x11/nvidia-driver +.else +RUN_DEPENDS+= ${LINUXBASE}/usr/X11R6/lib/libGL.so.1:${PORTSDIR}/graphics/linux_dri +.endif +.else +RUN_DEPENDS+= ${LINUXBASE}/lib/libGL.so.1:${PORTSDIR}/graphics/linux_glx +.endif + +post-patch: + @${FIND} ${WRKSRC} -type d -empty -exec ${TOUCH} "{}/.keep_me" \; + @${MKDIR} ${WRKSRC}/.programs/Resources + @${MV} -f ${WRKSRC}/Resources/plugins ${WRKSRC}/.programs/Resources +.for p in ${PROGRAMS} + @${MV} -f ${WRKSRC}/${p}-* ${WRKSRC}/.programs +.endfor + +pre-install: + @${RM} -f ${PLIST} + @${RM} -f ${PLIST}.dirs +.for d in "" .programs + @cd ${WRKSRC}/${d} && \ + ${FIND} * -type f | ${SORT} | ${SED} -e 's|^|${XDIR_REL}/|' >> ${PLIST} && \ + ${FIND} * -type d >> ${PLIST}.dirs +.endfor + @${SORT} -ru ${PLIST}.dirs | ${SED} -e 's|^|@dirrm ${XDIR_REL}/|' >> ${PLIST} + +do-install: + ${INSTALL_SCRIPT} ${WRKDIR}/x-plane-wrapper ${PREFIX}/libexec +.for p in ${PROGRAMS} + ${LN} -sf ${PREFIX}/libexec/x-plane-wrapper ${PREFIX}/bin/${p} +.endfor +.for d in "" .programs + cd ${WRKSRC}/${d} && ${FIND} * -type d -exec ${MKDIR} "${XDIR}/{}" \; +.endfor + cd ${WRKSRC} && ${FIND} * -type f -exec ${INSTALL_DATA} "{}" "${XDIR}/{}" \; + cd ${WRKSRC}/.programs && ${FIND} * -type f -exec ${INSTALL_PROGRAM} "{}" "${XDIR}/{}" \; + @${CAT} ${PKGMESSAGE} + +.include <bsd.port.post.mk> diff --git a/games/linux-x-plane/distinfo b/games/linux-x-plane/distinfo new file mode 100644 index 000000000000..3b4e6fd33c92 --- /dev/null +++ b/games/linux-x-plane/distinfo @@ -0,0 +1,3 @@ +MD5 (XLIN816b.tar.bz2) = 7c0640cecc45ddfae06bb3a6a3f2cbc4 +SHA256 (XLIN816b.tar.bz2) = 3ac778024a1a91ffd040bad0595697416cc58cb547a0db08e0ec14e20bb24f98 +SIZE (XLIN816b.tar.bz2) = 371099632 diff --git a/games/linux-x-plane/files/x-plane-wrapper.in b/games/linux-x-plane/files/x-plane-wrapper.in new file mode 100644 index 000000000000..d357045f5dd6 --- /dev/null +++ b/games/linux-x-plane/files/x-plane-wrapper.in @@ -0,0 +1,39 @@ +#!/bin/sh + +xdir="%%XDIR%%" +userdir="$HOME/.x-plane" +portversion="%%PORTVERSION%%" +xpversion="%%XPVERSION%%" + +# The executables need to be run from the data directory, and need to +# write files in it. We therefore mirror the data directory hierarchy +# in $userdir, and create symlinks to the data files. + +if [ "x`cat $userdir/version 2>/dev/null`" != "x$portversion" ]; then + echo "Updating hierarchy in $userdir" + cd $xdir || exit 1 + find * -type d -exec mkdir -p "$userdir/{}" \; || exit 1 + find * -type f ! -name '*.prf' -exec ln -sf "$xdir/{}" "$userdir/{}" \; || exit 1 + cd $xdir/Resources/Preferences || exit 1 + for f in *; do + if ! [ -e "$userdir/Resources/Preferences/$f" ]; then + install -m 644 "$f" $userdir/Resources/Preferences || exit 1 + fi + done + echo "$portversion" > $userdir/version || exit 1 +fi + +if ! [ -e $userdir/cpu ]; then + echo "i586" > $userdir/cpu || exit 1 +fi + +cpu=`cat $userdir/cpu 2>/dev/null` +if [ "x$cpu" != "xathlon-xp" ] && [ "x$cpu" != "xi586" ] && [ "x$cpu" != "xpentium-3" ]; then + echo "Unknown CPU \"$cpu\" in $userdir/cpu, defaulting to i586" + cpu=i586 +fi + +program=`basename $0` + +cd $userdir || exit 1 +exec ./$program-$xpversion-lin1-$cpu "$@" diff --git a/games/linux-x-plane/pkg-descr b/games/linux-x-plane/pkg-descr new file mode 100644 index 000000000000..3356beb54115 --- /dev/null +++ b/games/linux-x-plane/pkg-descr @@ -0,0 +1,5 @@ +X-Plane is a popular commercial flight simulator. If you do not have an +X-Plane 8 DVD, the program acts as a demo and locks the controls after 6 +minutes. + +WWW: http://www.x-plane.com/ diff --git a/games/linux-x-plane/pkg-message b/games/linux-x-plane/pkg-message new file mode 100644 index 000000000000..f6c2eb66ceba --- /dev/null +++ b/games/linux-x-plane/pkg-message @@ -0,0 +1,13 @@ +=============================================================================== +X-Plane binaries compiled for the following processors are available: + + athlon-xp + i586 + pentium-3 + +By default, the wrapper script uses the i586 binaries. To select another +target, set it in ~/.x-plane/cpu, for instance: + + $ mkdir ~/.x-plane + $ echo athlon-xp > ~/.x-plane/cpu +=============================================================================== |