aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordanfe <danfe@FreeBSD.org>2013-05-12 16:06:32 +0800
committerdanfe <danfe@FreeBSD.org>2013-05-12 16:06:32 +0800
commit50b2719b4dfe3fbff49e79ff267cf440db9fa8f5 (patch)
tree36fe9bc878683842de3c4779e9a7645be41dba81
parent21331e856d86bbccf4a8a14b3761e35227b69126 (diff)
downloadfreebsd-ports-gnome-50b2719b4dfe3fbff49e79ff267cf440db9fa8f5.tar.gz
freebsd-ports-gnome-50b2719b4dfe3fbff49e79ff267cf440db9fa8f5.tar.zst
freebsd-ports-gnome-50b2719b4dfe3fbff49e79ff267cf440db9fa8f5.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.
-rw-r--r--games/doom-data/Makefile.include4
-rw-r--r--games/duke3d-data/Makefile.include4
-rw-r--r--games/quake-data/Makefile.include4
-rw-r--r--games/quake2-data/Makefile.include8
-rw-r--r--games/quake3-data/Makefile.include4
5 files changed, 22 insertions, 2 deletions
diff --git a/games/doom-data/Makefile.include b/games/doom-data/Makefile.include
index 6c262202ab38..e85c68b10d05 100644
--- a/games/doom-data/Makefile.include
+++ b/games/doom-data/Makefile.include
@@ -3,6 +3,10 @@
DMPKGNAMEPREFIX?= doom-
DMDIR?= ${LOCALBASE}/share/doom
+.if ${PKGNAMEPREFIX} == ${DMPKGNAMEPREFIX} && defined(OPTIONSMKINCLUDED)
+. error include before <bsd.port.options.mk> if using DMPKGNAMEPREFIX
+.endif
+
MAKE_ENV+= DMDIR="${DMDIR}"
PLIST_SUB+= DMDIR="${DMDIR:S/${LOCALBASE}\///}"
SUB_LIST+= DMDIR="${DMDIR}"
diff --git a/games/duke3d-data/Makefile.include b/games/duke3d-data/Makefile.include
index ec9f21e91030..74204d295c45 100644
--- a/games/duke3d-data/Makefile.include
+++ b/games/duke3d-data/Makefile.include
@@ -16,6 +16,10 @@
DN3DPKGNAMEPREFIX?= duke3d-
DN3DDIR?= ${LOCALBASE}/share/duke3d
+.if ${PKGNAMEPREFIX} == ${DN3DPKGNAMEPREFIX} && defined(OPTIONSMKINCLUDED)
+. error include before <bsd.port.options.mk> if using DN3DPKGNAMEPREFIX
+.endif
+
MAKE_ENV+= DN3DDIR="${DN3DDIR}"
PLIST_SUB+= DN3DDIR="${DN3DDIR:S/${LOCALBASE}\///}"
SUB_LIST+= DN3DDIR="${DN3DDIR}"
diff --git a/games/quake-data/Makefile.include b/games/quake-data/Makefile.include
index ee576884bd34..4a0479fabe3e 100644
--- a/games/quake-data/Makefile.include
+++ b/games/quake-data/Makefile.include
@@ -4,6 +4,10 @@
Q1PKGNAMEPREFIX?= quake-
Q1DIR?= ${LOCALBASE}/share/quake
+.if ${PKGNAMEPREFIX} == ${Q1PKGNAMEPREFIX} && defined(OPTIONSMKINCLUDED)
+. error include before <bsd.port.options.mk> if using Q1PKGNAMEPREFIX
+.endif
+
MAKE_ENV+= Q1DIR="${Q1DIR}"
PLIST_SUB+= Q1DIR="${Q1DIR:S/${LOCALBASE}\///}"
SUB_LIST+= Q1DIR="${Q1DIR}"
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}"
diff --git a/games/quake3-data/Makefile.include b/games/quake3-data/Makefile.include
index dbd7ff998c07..7c9dd4e9216c 100644
--- a/games/quake3-data/Makefile.include
+++ b/games/quake3-data/Makefile.include
@@ -4,6 +4,10 @@
Q3PKGNAMEPREFIX?= quake3-
Q3DIR?= ${LOCALBASE}/share/quake3
+.if ${PKGNAMEPREFIX} == ${Q3PKGNAMEPREFIX} && defined(OPTIONSMKINCLUDED)
+. error include before <bsd.port.options.mk> if using Q3PKGNAMEPREFIX
+.endif
+
MAKE_ENV+= Q3DIR="${Q3DIR}"
PLIST_SUB+= Q3DIR="${Q3DIR:S/${LOCALBASE}\///}"
SUB_LIST+= Q3DIR="${Q3DIR}"