summaryrefslogtreecommitdiff
path: root/games/quake2-data
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2013-05-12 08:06:32 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2013-05-12 08:06:32 +0000
commit9752f9ac9754718fcf1046e29c071474a69e749e (patch)
tree36fe9bc878683842de3c4779e9a7645be41dba81 /games/quake2-data
parent459303bbf89ffb7d06079da088a4cc1b4961fb93 (diff)
downloadfreebsd-ports-9752f9ac9754718fcf1046e29c071474a69e749e.zip
If port is setting PKGNAMEPREFIX=${FOOPKGNAMEPREFIX}, but .include's this
file before <bsd.port.options.mk>, options handling gets broken because options will be loaded from OPTIONSFILE which is based on UNIQUENAME and thus PKGNAMEPREFIX, which is empty at that point. Prevent this: ensure that FOOPKGNAMEPREFIX is defined in advance for ports that use it to set their PKGNAMEPREFIX and having OPTIONS.
Diffstat (limited to 'games/quake2-data')
-rw-r--r--games/quake2-data/Makefile.include8
1 files changed, 6 insertions, 2 deletions
diff --git a/games/quake2-data/Makefile.include b/games/quake2-data/Makefile.include
index 4bff0cd4075c..cd19b7d4a47e 100644
--- a/games/quake2-data/Makefile.include
+++ b/games/quake2-data/Makefile.include
@@ -11,7 +11,7 @@
# Q2DIR - The Quake II data directory (also added to
# MAKE_ENV, PLIST_SUB, and SUB_LIST)
#
-# Some notes for making such kind of ports:
+# Some notes for making this kind of ports:
#
# - The game engines should be modified to add ${Q2DIR} as the first search
# path (it's a stack so new paths override previous ones), and add
@@ -42,12 +42,16 @@
# it as an option (off by default). If the engine is not compatible with
# the game.so files provided by the ports then ignore this rule.
#
-# For the examples please see existing ports.
+# For the examples, please see existing ports.
#
Q2PKGNAMEPREFIX?= quake2-
Q2DIR?= ${LOCALBASE}/share/quake2
+.if ${PKGNAMEPREFIX} == ${Q2PKGNAMEPREFIX} && defined(OPTIONSMKINCLUDED)
+. error include before <bsd.port.options.mk> if using Q2PKGNAMEPREFIX
+.endif
+
MAKE_ENV+= Q2DIR="${Q2DIR}"
PLIST_SUB+= Q2DIR="${Q2DIR:S/${LOCALBASE}\///}"
SUB_LIST+= Q2DIR="${Q2DIR}"