aboutsummaryrefslogtreecommitdiff
path: root/Mk/bsd.port.subdir.mk
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 /Mk/bsd.port.subdir.mk
parent7eb9d1cc9331695e543e48dcb219030c77435b4e (diff)
downloadports-4a917313b0a855e034a82a2148602053862f74e8.tar.gz
ports-4a917313b0a855e034a82a2148602053862f74e8.zip
Notes
Diffstat (limited to 'Mk/bsd.port.subdir.mk')
-rw-r--r--Mk/bsd.port.subdir.mk46
1 files changed, 19 insertions, 27 deletions
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; \
} \
} \
{ \