1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-03 01:23:49 +00:00

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.
This commit is contained in:
Alexey Dokuchaev 2013-05-12 08:06:32 +00:00
parent 459303bbf8
commit 9752f9ac97
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=317934
5 changed files with 22 additions and 2 deletions

View File

@ -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}"

View File

@ -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}"

View File

@ -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}"

View File

@ -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}"

View File

@ -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}"