head 1.36; access; symbols pkgsrc-2023Q4:1.36.0.30 pkgsrc-2023Q4-base:1.36 pkgsrc-2023Q3:1.36.0.28 pkgsrc-2023Q3-base:1.36 pkgsrc-2023Q2:1.36.0.26 pkgsrc-2023Q2-base:1.36 pkgsrc-2023Q1:1.36.0.24 pkgsrc-2023Q1-base:1.36 pkgsrc-2022Q4:1.36.0.22 pkgsrc-2022Q4-base:1.36 pkgsrc-2022Q3:1.36.0.20 pkgsrc-2022Q3-base:1.36 pkgsrc-2022Q2:1.36.0.18 pkgsrc-2022Q2-base:1.36 pkgsrc-2022Q1:1.36.0.16 pkgsrc-2022Q1-base:1.36 pkgsrc-2021Q4:1.36.0.14 pkgsrc-2021Q4-base:1.36 pkgsrc-2021Q3:1.36.0.12 pkgsrc-2021Q3-base:1.36 pkgsrc-2021Q2:1.36.0.10 pkgsrc-2021Q2-base:1.36 pkgsrc-2021Q1:1.36.0.8 pkgsrc-2021Q1-base:1.36 pkgsrc-2020Q4:1.36.0.6 pkgsrc-2020Q4-base:1.36 pkgsrc-2020Q3:1.36.0.4 pkgsrc-2020Q3-base:1.36 pkgsrc-2020Q2:1.36.0.2 pkgsrc-2020Q2-base:1.36 pkgsrc-2020Q1:1.34.0.16 pkgsrc-2020Q1-base:1.34 pkgsrc-2019Q4:1.34.0.18 pkgsrc-2019Q4-base:1.34 pkgsrc-2019Q3:1.34.0.14 pkgsrc-2019Q3-base:1.34 pkgsrc-2019Q2:1.34.0.12 pkgsrc-2019Q2-base:1.34 pkgsrc-2019Q1:1.34.0.10 pkgsrc-2019Q1-base:1.34 pkgsrc-2018Q4:1.34.0.8 pkgsrc-2018Q4-base:1.34 pkgsrc-2018Q3:1.34.0.6 pkgsrc-2018Q3-base:1.34 pkgsrc-2018Q2:1.34.0.4 pkgsrc-2018Q2-base:1.34 pkgsrc-2018Q1:1.34.0.2 pkgsrc-2018Q1-base:1.34 pkgsrc-2017Q4:1.33.0.8 pkgsrc-2017Q4-base:1.33 pkgsrc-2017Q3:1.33.0.6 pkgsrc-2017Q3-base:1.33 pkgsrc-2017Q2:1.33.0.2 pkgsrc-2017Q2-base:1.33 pkgsrc-2017Q1:1.32.0.6 pkgsrc-2017Q1-base:1.32 pkgsrc-2016Q4:1.32.0.4 pkgsrc-2016Q4-base:1.32 pkgsrc-2016Q3:1.32.0.2 pkgsrc-2016Q3-base:1.32 pkgsrc-2016Q2:1.31.0.2 pkgsrc-2016Q2-base:1.31 pkgsrc-2016Q1:1.27.0.8 pkgsrc-2016Q1-base:1.27 pkgsrc-2015Q4:1.27.0.6 pkgsrc-2015Q4-base:1.27 pkgsrc-2015Q3:1.27.0.4 pkgsrc-2015Q3-base:1.27 pkgsrc-2015Q2:1.27.0.2 pkgsrc-2015Q2-base:1.27 pkgsrc-2015Q1:1.26.0.10 pkgsrc-2015Q1-base:1.26 pkgsrc-2014Q4:1.26.0.8 pkgsrc-2014Q4-base:1.26 pkgsrc-2014Q3:1.26.0.6 pkgsrc-2014Q3-base:1.26 pkgsrc-2014Q2:1.26.0.4 pkgsrc-2014Q2-base:1.26 pkgsrc-2014Q1:1.26.0.2 pkgsrc-2014Q1-base:1.26 pkgsrc-2013Q4:1.24.0.4 pkgsrc-2013Q4-base:1.24 pkgsrc-2013Q3:1.24.0.2 pkgsrc-2013Q3-base:1.24 pkgsrc-2013Q2:1.23.0.4 pkgsrc-2013Q2-base:1.23 pkgsrc-2013Q1:1.23.0.2 pkgsrc-2013Q1-base:1.23 pkgsrc-2012Q4:1.21.0.2 pkgsrc-2012Q4-base:1.21 pkgsrc-2012Q3:1.20.0.6 pkgsrc-2012Q3-base:1.20 pkgsrc-2012Q2:1.20.0.4 pkgsrc-2012Q2-base:1.20 pkgsrc-2012Q1:1.20.0.2 pkgsrc-2012Q1-base:1.20 pkgsrc-2011Q4:1.19.0.4 pkgsrc-2011Q4-base:1.19 pkgsrc-2011Q3:1.19.0.2 pkgsrc-2011Q3-base:1.19 pkgsrc-2011Q2:1.18.0.18 pkgsrc-2011Q2-base:1.18 pkgsrc-2011Q1:1.18.0.16 pkgsrc-2011Q1-base:1.18 pkgsrc-2010Q4:1.18.0.14 pkgsrc-2010Q4-base:1.18 pkgsrc-2010Q3:1.18.0.12 pkgsrc-2010Q3-base:1.18 pkgsrc-2010Q2:1.18.0.10 pkgsrc-2010Q2-base:1.18 pkgsrc-2010Q1:1.18.0.8 pkgsrc-2010Q1-base:1.18 pkgsrc-2009Q4:1.18.0.6 pkgsrc-2009Q4-base:1.18 pkgsrc-2009Q3:1.18.0.4 pkgsrc-2009Q3-base:1.18 pkgsrc-2009Q2:1.18.0.2 pkgsrc-2009Q2-base:1.18 pkgsrc-2009Q1:1.17.0.2 pkgsrc-2009Q1-base:1.17 pkgsrc-2008Q4:1.16.0.6 pkgsrc-2008Q4-base:1.16 pkgsrc-2008Q3:1.16.0.4 pkgsrc-2008Q3-base:1.16 cube-native-xorg:1.16.0.2 cube-native-xorg-base:1.16 pkgsrc-2008Q2:1.15.0.10 pkgsrc-2008Q2-base:1.15 cwrapper:1.15.0.8 pkgsrc-2008Q1:1.15.0.6 pkgsrc-2008Q1-base:1.15 pkgsrc-2007Q4:1.15.0.4 pkgsrc-2007Q4-base:1.15 pkgsrc-2007Q3:1.15.0.2 pkgsrc-2007Q3-base:1.15 pkgsrc-2007Q2:1.12.0.6 pkgsrc-2007Q2-base:1.12 pkgsrc-2007Q1:1.12.0.4 pkgsrc-2007Q1-base:1.12 jlam-pkgviews:1.12.0.2 jlam-pkgviews-base:1.12 pkgsrc-2006Q4:1.11.0.2 pkgsrc-2006Q4-base:1.11 pkgsrc-2006Q3:1.9.0.2 pkgsrc-2006Q3-base:1.9 pkgsrc-2006Q2:1.8.0.2 pkgsrc-2006Q2-base:1.8 pkgsrc-2006Q1:1.5.0.2 pkgsrc-2006Q1-base:1.5; locks; strict; comment @# @; 1.36 date 2020.06.10.16.06.09; author leot; state Exp; branches; next 1.35; commitid io0lXh1xnrUH8HbC; 1.35 date 2020.04.18.10.54.21; author rillig; state Exp; branches; next 1.34; commitid 1XV7BM0cu03v8R4C; 1.34 date 2018.03.11.14.53.10; author rillig; state Exp; branches; next 1.33; commitid DUnseBQW0IHYa3uA; 1.33 date 2017.06.14.16.23.09; author prlw1; state Exp; branches; next 1.32; commitid aE370uNFy4tdkmVz; 1.32 date 2016.07.25.21.57.23; author wiz; state Exp; branches; next 1.31; commitid GMIS5F5SMAwlCKfz; 1.31 date 2016.06.03.14.32.30; author joerg; state Exp; branches; next 1.30; commitid NMcvItvAcOWFP19z; 1.30 date 2016.05.10.16.54.05; author jperkin; state Exp; branches; next 1.29; commitid 6N4cNeHf8KhFnX5z; 1.29 date 2016.05.04.11.17.41; author jperkin; state Exp; branches; next 1.28; commitid LFc3FIQMGhPqI95z; 1.28 date 2016.04.10.15.58.03; author joerg; state Exp; branches; next 1.27; commitid 4OPBSqBKVmSA262z; 1.27 date 2015.06.07.03.39.08; author joerg; state Exp; branches; next 1.26; commitid QSKOQkDsKhdWQroy; 1.26 date 2014.01.24.12.42.52; author obache; state Exp; branches; next 1.25; commitid cUFkUpqfKUixSmmx; 1.25 date 2014.01.18.19.48.57; author wiz; state Exp; branches; next 1.24; commitid UJMjlEwxUCg3sDlx; 1.24 date 2013.07.05.15.31.54; author jperkin; state Exp; branches; next 1.23; commitid jw3VLiSFnc8umiWw; 1.23 date 2013.02.20.09.19.08; author wiz; state Exp; branches; next 1.22; 1.22 date 2013.02.20.08.45.05; author wiz; state Exp; branches; next 1.21; 1.21 date 2012.12.06.11.36.31; author jperkin; state Exp; branches; next 1.20; 1.20 date 2012.03.08.23.12.16; author wiz; state Exp; branches; next 1.19; 1.19 date 2011.08.30.11.19.51; author obache; state Exp; branches; next 1.18; 1.18 date 2009.06.14.17.12.03; author joerg; state Exp; branches; next 1.17; 1.17 date 2009.03.17.22.13.36; author rillig; state Exp; branches; next 1.16; 1.16 date 2008.07.23.23.46.26; author seb; state Exp; branches; next 1.15; 1.15 date 2007.08.20.10.59.53; author joerg; state Exp; branches; next 1.14; 1.14 date 2007.07.31.19.51.01; author jlam; state Exp; branches; next 1.13; 1.13 date 2007.07.02.14.54.21; author joerg; state Exp; branches; next 1.12; 1.12 date 2007.03.02.09.08.33; author wiz; state Exp; branches; next 1.11; 1.11 date 2006.11.15.10.40.34; author joerg; state Exp; branches; next 1.10; 1.10 date 2006.10.09.12.25.44; author joerg; state Exp; branches; next 1.9; 1.9 date 2006.07.07.21.24.29; author jlam; state Exp; branches; next 1.8; 1.8 date 2006.05.14.14.27.41; author seb; state Exp; branches; next 1.7; 1.7 date 2006.05.09.21.37.33; author minskim; state Exp; branches; next 1.6; 1.6 date 2006.04.17.06.12.46; author jlam; state Exp; branches; next 1.5; 1.5 date 2006.03.20.01.48.58; author jlam; state Exp; branches; next 1.4; 1.4 date 2006.03.09.16.39.39; author jlam; state Exp; branches; next 1.3; 1.3 date 2006.01.14.00.58.37; author seb; state Exp; branches; next 1.2; 1.2 date 2006.01.13.22.37.02; author jlam; state Exp; branches; next 1.1; 1.1 date 2006.01.12.23.43.57; author jlam; state Exp; branches; next ; desc @@ 1.36 log @mk/plist: Add EARLY_PRINT_PLIST_AWK EARLY_PRINT_PLIST_AWK is like PRINT_PLIST_AWK but operates before the file/directory lists are sorted. Discussed on tech-pkg@@ mainly to address `print-PLIST' order problems for Python 3 packages: @ text @# $NetBSD: print-plist.mk,v 1.35 2020/04/18 10:54:21 rillig Exp $ # # Automatic PLIST generation # - files & symlinks first # - empty directories are handled properly # - dirs from mtree files are excluded # - substitute for platform or package specifics substrings # # Usage: # - make install # - make print-PLIST | brain >PLIST # # Keywords: plist print-plist _PRINT_PLIST_AWK_SUBST={ _PRINT_PLIST_AWK_SUBST+= \ gsub(/${PKGNAME_NOREV}/, "$${PKGNAME}"); \ gsub(/${PKGVERSION:S/./\./g:C/nb[0-9]*$$//}/, "$${PKGVERSION}");\ gsub(/^${PKGLOCALEDIR}\/locale/, "share/locale"); \ gsub("^${PKGGNUDIR:S/\/$$//}/", "gnu/"); \ gsub("^${PKGINFODIR}/", "info/"); \ gsub("^${PKGMANDIR}/", "man/"); _PRINT_PLIST_AWK_SUBST+=} _PRINT_PLIST_AWK_IGNORE= ($$0 ~ /^${PKG_DBDIR:S|^${PREFIX}/||:S|/|\\/|g}\//) _PRINT_PLIST_AWK_IGNORE+= || ($$0 ~ /emul\/linux\/proc/) .if defined(INFO_FILES) _PRINT_PLIST_AWK_IGNORE+= || ($$0 ~ /^${PKGINFODIR:S|/|\\/|g}\/dir$$/) _PRINT_PLIST_AWK_IGNORE+= || ($$0 ~ /^${PKGINFODIR:S|/|\\/|g}\/[^\/]+(-[0-9]+)(\.gz)?$$/) _PRINT_PLIST_AWK_IGNORE+= || ($$0 ~ /^([^\/]*\/)*(info\/[^\/]+|[^\/]+\.info)(-[0-9]+)(\.gz)?$$/) .endif .if (defined(FONTS_DIRS.x11) && !empty(FONTS_DIRS.x11:M*)) _PRINT_PLIST_AWK_IGNORE+= || ($$0 ~ /^.*\/encodings\.dir/) _PRINT_PLIST_AWK_IGNORE+= || ($$0 ~ /^.*\/fonts\.dir/) .endif .if (defined(FONTS_DIRS.ttf) && !empty(FONTS_DIRS.ttf:M*)) || \ (defined(FONTS_DIRS.type1) && !empty(FONTS_DIRS.type1:M*)) _PRINT_PLIST_AWK_IGNORE+= || ($$0 ~ /^.*\/fonts\.scale/) .endif .if (defined(FONTS_DIRS.ttf) && !empty(FONTS_DIRS.ttf:M*)) || \ (defined(FONTS_DIRS.type1) && !empty(FONTS_DIRS.type1:M*)) || \ (defined(FONTS_DIRS.x11) && !empty(FONTS_DIRS.x11:M*)) _PRINT_PLIST_AWK_IGNORE+= || ($$0 ~ /^.*\/fonts\.cache-1/) .endif .if defined(ICON_THEMES) _PRINT_PLIST_AWK_IGNORE+= || ($$0 ~ /^share\/icons\/*\/icon-theme\.cache$$/) .endif # List the content of $PREFIX and emit "@@pkgdir " statements for # empty directories. _PRINT_PLIST_FILES_CMD= \ ${FIND} ${DESTDIR}${PREFIX}/. \! -type d -print _PRINT_PLIST_DIRS_CMD= \ ${FIND} ${DESTDIR}${PREFIX}/. -type d -print .if !empty(LIBTOOLIZE_PLIST:M[yY][eE][sS]) _PRINT_PLIST_LIBTOOLIZE_FILTER?= \ ( \ if ${TEST} -d ${WRKDIR}; then \ tmpdir="${WRKDIR}"; \ else \ tmpdir="$${TMPDIR-/tmp}"; \ fi; \ fileslist="$$tmpdir/print.plist.files.$$$$"; \ libslist="$$tmpdir/print.plist.libs.$$$$"; \ while read file; do \ case $$file in \ *.la) \ ${_LIBTOOL_EXPAND} $$file >> $$libslist; \ ;; \ esac; \ ${ECHO} "$$file"; \ done > $$fileslist; \ if ${TEST} -f "$$libslist"; then \ ${GREP} -hvxF "`${SORT} -u $$libslist`" "$$fileslist"; \ else \ ${CAT} "$$fileslist"; \ fi; \ ${RM} -f "$$fileslist" "$$libslist"; \ ) .else _PRINT_PLIST_LIBTOOLIZE_FILTER?= ${CAT} .endif .PHONY: print-PLIST .if !target(print-PLIST) print-PLIST: ${RUN} ${ECHO} '@@comment $$'NetBSD'$$' ${RUN} ${ALL_ENV}; \ shlib_type=${SHLIB_TYPE:Q}; \ case $$shlib_type in \ "a.out") genlinks=1 ;; \ *) genlinks=0 ;; \ esac; \ ${_PRINT_PLIST_FILES_CMD} \ | ${AWK} ' \ ${EARLY_PRINT_PLIST_AWK} \ { print $$0; }' \ | ${_PRINT_PLIST_LIBTOOLIZE_FILTER} \ | ${SORT} \ | ${AWK} ' \ { sub("${DESTDIR:S|+|\\\\+|g}${PREFIX}/\\./", ""); } \ ${_PRINT_PLIST_AWK_IGNORE} { next; } \ ${PRINT_PLIST_AWK} \ ${_PRINT_PLIST_AWK_SUBST} \ /^@@/ { print $$0; next } \ /.*\/lib[^\/]+\.so\.[0-9]+\.[0-9]+\.[0-9]+$$/ { \ print $$0; \ sub("\\.[0-9]+$$", ""); \ if ('$$genlinks') print $$0; \ sub("\\.[0-9]+$$", ""); \ if ('$$genlinks') print $$0; \ sub("\\.[0-9]+$$", ""); \ if ('$$genlinks') print $$0; \ next; \ } \ /.*\/lib[^\/]+\.so\.[0-9]+\.[0-9]+$$/ { \ print $$0; \ sub("\\.[0-9]+$$", ""); \ if ('$$genlinks') print $$0; \ sub("\\.[0-9]+$$", ""); \ if ('$$genlinks') print $$0; \ next; \ } \ /^man\// { sub("\\.gz$$", ""); } \ { print $$0; }' ${RUN}\ for i in `${_PRINT_PLIST_DIRS_CMD} \ | ${AWK} ' \ ${EARLY_PRINT_PLIST_AWK} \ { print $$0; }' \ | ${SORT} -r \ | ${AWK} ' \ /emul\/linux\/proc/ { next; } \ /${DESTDIR:S|/|\\/|g:S/+/\\\\+/g}${PREFIX:S|/|\\/|g}\/\.$$/ { next; } \ /${PKG_DBDIR:S|/|\\/|g}\// { next; } \ { sub("${DESTDIR:S/+/\\\\\\+/g}${PREFIX}/\\\\./", ""); } \ { sub("^${PKGINFODIR}/", "info/"); } \ { sub("^${PKGMANDIR}/", "man/"); } \ /^${PKG_DBDIR:S|^${PREFIX}/||:S|/|\\/|g}(\/|$$)/ { next; } \ /^${PKGINFODIR:S|/|\\/|g}$$/ { next; } \ { print $$0; }'` ; \ do \ if [ `${LS} -la ${DESTDIR}${PREFIX}/$$i | ${WC} -l` = 3 ]; then \ ${ECHO} @@pkgdir $$i | ${AWK} ' \ ${PRINT_PLIST_AWK} \ { print $$0; }' ; \ fi ; \ done \ | ${AWK} '${_PRINT_PLIST_AWK_SUBST} { print $$0; }' .endif # target(print-PLIST) _VARGROUPS+= print-PLIST _PKG_VARS.print-PLIST= \ PKGNAME_NOREV PKGVERSION \ PKGLOCALEDIR PKGGNUDIR PKGINFODIR PKGMANDIR PKG_DBDIR \ FONTS_DIRS.x11 FONTS_DIRS.ttf FONTS_DIRS.type1 \ INFO_FILES ICON_THEMES PRINT_PLIST_AWK _SYS_VARS.print-PLIST= \ PREFIX DESTDIR LIBTOOLIZE_PLIST SHLIB_TYPE WRKDIR _USE_VARS.print-PLIST= ALL_ENV _IGN_VARS.print-PLIST= _* _LISTED_VARS.print-PLIST= \ *_SUBST *_AWK _SORTED_VARS.print-PLIST= \ *_ENV @ 1.35 log @mk/plist/print-plist.mk: add show-all-print-PLIST target This makes it easier to see what happens during print-PLIST. @ text @d1 1 a1 1 # $NetBSD: print-plist.mk,v 1.34 2018/03/11 14:53:10 rillig Exp $ d97 3 d130 3 @ 1.34 log @mk/plist: make print-PLIST discoverable by "make help" Because print-PLIST uses mixed case (unlike most of the other make targets), it is not found by the keyword search of "make help". @ text @d1 1 a1 1 # $NetBSD: print-plist.mk,v 1.33 2017/06/14 16:23:09 prlw1 Exp $ d90 1 a90 1 ${RUN} ${ALL_ENV}; \ d147 15 @ 1.33 log @Essentially from OBATA Akio in private mail, June 2015: Introduce Icon Theme cache handling framework Icon Theme cache files are used by GTK+ and maintained with the gtk-update-icon-cache tool. Each Icon Theme package duplicates its own maintainance scripts: only the specified icon theme directory differs. With this framework, if packages have ICON_THEMES=yes, associated icon themes will be detected and their cache files will be maintained automatically. Change cache handling behaviour as follows: * Icon theme caches will be updated if either gtk2+ or gtk3+ gtk-update-icon-cache tool is available. * With installation of gtk2+ package, not only hicolor icon theme but also any other icon theme cache files will be updated. * Prevent removal of icon caches at deinstall, gtk3+ may be installed and using them. * Ditto with gtk3+, gtk2+ may not be installed now, so caches must be maintained by gtk3+. @ text @d1 13 a13 13 # $NetBSD: print-plist.mk,v 1.32 2016/07/25 21:57:23 wiz Exp $ ### ### Automatic PLIST generation ### - files & symlinks first ### - empty directories are handled properly ### - dirs from mtree files are excluded ### - substitute for platform or package specifics substrings ### ### Usage: ### - make install ### - make print-PLIST | brain >PLIST ### @ 1.32 log @Remove special PRINT_PLIST_AWK for a couple of variables. In particular: OS_VERSION MACHINE_GNU_PLATFORM MACHINE_ARCH MACHINE_GNU_ARCH LOWER_OS_VERSION Reason: Only very few packages really need these, many other have false positives. Ok jperkin@@ @ text @d1 1 a1 1 # $NetBSD: print-plist.mk,v 1.31 2016/06/03 14:32:30 joerg Exp $ d46 3 @ 1.31 log @Honour ALL_ENV in print-PLIST. @ text @d1 1 a1 1 # $NetBSD: print-plist.mk,v 1.30 2016/05/10 16:54:05 jperkin Exp $ a15 9 .if !defined(EMUL_PLATFORMS) _PRINT_PLIST_AWK_SUBST+= \ gsub(/${OS_VERSION:S/./\./g}/, "$${OS_VERSION}"); \ gsub(/${MACHINE_GNU_PLATFORM}/, "$${MACHINE_GNU_PLATFORM}"); \ gsub(/${MACHINE_ARCH}/, "$${MACHINE_ARCH}"); \ gsub(/${MACHINE_GNU_ARCH}/, "$${MACHINE_GNU_ARCH}"); _PRINT_PLIST_AWK_SUBST+= \ gsub(/${LOWER_OS_VERSION:S/./\./g}/, "$${LOWER_OS_VERSION}"); .endif @ 1.30 log @Restore print-PLIST @@pkgdir functionality. This was lost in the @@dirrm cleanup as the implicit print action was removed. @ text @d1 1 a1 1 # $NetBSD: print-plist.mk,v 1.29 2016/05/04 11:17:41 jperkin Exp $ d96 1 a96 1 ${RUN}\ @ 1.29 log @Handle MANZ for print-PLIST. @ text @d1 1 a1 1 # $NetBSD: print-plist.mk,v 1.28 2016/04/10 15:58:03 joerg Exp $ d142 2 a143 1 /^${PKGINFODIR:S|/|\\/|g}$$/ { next; }'` ; \ @ 1.28 log @Remove support for USE_DESTDIR=no. @ text @d1 1 a1 1 # $NetBSD: print-plist.mk,v 1.27 2015/06/07 03:39:08 joerg Exp $ d129 1 @ 1.27 log @Garbage collect remaining part of the @@dirrm logic. @ text @d1 1 a1 1 # $NetBSD: print-plist.mk,v 1.26 2014/01/24 12:42:52 obache Exp $ d56 2 a57 11 # scan $PREFIX for any files/dirs modified since the package was extracted # will emit "@@exec mkdir"-statements for empty directories # XXX will fail for data files that were copied using tar (e.g. emacs)! # XXX should check $LOCALBASE and $X11BASE, and add @@cwd statements .if ${_USE_DESTDIR} == "no" _PRINT_PLIST_FILES_CMD= \ ${FIND} ${DESTDIR}${PREFIX}/. -xdev -newer ${_COOKIE.extract} \! -type d -print _PRINT_PLIST_DIRS_CMD= \ ${FIND} ${DESTDIR}${PREFIX}/. -xdev -newer ${_COOKIE.extract} -type d -print .else a61 1 .endif @ 1.26 log @Move PY_PEP3147 specific PRINT_PLIST handling from common mk/plist/print-plist.mk to lang/python/extension.mk, handling reverse way. @ text @d1 1 a1 1 # $NetBSD: print-plist.mk,v 1.25 2014/01/18 19:48:57 wiz Exp $ a55 31 # Common (system) directories not to generate @@dirrm statements for # Reads _MTREE_FILE and generate awk statements that will # sort out which directories NOT to include into the PLIST @@dirrm list _COMMON_MTREE_FILE= ${PKGSRCDIR}/mk/plist/common-dirs.mtree .if make(print-PLIST) _PRINT_PLIST_COMMON_DIRS!= ${AWK} 'BEGIN { \ i=0; \ stack[i]="${PREFIX}" ; \ cwd=""; \ } \ ! ( /^\// || /^\#/ || /^$$/ ) { \ if ( $$1 == ".." ){ \ i=i-1; \ cwd = stack[i]; \ } else if ( $$1 == "." ){ \ } else { \ stack[i] = cwd ; \ if ( i == 0 ){ \ cwd = $$1 ; \ } else { \ cwd = cwd "\\/" $$1 ; \ } \ print "/^" cwd "$$$$/ { next; }"; \ i=i+1 ; \ } \ } \ END { print "{ print $$$$0; }"; } \ ' <${_COMMON_MTREE_FILE} .endif d151 1 a151 2 /^${PKGINFODIR:S|/|\\/|g}$$/ { next; } \ ${_PRINT_PLIST_COMMON_DIRS}'` ; \ @ 1.25 log @Improve support for python-3.3. @ text @d1 1 a1 1 # $NetBSD: print-plist.mk,v 1.24 2013/07/05 15:31:54 jperkin Exp $ a31 3 # for Python packages _PRINT_PLIST_AWK_SUBST+= gsub(/__pycache__\//, ""); _PRINT_PLIST_AWK_SUBST+= gsub(/\.cpython-[0-9]+/, "") @ 1.24 log @Fix print-PLIST with a custom PKGGNUDIR. @ text @d1 1 a1 1 # $NetBSD: print-plist.mk,v 1.23 2013/02/20 09:19:08 wiz Exp $ d32 4 @ 1.23 log @Fix continuation for previous. @ text @d1 1 a1 1 # $NetBSD: print-plist.mk,v 1.22 2013/02/20 08:45:05 wiz Exp $ d29 1 a29 1 gsub("^${PKGGNUDIR}", "gnu/"); \ a177 1 { sub("^${PKGGNUDIR}", "gnu/"); } \ @ 1.22 log @Remove OPSYS and LOWER_OPSYS substitutions in print-PLIST; nowadays they cause more PLIST breakage than they fix. @ text @d1 1 a1 1 # $NetBSD: print-plist.mk,v 1.21 2012/12/06 11:36:31 jperkin Exp $ d23 1 a23 1 gsub(/${LOWER_OS_VERSION:S/./\./g}/, "$${LOWER_OS_VERSION}"); \ @ 1.21 log @Introduce PKGGNUDIR as a way to control gnu prefix. By default pkgsrc uses LOCABASE/gnu as a prefix for packages to install native versions of GNU tools, which are them symbolically linked back to the 'g' versions of the files in LOCALBASE, and users can then add LOCALBASE/gnu/bin to PATH to pick up those tools. On systems where the GNU environment is desired, PKGGNUDIR now allows users to install the non-'g' files directly into LOCALBASE, making them the default without having to alter PATH, whilst retaining the 'g' files in order to ensure dependencies and tool paths remain the same. @ text @d1 1 a1 1 # $NetBSD: print-plist.mk,v 1.20 2012/03/08 23:12:16 wiz Exp $ a17 1 gsub(/${OPSYS}/, "$${OPSYS}"); \ a23 1 gsub(/${LOWER_OPSYS}/, "$${LOWER_OPSYS}"); @ 1.20 log @Remove special handling for LOWER_VENDOR in print-PLIST, it hurts more than it helps (e.g. replacing foo.pc with foo.${LOWER_VENDOR}). @ text @d1 1 a1 1 # $NetBSD: print-plist.mk,v 1.19 2011/08/30 11:19:51 obache Exp $ d31 1 d180 1 @ 1.19 log @escape `+' in DESTDIR for regex. fixes PR#45245. @ text @d1 1 a1 1 # $NetBSD: print-plist.mk,v 1.18 2009/06/14 17:12:03 joerg Exp $ a22 4 . if !empty(LOWER_VENDOR) _PRINT_PLIST_AWK_SUBST+= \ gsub(/${LOWER_VENDOR}/, "$${LOWER_VENDOR}"); . endif @ 1.18 log @Don't generate @@dirrm lines in print-PLIST, switch @@exec mkdir lines to @@pkgdir. @ text @d1 1 a1 1 # $NetBSD: print-plist.mk,v 1.17 2009/03/17 22:13:36 rillig Exp $ d151 1 a151 1 { sub("${DESTDIR}${PREFIX}/\\./", ""); } \ d180 1 a180 1 /${DESTDIR:S|/|\\/|g}${PREFIX:S|/|\\/|g}\/\.$$/ { next; } \ d182 1 a182 1 { sub("${DESTDIR}${PREFIX}/\\\\./", ""); } \ @ 1.17 log @Replaced _PKG_SILENT and _PKG_DEBUG with RUN. @ text @d1 1 a1 1 # $NetBSD: print-plist.mk,v 1.16 2008/07/23 23:46:26 seb Exp $ a5 1 ### - @@dirrm statements last a34 1 gsub(/^@@dirrm ${PKGLOCALEDIR}\/locale/, "@@dirrm share/locale"); \ d190 1 a190 1 ${ECHO} @@exec \$${MKDIR} %D/$$i | ${AWK} ' \ a193 3 ${ECHO} @@dirrm $$i | ${AWK} ' \ ${PRINT_PLIST_AWK} \ { print $$0; }' ; \ @ 1.16 log @Avoid quoting "other character" in awk's strings as regular expressions. See pkg/39002. @ text @d1 1 a1 1 # $NetBSD: print-plist.mk,v 1.15 2007/08/20 10:59:53 joerg Exp $ d142 2 a143 3 ${_PKG_SILENT}${_PKG_DEBUG}\ ${ECHO} '@@comment $$'NetBSD'$$' ${_PKG_SILENT}${_PKG_DEBUG}\ d177 1 a177 1 ${_PKG_SILENT}${_PKG_DEBUG}\ @ 1.15 log @For DESTDIR operation, no need to filter out old files. @ text @d1 1 a1 1 # $NetBSD: print-plist.mk,v 1.14 2007/07/31 19:51:01 jlam Exp $ d37 2 a38 2 gsub("^${PKGINFODIR}\/", "info/"); \ gsub("^${PKGMANDIR}\/", "man/"); @ 1.14 log @Don't substitute for OPSYS- or ARCH-related variables in print-plist if EMUL_PLATFORMS is defined. This facilitates making EMUL_PLATFORM-specific PLISTs. @ text @d1 1 a1 1 # $NetBSD: print-plist.mk,v 1.13 2007/07/02 14:54:21 joerg Exp $ d98 1 d103 6 @ 1.13 log @Remove USE_MTREE support. Keep one copy (the NetBSD version) for the purpose of print-PLIST in plist/common-dirs.mtree. Discussed with wiz@@, no objections on tech-pkg@@. @ text @d1 1 a1 1 # $NetBSD: print-plist.mk,v 1.12 2007/03/02 09:08:33 wiz Exp $ d16 3 a18 1 _PRINT_PLIST_AWK_SUBST={ \ d24 7 a30 2 .if !empty(LOWER_VENDOR) _PRINT_PLIST_AWK_SUBST+= gsub(/${LOWER_VENDOR}/, "$${LOWER_VENDOR}"); a32 2 gsub(/${LOWER_OS_VERSION:S/./\./g}/, "$${LOWER_OS_VERSION}"); \ gsub(/${LOWER_OPSYS}/, "$${LOWER_OPSYS}"); \ d38 2 a39 2 gsub("^${PKGMANDIR}\/", "man/"); \ } @ 1.12 log @Make MTREE_FILE and MTREE_ARGS internal by prefixing them with '_'. They are not supposed to be set by the user. @ text @d1 1 a1 1 # $NetBSD: print-plist.mk,v 1.11 2006/11/15 10:40:34 joerg Exp $ d60 2 d85 1 a85 1 ' <${_MTREE_FILE} @ 1.11 log @Font-related entries we skip for CHECK_FILES should be skipped for print-PLIST as well. @ text @d1 1 a1 1 # $NetBSD: print-plist.mk,v 1.10 2006/10/09 12:25:44 joerg Exp $ d58 1 a58 1 # Reads MTREE_FILE and generate awk statements that will d83 1 a83 1 ' <${MTREE_FILE} @ 1.10 log @Main infrastructure for DESTDIR support. Packages may set PKG_DESTDIR_SUPPORT to either "destdir" or "user-destdir" to flag support for this, following the same rules as PKG_INSTALLATION_TYPES (e.g. define before first include of bsd.prefs.mk). The user activates it via USE_DESTDIR. When set to "yes", packages with "user-destdir" are handled as "destdir". The installation of the package will not go to ${LOCALBASE}, but a subdirectory of ${WRKDIR} instead. pre/post install scripts are not run and the package is not registered either. A binary package can be created instead to be installed normally with pkg_add. For "user-destdir" packages, everything is run as normal user and ownership is supposed to be correctled by pkg_create later. Since the current pkg_install code uses pax and it doesn't allow overwriting owners, this does not work yet. For "destdir" packages, installation, packaging and cleaning is run as root. This commit does not change the handling of DEPENDS_TARGET or bin-install to allow recursive usage. @ text @d1 1 a1 1 # $NetBSD: print-plist.mk,v 1.9 2006/07/07 21:24:29 jlam Exp $ d43 13 @ 1.9 log @Rename _COOKIE variables to _COOKIE.. These are private variables so there are no user-visible changes. This change just makes it a little easier to write for loops. @ text @d1 1 a1 1 # $NetBSD: print-plist.mk,v 1.8 2006/05/14 14:27:41 seb Exp $ d79 1 a79 1 ${FIND} ${PREFIX}/. -xdev -newer ${_COOKIE.extract} \! -type d -print d81 1 a81 1 ${FIND} ${PREFIX}/. -xdev -newer ${_COOKIE.extract} -type d -print d127 1 a127 1 { sub("${PREFIX}/\\./", ""); } \ d156 1 a156 1 /${PREFIX:S|/|\\/|g}\/\.$$/ { next; } \ d158 1 a158 1 { sub("${PREFIX}/\\\\./", ""); } \ d165 1 a165 1 if [ `${LS} -la ${PREFIX}/$$i | ${WC} -l` = 3 ]; then \ @ 1.8 log @Re-add ${PREFIX} to the list of directories print-PLIST target should ignore or it is broken for packages that installing files right under ${PREFIX}. Example in lang/sun-jre15: $ make print-PLIST ... @@dirrm java/sun-1.5 ls: /usr/pkg//usr/pkg/.: No such file or directory @@dirrm /usr/pkg/. $ It looks to me that was removed by mistake in revision 1.5 of this file. @ text @d1 1 a1 1 # $NetBSD: print-plist.mk,v 1.7 2006/05/09 21:37:33 minskim Exp $ d79 1 a79 1 ${FIND} ${PREFIX}/. -xdev -newer ${_EXTRACT_COOKIE} \! -type d -print d81 1 a81 1 ${FIND} ${PREFIX}/. -xdev -newer ${_EXTRACT_COOKIE} -type d -print @ 1.7 log @Apply PRINT_PLIST_AWK and _PLIST_PLIST_AWK_SUBST in the same order for both files and directories. @ text @d1 1 a1 1 # $NetBSD: print-plist.mk,v 1.6 2006/04/17 06:12:46 jlam Exp $ d156 1 @ 1.6 log @Modify the plist module to automatically transform "^share/locale" in PLISTs to "${PKGLOCALEDIR}/locale" for the installed PLIST. This is similar to the work that's already done to automatically handle PKGINFODIR and PKGMANDIR. PLISTs in pkgsrc will be modified so that they would just list the message files to be under "share/locale". USE_PKGLOCALEDIR must continue to be set in package Makefiles so that localedir substitutions happen at post-configure time. @ text @d1 1 a1 1 # $NetBSD: print-plist.mk,v 1.5 2006/03/20 01:48:58 jlam Exp $ d129 1 a149 1 ${PRINT_PLIST_AWK} \ @ 1.5 log @* Creates a new variable PKGINFODIR (named similarly to PKGMANDIR) that is a purely user-settable variable to represent the relative path under ${PREFIX} where info files are stored and "dir" files are managed. PKGINFODIR defaults to "info". INFO_DIR still works, but will be obsoleted after the 2006Q1 branch. * Modify GNU_CONFIGURE_INFODIR to only honor ${PKGINFODIR} if the package installs directly into ${PREFIX} and not some subdirectory under ${PREFIX}. This fixes packages that don't really honor $(infodir) all that well, and also avoids PLIST problems relating to directory removal for those packages. * Since the majority of Emacs Lisp packages use GNU_CONFIGURE, just set GNU_CONFIGURE_INFODIR directly to ${EMACS_INFOPREFIX}, which is the Emacs-distro-specific location for info files. Also pass EMACS_INFOPREFIX through PLIST_SUBST for PLIST substitution. * INFO_FILES should be defined if the package installs info files. If the info files are not listed in the PLIST, then INFO_FILES must list the filenames for the info files installed by the package, which are assumed to be located in ${PREFIX}/${PKGINFODIR}. * The plist module can now better detect info files listed in PLISTs and exports a command to the pkginstall module to append info file names to the +INFO_FILES scriptlet at install-time. * The print-PLIST target is updated to properly list info files in the auto-generated PLIST. * The check-files code is updated to skip all "dir" Info database files. @ text @d1 1 a1 1 # $NetBSD: print-plist.mk,v 1.4 2006/03/09 16:39:39 jlam Exp $ d30 2 a31 1 gsub(/${PKGLOCALEDIR}\/locale/, "$${PKGLOCALEDIR}/locale"); \ @ 1.4 log @Check that INFO_FILES is defined before using its value. Fixes PR pkg/33043. @ text @d1 1 a1 1 # $NetBSD: print-plist.mk,v 1.3 2006/01/14 00:58:37 seb Exp $ d31 1 d35 6 a40 9 _PRINT_PLIST_AWK_IGNORE= ($$0 ~ /emul\/linux\/proc/) _PRINT_PLIST_AWK_IGNORE+= || ($$0 ~ /^info\/dir$$/) .if defined(INFO_DIR) && empty(INFO_DIR:Minfo) _PRINT_PLIST_AWK_IGNORE+= || ($$0 ~ /^${INFO_DIR:S|/|\\/|g}\/dir$$/) .endif .if defined(INFO_FILES) && !empty(INFO_FILES) . for _f_ in ${INFO_FILES} _PRINT_PLIST_AWK_IGNORE+= || ($$0 ~ /^${INFO_DIR:S|/|\\/|g}\/${_f_:S|+|\+|g}(-[0-9]+)?(\.gz)?$$/) . endfor d155 1 a155 1 /${PREFIX:S|/|\\/|g}\/\.$$/ { next; } \ d157 1 d159 2 @ 1.3 log @Signature police. @ text @d1 1 a1 1 # $NetBSD$ d39 1 a39 1 .if !empty(INFO_FILES) @ 1.2 log @Remove the show-shlib-type target since it's no longer needed ... the same value is returned by querying for SHLIB_TYPE via show-var, so convert the only remaining use of show-shlib-type to just use SHLIB_TYPE. @ text @d1 1 a1 1 # $$etBSD$ @ 1.1 log @Initial commit of a new module that encapsulates all of the code for manipulating PLISTs. This module is not used by default pending more widespread testing -- currently the variable _USE_PLIST_MODULE must be defined in /etc/mk.conf to enable its use. The main features of the new PLIST module are: (1) Splits out the PLIST-handling code from bsd.pkg.mk into a separate "plist" module. (2) Splits out giant, multi-line awk scripts stored in make variables into separate awk scripts that may be joined together to post-process PLISTs. Each of these awk scripts consolidates the processing for one set of files, e.g., man pages, info pages, etc., and is more easily commented than a make variable. (3) Splits out the print-PLIST code from the regular PLIST code since they have no common pieces (print-plist.mk vs. plist.mk). (4) Completely re-implements the shared-library handling to be more efficient. Along the way, this also fixes a problem for Mac OS X users where the PLISTs incorrectly contained absolute paths. (5) Completely re-implements the info-file handling so that we can migrate from INFO_FILES definitions to just adding info/foo.info entries in the static PLISTs. (6) Adds commented-out support for automatically compressed or decompressed info page entries based on the value of MANZ. These changes will be activated after texinfo.mk has been replaced by something that is built using the more modern primitives now available in pkgsrc. (7) Move the file compression logic into a separate script "doc-compress" that compresses or decompresses files while minding symlinks. This script is now called by bsd.pkg.mk to do the "autmoatic man page handling". In the future, it will also handle the "automatic info page handling" and possible others. In general, the idea is to move stuff out of the Makefiles and into separate files where we don't need to worry about quoting rules and where each file can have a separate history of commits. This simplifies the makefile logic (especially in terms of readability) and also simplifies maintenance of the code. @ text @d119 1 a119 1 shlib_type=`${MAKE} ${MAKEFLAGS} show-shlib-type`; \ @