1 # $OpenBSD: Makefile,v 1.87 2021/11/06 19:09:10 rsadowski Exp $
3 .if !defined(BSD_OWN_MK)
8 DISTFILES_DB ?= ${.CURDIR}/infrastructure/db/locate.database
9 INDEX = ${LOCALBASE}/share/ports-INDEX
13 .elif !make(search) && (defined(key) || defined(name) || defined(category) || defined(author))
14 # set up subdirs from the index, assume it's up-to-date
15 _CMD = perl ${.CURDIR}/infrastructure/bin/port-search-helper index='${INDEX}'
20 _CMD += maintainer='${name}'
22 . if defined(category)
23 _CMD += category='${category}'
25 . if defined(maintainer)
26 _CMD += maintainer='${maintainer}'
29 .elif defined(SUBDIRLIST)
30 SUBDIR != sed -e 's,[ ]*\#.*,,' -e '/^[ ]*$$/d' ${SUBDIRLIST}
51 SUBDIR += inputmethods
65 SUBDIR += productivity
76 .include <bsd.port.subdir.mk>
79 @if pkg_info -q -e 'portslist-<6.10'; then \
80 echo "Old portslist found"; \
81 echo "Don't mix -current and 6.4"; \
83 @echo "Please install portslist"
84 @echo "${SUDO} pkg_add portslist"
89 @awk -F\| '{ printf("Port:\t%s\nPath:\t%s\nInfo:\t%s\nMaint:\t%s\nIndex:\t%s\nL-deps:\t%s\nB-deps:\t%s\nR-deps:\t%s\n\n", $$1, $$2, $$4, $$6, $$7, $$8, $$9, $$10); }' < ${INDEX}
91 print-licenses: ${INDEX}
92 @printf "Port PC PF DC DF Maint\n"
93 @awk -F\| '{printf("%-40.39s%-3.2s%-3.2s%-3.2s%-3.2s%-25.25s\n",$$2,$$12,$$13,$$14,$$15,$$6);}' < ${INDEX}
96 .if !defined(key) && !defined(name)
97 @echo "The search target requires a keyword or name parameter,"
98 @echo "e.g.: \"make search key=somekeyword\" \"make search name=somename\""
101 @egrep -i -- "${key}" ${INDEX} | awk -F\| '{ printf("Port:\t%s\nPath:\t%s\nInfo:\t%s\nMaint:\t%s\nIndex:\t%s\nL-deps:\t%s\nB-deps:\t%s\nR-deps:\t%s\nArchs:\t%s\n\n", $$1, $$2, $$4, $$6, $$7, $$8, $$9, $$10, $$11); }'
103 @awk -F\| '$$1 ~ /${name}/ { printf("Port:\t%s\nPath:\t%s\nInfo:\t%s\nMaint:\t%s\nIndex:\t%s\nL-deps:\t%s\nB-deps:\t%s\nR-deps:\t%s\nArchs:\t%s\n\n", $$1, $$2, $$4, $$6, $$7, $$8, $$9, $$10, $$11); }' ${INDEX}
108 @{ echo "DUMMY_PACKAGE=Yes"; \
109 echo ".include <bsd.port.mk>"; }|${MAKE} -f - fix-permissions
111 distfiles-update-locatedb:
112 @PORTSDIR=${.CURDIR} /bin/sh ${.CURDIR}/infrastructure/fetch/distfiles-update-locatedb ${DISTFILES_DB}
114 create_DEPENDS_CACHE:
115 @${_mk_DEPENDS_CACHE}; echo $${_DEPENDS_CACHE}
117 destroy_DEPENDS_CACHE:
118 @${_PBUILD} rm -rf 2>/dev/null $${_DEPENDS_CACHE}
121 .PHONY: index search distfiles-update-locatedb \
122 print-licenses print-index fix-permissions \
123 create_DEPENDS_CACHE destroy_DEPENDS_CACHE