aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKris Kennaway <kris@FreeBSD.org>2007-08-08 03:46:04 +0000
committerKris Kennaway <kris@FreeBSD.org>2007-08-08 03:46:04 +0000
commit4a917313b0a855e034a82a2148602053862f74e8 (patch)
tree7a2f1734734b2e50349656be7286949b2a706529
parent7eb9d1cc9331695e543e48dcb219030c77435b4e (diff)
downloadports-4a917313b0a855e034a82a2148602053862f74e8.tar.gz
ports-4a917313b0a855e034a82a2148602053862f74e8.zip
Notes
-rw-r--r--Mk/bsd.port.mk22
-rw-r--r--Mk/bsd.port.subdir.mk46
2 files changed, 30 insertions, 38 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index c484a5f68663..7f5260ecf2d0 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -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
diff --git a/Mk/bsd.port.subdir.mk b/Mk/bsd.port.subdir.mk
index 0a3cecb5a55d..40d0dac65ca7 100644
--- a/Mk/bsd.port.subdir.mk
+++ b/Mk/bsd.port.subdir.mk
@@ -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/&/\&amp;/g' -e 's/>/\&gt;/g' -e 's/</\&lt;/g'
package-name:
@@ -298,12 +294,8 @@ README.html:
.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' \
-e '/%%COMMENT%%/r$@.tmp4' \
@@ -415,7 +407,7 @@ _PORTSEARCH= \
break; \
}\
} \
- if (toprint == 1 ) disp[fields[d[i]]] = 1; \
+ if (toprint == 1 ) disp[fields[d[i]]] = 1; \
} \
} \
{ \