let PLIST, DESCR, MESSAGE, UNMESSAGE be subpackage-dependent.
careful: they do not get defined to a default value unless the `main' variable is defined, because they get set later otherwise... remove the .if defined(MULTI_PACKAGES) guards as they don't serve any purpose. Simplify the PLIST tests to make them more uniform. Move SED_PLIST to the list of obsolete variables instead of giving it special treatment.
This commit is contained in:
parent
10bf5604d4
commit
d89691b16b
@ -1,6 +1,6 @@
|
||||
#-*- mode: Makefile; tab-width: 4; -*-
|
||||
# ex:ts=4 sw=4 filetype=make:
|
||||
# $OpenBSD: bsd.port.mk,v 1.831 2006/11/22 12:40:50 espie Exp $
|
||||
# $OpenBSD: bsd.port.mk,v 1.832 2006/11/24 00:10:00 espie Exp $
|
||||
# $FreeBSD: bsd.port.mk,v 1.264 1996/12/25 02:27:44 imp Exp $
|
||||
# $NetBSD: bsd.port.mk,v 1.62 1998/04/09 12:47:02 hubertf Exp $
|
||||
#
|
||||
@ -27,7 +27,7 @@ ERRORS+= "Fatal: Use 'env FLAVOR=${FLAVOR} ${MAKE}' instead."
|
||||
ERRORS+= "Fatal: Use 'env SUBPACKAGE=${SUBPACKAGE} ${MAKE}' instead."
|
||||
.endif
|
||||
|
||||
.for v in PKGREPOSITORY PKGREPOSITORYBASE CDROM_PACKAGES FTP_PACKAGES
|
||||
.for v in PKGREPOSITORY PKGREPOSITORYBASE CDROM_PACKAGES FTP_PACKAGES SED_PLIST
|
||||
. if defined($v)
|
||||
ERRORS+= "Fatal: Variable $v is obsolete, use PACKAGE_REPOSITORY instead."
|
||||
. endif
|
||||
@ -85,12 +85,12 @@ CONFIGURE_STYLE USE_LIBTOOL SEPARATE_BUILD \
|
||||
SHARED_LIBS USE_MOTIF PACKAGES MASTER_SITES \
|
||||
MASTER_SITES0 MASTER_SITES1 MASTER_SITES2 MASTER_SITES3 MASTER_SITES4 \
|
||||
MASTER_SITES5 MASTER_SITES6 MASTER_SITES7 MASTER_SITES8 MASTER_SITES9 \
|
||||
MAINTAINER SUBPACKAGE PACKAGING DESCR SUPDISTFILES \
|
||||
MAINTAINER SUBPACKAGE PACKAGING SUPDISTFILES \
|
||||
AUTOCONF_VERSION AUTOMAKE_VERSION CONFIGURE_ARGS
|
||||
# and stuff needing to be MULTI_PACKAGE'd
|
||||
_ALL_VARIABLES_INDEXED?=COMMENT FULLPKGNAME PKGNAME PKG_ARCH \
|
||||
PERMIT_PACKAGE_FTP PERMIT_PACKAGE_CDROM RUN_DEPENDS LIB_DEPENDS WANTLIB \
|
||||
CATEGORIES
|
||||
CATEGORIES DESCR
|
||||
|
||||
# special purpose user settings
|
||||
PATCH_CHECK_ONLY?=No
|
||||
@ -371,10 +371,6 @@ ERRORS+= "Fatal: Subpackage ${SUBPACKAGE} does not exist."
|
||||
ERRORS+= "Fatal: SUBPACKAGES should always beging with -: ${MULTI_PACKAGES:N-*}."
|
||||
.endif
|
||||
|
||||
.if defined(SED_PLIST)
|
||||
ERRORS+="Fatal: SED_PLIST deprecated"
|
||||
.endif
|
||||
|
||||
# Build FLAVOR_EXT, checking that no flavors are misspelled
|
||||
FLAVOR_EXT:=
|
||||
# _FLAVOR_EXT2 is used internally for working directories.
|
||||
@ -586,14 +582,20 @@ _PACKAGE_COOKIE_DEPS=${_FAKE_COOKIE}
|
||||
PKGNAMES += ${FULLPKGNAME${_s}}
|
||||
.endfor
|
||||
|
||||
.if defined(MULTI_PACKAGES)
|
||||
. for _s in ${MULTI_PACKAGES}
|
||||
. for _v in PKG_ARCH PERMIT_PACKAGE_FTP PERMIT_PACKAGE_CDROM \
|
||||
.for _s in ${MULTI_PACKAGES}
|
||||
. for _v in PKG_ARCH PERMIT_PACKAGE_FTP PERMIT_PACKAGE_CDROM \
|
||||
RUN_DEPENDS WANTLIB LIB_DEPENDS PREFIX CATEGORIES
|
||||
${_v}${_s} ?= ${${_v}}
|
||||
. endfor
|
||||
. endfor
|
||||
.endif
|
||||
.endfor
|
||||
|
||||
.for _s in ${MULTI_PACKAGES}
|
||||
. for _v in MESSAGE UNMESSAGE DESCR PLIST
|
||||
. if defined(${_v})
|
||||
${_v}${_s} ?= ${${_v}}
|
||||
. endif
|
||||
. endfor
|
||||
.endfor
|
||||
|
||||
_PACKAGE_LINKS=
|
||||
_PKGFILE= ${FULLPKGNAME${SUBPACKAGE}}${PKG_SUFX}
|
||||
@ -701,30 +703,25 @@ _tmpvars += FLAVORS='${FLAVOR_EXT}'
|
||||
_SED_SUBST+=-e 's,$${FLAVORS},${FLAVOR_EXT},g' -e 's,$$\\,$$,g'
|
||||
|
||||
# find out the most appropriate PLIST source
|
||||
.if !defined(PLIST) && exists(${PKGDIR}/PLIST${SUBPACKAGE}${FLAVOR_EXT}.${ARCH})
|
||||
PLIST= ${PKGDIR}/PLIST${SUBPACKAGE}${FLAVOR_EXT}.${ARCH}
|
||||
.else
|
||||
. if !defined(PLIST) && exists(${PKGDIR}/PLIST${SUBPACKAGE}${FLAVOR_EXT}.${MACHINE_ARCH})
|
||||
PLIST= ${PKGDIR}/PLIST${SUBPACKAGE}${FLAVOR_EXT}.${MACHINE_ARCH}
|
||||
.if !defined(PLIST${SUBPACKAGE})
|
||||
. if exists(${PKGDIR}/PLIST${SUBPACKAGE}${FLAVOR_EXT}.${ARCH})
|
||||
PLIST${SUBPACKAGE}= ${PKGDIR}/PLIST${SUBPACKAGE}${FLAVOR_EXT}.${ARCH}
|
||||
. elif exists(${PKGDIR}/PLIST${SUBPACKAGE}${FLAVOR_EXT}.${MACHINE_ARCH})
|
||||
PLIST${SUBPACKAGE}= ${PKGDIR}/PLIST${SUBPACKAGE}${FLAVOR_EXT}.${MACHINE_ARCH}
|
||||
. elif ${NO_SHARED_LIBS:L} == "yes" && exists(${PKGDIR}/PLIST${SUBPACKAGE}${FLAVOR_EXT}.noshared)
|
||||
PLIST${SUBPACKAGE}= ${PKGDIR}/PLIST${SUBPACKAGE}${FLAVOR_EXT}.noshared
|
||||
. elif exists(${PKGDIR}/PLIST${SUBPACKAGE}${FLAVOR_EXT})
|
||||
PLIST${SUBPACKAGE}= ${PKGDIR}/PLIST${SUBPACKAGE}${FLAVOR_EXT}
|
||||
. elif exists(${PKGDIR}/PLIST${SUBPACKAGE}.${ARCH})
|
||||
PLIST${SUBPACKAGE}= ${PKGDIR}/PLIST${SUBPACKAGE}.${ARCH}
|
||||
. elif exists(${PKGDIR}/PLIST${SUBPACKAGE}.${MACHINE_ARCH})
|
||||
PLIST${SUBPACKAGE}= ${PKGDIR}/PLIST${SUBPACKAGE}.${MACHINE_ARCH}
|
||||
. elif ${NO_SHARED_LIBS:L} == "yes" && exists(${PKGDIR}/PLIST${SUBPACKAGE}.noshared)
|
||||
PLIST${SUBPACKAGE}= ${PKGDIR}/PLIST${SUBPACKAGE}.noshared
|
||||
. else
|
||||
PLIST${SUBPACKAGE}= ${PKGDIR}/PLIST${SUBPACKAGE}
|
||||
. endif
|
||||
.endif
|
||||
.if !defined(PLIST) && ${NO_SHARED_LIBS:L} == "yes" && exists(${PKGDIR}/PLIST${SUBPACKAGE}${FLAVOR_EXT}.noshared)
|
||||
PLIST= ${PKGDIR}/PLIST${SUBPACKAGE}${FLAVOR_EXT}.noshared
|
||||
.endif
|
||||
.if !defined(PLIST) && exists(${PKGDIR}/PLIST${SUBPACKAGE}${FLAVOR_EXT})
|
||||
PLIST= ${PKGDIR}/PLIST${SUBPACKAGE}${FLAVOR_EXT}
|
||||
.endif
|
||||
.if !defined(PLIST) && exists(${PKGDIR}/PLIST${SUBPACKAGE}.${ARCH})
|
||||
PLIST= ${PKGDIR}/PLIST${SUBPACKAGE}.${ARCH}
|
||||
.else
|
||||
. if !defined(PLIST) && exists(${PKGDIR}/PLIST${SUBPACKAGE}.${MACHINE_ARCH})
|
||||
PLIST= ${PKGDIR}/PLIST${SUBPACKAGE}.${MACHINE_ARCH}
|
||||
. endif
|
||||
.endif
|
||||
.if !defined(PLIST) && ${NO_SHARED_LIBS:L} == "yes" && exists(${PKGDIR}/PLIST${SUBPACKAGE}.noshared)
|
||||
PLIST= ${PKGDIR}/PLIST${SUBPACKAGE}.noshared
|
||||
.endif
|
||||
PLIST?= ${PKGDIR}/PLIST${SUBPACKAGE}
|
||||
|
||||
# Likewise for DESCR/MESSAGE/COMMENT
|
||||
.if defined(COMMENT${SUBPACKAGE}${FLAVOR_EXT})
|
||||
@ -734,13 +731,13 @@ _COMMENT=${COMMENT${SUBPACKAGE}}
|
||||
.endif
|
||||
|
||||
.if exists(${PKGDIR}/MESSAGE${SUBPACKAGE})
|
||||
MESSAGE?= ${PKGDIR}/MESSAGE${SUBPACKAGE}
|
||||
MESSAGE${SUBPACKAGE}?= ${PKGDIR}/MESSAGE${SUBPACKAGE}
|
||||
.endif
|
||||
.if exists(${PKGDIR}/UNMESSAGE${SUBPACKAGE})
|
||||
UNMESSAGE?= ${PKGDIR}/UNMESSAGE${SUBPACKAGE}
|
||||
UNMESSAGE${SUBPACKAGE}?= ${PKGDIR}/UNMESSAGE${SUBPACKAGE}
|
||||
.endif
|
||||
|
||||
DESCR?= ${PKGDIR}/DESCR${SUBPACKAGE}
|
||||
DESCR${SUBPACKAGE}?= ${PKGDIR}/DESCR${SUBPACKAGE}
|
||||
|
||||
MTREE_FILE?=
|
||||
MTREE_FILE+=${PORTSDIR}/infrastructure/db/fake.mtree
|
||||
@ -748,7 +745,7 @@ MTREE_FILE+=${PORTSDIR}/infrastructure/db/fake.mtree
|
||||
# Fill out package command, and package dependencies
|
||||
_PKG_PREREQ= ${WRKPKG}/DESCR${SUBPACKAGE} ${WRKPKG}/COMMENT${SUBPACKAGE}
|
||||
PKG_ARGS+= -c '${WRKPKG}/COMMENT${SUBPACKAGE}' -d ${WRKPKG}/DESCR${SUBPACKAGE}
|
||||
PKG_ARGS+=-f ${PLIST} -p ${PREFIX${SUBPACKAGE}}
|
||||
PKG_ARGS+=-f ${PLIST${SUBPACKAGE}} -p ${PREFIX${SUBPACKAGE}}
|
||||
.if exists(${PKGDIR}/INSTALL${SUBPACKAGE})
|
||||
PKG_ARGS+= -i ${PKGDIR}/INSTALL${SUBPACKAGE}
|
||||
.endif
|
||||
@ -761,11 +758,11 @@ PKG_ARGS+= -r ${PKGDIR}/REQ${SUBPACKAGE}
|
||||
.if exists(${PKGDIR}/MODULE${SUBPACKAGE}.pm)
|
||||
PKG_ARGS+= -m ${PKGDIR}/MODULE${SUBPACKAGE}.pm
|
||||
.endif
|
||||
.if defined(MESSAGE)
|
||||
PKG_ARGS+= -M ${MESSAGE}
|
||||
.if defined(MESSAGE${SUBPACKAGE})
|
||||
PKG_ARGS+= -M ${MESSAGE${SUBPACKAGE}}
|
||||
.endif
|
||||
.if defined(UNMESSAGE)
|
||||
PKG_ARGS+= -U ${UNMESSAGE}
|
||||
.if defined(UNMESSAGE${SUBPACKAGE})
|
||||
PKG_ARGS+= -U ${UNMESSAGE${SUBPACKAGE}}
|
||||
.endif
|
||||
PKG_ARGS+= -B ${WRKINST}
|
||||
PKG_ARGS+=-A'${PKG_ARCH${SUBPACKAGE}}'
|
||||
@ -1324,7 +1321,7 @@ ${_SYSTRACE_COOKIE}: ${_WRKDIR_COOKIE}
|
||||
${WRKPKG}/COMMENT${SUBPACKAGE}:
|
||||
@echo ${_COMMENT} >$@
|
||||
|
||||
${WRKPKG}/DESCR${SUBPACKAGE}: ${DESCR}
|
||||
${WRKPKG}/DESCR${SUBPACKAGE}: ${DESCR${SUBPACKAGE}}
|
||||
@${_SED_SUBST} <$? >$@.tmp && mv -f $@.tmp $@
|
||||
@echo "\nMaintainer: ${MAINTAINER}" >>$@
|
||||
.if defined(HOMEPAGE)
|
||||
|
Loading…
Reference in New Issue
Block a user