summaryrefslogtreecommitdiff
path: root/games/glest
diff options
context:
space:
mode:
authorJose Alonso Cardenas Marquez <acm@FreeBSD.org>2007-09-06 01:29:03 +0000
committerJose Alonso Cardenas Marquez <acm@FreeBSD.org>2007-09-06 01:29:03 +0000
commit565266d4808723401340b255d9b1d637833c9f14 (patch)
tree9e18e42d82838215284d973c8dec678a82948034 /games/glest
parent* Forgot to remove extra dir [1]. (diff)
- Update to 2.0.1
- Add glest/files/pkg-message file - Modify glest-wrapper file. Now it works with home directory and place the configuration files there. - Remove glest-data/pkg-plist file
Notes
Notes: svn path=/head/; revision=198885
Diffstat (limited to 'games/glest')
-rw-r--r--games/glest/Makefile36
-rw-r--r--games/glest/distinfo6
-rw-r--r--games/glest/files/glest-wrapper.in24
-rw-r--r--games/glest/files/pkg-message.in10
-rw-r--r--games/glest/pkg-plist6
5 files changed, 52 insertions, 30 deletions
diff --git a/games/glest/Makefile b/games/glest/Makefile
index 84f186273f51..e46db8d9b686 100644
--- a/games/glest/Makefile
+++ b/games/glest/Makefile
@@ -6,8 +6,7 @@
#
PORTNAME= glest
-PORTVERSION= 2.0.0
-PORTREVISION= 6
+PORTVERSION= 2.0.1
CATEGORIES= games
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
@@ -22,11 +21,12 @@ LIB_DEPENDS= xerces-c.27:${PORTSDIR}/textproc/xerces-c2 \
openal.0:${PORTSDIR}/audio/openal \
alut.1:${PORTSDIR}/audio/freealut
BUILD_DEPENDS= jam:${PORTSDIR}/devel/jam
-RUN_DEPENDS= ${LOCALBASE}/lib/${PORTNAME}/configuration.xml:${PORTSDIR}/games/glest-data
+RUN_DEPENDS= ${DATADIR}/configuration.xml:${PORTSDIR}/games/glest-data
USE_XLIB= yes
USE_AUTOTOOLS= automake:15:env autoconf:259:env
USE_ZIP= yes
+USE_DOS2UNIX= yes
USE_GCC= 3.2+
USE_SDL= yes
USE_GL= yes
@@ -35,21 +35,15 @@ CONFIGURE_SCRIPT= mk/linux/configure
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include ${PTHREAD_CFLAGS}" \
LIBS="-L${LOCALBASE}/lib ${PTHREAD_LIBS}"
+EXTRACT_AFTER_ARGS= -d ${WRKSRC}
+SUB_FILES= glest-wrapper pkg-message
-GLESTDIRE= lib/${PORTNAME}
-
-PLIST_SUB= GLESTDIRE=${GLESTDIRE}
-SUB_FILES= glest-wrapper
+JAM_CMD= ${LOCALBASE}/bin/jam -qa
.include <bsd.port.pre.mk>
-.if ${OSVERSION} < 500000
-IGNORE= does not build on 4.x
-.endif
-
-post-extract:
- @${FIND} -E ${WRKDIR} -type f -iregex ".*\.(c|cpp|h|txt|sh|ac|sub|ini|m4|jam|guess|rpath)" \
- -print0 | ${XARGS} -0 ${REINPLACE_CMD} -e 's/[[:cntrl:]]*$$//'
+pre-extract:
+ @${MKDIR} ${WRKSRC}
post-patch:
@${REINPLACE_CMD} -e "s|%%ACLOCAL%%|${ACLOCAL}|g" -e "s|%%AUTOCONF%%|${AUTOCONF}|g" \
@@ -64,21 +58,19 @@ pre-configure:
@cd ${WRKSRC}/mk/linux && ${SH} autogen.sh
do-build:
- @cd ${WRKSRC} && jam -q
+ @cd ${WRKSRC} && ${JAM_CMD}
do-install:
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/docs/license.txt ${DOCSDIR}/license-game.txt
.endif
- ${MKDIR} ${PREFIX}/${GLESTDIRE}
- ${INSTALL_PROGRAM} ${WRKSRC}/glest ${PREFIX}/${GLESTDIRE}
- ${INSTALL_DATA} ${WRKSRC}/mk/linux/glest.ini ${PREFIX}/${GLESTDIRE}
- ${INSTALL_SCRIPT} ${WRKDIR}/glest-wrapper ${PREFIX}/bin/glest
+ @${MKDIR} ${DATADIR}
+ ${INSTALL_PROGRAM} ${WRKSRC}/glest ${DATADIR}
+ ${INSTALL_DATA} ${WRKSRC}/mk/linux/glest.ini ${DATADIR}
+ ${INSTALL_SCRIPT} ${WRKDIR}/glest-wrapper ${PREFIX}/bin/${PORTNAME}
post-install:
- @${ECHO_MSG}
- @${ECHO_MSG} "* Configuration file ${PREFIX}/${GLESTDIRE}/glest.ini"
- @${ECHO_MSG}
+ @${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>
diff --git a/games/glest/distinfo b/games/glest/distinfo
index d5e636b503db..8668195e3eb8 100644
--- a/games/glest/distinfo
+++ b/games/glest/distinfo
@@ -1,3 +1,3 @@
-MD5 (glest/glest_source_2.0.0.zip) = f7716da7a044dbe108c619b0f52621bb
-SHA256 (glest/glest_source_2.0.0.zip) = 4dea296c6b3ee0757551eb1a71f00674f5cf2df6095dec6922afb39b42df30d8
-SIZE (glest/glest_source_2.0.0.zip) = 503892
+MD5 (glest/glest_source_2.0.1.zip) = 2d35a5d08331957f63240cadc9766b75
+SHA256 (glest/glest_source_2.0.1.zip) = f476665f374537def35ebd7737b7fa8940ef9f014cfabd5fbbd50a4c647b42b2
+SIZE (glest/glest_source_2.0.1.zip) = 510653
diff --git a/games/glest/files/glest-wrapper.in b/games/glest/files/glest-wrapper.in
index aba5d39bc502..964fcb7a808d 100644
--- a/games/glest/files/glest-wrapper.in
+++ b/games/glest/files/glest-wrapper.in
@@ -1,4 +1,24 @@
#!/bin/sh
-cd %%PREFIX%%/lib/glest || exit 1
-exec ./glest "$@"
+# The executable needs to be run from its data directory, and needs to store
+# configuration in it. We therefore mirror the data directory hierarchy in
+# ~/.glest, and create symlinks to the data files.
+
+if [ -d ~/.glest ]
+then
+ echo "Using existing ~/.glest directory."
+else
+ echo "Creating ~/.glest directory."
+ cd %%DATADIR%% || exit 1
+ find * -type d -exec mkdir -p ~/.glest/{} \;
+ find * -type f -exec ln -s %%DATADIR%%/{} ~/.glest/{} \; 2>/dev/null
+ mkdir -p ~/.glest/screens
+ mkdir -p ~/.glest/shaders/standard
+ touch ~/.glest/glest.log
+ rm ~/.glest/glest.ini ~/.glest/configuration.xml ~/.glest/glest
+ cp -f %%DATADIR%%/configuration.xml ~/.glest/
+ cp -f %%DATADIR%%/glest.ini ~/.glest/
+fi
+
+cd ~/.glest || exit 1
+exec %%DATADIR%%/glest "$@"
diff --git a/games/glest/files/pkg-message.in b/games/glest/files/pkg-message.in
new file mode 100644
index 000000000000..6cda4f748b37
--- /dev/null
+++ b/games/glest/files/pkg-message.in
@@ -0,0 +1,10 @@
+###############################################################################
+
+The glest game was installed
+
+1) You can see the glest configuration files into your ~/.glest directory
+2) If you have problems to run glest, please you should remove your ~/glest
+ directory and try again
+3) Enjoy it ;)
+
+###############################################################################
diff --git a/games/glest/pkg-plist b/games/glest/pkg-plist
index 9ec952574491..ffd80e1c97cd 100644
--- a/games/glest/pkg-plist
+++ b/games/glest/pkg-plist
@@ -1,6 +1,6 @@
bin/glest
-%%GLESTDIRE%%/glest
-%%GLESTDIRE%%/glest.ini
+%%DATADIR%%/glest
+%%DATADIR%%/glest.ini
%%PORTDOCS%%%%DOCSDIR%%/license-game.txt
%%PORTDOCS%%@dirrmtry %%DOCSDIR%%
-@dirrmtry %%GLESTDIRE%%
+@dirrmtry %%DATADIR%%