summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjperkin <jperkin@pkgsrc.org>2022-11-03 08:29:32 +0000
committerjperkin <jperkin@pkgsrc.org>2022-11-03 08:29:32 +0000
commit8229fba513e1a0d462dbd4da6611ba788f0ae6fd (patch)
treee307235716c5438267ddcbe5f954dbe48895c382
parent7d057f4cc13f29105e09122222911f6fd98ff3dd (diff)
downloadpkgsrc-8229fba513e1a0d462dbd4da6611ba788f0ae6fd.tar.gz
mk: Skip many more CTF and debug files by default.
Leave CTF_FILES_SKIP and STRIP_FILES_SKIP purely for packages to set any additional paths to skip.
-rw-r--r--mk/install/bsd.install-vars.mk6
-rw-r--r--mk/install/install.mk16
2 files changed, 18 insertions, 4 deletions
diff --git a/mk/install/bsd.install-vars.mk b/mk/install/bsd.install-vars.mk
index e7cab17da15..7bf37b9d167 100644
--- a/mk/install/bsd.install-vars.mk
+++ b/mk/install/bsd.install-vars.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.install-vars.mk,v 1.12 2022/10/12 10:47:00 jperkin Exp $
+# $NetBSD: bsd.install-vars.mk,v 1.13 2022/11/03 08:29:32 jperkin Exp $
#
# This Makefile fragment is included separately by bsd.pkg.mk and
# defines some variables which must be defined earlier than where
@@ -63,11 +63,11 @@ TOOLS_CREATE+= ctfconvert
TOOLS_PATH.ctfconvert= ${TOOLS_PLATFORM.ctfconvert}
TOOLS_ARGS.ctfconvert?= -i
CTFCONVERT?= ctfconvert
-CTF_FILES_SKIP?= include/* info/* share/* ${PKGMANDIR}/*
+CTF_FILES_SKIP?=
.endif
STRIP_DEBUG?= no
-STRIP_FILES_SKIP?= include/* info/* share/* ${PKGMANDIR}/*
+STRIP_FILES_SKIP?=
.if !empty(_MANCOMPRESSED:M[yY][eE][sS]) && empty(_MANZ:M[yY][eE][sS])
USE_TOOLS+= gunzip
diff --git a/mk/install/install.mk b/mk/install/install.mk
index 2360f5f5e42..2f079478158 100644
--- a/mk/install/install.mk
+++ b/mk/install/install.mk
@@ -1,4 +1,4 @@
-# $NetBSD: install.mk,v 1.81 2022/07/06 18:53:58 rillig Exp $
+# $NetBSD: install.mk,v 1.82 2022/11/03 08:29:32 jperkin Exp $
#
# This file provides the code for the "install" phase.
#
@@ -340,6 +340,18 @@ post-install:
@${DO_NADA}
.endif
+#
+# Filename matches that will never be suitable for debug handling. This is
+# not meant to be exhaustive, but to catch the most common directories and
+# extensions to avoid expensive checks and improve performance.
+#
+_DEBUG_SKIP_PATTERNS= include/* info/* share/*
+_DEBUG_SKIP_PATTERNS+= ${PKGMANDIR}/* ${PKGLOCALEDIR}/locale/*
+_DEBUG_SKIP_PATTERNS+= *.css *.html *.js *.json *.md *.rst *.txt *.xml
+_DEBUG_SKIP_PATTERNS+= *.php *.pl *.pm *.py *.pyc *.pyi *.pyo *.rb *.ri
+_DEBUG_SKIP_PATTERNS+= *.png *.gz *.svg *.gif
+_DEBUG_SKIP_PATTERNS+= *.a *.c *.h *.hpp *.la
+
######################################################################
### install-ctf (PRIVATE)
######################################################################
@@ -351,6 +363,7 @@ install-ctf: plist
${RUN}cd ${DESTDIR:Q}${PREFIX:Q}; \
${CAT} ${_PLIST_NOKEYWORDS} | while read f; do \
case "$${f}" in \
+ ${_DEBUG_SKIP_PATTERNS:@p@${p}) continue ;;@} \
${CTF_FILES_SKIP:@p@${p}) continue ;;@} \
*) ;; \
esac; \
@@ -376,6 +389,7 @@ install-strip-debug: plist
${RUN}cd ${DESTDIR:Q}${PREFIX:Q}; \
${CAT} ${_PLIST_NOKEYWORDS} | while read f; do \
case "$${f}" in \
+ ${_DEBUG_SKIP_PATTERNS:@p@${p}) continue ;;@} \
${STRIP_FILES_SKIP:@p@${p}) continue;;@} \
*) ;; \
esac; \