aboutsummaryrefslogtreecommitdiff
path: root/Mk
diff options
context:
space:
mode:
authorKirill Ponomarev <krion@FreeBSD.org>2005-02-07 11:17:50 +0000
committerKirill Ponomarev <krion@FreeBSD.org>2005-02-07 11:17:50 +0000
commit1c8dc16ebeeccddc2d8286cfbd294b5991861411 (patch)
tree467f9d3f0764e6de38445cebb714f5ae04b9bd80 /Mk
parenta74cb3b9f72cda444a645c2494bd67b8700d6475 (diff)
downloadports-1c8dc16ebeeccddc2d8286cfbd294b5991861411.tar.gz
ports-1c8dc16ebeeccddc2d8286cfbd294b5991861411.zip
Notes
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.gcc.mk156
-rw-r--r--Mk/bsd.port.mk207
-rw-r--r--Mk/bsd.port.subdir.mk55
3 files changed, 314 insertions, 104 deletions
diff --git a/Mk/bsd.gcc.mk b/Mk/bsd.gcc.mk
new file mode 100644
index 000000000000..a623c2e48b72
--- /dev/null
+++ b/Mk/bsd.gcc.mk
@@ -0,0 +1,156 @@
+#-*- mode: Fundamental; tab-width: 4; -*-
+# ex:ts=4
+#
+# bsd.gcc.mk - Support for smarter USE_GCC usage.
+#
+# Created by: Edwin Groothuis <edwin@freebsd.org>
+#
+# For port developers:
+# If your port needs a specific version of GCC, you can easily specify
+# that with the "USE_GCC=" statement. If you need a certain minimal version,
+# but don't care if about the upperversion, just the + sign behind
+# the version.
+#
+# For example:
+# USE_GCC= 3.3 # port requires gcc 3.3 to build with.
+# USE_GCC= 3.1+ # port requires gcc 3.1 or later to build with.
+#
+# If you are wondering what your port exactly does, use "make test-gcc"
+# to see some debugging.
+#
+# $FreeBSD$
+#
+
+GCC_Include_MAINTAINER= portmgr@FreeBSD.org
+
+#
+# All GCC versions supported by the ports framework.
+# Please keep them in ascending order.
+#
+GCCVERSIONS= 020702 029500 030100 030200 030301 030402 040000
+
+#
+# Versions of GCC shipped.
+# The first field if the OSVERSION in which it appeared in the base system.
+# The second field is the OSVERSION in which it disappeared from
+# the base system.
+# The third field is the version as USE_GCC would use.
+#
+GCCVERSION_020702= 000000 400012 2.7
+GCCVERSION_029500= 400012 500035 2.95
+GCCVERSION_030100= 500035 500039 3.1
+GCCVERSION_030200= 500039 501103 3.2
+GCCVERSION_030301= 501103 502126 3.3
+GCCVERSION_030402= 502126 999999 3.4
+GCCVERSION_040000= 999999 999999 4.0
+
+#
+# No configurable parts below this.
+#
+
+#
+# See if we can use a later version
+#
+_USE_GCC:= ${USE_GCC:S/+//}
+.if ${USE_GCC} != ${_USE_GCC}
+_GCC_ORLATER:= true
+.endif
+
+#
+# Extract the fields from GCCVERSION_ and check if USE_GCC points to a valid
+# version.
+#
+.for v in ${GCCVERSIONS}
+. for j in ${GCCVERSION_${v}}
+. if !defined(_GCCVERSION_${v}_L)
+_GCCVERSION_${v}_L= ${j}
+. elif !defined(_GCCVERSION_${v}_R)
+_GCCVERSION_${v}_R= ${j}
+. elif !defined(_GCCVERSION_${v}_V)
+_GCCVERSION_${v}_V= ${j}
+. if ${_USE_GCC}==${j}
+_GCCVERSION_OKAY= true;
+. endif
+. endif
+. endfor
+.endfor
+
+.if !defined(_GCCVERSION_OKAY)
+BROKEN= "Unknown version of GCC specified (USE_GCC=${USE_GCC})"
+.endif
+
+#
+# Determine current GCCVERSION
+#
+.for v in ${GCCVERSIONS}
+. if exists(${LOCALBASE}/bin/gcc${_GCCVERSION_${v}_V:S/.//})
+_GCC_FOUND${v}= port
+. endif
+. if ${OSVERSION} >= ${_GCCVERSION_${v}_L} && ${OSVERSION} < ${_GCCVERSION_${v}_R}
+_GCCVERSION:= ${v}
+_GCC_FOUND${v}:= base
+. endif
+.endfor
+.if !defined(_GCCVERSION)
+BROKEN= "Couldn't find your current GCCVERSION (OSVERSION=${OSVERSION})"
+.endif
+
+#
+# If the GCC package defined in USE_GCC does not exist, but a later
+# version is allowed (for example 3.1+), see if there is a later.
+# The first available version will be used.
+#
+.if defined(_GCC_ORLATER)
+. for v in ${GCCVERSIONS}
+. if ${_USE_GCC} == ${_GCCVERSION_${v}_V}
+_GCC_MIN:= true
+. endif
+. if defined(_GCC_MIN) && defined(_GCC_FOUND${v}) && !defined(_GCC_FOUND)
+_GCC_FOUND:= ${_GCCVERSION_${v}_V}
+. endif
+. endfor
+.endif
+.if defined(_GCC_FOUND)
+_USE_GCC:=${_GCC_FOUND}
+.endif
+
+#
+# Determine if the installed OS already has this GCCVERSION, and if not
+# then set BUILD_DEPENDS, CC, CXX and F77
+#
+.for v in ${GCCVERSIONS}
+. if ${_USE_GCC} == ${_GCCVERSION_${v}_V}
+. if ${OSVERSION} < ${_GCCVERSION_${v}_L} || ${OSVERSION} > ${_GCCVERSION_${v}_R}
+V:= ${_GCCVERSION_${v}_V:S/.//}
+CC:= gcc${V}
+CXX:= g++${V}
+F77:= g77-${V}
+_GCC_BUILD_DEPENDS:= ${CC}
+. endif
+. endif
+.endfor
+.undef V
+
+.if defined(_GCC_BUILD_DEPENDS)
+BUILD_DEPENDS+= ${_GCC_BUILD_DEPENDS}:${PORTSDIR}/lang/${_GCC_BUILD_DEPENDS}
+.endif
+
+MAKE_ENV+= CC="${CC}" CXX="${CXX}"
+
+test-gcc:
+ @echo USE_GCC=${USE_GCC}
+.if defined(_GCC_ORLATER)
+ @echo Port can use later versions.
+.else
+ @echo Port cannot use later versions.
+.endif
+.for v in ${GCCVERSIONS}
+ @echo -n "GCC version: ${_GCCVERSION_${v}_V} "
+.if defined(_GCC_FOUND${v})
+ @echo -n "(${_GCC_FOUND${v}}) "
+.endif
+ @echo "- OSVERSION from ${_GCCVERSION_${v}_L} to ${_GCCVERSION_${v}_R}"
+# @echo ${v} - ${_GCC_FOUND${v}} - ${_GCCVERSION_${v}_L} to ${_GCCVERSION_${v}_R} - ${_GCCVERSION_${v}_V}
+.endfor
+ @echo Using GCC vesion ${_USE_GCC}
+ @echo CC:${CC} - CXX:${CXX} - F77:${F77} - BUILD_DEPENDS:${BUILD_DEPENDS}
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 127d1bc16a7d..f1978094eadd 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -155,10 +155,10 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org
# IGNORE - Package build should be skipped entirely (e.g.
# because of serious unfixable problems in the build,
# because it cannot be manually fetched, etc). Error
-# logs will not appear on bento, so this should be
+# logs will not appear on pointyhat, so this should be
# used sparingly.
# BROKEN - Port is believed to be broken. Package builds will
-# still be attempted on the bento package cluster to
+# still be attempted on the pointyhat package cluster to
# test this assumption.
# DEPRECATED - Port is deprecated to install. Advisory only.
# EXPIRATION_DATE
@@ -166,6 +166,9 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org
# the port is planed to remove. The date format is
# ISO 8601 (YYYY-MM-DD).
#
+# DISABLE_VULNERABILITIES
+# - If set, do not check if the port is listed in the
+# vulnerabilities database.
# In addition to RESTRICTED or NO_CDROM, if only a subset of distfiles
# or patchfiles have redistribution restrictions, set the following
# to the list of such files.
@@ -380,8 +383,12 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org
# one or more versions of PostgreSQL.
##
# USE_RC_SUBR - If set, the ports startup/shutdown script uses the common
-# routines found in etc/rc.subr and may need to
-# depend on the sysutils/rc_subr port.
+# routines found in etc/rc.subr and may need to
+# depend on the sysutils/rc_subr port.
+# If this is set to a list of files, these files will be
+# automatically added to ${SUB_FILES} and some "variable=value"
+# pairs will be added to ${SUB_LIST}. These files will be
+# installed in ${PREFIX}/etc/rc.d and added to the packing list.
# RC_SUBR - Set to path of rc.subr.
# Default: ${LOCALBASE}/etc/rc.subr.
##
@@ -628,8 +635,12 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org
# config - Configure options for this port (using ${DIALOG}).
# Automatically run prior to extract, patch, configure, build,
# install, and package.
-# showconfig - Display options config for this port
-# rmconfig - Remove the options config for this port
+# config-recursive
+# - Configure options for this port for this port and all dependencies.
+# showconfig - Display options config for this port.
+# rmconfig - Remove the options config for this port.
+# rmconfig-recursive
+# - Remove the options config for this port and all dependencies.
#
# Default sequence for "all" is:
#
@@ -1022,6 +1033,14 @@ PORTOBJFORMAT!= ${TEST} -x /usr/bin/objformat && /usr/bin/objformat || ${ECHO_C
MASTERDIR?= ${.CURDIR}
+.if ${MASTERDIR} != ${.CURDIR}
+SLAVE_PORT?= yes
+MASTER_PORT?=${MASTERDIR:C/[^\/]+\/\.\.\///:C/[^\/]+\/\.\.\///:C/^.*\/([^\/]+\/[^\/]+)$/\\1/}
+.else
+SLAVE_PORT?= no
+MASTER_PORT?=
+.endif
+
# If they exist, include Makefile.inc, then architecture/operating
# system specific Makefiles, then local Makefile.local.
@@ -1062,12 +1081,37 @@ UNIQUENAME?= ${PKGNAMEPREFIX}${PORTNAME}
OPTIONSFILE?= ${PORT_DBDIR}/${UNIQUENAME}/options
_OPTIONSFILE!= ${ECHO_CMD} "${OPTIONSFILE}"
.if defined(OPTIONS)
-.if exists(${_OPTIONSFILE}) && !make(rmconfig)
-.include "${_OPTIONSFILE}"
-.endif
-.if exists(${_OPTIONSFILE}.local)
-.include "${_OPTIONSFILE}.local"
-.endif
+. if defined(PACKAGE_BUILDING) || (defined(BATCH) && !exists(${_OPTIONSFILE}))
+. if defined(OPTIONS)
+REALOPTIONS=${OPTIONS:C/".*"//g}
+. for O in ${REALOPTIONS}
+RO:=${O}
+. if ${RO:L} == off
+WITHOUT:= ${WITHOUT} ${OPT}
+. endif
+. if ${RO:L} == on
+WITH:= ${WITH} ${OPT}
+. endif
+OPT:=${RO}
+. endfor
+. endif
+. for W in ${WITH}
+WITH_${W}:= true
+. endfor
+. for W in ${WITHOUT}
+WITHOUT_${W}:= true
+. endfor
+. undef WITH
+. undef WITHOUT
+. undef RO
+. undef REALOPTIONS
+. endif
+. if exists(${_OPTIONSFILE}) && !make(rmconfig)
+. include "${_OPTIONSFILE}"
+. endif
+. if exists(${_OPTIONSFILE}.local)
+. include "${_OPTIONSFILE}.local"
+. endif
.endif
# check for old, crufty, makefile types, part 1:
@@ -1384,62 +1428,7 @@ CONFIGURE_ENV+= MAKE=${GMAKE}
.endif
.if defined(USE_GCC)
-.if ${OSVERSION} < 400012
-GCCVERSION= 020702
-.endif
-.if ${OSVERSION} >= 400012 && ${OSVERSION} < 500035
-GCCVERSION= 029500
-.endif
-.if ${OSVERSION} >= 500035 && ${OSVERSION} < 500039
-GCCVERSION= 030100
-.endif
-.if ${OSVERSION} >= 500039 && ${OSVERSION} < 501103
-GCCVERSION= 030200
-.endif
-.if ${OSVERSION} >= 501103 && ${OSVERSION} < 502126
-GCCVERSION= 030301
-.endif
-.if ${OSVERSION} >= 502126
-GCCVERSION= 030402
-.endif
-.endif
-
-.if defined(USE_GCC)
-.if ${USE_GCC} == 2.95 && ( ${OSVERSION} < 400012 || ${OSVERSION} > 500034 )
-CC= gcc295
-CXX= g++295
-BUILD_DEPENDS+= gcc295:${PORTSDIR}/lang/gcc295
-GCCVERSION= 029500
-.endif
-.if ${USE_GCC} == 3.1 && ( ${OSVERSION} < 500035 || ${OSVERSION} > 500038 )
-CC= gcc31
-CXX= g++31
-F77= g77-31
-BUILD_DEPENDS+= gcc31:${PORTSDIR}/lang/gcc31
-GCCVERSION= 030100
-.endif
-.if ${USE_GCC} == 3.2 && ( ${OSVERSION} < 500039 || ${OSVERSION} > 501102 )
-CC= gcc32
-CXX= g++32
-F77= g77-32
-BUILD_DEPENDS+= gcc32:${PORTSDIR}/lang/gcc32
-GCCVERSION= 030200
-.endif
-.if ${USE_GCC} == 3.3 && ( ${OSVERSION} < 501103 || ${OSVERSION} > 502125 )
-CC= gcc33
-CXX= g++33
-F77= g77-33
-BUILD_DEPENDS+= gcc33:${PORTSDIR}/lang/gcc33
-GCCVERSION= 030301
-.endif
-.if ${USE_GCC} == 3.4 && ${OSVERSION} < 502126
-CC= gcc34
-CXX= g++34
-F77= g77-34
-BUILD_DEPENDS+= gcc34:${PORTSDIR}/lang/gcc34
-GCCVERSION= 030402
-.endif
-MAKE_ENV+= CC="${CC}" CXX="${CXX}"
+.include "${PORTSDIR}/Mk/bsd.gcc.mk"
.endif
.if defined(USE_OPENLDAP_VER)
@@ -1478,6 +1467,10 @@ RC_SUBR= ${LOCALBASE}/etc/rc.subr
.else
RC_SUBR= /etc/rc.subr
.endif
+.if ${USE_RC_SUBR:U} != "YES"
+SUB_LIST+= RC_SUBR=${RC_SUBR}
+SUB_FILES+= ${USE_RC_SUBR}
+.endif
.endif
.if defined(USE_ICONV)
@@ -1708,20 +1701,28 @@ BROKEN= "unknown MySQL version: ${MYSQL_VER}"
DEFAULT_PGSQL_VER?= 74
# Setting/finding PostgreSQL version we want.
-.if defined(WANT_PGSQL_VER)
+.if exists(${LOCALBASE}/bin/pg_config)
+_PGSQL_VER!= ${LOCALBASE}/bin/pg_config --version | ${SED} -n 's/PostgreSQL[^0-9]*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\..*/\1\2/p'
+.endif
+
+.if defined(WANT_PGSQL_VER) && defined(_PGSQL_VER) && ${WANT_PGSQL_VER} != ${_PGSQL_VER}
+IGNORE= "The port wants postgresql${WANT_PGSQL_VER}-client but you have postgresql${_PGSQL_VER}-client installed"
+.endif
+
+.if defined(_PGSQL_VER)
+PGSQL_VER= ${_PGSQL_VER}
+.elif defined(WANT_PGSQL_VER)
PGSQL_VER= ${WANT_PGSQL_VER}
-.elif exists(${LOCALBASE}/bin/pg_config)
-PGSQL_VER!= ${LOCALBASE}/bin/pg_config --version | ${SED} -n 's/PostgreSQL[^0-9]*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\..*/\1\2/p'
.else
PGSQL_VER= ${DEFAULT_PGSQL_VER}
-.endif # WANT_PGSQL_VER
+.endif
# And now we are checking if we can use it
.if exists(${PORTSDIR}/databases/postgresql${PGSQL_VER}-client)
.if defined(BROKEN_WITH_PGSQL)
. for VER in ${BROKEN_WITH_PGSQL}
. if (${PGSQL_VER} == "${VER}")
-BROKEN= "Doesn't work with PostgreSQL version : ${PGSQL_VER} (Doesn't support PostgresSQL ${BROKEN_WITH_PGSQL})"
+IGNORE= "Does not work with postgresql${PGSQL_VER}-client PostgresSQL \(${BROKEN_WITH_PGSQL} not supported\)"
. endif
. endfor
.endif # BROKEN_WITH_PGSQL
@@ -3006,8 +3007,8 @@ check-vulnerable:
if [ "$$audit_created" -lt "$$audit_expiry" ]; then \
${ECHO_MSG} "===> WARNING: Vulnerability database out of date, checking anyway"; \
fi; \
- vlist=`${_EXTRACT_AUDITFILE} | ${AWK} -F\| ' \
- /^[^#]/ { \
+ vlist=`${_EXTRACT_AUDITFILE} | ${GREP} "${PORTNAME}" | \
+ ${AWK} -F\| ' /^[^#]/ { \
if (!system("${PKG_VERSION} -T \"${PKGNAME}\" \"" $$1 "\"")) \
print "=> " $$3 ".\n Reference: <" $$2 ">" \
} \
@@ -3704,7 +3705,8 @@ _INSTALL_SEQ= install-message check-conflicts \
_INSTALL_SUSEQ= check-umask install-mtree pre-su-install \
pre-su-install-script do-install post-install \
post-install-script add-plist-info add-plist-docs \
- add-plist-post compress-man run-ldconfig fake-pkg security-check
+ add-plist-post install-rc-script compress-man run-ldconfig \
+ fake-pkg security-check
_PACKAGE_DEP= install
_PACKAGE_SEQ= package-message pre-package pre-package-script \
do-package post-package-script
@@ -4789,13 +4791,17 @@ add-plist-docs:
[ "`${SED} -En -e '/^@cw?d[ ]*/s,,,p' ${TMPPLIST} | ${TAIL} -n 1`" != "${PREFIX}" ]; then \
${ECHO_CMD} "@cwd ${PREFIX}" >> ${TMPPLIST}; \
fi
+.for x in ${PORTDOCS}
+ @if [ ! -e ${DOCSDIR}/${x} ]; then \
+ @${ECHO_CMD} ${DOCSDIR}/${x} | \
+ ${SED} -e 's,^${PREFIX}/,,' >> ${TMPPLIST}; \
+ fi
+.endfor
@${FIND} -P ${PORTDOCS:S/^/${DOCSDIR}\//} ! -type d 2>/dev/null | \
${SED} -ne 's,^${PREFIX}/,,p' >> ${TMPPLIST}
@${FIND} -P -d ${PORTDOCS:S/^/${DOCSDIR}\//} -type d 2>/dev/null | \
${SED} -ne 's,^${PREFIX}/,@dirrm ,p' >> ${TMPPLIST}
- @if [ -d "${DOCSDIR}" ]; then \
- ${ECHO_CMD} "@unexec rmdir %D/${DOCSDIR:S,^${PREFIX}/,,} 2>/dev/null || true" >> ${TMPPLIST}; \
- fi
+ @${ECHO_CMD} "@dirrm ${DOCSDIR:S,^${PREFIX}/,,}" >> ${TMPPLIST}
.else
@${DO_NADA}
.endif
@@ -4804,6 +4810,7 @@ add-plist-docs:
add-plist-info:
# Process GNU INFO files at package install/deinstall time
.for i in ${INFO}
+ install-info --quiet ${PREFIX}/${INFO_PATH}/$i.info ${PREFIX}/${INFO_PATH}/dir
@${ECHO_CMD} "@unexec install-info --delete %D/${INFO_PATH}/$i.info %D/${INFO_PATH}/dir" \
>> ${TMPPLIST}
@${LS} ${PREFIX}/${INFO_PATH}/$i.info* | ${SED} -e s:${PREFIX}/::g >> ${TMPPLIST}
@@ -4826,6 +4833,25 @@ add-plist-post:
@${DO_NADA}
.endif
+.if !target(install-rc-script)
+install-rc-script:
+.if defined(USE_RC_SUBR)
+.if ${USE_RC_SUBR:U} != "YES"
+ @${ECHO_CMD} "===> Installing startup script(s) in ${PREFIX}/etc/rc.d"
+ @if ${EGREP} -qe '^@cw?d' ${TMPPLIST} && \
+ [ "`${SED} -En -e '/^@cw?d[ ]*/s,,,p' ${TMPPLIST} | ${TAIL} -n 1`" != "${PREFIX}" ]; then \
+ ${ECHO_CMD} "@cwd ${PREFIX}" >> ${TMPPLIST}; \
+ fi
+ @for i in ${USE_RC_SUBR}; do \
+ ${INSTALL_SCRIPT} ${WRKDIR}/$${i} ${PREFIX}/etc/rc.d; \
+ ${ECHO_CMD} etc/rc.d/$${i} >> ${TMPPLIST}; \
+ done
+.endif
+.else
+ @${DO_NADA}
+.endif
+.endif
+
# Compress (or uncompress) and symlink manpages.
.if !target(compress-man)
compress-man:
@@ -5022,6 +5048,21 @@ config:
.endif
.endif
+.if !target(config-recursive)
+config-recursive:
+ @${ECHO_MSG} "===> Setting user-specified options for ${PKGNAME} and dependencies";
+ @for dir in ${.CURDIR} $$(${ALL-DEPENDS-LIST}); do \
+ (cd $$dir; ${MAKE} config-conditional); \
+ done
+.endif
+
+.if !target(config-conditional)
+config-conditional:
+.if defined(OPTIONS) && !exists(${_OPTIONSFILE})
+ cd ${.CURDIR} && ${MAKE} config;
+.endif
+.endif
+
.if !target(showconfig)
showconfig:
.if defined(OPTIONS) && exists(${_OPTIONSFILE})
@@ -5072,5 +5113,13 @@ rmconfig:
.endif
.endif
+.if !target(rmconfig-recursive)
+rmconfig-recursive:
+ @${ECHO_MSG} "===> Removing user-specified options for ${PKGNAME} and dependencies";
+ @for dir in ${.CURDIR} $$(${ALL-DEPENDS-LIST}); do \
+ (cd $$dir; ${MAKE} rmconfig); \
+ done
+.endif
+
.endif
# End of post-makefile section.
diff --git a/Mk/bsd.port.subdir.mk b/Mk/bsd.port.subdir.mk
index 5d00a4869ffd..8370cdd6e3e1 100644
--- a/Mk/bsd.port.subdir.mk
+++ b/Mk/bsd.port.subdir.mk
@@ -327,7 +327,7 @@ README.html:
PKGINSTALLVER="${PKGINSTALLVER:S/"/"'"'"/g:S/\$/\$\$/g:S/\\/\\\\/g}"
.endif
-PORTSEARCH_DISPLAY_FIELDS?=name,path,info,maint,index,bdeps,rdeps
+PORTSEARCH_DISPLAY_FIELDS?=name,path,info,maint,index,bdeps,rdeps,www
PORTSEARCH_KEYLIM?=0
PORTSEARCH_XKEYLIM?=0
PORTSEARCH_IGNORECASE?=1
@@ -342,7 +342,8 @@ search: ${PORTSDIR}/${INDEXFILE}
-z "$$maint" -a -z "$$xmaint" -a \
-z "$$cat" -a -z "$$xcat" -a \
-z "$$bdeps" -a -z "$$xbdeps" -a \
- -z "$$rdeps" -a -z "$$xrdeps" ]; \
+ -z "$$rdeps" -a -z "$$xrdeps" -a \
+ -z "$$www" -a -z "$$xwww" ]; \
then \
echo "The search target requires a keyword parameter or name parameter,"; \
echo "e.g.: \"make search key=somekeyword\""; \
@@ -358,6 +359,7 @@ search: ${PORTSDIR}/${INDEXFILE}
-v cat="$$cat" -v xcat="$$xcat" \
-v bdeps="$$bdeps" -v xbdeps="$$xbdeps" \
-v rdeps="$$rdeps" -v xrdeps="$$xrdeps" \
+ -v www="$$www" -v xwww="$$xwww" \
-v icase="$${icase:-${PORTSEARCH_IGNORECASE}}" \
-v keylim="$${keylim:-${PORTSEARCH_KEYLIM}}" \
-v xkeylim="$${xkeylim:-${PORTSEARCH_XKEYLIM}}" \
@@ -373,29 +375,32 @@ search: ${PORTSDIR}/${INDEXFILE}
if (!xkeylim && xkeylen) \
xparms[0] = (icase ? tolower(xkey) : xkey); \
if (icase) { \
- if (length(name)) parms[1] = tolower(name); if (length(xname)) xparms[1] = tolower(xname); \
- if (length(path)) parms[2] = tolower(path); if (length(xpath)) xparms[2] = tolower(xpath); \
- if (length(info)) parms[4] = tolower(info); if (length(xinfo)) xparms[4] = tolower(xinfo); \
- if (length(maint)) parms[6] = tolower(maint); if (length(xmaint)) xparms[6] = tolower(xmaint); \
- if (length(cat)) parms[7] = tolower(cat); if (length(xcat)) xparms[7] = tolower(xcat); \
- if (length(bdeps)) parms[8] = tolower(bdeps); if (length(xbdeps)) xparms[8] = tolower(xbdeps); \
- if (length(rdeps)) parms[9] = tolower(rdeps); if (length(xrdeps)) xparms[9] = tolower(xrdeps); \
+ if (length(name)) parms[1] = tolower(name); if (length(xname)) xparms[1] = tolower(xname); \
+ if (length(path)) parms[2] = tolower(path); if (length(xpath)) xparms[2] = tolower(xpath); \
+ if (length(info)) parms[4] = tolower(info); if (length(xinfo)) xparms[4] = tolower(xinfo); \
+ if (length(maint)) parms[6] = tolower(maint); if (length(xmaint)) xparms[6] = tolower(xmaint); \
+ if (length(cat)) parms[7] = tolower(cat); if (length(xcat)) xparms[7] = tolower(xcat); \
+ if (length(bdeps)) parms[8] = tolower(bdeps); if (length(xbdeps)) xparms[8] = tolower(xbdeps); \
+ if (length(rdeps)) parms[9] = tolower(rdeps); if (length(xrdeps)) xparms[9] = tolower(xrdeps); \
+ if (length(www)) parms[10] = tolower(www); if (length(xwww)) xparms[10] = tolower(xwww); \
} else { \
- if (length(name)) parms[1] = name; if (length(xname)) xparms[1] = xname; \
- if (length(path)) parms[2] = path; if (length(xpath)) xparms[2] = xpath; \
- if (length(info)) parms[4] = info; if (length(xinfo)) xparms[4] = xinfo; \
- if (length(maint)) parms[6] = maint; if (length(xmaint)) xparms[6] = xmaint; \
- if (length(cat)) parms[7] = cat; if (length(xcat)) xparms[7] = xcat; \
- if (length(bdeps)) parms[8] = bdeps; if (length(xbdeps)) xparms[8] = xbdeps; \
- if (length(rdeps)) parms[9] = rdeps; if (length(xrdeps)) xparms[9] = xrdeps; \
+ if (length(name)) parms[1] = name; if (length(xname)) xparms[1] = xname; \
+ if (length(path)) parms[2] = path; if (length(xpath)) xparms[2] = xpath; \
+ if (length(info)) parms[4] = info; if (length(xinfo)) xparms[4] = xinfo; \
+ if (length(maint)) parms[6] = maint; if (length(xmaint)) xparms[6] = xmaint; \
+ if (length(cat)) parms[7] = cat; if (length(xcat)) xparms[7] = xcat; \
+ if (length(bdeps)) parms[8] = bdeps; if (length(xbdeps)) xparms[8] = xbdeps; \
+ if (length(rdeps)) parms[9] = rdeps; if (length(xrdeps)) xparms[9] = xrdeps; \
+ if (length(www)) parms[10] = www; if (length(xwww)) xparms[10] = xwww; \
} \
- fields["name"] = 1; names[1] = "Port"; \
- fields["path"] = 2; names[2] = "Path"; \
- fields["info"] = 4; names[4] = "Info"; \
- fields["maint"] = 6; names[6] = "Maint"; \
- fields["cat"] = 7; names[7] = "Index"; \
- fields["bdeps"] = 8; names[8] = "B-deps"; \
- fields["rdeps"] = 9; names[9] = "R-deps"; \
+ fields["name"] = 1; names[1] = "Port"; \
+ fields["path"] = 2; names[2] = "Path"; \
+ fields["info"] = 4; names[4] = "Info"; \
+ fields["maint"] = 6; names[6] = "Maint"; \
+ fields["cat"] = 7; names[7] = "Index"; \
+ fields["bdeps"] = 8; names[8] = "B-deps"; \
+ fields["rdeps"] = 9; names[9] = "R-deps"; \
+ fields["www"] = 10; names[10] = "WWW"; \
split(display, d, /,[ \t]*/); \
for (i in d) { \
disp[fields[d[i]]] = 1; \
@@ -411,7 +416,7 @@ search: ${PORTSDIR}/${INDEXFILE}
if ((icase ? tolower($$i) : $$i) ~ xparms[i]) \
next; \
found = 0; \
- for (i = 1; i < 10; i++) \
+ for (i = 1; i < 11; i++) \
if (i in disp) { \
if (xkeylim && (icase ? tolower($$i) : $$i) ~ xkey) \
next; \
@@ -420,7 +425,7 @@ search: ${PORTSDIR}/${INDEXFILE}
} \
if (keylim && !found) \
next; \
- for (i = 1; i < 10; i++) \
+ for (i = 1; i < 11; i++) \
if (i in disp) \
printf("%s:\t%s\n", names[i], $$i); \
print(""); \