mirror of
https://git.FreeBSD.org/ports.git
synced 2025-02-02 11:09:29 +00:00
* Shuffle some important variable definitions to early in the file,
notably PORTSDIR. The previous commit introduced a use-before-define with respect to this variable, which broke things like portmaster. * Drop support for COMMENTFILE and a vestigial remnant of NetBSD support.
This commit is contained in:
parent
7eb9d1cc93
commit
4a917313b0
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=197323
@ -1089,6 +1089,17 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org
|
||||
# Most port authors should not need to understand anything after this point.
|
||||
#
|
||||
|
||||
# These need to be absolute since we don't know how deep in the ports
|
||||
# tree we are and thus can't go relative. They can, of course, be overridden
|
||||
# by individual Makefiles or local system make configuration.
|
||||
PORTSDIR?= /usr/ports
|
||||
LOCALBASE?= /usr/local
|
||||
X11BASE?= ${LOCALBASE}
|
||||
LINUXBASE?= /compat/linux
|
||||
DISTDIR?= ${PORTSDIR}/distfiles
|
||||
_DISTDIR?= ${DISTDIR}/${DIST_SUBDIR}
|
||||
INDEXDIR?= ${PORTSDIR}
|
||||
|
||||
.include "${PORTSDIR}/Mk/bsd.commands.mk"
|
||||
|
||||
#
|
||||
@ -1294,16 +1305,6 @@ PKGVERSION= ${PORTVERSION:C/[-_,]/./g}${_SUF1}${_SUF2}
|
||||
PKGNAME= ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}-${PKGVERSION}
|
||||
DISTNAME?= ${PORTNAME}-${DISTVERSIONPREFIX}${DISTVERSION:C/:(.)/\1/g}${DISTVERSIONSUFFIX}
|
||||
|
||||
# These need to be absolute since we don't know how deep in the ports
|
||||
# tree we are and thus can't go relative. They can, of course, be overridden
|
||||
# by individual Makefiles or local system make configuration.
|
||||
PORTSDIR?= /usr/ports
|
||||
LOCALBASE?= /usr/local
|
||||
X11BASE?= ${LOCALBASE}
|
||||
LINUXBASE?= /compat/linux
|
||||
DISTDIR?= ${PORTSDIR}/distfiles
|
||||
_DISTDIR?= ${DISTDIR}/${DIST_SUBDIR}
|
||||
INDEXDIR?= ${PORTSDIR}
|
||||
INDEXFILE?= INDEX-${OSVERSION:C/([0-9]).*/\1/}
|
||||
|
||||
DOCSDIR?= ${PREFIX}/share/doc/${PORTNAME}
|
||||
@ -2300,7 +2301,6 @@ COPYTREE_SHARE= ${SH} -c '(${FIND} -d $$0 $$2 | ${CPIO} -dumpl $$1 >/dev/null \
|
||||
.undef NO_PACKAGE
|
||||
.endif
|
||||
|
||||
COMMENTFILE?= ${PKGDIR}/pkg-comment
|
||||
DESCR?= ${PKGDIR}/pkg-descr
|
||||
PLIST?= ${PKGDIR}/pkg-plist
|
||||
PKGINSTALL?= ${PKGDIR}/pkg-install
|
||||
|
@ -40,6 +40,21 @@
|
||||
# Search for ports using either 'make search key=<keyword>'
|
||||
# or 'make search name=<keyword>'.
|
||||
|
||||
PORTSDIR?= /usr/ports
|
||||
TEMPLATES?= ${PORTSDIR}/Templates
|
||||
.if defined(PORTSTOP)
|
||||
README= ${TEMPLATES}/README.top
|
||||
.else
|
||||
README= ${TEMPLATES}/README.category
|
||||
.endif
|
||||
MOVEDDIR?= ${PORTSDIR}
|
||||
MOVEDFILE?= MOVED
|
||||
|
||||
# XXX Are these needed here? DESCR was set wrong for a few years
|
||||
MASTERDIR?= ${.CURDIR}
|
||||
PKGDIR?= ${MASTERDIR}
|
||||
DESCR?= ${PKGDIR}/pkg-descr
|
||||
|
||||
.include "${PORTSDIR}/Mk/bsd.commands.mk"
|
||||
|
||||
.MAIN: all
|
||||
@ -66,6 +81,9 @@ OSVERSION!= ${SYSCTL} -n kern.osreldate
|
||||
.endif
|
||||
.endif
|
||||
|
||||
INDEXDIR?= ${PORTSDIR}
|
||||
INDEXFILE?= INDEX-${OSVERSION:C/([0-9]).*/\1/}
|
||||
|
||||
UID!= ${ID} -u
|
||||
.if exists(${LOCALBASE}/sbin/pkg_info)
|
||||
PKG_INFO?= ${LOCALBASE}/sbin/pkg_info
|
||||
@ -249,28 +267,6 @@ readme:
|
||||
@${MAKE} README.html
|
||||
.endif
|
||||
|
||||
.if (${OPSYS} == "NetBSD")
|
||||
PORTSDIR ?= /usr/opt
|
||||
.else
|
||||
PORTSDIR ?= /usr/ports
|
||||
.endif
|
||||
TEMPLATES ?= ${PORTSDIR}/Templates
|
||||
.if defined(PORTSTOP)
|
||||
README= ${TEMPLATES}/README.top
|
||||
.else
|
||||
README= ${TEMPLATES}/README.category
|
||||
.endif
|
||||
COMMENTFILE?= ${.CURDIR}/pkg/COMMENT
|
||||
DESCR?= ${.CURDIR}/pkg/DESCR
|
||||
INDEXDIR?= ${PORTSDIR}
|
||||
.if ${OSVERSION} >= 500036
|
||||
INDEXFILE?= INDEX-${OSVERSION:C/([0-9]).*/\1/}
|
||||
.else
|
||||
INDEXFILE?= INDEX
|
||||
.endif
|
||||
MOVEDDIR?= ${PORTSDIR}
|
||||
MOVEDFILE?= MOVED
|
||||
|
||||
HTMLIFY= ${SED} -e 's/&/\&/g' -e 's/>/\>/g' -e 's/</\</g'
|
||||
|
||||
package-name:
|
||||
@ -297,12 +293,8 @@ README.html:
|
||||
.endif
|
||||
.if defined(COMMENT)
|
||||
@${ECHO_CMD} "${COMMENT}" | ${HTMLIFY} > $@.tmp4
|
||||
.else
|
||||
.if exists(${COMMENTFILE})
|
||||
@${HTMLIFY} ${COMMENTFILE} > $@.tmp4
|
||||
.else
|
||||
@> $@.tmp4
|
||||
.endif
|
||||
.endif
|
||||
@${CAT} ${README} | \
|
||||
${SED} -e 's/%%CATEGORY%%/'"`basename ${.CURDIR}`"'/g' \
|
||||
@ -415,7 +407,7 @@ _PORTSEARCH= \
|
||||
break; \
|
||||
}\
|
||||
} \
|
||||
if (toprint == 1 ) disp[fields[d[i]]] = 1; \
|
||||
if (toprint == 1 ) disp[fields[d[i]]] = 1; \
|
||||
} \
|
||||
} \
|
||||
{ \
|
||||
|
Loading…
x
Reference in New Issue
Block a user