aboutsummaryrefslogtreecommitdiff
path: root/games/glest
diff options
context:
space:
mode:
authorWilliam Grzybowski <wg@FreeBSD.org>2014-08-11 13:34:39 +0000
committerWilliam Grzybowski <wg@FreeBSD.org>2014-08-11 13:34:39 +0000
commit45091479d9ecf94836cf48e1a57e73cd4334c656 (patch)
tree9fe0d0e839a8265757791524992bc9d5e2e1e053 /games/glest
parent673e3faa80afa6d71dd4fde336966698e16616de (diff)
downloadports-45091479d9ecf94836cf48e1a57e73cd4334c656.tar.gz
ports-45091479d9ecf94836cf48e1a57e73cd4334c656.zip
Notes
Diffstat (limited to 'games/glest')
-rw-r--r--games/glest/Makefile31
-rw-r--r--games/glest/files/patch-source-shared_lib-include-graphics-math_util.h19
-rw-r--r--games/glest/pkg-plist2
3 files changed, 30 insertions, 22 deletions
diff --git a/games/glest/Makefile b/games/glest/Makefile
index 2f44a739c423..9d6ae180b229 100644
--- a/games/glest/Makefile
+++ b/games/glest/Makefile
@@ -29,23 +29,19 @@ SUB_FILES= glest-wrapper pkg-message
JAM_CMD= ${LOCALBASE}/bin/jam -qa
-OPTIONS_DEFINE= EDITOR
+OPTIONS_DEFINE= DOCS EDITOR
+OPTIONS_SUB= yes
EDITOR_DESC= Build map editor
EXTRACT_AFTER_ARGS= -d ${WRKDIR}/${DISTNAME}
-NO_STAGE= yes
.include <bsd.port.options.mk>
-.include <bsd.port.pre.mk>
.if ${PORT_OPTIONS:MEDITOR}
USE_WX= 2.6+
WX_CONF_ARGS= relative
WANT_UNICODE= yes
-PLIST_SUB+= EDITOR=""
HAVE_EDITOR= true
-.else
-PLIST_SUB+= EDITOR="@comment "
.endif
pre-extract:
@@ -70,20 +66,15 @@ do-build:
@cd ${WRKSRC} && ${JAM_CMD}
do-install:
-.if ${PORT_OPTIONS:MDOCS}
- @${MKDIR} ${DOCSDIR}
- ${INSTALL_DATA} ${WRKSRC}/docs/code_license.txt ${DOCSDIR}/code_license.txt
-.endif
- @${MKDIR} ${DATADIR}
- ${INSTALL_PROGRAM} ${WRKSRC}/glest ${DATADIR}
- ${INSTALL_DATA} ${WRKSRC}/mk/linux/glest.ini ${DATADIR}
- ${INSTALL_SCRIPT} ${WRKDIR}/glest-wrapper ${PREFIX}/bin/${PORTNAME}
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/docs/code_license.txt ${STAGEDIR}${DOCSDIR}/code_license.txt
+ @${MKDIR} ${STAGEDIR}${DATADIR}
+ ${INSTALL_PROGRAM} ${WRKSRC}/glest ${STAGEDIR}${DATADIR}
+ ${INSTALL_DATA} ${WRKSRC}/mk/linux/glest.ini ${STAGEDIR}${DATADIR}
+ ${INSTALL_SCRIPT} ${WRKDIR}/glest-wrapper ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
-.if defined(HAVE_EDITOR)
- ${INSTALL_PROGRAM} ${WRKSRC}/glest_editor ${PREFIX}/bin/
+.if ${PORT_OPTIONS:MEDITOR}
+ ${INSTALL_PROGRAM} ${WRKSRC}/glest_editor ${STAGEDIR}${PREFIX}/bin/
.endif
-post-install:
- @${CAT} ${PKGMESSAGE}
-
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/games/glest/files/patch-source-shared_lib-include-graphics-math_util.h b/games/glest/files/patch-source-shared_lib-include-graphics-math_util.h
new file mode 100644
index 000000000000..24e6656e88ea
--- /dev/null
+++ b/games/glest/files/patch-source-shared_lib-include-graphics-math_util.h
@@ -0,0 +1,19 @@
+--- ./source/shared_lib/include/graphics/math_util.h.bak 2014-08-10 15:21:32.000000000 -0400
++++ ./source/shared_lib/include/graphics/math_util.h 2014-08-10 15:23:08.000000000 -0400
+@@ -23,6 +23,16 @@
+ const float zero= 1e-6f;
+ const float infinity= 1e6f;
+
++template <typename T>
++inline T max(const T& a, const T& b) {
++ return (b > a) ? b : a;
++}
++
++template <typename T>
++inline T min(const T& a, const T& b) {
++ return (b < a) ? b : a;
++}
++
+ // =====================================================
+ // class Rect
+ // =====================================================
diff --git a/games/glest/pkg-plist b/games/glest/pkg-plist
index 0e5db7abed53..a2352e8ac4c3 100644
--- a/games/glest/pkg-plist
+++ b/games/glest/pkg-plist
@@ -3,5 +3,3 @@ bin/glest
%%DATADIR%%/glest
%%DATADIR%%/glest.ini
%%PORTDOCS%%%%DOCSDIR%%/code_license.txt
-%%PORTDOCS%%@dirrmtry %%DOCSDIR%%
-@dirrmtry %%DATADIR%%