aboutsummaryrefslogtreecommitdiff
path: root/Mk
diff options
context:
space:
mode:
authorMathieu Arnold <mat@FreeBSD.org>2015-08-17 14:20:40 +0000
committerMathieu Arnold <mat@FreeBSD.org>2015-08-17 14:20:40 +0000
commit21a283f3bec444388d1448f993783ec673a06502 (patch)
tree16be3a9188cf2781563095e15839c170074dd7a7 /Mk
parentcda45bfa8a05d49eb690397ab1b7facd622490a7 (diff)
downloadports-21a283f3bec444388d1448f993783ec673a06502.tar.gz
ports-21a283f3bec444388d1448f993783ec673a06502.zip
Notes
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.database.mk14
-rw-r--r--Mk/bsd.options.mk49
-rw-r--r--Mk/bsd.port.mk54
-rw-r--r--Mk/bsd.sanity.mk5
4 files changed, 30 insertions, 92 deletions
diff --git a/Mk/bsd.database.mk b/Mk/bsd.database.mk
index 7151ce1bcca5..26ab48d50222 100644
--- a/Mk/bsd.database.mk
+++ b/Mk/bsd.database.mk
@@ -47,7 +47,7 @@ Database_Include_MAINTAINER= ports@FreeBSD.org
# build this port with (overrides WITH_BDB_VER).
# WITH_BDB_VER
# - User defined global variable to set Berkeley DB version.
-# <UNIQUENAME>_WITH_BDB_VER
+# <BDB_UNIQUENAME>_WITH_BDB_VER
# - User defined port specific variable to set Berkeley DB
# version.
# WITH_BDB_HIGHEST
@@ -191,6 +191,8 @@ IGNORE= cannot install: unknown MySQL version: ${MYSQL_VER}
# TODO: avoid malformed conditional with invalid USE_BDB/WITH_BDB_VER
# check if + works properly from test builds 01h12m23s
+BDB_UNIQUENAME?= ${PKGNAMEPREFIX}${PORTNAME}
+
_USE_BDB_save:=${USE_BDB}
_WITH_BDB_VER_save:=${WITH_BDB_VER}
@@ -211,9 +213,9 @@ db5_FIND= ${LOCALBASE}/include/db5/db.h
db6_FIND= ${LOCALBASE}/include/db6/db.h
# Override the global WITH_BDB_VER with the
-# port specific <UNIQUENAME>_WITH_BDB_VER
-.if defined(${UNIQUENAME:tu:S,-,_,}_WITH_BDB_VER)
-WITH_BDB_VER= ${${UNIQUENAME:tu:S,-,_,}_WITH_BDB_VER}
+# port specific <BDB_UNIQUENAME>_WITH_BDB_VER
+.if defined(${BDB_UNIQUENAME:tu:S,-,_,}_WITH_BDB_VER)
+WITH_BDB_VER= ${${BDB_UNIQUENAME:tu:S,-,_,}_WITH_BDB_VER}
.endif
# Override USE_BDB with global WITH_BDB_VER
@@ -340,7 +342,7 @@ BDB_VER= ${_BDB_VER}
debug-bdb:
@${ECHO_CMD} "--INPUTS----------------------------------------------------"
- @${ECHO_CMD} "${UNIQUENAME:tu:S,-,_,}_WITH_BDB_VER: ${${UNIQUENAME:tu:S,-,_,}_WITH_BDB_VER}"
+ @${ECHO_CMD} "${BDB_UNIQUENAME:tu:S,-,_,}_WITH_BDB_VER: ${${BDB_UNIQUENAME:tu:S,-,_,}_WITH_BDB_VER}"
@${ECHO_CMD} "WITH_BDB_VER: ${_WITH_BDB_VER_save}"
@${ECHO_CMD} "WANT_BDB_VER: ${WANT_BDB_VER}"
@${ECHO_CMD} "BDB_BUILD_DEPENDS: ${BDB_BUILD_DEPENDS}"
@@ -374,7 +376,7 @@ BAD_VAR+= ${var},
. endif
. endfor
. if defined(BAD_VAR)
-_IGNORE_MSG= Obsolete variable(s) ${BAD_VAR} use WITH_BDB_VER or ${UNIQUENAME:tu:S,-,_,}_WITH_BDB_VER to select Berkeley DB version
+_IGNORE_MSG= Obsolete variable(s) ${BAD_VAR} use WITH_BDB_VER or ${BDB_UNIQUENAME:tu:S,-,_,}_WITH_BDB_VER to select Berkeley DB version
. if defined(IGNORE)
IGNORE+= ${_IGNORE_MSG}
. else
diff --git a/Mk/bsd.options.mk b/Mk/bsd.options.mk
index 7a198af8dd04..19a5b924ec93 100644
--- a/Mk/bsd.options.mk
+++ b/Mk/bsd.options.mk
@@ -127,7 +127,6 @@
OPTIONSMKINCLUDED= bsd.options.mk
OPTIONS_NAME?= ${PKGORIGIN:S/\//_/}
-OPTIONSFILE?= ${PORT_DBDIR}/${UNIQUENAME}/options
OPTIONS_FILE?= ${PORT_DBDIR}/${OPTIONS_NAME}/options
_OPTIONS_FLAGS= ALL_TARGET CATEGORIES CFLAGS CONFIGURE_ENV CONFLICTS \
@@ -244,22 +243,6 @@ PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}}
NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}}
. endfor
-# XXX To remove once UNIQUENAME will be removed
-## Set the options specified per-port (set by user in make.conf)
-. for opt in ${${UNIQUENAME}_SET}
-. if !empty(COMPLETE_OPTIONS_LIST:M${opt})
-PORT_OPTIONS+= ${opt}
-NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}}
-. endif
-. endfor
-
-## Unset the options excluded per-port (set by user in make.conf)
-. for opt in ${${UNIQUENAME}_UNSET}
-PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}}
-NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}}
-. endfor
-# XXX To remove once UNIQUENAME will be removed
-
## Set the options specified per-port (set by user in make.conf)
. for opt in ${${OPTIONS_NAME}_SET}
. if !empty(COMPLETE_OPTIONS_LIST:M${opt})
@@ -274,14 +257,6 @@ PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}}
NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}}
. endfor
-# XXX to remove once UNIQUENAME is removed
-## options files (from dialog)
-. if exists(${OPTIONSFILE}) && !make(rmconfig)
-. include "${OPTIONSFILE}"
-. endif
-. sinclude "${OPTIONSFILE}.local"
-# XXX to remove once UNIQUENAME is removed
-
## options files (from dialog)
. if exists(${OPTIONS_FILE}) && !make(rmconfig)
. include "${OPTIONS_FILE}"
@@ -303,6 +278,14 @@ PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}}
.endif
.endfor
+_OPTIONS_UNIQUENAME= ${PKGNAMEPREFIX}${PORTNAME}
+.for _k in SET UNSET SET_FORCE UNSET_FORCE
+.if defined(${_OPTIONS_UNIQUENAME}_${_k})
+WARNING+= "You are using ${_OPTIONS_UNIQUENAME}_${_k} which is not supported any more, use:"
+WARNING+= "${OPTIONS_NAME}_${_k}= ${${_OPTIONS_UNIQUENAME}_${_k}}"
+.endif
+.endfor
+
.if defined(OPTIONS_WARNINGS)
WARNING+= "You are using the following deprecated options: ${OPTIONS_WARNINGS}"
WARNING+= "If you added them on the command line, you should replace them by"
@@ -355,22 +338,6 @@ PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}}
NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}}
. endfor
-# XXX To remove once UNIQUENAME will be removed
-## Set the options specified per-port (set by user in make.conf)
-. for opt in ${${UNIQUENAME}_SET_FORCE}
-. if !empty(COMPLETE_OPTIONS_LIST:M${opt})
-PORT_OPTIONS+= ${opt}
-NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}}
-. endif
-. endfor
-
-## Unset the options excluded per-port (set by user in make.conf)
-. for opt in ${${UNIQUENAME}_UNSET_FORCE}
-PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}}
-NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}}
-. endfor
-# XXX To remove once UNIQUENAME will be removed
-
## Set the options specified per-port (set by user in make.conf)
. for opt in ${${OPTIONS_NAME}_SET_FORCE}
. if !empty(COMPLETE_OPTIONS_LIST:M${opt})
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index cc537724937b..b6b82fa82f99 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -74,9 +74,6 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org
# Optional.
# PKGVERSION - Always defined as ${PORTVERSION}.
# Do not define this in your Makefile.
-# UNIQUENAME - A name for your port that is globally unique. By default,
-# this is set to ${LATEST_LINK} when LATEST_LINK is set,
-# and to ${PKGNAMEPREFIX}${PORTNAME} otherwise.
# DISTVERSION - Vendor version of the distribution.
# Default: ${PORTVERSION}
# DISTNAME - Name of port or distribution used in generating
@@ -892,7 +889,7 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org
# directories to be searched for shared libraries.
# Otherwise, this is a list of directories to be added to that
# list. The directory names are written to
-# ${LOCALBASE}/libdata/ldconfig/${UNIQUENAME} which is then
+# ${LOCALBASE}/libdata/ldconfig/${PKGBASE} which is then
# used by the ldconfig startup script.
# This mechanism replaces ldconfig scripts installed by some
# ports, often under such names as 000.${UNQUENAME}.sh.
@@ -901,7 +898,7 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org
# version, and the directory list given will be ignored.
# USE_LDCONFIG32
# - Same as USE_LDCONFIG but the target file is
-# ${LOCALBASE}/libdata/ldconfig32/${UNIQUENAME} instead.
+# ${LOCALBASE}/libdata/ldconfig32/${PKGBASE} instead.
# Note: that should only be used on 64-bit architectures.
#
# DOCSDIR - Name of the directory to install the packages docs in.
@@ -977,11 +974,6 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org
# generating the packing list on-the-fly, make sure it's generated before
# do-install is called!
#
-# For package:
-#
-# LATEST_LINK - Install the "Latest" link for the package as ___. Define
-# this if the "Latest" link name will be incorrectly determined.
-#
# This is used in all stages:
#
# SCRIPTS_ENV - Additional environment vars passed to scripts in
@@ -1252,12 +1244,6 @@ USERS_BLACKLIST= _dhcp _pflogd auditdistd bin bind daemon games hast kmem mailnu
LDCONFIG_DIR= libdata/ldconfig
LDCONFIG32_DIR= libdata/ldconfig32
-.if defined(LATEST_LINK)
-UNIQUENAME?= ${LATEST_LINK}
-.else
-UNIQUENAME?= ${PKGNAMEPREFIX}${PORTNAME}
-.endif
-
.endif
# At least KDE needs TMPDIR for the package building,
@@ -2571,8 +2557,7 @@ WRKDIR_PKGFILE= ${WRKDIR}/pkg/${PKGNAME}${PKG_SUFX}
# The "latest version" link -- ${PKGNAME} minus everthing after the last '-'
PKGLATESTREPOSITORY?= ${PACKAGES}/Latest
PKGBASE?= ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}
-LATEST_LINK?= ${PKGBASE}
-PKGLATESTFILE= ${PKGLATESTREPOSITORY}/${LATEST_LINK}${PKG_SUFX}
+PKGLATESTFILE= ${PKGLATESTREPOSITORY}/${PKGBASE}${PKG_SUFX}
CONFIGURE_SCRIPT?= configure
CONFIGURE_CMD?= ./${CONFIGURE_SCRIPT}
@@ -2903,7 +2888,7 @@ DEPENDS_ARGS+= NOCLEANDEPENDS=yes
################################################################
.if ((!defined(OPTIONS_DEFINE) && !defined(OPTIONS_SINGLE) && !defined(OPTIONS_MULTI)) \
&& !defined(OPTIONS_GROUP) && !defined(OPTIONS_RADIO) \
- || defined(CONFIG_DONE_${UNIQUENAME:tu}) || \
+ || defined(CONFIG_DONE_${PKGBASE:tu}) || \
defined(PACKAGE_BUILDING) || defined(BATCH))
_OPTIONS_OK=yes
.endif
@@ -3584,8 +3569,8 @@ install-ldconfig-file:
@${MKDIR} ${STAGEDIR}${LOCALBASE}/${LDCONFIG_DIR}
.endif
@${ECHO_CMD} ${USE_LDCONFIG} | ${TR} ' ' '\n' \
- > ${STAGEDIR}${LOCALBASE}/${LDCONFIG_DIR}/${UNIQUENAME}
- @${ECHO_CMD} ${LOCALBASE}/${LDCONFIG_DIR}/${UNIQUENAME} >> ${TMPPLIST}
+ > ${STAGEDIR}${LOCALBASE}/${LDCONFIG_DIR}/${PKGBASE}
+ @${ECHO_CMD} ${LOCALBASE}/${LDCONFIG_DIR}/${PKGBASE} >> ${TMPPLIST}
.endif
.endif
.endif
@@ -3596,8 +3581,8 @@ install-ldconfig-file:
@${MKDIR} ${STAGEDIR}${LOCALBASE}/${LDCONFIG32_DIR}
.endif
@${ECHO_CMD} ${USE_LDCONFIG32} | ${TR} ' ' '\n' \
- > ${STAGEDIR}${LOCALBASE}/${LDCONFIG32_DIR}/${UNIQUENAME}
- @${ECHO_CMD} ${LOCALBASE}/${LDCONFIG32_DIR}/${UNIQUENAME} >> ${TMPPLIST}
+ > ${STAGEDIR}${LOCALBASE}/${LDCONFIG32_DIR}/${PKGBASE}
+ @${ECHO_CMD} ${LOCALBASE}/${LDCONFIG32_DIR}/${PKGBASE} >> ${TMPPLIST}
.endif
.endif
.endif
@@ -5117,18 +5102,12 @@ do-config:
@${ECHO_MSG} "===> No options to configure"
.else
@optionsdir=${OPTIONS_FILE:H}; \
- oldoptionsdir=${OPTIONSFILE:H}; \
if [ ${UID} != 0 -a -z "${INSTALL_AS_USER}" -a ! -w "${PORT_DBDIR}" ] ; then \
${ECHO_MSG} "===> Switching to root credentials to create $${optionsdir}"; \
- (${SU_CMD} "${SH} -c \"if [ -d $${oldoptionsdir} -a ! -d $${optionsdir} ]; then ${MV} $${oldoptionsdir} $${optionsdir}; elif [ -d $${oldoptionsdir} -a -d $${optionsdir} ]; then ${RM} -rf $${oldoptionsdir} ; fi ; ${MKDIR} $${optionsdir} 2> /dev/null\"") || \
+ (${SU_CMD} "${SH} -c \"${MKDIR} $${optionsdir} 2> /dev/null\"") || \
(${ECHO_MSG} "===> Cannot create $${optionsdir}, check permissions"; exit 1); \
${ECHO_MSG} "===> Returning to user credentials" ; \
else \
- if [ -d $${oldoptionsdir} -a ! -d $${optionsdir} ]; then \
- ${MV} $${oldoptionsdir} $${optionsdir}; \
- elif [ -d $${oldoptionsdir} -a -d $${optionsdir} ]; then \
- ${RM} -rf $${oldoptionsdir} ; \
- fi ; \
${MKDIR} $${optionsdir} 2> /dev/null || \
(${ECHO_MSG} "===> Cannot create $${optionsdir}, check permissions"; exit 1) ; \
fi
@@ -5246,19 +5225,6 @@ showconfig-recursive:
.if !target(rmconfig)
rmconfig:
-.if exists(${OPTIONSFILE})
- -@${ECHO_MSG} "===> Removing user-configured options for ${PKGNAME}"; \
- optionsdir=${OPTIONSFILE:H}; \
- if [ ${UID} != 0 -a "x${INSTALL_AS_USER}" = "x" -a ! -w "${OPTIONSFILE}" ]; then \
- ${ECHO_MSG} "===> Switching to root credentials to remove ${OPTIONSFILE} and $${optionsdir}"; \
- ${SU_CMD} "${RM} -f ${OPTIONSFILE} ; \
- ${RMDIR} $${optionsdir}"; \
- ${ECHO_MSG} "===> Returning to user credentials"; \
- else \
- ${RM} -f ${OPTIONSFILE}; \
- ${RMDIR} $${optionsdir} 2>/dev/null || return 0; \
- fi
-.endif
.if exists(${OPTIONS_FILE})
-@${ECHO_MSG} "===> Removing user-configured options for ${PKGNAME}"; \
optionsdir=${OPTIONS_FILE:H}; \
@@ -5675,7 +5641,7 @@ _PHONY_TARGETS+= ${target}
${target}: ${${target:tu}_COOKIE}
.elif !target(${target})
${target}: config-conditional
- @cd ${.CURDIR} && ${MAKE} CONFIG_DONE_${UNIQUENAME:tu}=1 ${${target:tu}_COOKIE}
+ @cd ${.CURDIR} && ${MAKE} CONFIG_DONE_${PKGBASE:tu}=1 ${${target:tu}_COOKIE}
.elif target(${target}) && defined(IGNORE)
.endif
diff --git a/Mk/bsd.sanity.mk b/Mk/bsd.sanity.mk
index 3040665aa62e..67ea6003d3de 100644
--- a/Mk/bsd.sanity.mk
+++ b/Mk/bsd.sanity.mk
@@ -159,7 +159,8 @@ SANITY_UNSUPPORTED= USE_OPENAL USE_FAM USE_MAKESELF USE_ZIP USE_LHA USE_CMAKE \
USE_GETTEXT USE_GMAKE USE_SCONS USE_DRUPAL NO_INSTALL_MANPAGES \
INSTALLS_SHLIB USE_PYDISTUTILS PYTHON_CONCURRENT_INSTALL \
PYDISTUTILS_AUTOPLIST PYTHON_PY3K_PLIST_HACK PYDISTUTILS_NOEGGINFO \
- USE_PYTHON_PREFIX USE_BZIP2 USE_XZ USE_PGSQL NEED_ROOT
+ USE_PYTHON_PREFIX USE_BZIP2 USE_XZ USE_PGSQL NEED_ROOT \
+ UNIQUENAME LATEST_LINK
SANITY_DEPRECATED= PYTHON_PKGNAMESUFFIX USE_AUTOTOOLS
USE_AUTOTOOLS_ALT= USES=autoreconf and GNU_CONFIGURE=yes
@@ -194,6 +195,8 @@ PYDISTUTILS_NOEGGINFO_ALT= USE_PYTHON=noegginfo
USE_PYTHON_PREFIX_ALT= USE_PYTHON=pythonprefix
PYTHON_PKGNAMESUFFIX_ALT= PYTHON_PKGNAMEPREFIX
NO_INSTALL_MANPAGES_ALT= USES=imake:noman
+UNIQUENAME_ALT= PKGBASE
+LATEST_LINK_ALT= PKGBASE
.for a in ${SANITY_DEPRECATED}
.if defined(${a})