Tue Dec 30 15:13:21 2014 UTC ()
Remove pkg_views support, second part: infrastructure.


(wiz)
diff -r1.23 -r1.24 pkgsrc/doc/RESPONSIBLE
diff -r1.36 -r1.37 pkgsrc/doc/guide/files/buildlink.xml
diff -r1.50 -r1.51 pkgsrc/doc/guide/files/faq.xml
diff -r1.54 -r1.55 pkgsrc/lang/perl5/buildlink3.mk
diff -r1.168 -r1.169 pkgsrc/mail/mutt/Makefile
diff -r1.72 -r1.73 pkgsrc/mail/qmail/Makefile
diff -r1.2006 -r1.2007 pkgsrc/mk/bsd.pkg.mk
diff -r1.57 -r1.58 pkgsrc/mk/bsd.pkg.use.mk
diff -r1.352 -r1.353 pkgsrc/mk/bsd.prefs.mk
diff -r1.7 -r1.8 pkgsrc/mk/buildlink3/BUILDLINK3_DG
diff -r1.4 -r0 pkgsrc/mk/buildlink3/PKGVIEWS_UG
diff -r1.7 -r0 pkgsrc/mk/buildlink3/README
diff -r1.5 -r0 pkgsrc/mk/buildlink3/TODO
diff -r1.231 -r1.232 pkgsrc/mk/buildlink3/bsd.buildlink3.mk
diff -r1.8 -r1.9 pkgsrc/mk/buildlink3/libtool-fix-la
diff -r1.251 -r1.252 pkgsrc/mk/defaults/mk.conf
diff -r1.1 -r1.2 pkgsrc/mk/help/directories.help
diff -r1.6 -r1.7 pkgsrc/mk/misc/can-be-built-here.mk
diff -r1.1 -r1.2 pkgsrc/mk/pkgformat/README
diff -r1.6 -r1.7 pkgsrc/mk/pkgformat/pkg/package.mk
diff -r1.4 -r1.5 pkgsrc/mk/pkgformat/pkg/pkgformat-vars.mk
diff -r1.1 -r1.2 pkgsrc/mk/pkgformat/pkg/pkgformat.mk
diff -r1.1 -r0 pkgsrc/mk/pkgformat/pkg/views.mk
diff -r1.60 -r1.61 pkgsrc/mk/pkginstall/bsd.pkginstall.mk
diff -r1.2 -r1.3 pkgsrc/mk/pkginstall/deinstall
diff -r1.2 -r1.3 pkgsrc/mk/pkginstall/header
diff -r1.2 -r1.3 pkgsrc/mk/pkginstall/install
diff -r1.1 -r0 pkgsrc/mk/pkginstall/deinstall-pre
diff -r1.1 -r0 pkgsrc/mk/pkginstall/install-post
diff -r1.8 -r1.9 pkgsrc/mk/pkginstall/files
diff -r1.47 -r1.48 pkgsrc/mk/plist/plist.mk
diff -r1.9 -r1.10 pkgsrc/mk/wrapper/gen-transform.sh
diff -r1.44 -r1.45 pkgsrc/net/openslp/Makefile
diff -r1.3 -r1.4 pkgsrc/pkgtools/cwrappers/files/bin/fixup-libtool.c
diff -r1.1 -r1.2 pkgsrc/pkgtools/cwrappers/files/doc/unimplemented.txt
diff -r1.7 -r1.8 pkgsrc/pkgtools/pkg_install/DESCR
diff -r1.203 -r1.204 pkgsrc/pkgtools/pkg_install/Makefile
diff -r1.27 -r1.28 pkgsrc/pkgtools/pkg_install/files/add/main.c
diff -r1.105 -r1.106 pkgsrc/pkgtools/pkg_install/files/add/perform.c
diff -r1.45 -r1.46 pkgsrc/pkgtools/pkg_install/files/add/pkg_add.1
diff -r1.62 -r1.63 pkgsrc/pkgtools/pkg_install/files/admin/main.c
diff -r1.33 -r1.34 pkgsrc/pkgtools/pkg_install/files/admin/pkg_admin.1
diff -r1.15 -r1.16 pkgsrc/pkgtools/pkg_install/files/create/build.c
diff -r1.14 -r1.15 pkgsrc/pkgtools/pkg_install/files/create/create.h
diff -r1.19 -r1.20 pkgsrc/pkgtools/pkg_install/files/create/main.c
diff -r1.25 -r1.26 pkgsrc/pkgtools/pkg_install/files/create/pkg_create.1
diff -r1.30 -r1.31 pkgsrc/pkgtools/pkg_install/files/delete/pkg_delete.1
diff -r1.12 -r1.13 pkgsrc/pkgtools/pkg_install/files/delete/pkg_delete.c
diff -r1.21 -r1.22 pkgsrc/pkgtools/pkg_install/files/info/info.h
diff -r1.61 -r1.62 pkgsrc/pkgtools/pkg_install/files/info/perform.c
diff -r1.64 -r1.65 pkgsrc/pkgtools/pkg_install/files/lib/lib.h
diff -r1.166 -r1.167 pkgsrc/pkgtools/pkg_install/files/lib/version.h
diff -r1.7 -r0 pkgsrc/pkgtools/pkg_install/files/view/Makefile.in
diff -r1.7 -r0 pkgsrc/pkgtools/pkg_install/files/view/linkfarm.1
diff -r1.7 -r0 pkgsrc/pkgtools/pkg_install/files/view/linkfarm.cat1
diff -r1.7 -r0 pkgsrc/pkgtools/pkg_install/files/view/pkg_view.sh.in
diff -r1.4 -r0 pkgsrc/pkgtools/pkg_install/files/view/linkfarm.sh.in
diff -r1.14 -r0 pkgsrc/pkgtools/pkg_install/files/view/pkg_view.1
diff -r1.58 -r1.59 pkgsrc/pkgtools/x11-links/buildlink3.mk
diff -r1.20 -r1.21 pkgsrc/security/nikto/Makefile

cvs diff -r1.23 -r1.24 pkgsrc/doc/RESPONSIBLE (expand / switch to unified diff)

--- pkgsrc/doc/RESPONSIBLE 2014/05/06 04:13:53 1.23
+++ pkgsrc/doc/RESPONSIBLE 2014/12/30 15:13:19 1.24
@@ -1,36 +1,35 @@ @@ -1,36 +1,35 @@
1$NetBSD: RESPONSIBLE,v 1.23 2014/05/06 04:13:53 rodent Exp $ 1$NetBSD: RESPONSIBLE,v 1.24 2014/12/30 15:13:19 wiz Exp $
2 2
3List of sections of the system, and who is responsible for them (or 3List of sections of the system, and who is responsible for them (or
4at least considered an expert on them). 4at least considered an expert on them).
5 5
6Warning: this list is not considered definitive, and is necessarily 6Warning: this list is not considered definitive, and is necessarily
7incomplete! 7incomplete!
8 8
9 9
10pkgsrc Infrastructure: 10pkgsrc Infrastructure:
11 11
12Part of the infrastructure People 12Part of the infrastructure People
13--------------------------------------------------------------------------- 13---------------------------------------------------------------------------
14README.html generation dmcmahill 14README.html generation dmcmahill
15bootstrap joerg 15bootstrap joerg
16bsd.options.mk dillo 16bsd.options.mk dillo
17buildlink3 - 17buildlink3 -
18bulk build hubertf, dmcmahill, rillig 18bulk build hubertf, dmcmahill, rillig
19destdir joerg 19destdir joerg
20mk/check rillig 20mk/check rillig
21mk/wrapper rillig 21mk/wrapper rillig
22pkg_install agc 22pkg_install agc
23pkgviews - 
24unprivileged builds rillig 23unprivileged builds rillig
25 24
26pkgsrc platforms: 25pkgsrc platforms:
27 26
28MACHINE_PLATFORM People 27MACHINE_PLATFORM People
29--------------------------------------------------------------------------- 28---------------------------------------------------------------------------
30AIX - 29AIX -
31BSD/OS reed 30BSD/OS reed
32Cygwin - 31Cygwin -
33Darwin/Mac OS X/OS X schmonz 32Darwin/Mac OS X/OS X schmonz
34DragonFly - 33DragonFly -
35FreeBSD - 34FreeBSD -
36FreeMiNT ryoon 35FreeMiNT ryoon

cvs diff -r1.36 -r1.37 pkgsrc/doc/guide/files/buildlink.xml (expand / switch to unified diff)

--- pkgsrc/doc/guide/files/buildlink.xml 2013/07/30 07:14:09 1.36
+++ pkgsrc/doc/guide/files/buildlink.xml 2014/12/30 15:13:19 1.37
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1<!-- $NetBSD: buildlink.xml,v 1.36 2013/07/30 07:14:09 wiz Exp $ --> 1<!-- $NetBSD: buildlink.xml,v 1.37 2014/12/30 15:13:19 wiz Exp $ -->
2 2
3<chapter id="buildlink"> 3<chapter id="buildlink">
4 <title>Buildlink methodology</title> 4 <title>Buildlink methodology</title>
5 5
6 <para>Buildlink is a framework in pkgsrc that controls what headers and libraries 6 <para>Buildlink is a framework in pkgsrc that controls what headers and libraries
7 are seen by a package's configure and build processes. This is implemented 7 are seen by a package's configure and build processes. This is implemented
8 in a two step process:</para> 8 in a two step process:</para>
9 9
10 <orderedlist> 10 <orderedlist>
11 <listitem> 11 <listitem>
12 <para>Symlink headers and libraries for dependencies into 12 <para>Symlink headers and libraries for dependencies into
13 <varname>BUILDLINK_DIR</varname>, which by default is a subdirectory 13 <varname>BUILDLINK_DIR</varname>, which by default is a subdirectory
14 of <varname>WRKDIR</varname>.</para> 14 of <varname>WRKDIR</varname>.</para>
@@ -307,33 +307,31 @@ BUILDLINK_TREE+= -tiff @@ -307,33 +307,31 @@ BUILDLINK_TREE+= -tiff
307 The resulting files are to be symlinked 307 The resulting files are to be symlinked
308 into <filename>${BUILDLINK_DIR}</filename>. By default, 308 into <filename>${BUILDLINK_DIR}</filename>. By default,
309 this takes the <filename>+CONTENTS</filename> of a 309 this takes the <filename>+CONTENTS</filename> of a
310 <replaceable>pkg</replaceable> and filters it through 310 <replaceable>pkg</replaceable> and filters it through
311 <varname>${BUILDLINK_CONTENTS_FILTER.<replaceable>pkg</replaceable>}</varname>.</para> 311 <varname>${BUILDLINK_CONTENTS_FILTER.<replaceable>pkg</replaceable>}</varname>.</para>
312 </listitem> 312 </listitem>
313 313
314 <listitem> 314 <listitem>
315 <para><varname>BUILDLINK_CONTENTS_FILTER.<replaceable>pkg</replaceable></varname> 315 <para><varname>BUILDLINK_CONTENTS_FILTER.<replaceable>pkg</replaceable></varname>
316 (not shown above) is a filter command that filters 316 (not shown above) is a filter command that filters
317 <filename>+CONTENTS</filename> input into a list of files 317 <filename>+CONTENTS</filename> input into a list of files
318 relative to 318 relative to
319 <filename>${BUILDLINK_PREFIX.<replaceable>pkg</replaceable>}</filename> 319 <filename>${BUILDLINK_PREFIX.<replaceable>pkg</replaceable>}</filename>
320 on stdout. By default for overwrite packages, 320 on stdout. By default,
321 <varname>BUILDLINK_CONTENTS_FILTER.<replaceable>pkg</replaceable></varname> 321 <varname>BUILDLINK_CONTENTS_FILTER.<replaceable>pkg</replaceable></varname>
322 outputs the contents of the <filename>include</filename> 322 outputs the contents of the <filename>include</filename>
323 and <filename>lib</filename> directories in the package 323 and <filename>lib</filename> directories in the package
324 <filename>+CONTENTS</filename>, and for pkgviews packages, 324 <filename>+CONTENTS</filename>.
325 it outputs any libtool archives in 
326 <filename>lib</filename> directories.</para> 
327 </listitem> 325 </listitem>
328 326
329 <listitem> 327 <listitem>
330 <para><varname>BUILDLINK_FNAME_TRANSFORM.<replaceable>pkg</replaceable></varname> 328 <para><varname>BUILDLINK_FNAME_TRANSFORM.<replaceable>pkg</replaceable></varname>
331 (not shown above) is a list of sed arguments used to 329 (not shown above) is a list of sed arguments used to
332 transform the name of the source filename into a 330 transform the name of the source filename into a
333 destination filename, e.g. <command>-e 331 destination filename, e.g. <command>-e
334 "s|/curses.h|/ncurses.h|g"</command>.</para> 332 "s|/curses.h|/ncurses.h|g"</command>.</para>
335 </listitem> 333 </listitem>
336 </itemizedlist> 334 </itemizedlist>
337 335
338 <para>This section can additionally include any 336 <para>This section can additionally include any
339 <filename>buildlink3.mk</filename> needed for 337 <filename>buildlink3.mk</filename> needed for

cvs diff -r1.50 -r1.51 pkgsrc/doc/guide/files/faq.xml (expand / switch to unified diff)

--- pkgsrc/doc/guide/files/faq.xml 2014/02/03 16:09:34 1.50
+++ pkgsrc/doc/guide/files/faq.xml 2014/12/30 15:13:19 1.51
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1<!-- $NetBSD: faq.xml,v 1.50 2014/02/03 16:09:34 wiz Exp $ --> 1<!-- $NetBSD: faq.xml,v 1.51 2014/12/30 15:13:19 wiz Exp $ -->
2 2
3<chapter id="faq"> <?dbhtml filename="faq.html"?> 3<chapter id="faq"> <?dbhtml filename="faq.html"?>
4<title>Frequently Asked Questions</title> 4<title>Frequently Asked Questions</title>
5 5
6<para>This section contains hints, tips &amp; tricks on special things in 6<para>This section contains hints, tips &amp; tricks on special things in
7pkgsrc that we didn't find a better place for in the previous chapters, and 7pkgsrc that we didn't find a better place for in the previous chapters, and
8it contains items for both pkgsrc users and developers.</para> 8it contains items for both pkgsrc users and developers.</para>
9 9
10<!-- ================================================================== --> 10<!-- ================================================================== -->
11 11
12 <sect1 id="mailing-list-pointers"> 12 <sect1 id="mailing-list-pointers">
13 <title>Are there any mailing lists for pkg-related discussion?</title> 13 <title>Are there any mailing lists for pkg-related discussion?</title>
14 14
@@ -51,37 +51,26 @@ it contains items for both pkgsrc users  @@ -51,37 +51,26 @@ it contains items for both pkgsrc users
51<para>To subscribe, do:</para> 51<para>To subscribe, do:</para>
52 52
53<programlisting> 53<programlisting>
54&cprompt; echo subscribe <replaceable>listname</replaceable> | mail majordomo@NetBSD.org 54&cprompt; echo subscribe <replaceable>listname</replaceable> | mail majordomo@NetBSD.org
55</programlisting> 55</programlisting>
56 56
57<para>Archives for all these mailing lists are available from 57<para>Archives for all these mailing lists are available from
58<ulink url="http://mail-index.NetBSD.org/"/>.</para> 58<ulink url="http://mail-index.NetBSD.org/"/>.</para>
59 59
60</sect1> 60</sect1>
61 61
62<!-- ================================================================== --> 62<!-- ================================================================== -->
63 63
64<sect1 id="pkgviews-docs"> 
65<title>Where's the pkgviews documentation?</title> 
66 
67<para>Pkgviews is tightly integrated with buildlink. You can find a 
68pkgviews User's guide in 
69<filename>pkgsrc/mk/buildlink3/PKGVIEWS_UG</filename>.</para> 
70 
71</sect1> 
72 
73<!-- ================================================================== --> 
74 
75<sect1 id="faq-pkgtools"> 64<sect1 id="faq-pkgtools">
76<title>Utilities for package management (pkgtools)</title> 65<title>Utilities for package management (pkgtools)</title>
77 66
78<para>The directory <filename>pkgsrc/pkgtools</filename> contains 67<para>The directory <filename>pkgsrc/pkgtools</filename> contains
79a number of useful utilities for both users and developers of pkgsrc. This 68a number of useful utilities for both users and developers of pkgsrc. This
80section attempts only to make the reader aware of the utilities and when 69section attempts only to make the reader aware of the utilities and when
81they might be useful, and not to duplicate the documentation that comes 70they might be useful, and not to duplicate the documentation that comes
82with each package.</para> 71with each package.</para>
83 72
84<para>Utilities used by pkgsrc (automatically installed when needed):</para> 73<para>Utilities used by pkgsrc (automatically installed when needed):</para>
85 74
86<itemizedlist> 75<itemizedlist>
87 76

cvs diff -r1.54 -r1.55 pkgsrc/lang/perl5/buildlink3.mk (expand / switch to unified diff)

--- pkgsrc/lang/perl5/buildlink3.mk 2014/05/29 07:57:07 1.54
+++ pkgsrc/lang/perl5/buildlink3.mk 2014/12/30 15:13:19 1.55
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: buildlink3.mk,v 1.54 2014/05/29 07:57:07 adam Exp $ 1# $NetBSD: buildlink3.mk,v 1.55 2014/12/30 15:13:19 wiz Exp $
2 2
3BUILDLINK_TREE+= perl 3BUILDLINK_TREE+= perl
4 4
5.if !defined(PERL_BUILDLINK3_MK) 5.if !defined(PERL_BUILDLINK3_MK)
6PERL_BUILDLINK3_MK:= 6PERL_BUILDLINK3_MK:=
7 7
8.include "../../mk/bsd.fast.prefs.mk" 8.include "../../mk/bsd.fast.prefs.mk"
9PERL5_REQD+= 5.20.0 9PERL5_REQD+= 5.20.0
10.for _perl5_ver_ in ${PERL5_REQD} 10.for _perl5_ver_ in ${PERL5_REQD}
11BUILDLINK_API_DEPENDS.perl+= perl>=${_perl5_ver_} 11BUILDLINK_API_DEPENDS.perl+= perl>=${_perl5_ver_}
12.endfor 12.endfor
13# Prevent p5-* etc. packages built for 5.20.0 to be used 13# Prevent p5-* etc. packages built for 5.20.0 to be used
14# with the next incompatible version of perl: 14# with the next incompatible version of perl:
@@ -24,25 +24,23 @@ PERL5= ${PERLDIR}/bin/perl @@ -24,25 +24,23 @@ PERL5= ${PERLDIR}/bin/perl
24 24
25pkgbase := perl 25pkgbase := perl
26.include "../../mk/pkg-build-options.mk" 26.include "../../mk/pkg-build-options.mk"
27 27
28.if !empty(PKG_BUILD_OPTIONS.perl:Mthreads) 28.if !empty(PKG_BUILD_OPTIONS.perl:Mthreads)
29. include "../../mk/pthread.buildlink3.mk" 29. include "../../mk/pthread.buildlink3.mk"
30.endif 30.endif
31 31
32PERL5_OPTIONS?= # empty 32PERL5_OPTIONS?= # empty
33.if !empty(PERL5_OPTIONS:Mthreads) 33.if !empty(PERL5_OPTIONS:Mthreads)
34INSTALL_TEMPLATES+= ${.CURDIR}/../../lang/perl5/files/install_threads.tmpl 34INSTALL_TEMPLATES+= ${.CURDIR}/../../lang/perl5/files/install_threads.tmpl
35.endif 35.endif
36 36
37.if ${PKG_INSTALLATION_TYPE} == "overwrite" 
38# 37#
39# Perl keeps headers and odd libraries in an odd path not caught by the 38# Perl keeps headers and odd libraries in an odd path not caught by the
40# default BUILDLINK_FILES_CMD, so name them to be symlinked into 39# default BUILDLINK_FILES_CMD, so name them to be symlinked into
41# ${BUILDLINK_DIR}. 40# ${BUILDLINK_DIR}.
42# 41#
43.include "../../lang/perl5/vars.mk" 42.include "../../lang/perl5/vars.mk"
44BUILDLINK_FILES.perl= ${PERL5_SUB_INSTALLARCHLIB}/CORE/* 43BUILDLINK_FILES.perl= ${PERL5_SUB_INSTALLARCHLIB}/CORE/*
45.endif 
46.endif # PERL_BUILDLINK3_MK 44.endif # PERL_BUILDLINK3_MK
47 45
48BUILDLINK_TREE+= -perl 46BUILDLINK_TREE+= -perl

cvs diff -r1.168 -r1.169 pkgsrc/mail/mutt/Makefile (expand / switch to unified diff)

--- pkgsrc/mail/mutt/Makefile 2014/10/09 14:06:39 1.168
+++ pkgsrc/mail/mutt/Makefile 2014/12/30 15:13:19 1.169
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.168 2014/10/09 14:06:39 wiz Exp $ 1# $NetBSD: Makefile,v 1.169 2014/12/30 15:13:19 wiz Exp $
2 2
3DISTNAME= mutt-1.4.2.3 3DISTNAME= mutt-1.4.2.3
4PKGREVISION= 7 4PKGREVISION= 7
5CATEGORIES= mail 5CATEGORIES= mail
6MASTER_SITES= ftp://ftp.mutt.org/mutt/ \ 6MASTER_SITES= ftp://ftp.mutt.org/mutt/ \
7 ftp://gd.tuwien.ac.at/infosys/mail/mutt/ \ 7 ftp://gd.tuwien.ac.at/infosys/mail/mutt/ \
8 ftp://ftp.fu-berlin.de/unix/mail/mutt/ 8 ftp://ftp.fu-berlin.de/unix/mail/mutt/
9 9
10MAINTAINER= pkgsrc-users@NetBSD.org 10MAINTAINER= pkgsrc-users@NetBSD.org
11HOMEPAGE= http://www.mutt.org/ 11HOMEPAGE= http://www.mutt.org/
12COMMENT= Text-based MIME mail client with PGP support 12COMMENT= Text-based MIME mail client with PGP support
13LICENSE= gnu-gpl-v2 13LICENSE= gnu-gpl-v2
14 14
@@ -90,19 +90,14 @@ INSTALL_MAKE_FLAGS= ${MAKE_FLAGS} syscon @@ -90,19 +90,14 @@ INSTALL_MAKE_FLAGS= ${MAKE_FLAGS} syscon
90 90
91.include "../../converters/libiconv/buildlink3.mk" 91.include "../../converters/libiconv/buildlink3.mk"
92.include "../../devel/gettext-lib/buildlink3.mk" 92.include "../../devel/gettext-lib/buildlink3.mk"
93 93
94# Pre-create some directories and symlinks used during the installation 94# Pre-create some directories and symlinks used during the installation
95# process. 95# process.
96# 96#
97pre-install: 97pre-install:
98 ${INSTALL_DATA_DIR} ${DESTDIR}${EGDIR} 98 ${INSTALL_DATA_DIR} ${DESTDIR}${EGDIR}
99 ${INSTALL_DATA_DIR} ${DESTDIR}${DOCDIR} 99 ${INSTALL_DATA_DIR} ${DESTDIR}${DOCDIR}
100 ${RM} -f ${DESTDIR}${DOCDIR}/samples 100 ${RM} -f ${DESTDIR}${DOCDIR}/samples
101 ${LN} -sf ${DESTDIR}${EGDIR} ${DESTDIR}${DOCDIR}/samples 101 ${LN} -sf ${DESTDIR}${EGDIR} ${DESTDIR}${DOCDIR}/samples
102 102
103post-install: 
104.if (${PKG_INSTALLATION_TYPE} == "pkgviews") 
105 ${MV} ${PREFIX}/${PKGMANDIR}/man5/mutt-mbox.5 ${PREFIX}/${PKGMANDIR}/man5/mbox.5 
106.endif 
107 
108.include "../../mk/bsd.pkg.mk" 103.include "../../mk/bsd.pkg.mk"

cvs diff -r1.72 -r1.73 pkgsrc/mail/qmail/Makefile (expand / switch to unified diff)

--- pkgsrc/mail/qmail/Makefile 2014/11/23 19:08:22 1.72
+++ pkgsrc/mail/qmail/Makefile 2014/12/30 15:13:19 1.73
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.72 2014/11/23 19:08:22 schmonz Exp $ 1# $NetBSD: Makefile,v 1.73 2014/12/30 15:13:19 wiz Exp $
2# 2#
3 3
4DISTNAME= ${PKGNAME_NOREV} 4DISTNAME= ${PKGNAME_NOREV}
5PKGNAME= qmail-1.03 5PKGNAME= qmail-1.03
6PKGREVISION= 19 6PKGREVISION= 19
7CATEGORIES= mail 7CATEGORIES= mail
8MASTER_SITES= http://qmail.org/ 8MASTER_SITES= http://qmail.org/
9 9
10MAINTAINER= schmonz@NetBSD.org 10MAINTAINER= schmonz@NetBSD.org
11HOMEPAGE= http://cr.yp.to/qmail.html 11HOMEPAGE= http://cr.yp.to/qmail.html
12COMMENT= Secure, reliable, efficient, simple, and fast MTA 12COMMENT= Secure, reliable, efficient, simple, and fast MTA
13LICENSE= public-domain 13LICENSE= public-domain
14 14
@@ -159,37 +159,35 @@ pre-install: @@ -159,37 +159,35 @@ pre-install:
159 ${LN} -s ${DESTDIR}${DOCDIR} ${DESTDIR}${QMAILDIR}/doc 159 ${LN} -s ${DESTDIR}${DOCDIR} ${DESTDIR}${QMAILDIR}/doc
160 ${LN} -s ${DESTDIR}${PREFIX}/${PKGMANDIR} ${DESTDIR}${QMAILDIR}/man 160 ${LN} -s ${DESTDIR}${PREFIX}/${PKGMANDIR} ${DESTDIR}${QMAILDIR}/man
161 ${LN} -s ${DESTDIR}${QMAIL_QUEUE_DIR} ${DESTDIR}${QMAILDIR}/queue 161 ${LN} -s ${DESTDIR}${QMAIL_QUEUE_DIR} ${DESTDIR}${QMAILDIR}/queue
162 ${LN} -s ${DESTDIR}${EGDIR}/users ${DESTDIR}${QMAILDIR}/users 162 ${LN} -s ${DESTDIR}${EGDIR}/users ${DESTDIR}${QMAILDIR}/users
163. endif 163. endif
164 164
165post-install: post-install-viruscan 165post-install: post-install-viruscan
166 # allow packaging as non-root, fix at install time with SPECIAL_PERMS 166 # allow packaging as non-root, fix at install time with SPECIAL_PERMS
167 ${CHMOD} 0755 ${DESTDIR}${PREFIX}/bin/qmail-queue 167 ${CHMOD} 0755 ${DESTDIR}${PREFIX}/bin/qmail-queue
168. for f in ${QMAIL_ROOT_ONLY_READABLES} ${QMAIL_ROOT_ONLY_EVERYTHINGS} 168. for f in ${QMAIL_ROOT_ONLY_READABLES} ${QMAIL_ROOT_ONLY_EVERYTHINGS}
169 ${CHMOD} 0755 ${DESTDIR}${PREFIX}/bin/${f} 169 ${CHMOD} 0755 ${DESTDIR}${PREFIX}/bin/${f}
170. endfor 170. endfor
171 # qmail's installer sets strange permissions, set them back 171 # qmail's installer sets strange permissions, set them back
172. if (${PKG_INSTALLATION_TYPE} == "overwrite") 172. for i in bin boot
173. for i in bin boot 173 ${CHGRP} ${BINGRP} ${DESTDIR}${QMAILDIR}/${i}
174 ${CHGRP} ${BINGRP} ${DESTDIR}${QMAILDIR}/${i} 174. endfor
175. endfor 175. for i in doc
176. for i in doc 176 ${CHGRP} ${SHAREGRP} ${DESTDIR}${QMAILDIR}/${i}
177 ${CHGRP} ${SHAREGRP} ${DESTDIR}${QMAILDIR}/${i} 177. endfor
178. endfor 178. for i in ${MANDIRS}
179. for i in ${MANDIRS} 179 ${CHGRP} ${MANGRP} ${DESTDIR}${QMAILDIR}/${i}
180 ${CHGRP} ${MANGRP} ${DESTDIR}${QMAILDIR}/${i} 180. endfor
181. endfor 
182. endif 
183 181
184 ${INSTALL_DATA} ${WRKSRC}/README.pkgsrc ${DESTDIR}${DOCDIR} 182 ${INSTALL_DATA} ${WRKSRC}/README.pkgsrc ${DESTDIR}${DOCDIR}
185 183
186 ${INSTALL_PROGRAM_DIR} ${DESTDIR}${SHAREDIR}/setup 184 ${INSTALL_PROGRAM_DIR} ${DESTDIR}${SHAREDIR}/setup
187 for i in ${SETUP_PROGRAMS}; do \ 185 for i in ${SETUP_PROGRAMS}; do \
188 ${INSTALL_PROGRAM} ${WRKSRC}/$$i \ 186 ${INSTALL_PROGRAM} ${WRKSRC}/$$i \
189 ${DESTDIR}${SHAREDIR}/setup; \ 187 ${DESTDIR}${SHAREDIR}/setup; \
190 done 188 done
191 for i in ${SETUP_SCRIPTS}; do \ 189 for i in ${SETUP_SCRIPTS}; do \
192 ${INSTALL_SCRIPT} ${WRKSRC}/$$i \ 190 ${INSTALL_SCRIPT} ${WRKSRC}/$$i \
193 ${DESTDIR}${SHAREDIR}/setup; \ 191 ${DESTDIR}${SHAREDIR}/setup; \
194 done 192 done
195 193

cvs diff -r1.2006 -r1.2007 pkgsrc/mk/bsd.pkg.mk (expand / switch to unified diff)

--- pkgsrc/mk/bsd.pkg.mk 2014/11/25 18:27:17 1.2006
+++ pkgsrc/mk/bsd.pkg.mk 2014/12/30 15:13:19 1.2007
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: bsd.pkg.mk,v 1.2006 2014/11/25 18:27:17 joerg Exp $ 1# $NetBSD: bsd.pkg.mk,v 1.2007 2014/12/30 15:13:19 wiz Exp $
2# 2#
3# This file is in the public domain. 3# This file is in the public domain.
4# 4#
5# Please see the pkgsrc/doc/guide manual for details on the 5# Please see the pkgsrc/doc/guide manual for details on the
6# variables used in this make file template. 6# variables used in this make file template.
7# 7#
8# Default sequence for "all" is: 8# Default sequence for "all" is:
9# 9#
10# bootstrap-depends 10# bootstrap-depends
11# fetch 11# fetch
12# checksum 12# checksum
13# depends 13# depends
14# tools 14# tools
@@ -111,37 +111,26 @@ _INSTALL_UNSTRIPPED= # set (flag used by @@ -111,37 +111,26 @@ _INSTALL_UNSTRIPPED= # set (flag used by
111##### Transform USE_* into dependencies 111##### Transform USE_* into dependencies
112 112
113.include "bsd.pkg.use.mk" 113.include "bsd.pkg.use.mk"
114 114
115############################################################################ 115############################################################################
116# Sanity checks 116# Sanity checks
117############################################################################ 117############################################################################
118 118
119.if defined(BUILDLINK_DEPTH) || defined(BUILDLINK_PACKAGES) || \ 119.if defined(BUILDLINK_DEPTH) || defined(BUILDLINK_PACKAGES) || \
120 defined(BUILDLINK_DEPENDS) || defined(BUILDLINK_ORDER) 120 defined(BUILDLINK_DEPENDS) || defined(BUILDLINK_ORDER)
121PKG_FAIL_REASON+= "Out-dated buildlink3.mk detected, please update" 121PKG_FAIL_REASON+= "Out-dated buildlink3.mk detected, please update"
122.endif 122.endif
123 123
124# PKG_INSTALLATION_TYPE can only be one of two values: "pkgviews" or 
125# "overwrite". 
126.if (${PKG_INSTALLATION_TYPE} != "pkgviews") && \ 
127 (${PKG_INSTALLATION_TYPE} != "overwrite") 
128PKG_FAIL_REASON+= "PKG_INSTALLATION_TYPE must be \`\`pkgviews'' or \`\`overwrite''." 
129.endif 
130 
131.if empty(PKG_INSTALLATION_TYPES:M${PKG_INSTALLATION_TYPE}) 
132PKG_FAIL_REASON+= "This package doesn't support PKG_INSTALLATION_TYPE=${PKG_INSTALLATION_TYPE}." 
133.endif 
134 
135.if !defined(CATEGORIES) 124.if !defined(CATEGORIES)
136PKG_FAIL_REASON+='CATEGORIES are mandatory.' 125PKG_FAIL_REASON+='CATEGORIES are mandatory.'
137.endif 126.endif
138 127
139.if !defined(PKGNAME) && !defined(DISTNAME) 128.if !defined(PKGNAME) && !defined(DISTNAME)
140PKG_FAIL_REASON+='PKGNAME and/or DISTNAME are mandatory.' 129PKG_FAIL_REASON+='PKGNAME and/or DISTNAME are mandatory.'
141.endif 130.endif
142 131
143.if defined(PKG_PATH) 132.if defined(PKG_PATH)
144PKG_FAIL_REASON+='Please unset PKG_PATH before doing pkgsrc work!' 133PKG_FAIL_REASON+='Please unset PKG_PATH before doing pkgsrc work!'
145.endif 134.endif
146 135
147# Allow variables to be set on a per-OS basis 136# Allow variables to be set on a per-OS basis
@@ -206,30 +195,26 @@ _BUILD_DEFS= ${BUILD_DEFS} @@ -206,30 +195,26 @@ _BUILD_DEFS= ${BUILD_DEFS}
206_BUILD_DEFS+= LOCALBASE 195_BUILD_DEFS+= LOCALBASE
207_BUILD_DEFS+= PKGGNUDIR 196_BUILD_DEFS+= PKGGNUDIR
208_BUILD_DEFS+= PKGINFODIR 197_BUILD_DEFS+= PKGINFODIR
209_BUILD_DEFS+= PKGMANDIR 198_BUILD_DEFS+= PKGMANDIR
210_BUILD_DEFS+= _USE_DESTDIR 199_BUILD_DEFS+= _USE_DESTDIR
211 200
212# Store the result in the +BUILD_INFO file so we can query for the build 201# Store the result in the +BUILD_INFO file so we can query for the build
213# options using "pkg_info -Q PKG_OPTIONS <pkg>". 202# options using "pkg_info -Q PKG_OPTIONS <pkg>".
214# 203#
215.if defined(PKG_SUPPORTED_OPTIONS) && defined(PKG_OPTIONS) 204.if defined(PKG_SUPPORTED_OPTIONS) && defined(PKG_OPTIONS)
216_BUILD_DEFS+= PKG_OPTIONS 205_BUILD_DEFS+= PKG_OPTIONS
217.endif 206.endif
218 207
219.if empty(DEPOT_SUBDIR) 
220PKG_FAIL_REASON+= "DEPOT_SUBDIR may not be empty." 
221.endif 
222 
223# Store the build options for multi-packages, i.e. packages that can 208# Store the build options for multi-packages, i.e. packages that can
224# be built with multiple versions of Apache, Python, Ruby, PHP etc. 209# be built with multiple versions of Apache, Python, Ruby, PHP etc.
225# 210#
226.if defined(MULTI) 211.if defined(MULTI)
227_BUILD_DEFS+= MULTI 212_BUILD_DEFS+= MULTI
228.endif 213.endif
229 214
230# ZERO_FILESIZE_P exits with a successful return code if the given file 215# ZERO_FILESIZE_P exits with a successful return code if the given file
231# has zero length. 216# has zero length.
232# NONZERO_FILESIZE_P exits with a successful return code if the given file 217# NONZERO_FILESIZE_P exits with a successful return code if the given file
233# has nonzero length. 218# has nonzero length.
234# 219#
235_ZERO_FILESIZE_P= ${AWK} 'END { exit (NR > 0) ? 1 : 0; }' 220_ZERO_FILESIZE_P= ${AWK} 'END { exit (NR > 0) ? 1 : 0; }'
@@ -339,49 +324,36 @@ ERROR_CAT?= ${SED} -e "s|^|ERROR: |" 1> @@ -339,49 +324,36 @@ ERROR_CAT?= ${SED} -e "s|^|ERROR: |" 1>
339# How to do nothing. Override if you, for some strange reason, would rather 324# How to do nothing. Override if you, for some strange reason, would rather
340# do something. 325# do something.
341DO_NADA?= ${TRUE} 326DO_NADA?= ${TRUE}
342 327
343# the FAIL command executes its arguments and then exits with a non-zero 328# the FAIL command executes its arguments and then exits with a non-zero
344# status. 329# status.
345FAIL?= ${SH} ${PKGSRCDIR}/mk/scripts/fail 330FAIL?= ${SH} ${PKGSRCDIR}/mk/scripts/fail
346 331
347# 332#
348# Config file related settings - see doc/pkgsrc.txt 333# Config file related settings - see doc/pkgsrc.txt
349# 334#
350PKG_SYSCONFVAR?= ${PKGBASE} 335PKG_SYSCONFVAR?= ${PKGBASE}
351PKG_SYSCONFSUBDIR?= # empty 336PKG_SYSCONFSUBDIR?= # empty
352.if ${PKG_INSTALLATION_TYPE} == "overwrite" 
353PKG_SYSCONFDEPOTBASE= # empty 
354PKG_SYSCONFBASEDIR= ${PKG_SYSCONFBASE} 337PKG_SYSCONFBASEDIR= ${PKG_SYSCONFBASE}
355.else 
356. if !empty(PKG_SYSCONFBASE:M${PREFIX}) || \ 
357 !empty(PKG_SYSCONFBASE:M${PREFIX}/*) 
358PKG_SYSCONFDEPOTBASE= # empty 
359PKG_SYSCONFBASEDIR= ${PKG_SYSCONFBASE} 
360. else 
361PKG_SYSCONFDEPOTBASE= ${PKG_SYSCONFBASE}/${DEPOT_SUBDIR} 
362PKG_SYSCONFBASEDIR= ${PKG_SYSCONFDEPOTBASE}/${PKGNAME} 
363. endif 
364.endif 
365.if empty(PKG_SYSCONFSUBDIR) 338.if empty(PKG_SYSCONFSUBDIR)
366DFLT_PKG_SYSCONFDIR:= ${PKG_SYSCONFBASEDIR} 339DFLT_PKG_SYSCONFDIR:= ${PKG_SYSCONFBASEDIR}
367.else 340.else
368DFLT_PKG_SYSCONFDIR:= ${PKG_SYSCONFBASEDIR}/${PKG_SYSCONFSUBDIR} 341DFLT_PKG_SYSCONFDIR:= ${PKG_SYSCONFBASEDIR}/${PKG_SYSCONFSUBDIR}
369.endif 342.endif
370PKG_SYSCONFDIR= ${DFLT_PKG_SYSCONFDIR} 343PKG_SYSCONFDIR= ${DFLT_PKG_SYSCONFDIR}
371.if defined(PKG_SYSCONFDIR.${PKG_SYSCONFVAR}) 344.if defined(PKG_SYSCONFDIR.${PKG_SYSCONFVAR})
372PKG_SYSCONFDIR= ${PKG_SYSCONFDIR.${PKG_SYSCONFVAR}} 345PKG_SYSCONFDIR= ${PKG_SYSCONFDIR.${PKG_SYSCONFVAR}}
373PKG_SYSCONFBASEDIR= ${PKG_SYSCONFDIR.${PKG_SYSCONFVAR}} 346PKG_SYSCONFBASEDIR= ${PKG_SYSCONFDIR.${PKG_SYSCONFVAR}}
374PKG_SYSCONFDEPOTBASE= # empty 
375.endif 347.endif
376PKG_SYSCONFDIR_PERMS?= ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 755 348PKG_SYSCONFDIR_PERMS?= ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 755
377 349
378ALL_ENV+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR:Q} 350ALL_ENV+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR:Q}
379_BUILD_DEFS+= PKG_SYSCONFBASEDIR PKG_SYSCONFDIR 351_BUILD_DEFS+= PKG_SYSCONFBASEDIR PKG_SYSCONFDIR
380 352
381# These are all of the tools use by pkgsrc Makefiles. This should 353# These are all of the tools use by pkgsrc Makefiles. This should
382# eventually be split up into lists of tools required by different 354# eventually be split up into lists of tools required by different
383# phases of a pkgsrc build. 355# phases of a pkgsrc build.
384# 356#
385USE_TOOLS+= \ 357USE_TOOLS+= \
386 [ awk basename cat chgrp chmod chown cmp cp cut dirname echo \ 358 [ awk basename cat chgrp chmod chown cmp cp cut dirname echo \
387 egrep env false find grep head hostname id install ln ls \ 359 egrep env false find grep head hostname id install ln ls \
@@ -652,29 +624,26 @@ su-target: .USE @@ -652,29 +624,26 @@ su-target: .USE
652 624
653################################################################ 625################################################################
654# Some more targets supplied for users' convenience 626# Some more targets supplied for users' convenience
655################################################################ 627################################################################
656 628
657# Run pkglint: 629# Run pkglint:
658.PHONY: lint 630.PHONY: lint
659lint: 631lint:
660 ${RUN} ${LOCALBASE}/bin/pkglint 632 ${RUN} ${LOCALBASE}/bin/pkglint
661 633
662# List of flags to pass to pkg_add(1) for bin-install: 634# List of flags to pass to pkg_add(1) for bin-install:
663 635
664BIN_INSTALL_FLAGS?= # -v 636BIN_INSTALL_FLAGS?= # -v
665.if ${PKG_INSTALLATION_TYPE} == "pkgviews" 
666PKG_ARGS_ADD= -W ${LOCALBASE} -w ${DEFAULT_VIEW} 
667.endif 
668_BIN_INSTALL_FLAGS= ${BIN_INSTALL_FLAGS} 637_BIN_INSTALL_FLAGS= ${BIN_INSTALL_FLAGS}
669.if defined(_AUTOMATIC) && !empty(_AUTOMATIC:M[Yy][Ee][Ss]) 638.if defined(_AUTOMATIC) && !empty(_AUTOMATIC:M[Yy][Ee][Ss])
670_BIN_INSTALL_FLAGS+= -A 639_BIN_INSTALL_FLAGS+= -A
671.endif 640.endif
672_BIN_INSTALL_FLAGS+= ${PKG_ARGS_ADD} 641_BIN_INSTALL_FLAGS+= ${PKG_ARGS_ADD}
673 642
674_SHORT_UNAME_R= ${:!${UNAME} -r!:C@\.([0-9]*)[_.-].*@.\1@} # n.n[_.]anything => n.n 643_SHORT_UNAME_R= ${:!${UNAME} -r!:C@\.([0-9]*)[_.-].*@.\1@} # n.n[_.]anything => n.n
675 644
676.include "install/bin-install.mk" 645.include "install/bin-install.mk"
677 646
678.PHONY: show-pkgtools-version 647.PHONY: show-pkgtools-version
679.if !target(show-pkgtools-version) 648.if !target(show-pkgtools-version)
680show-pkgtools-version: 649show-pkgtools-version:

cvs diff -r1.57 -r1.58 pkgsrc/mk/bsd.pkg.use.mk (expand / switch to unified diff)

--- pkgsrc/mk/bsd.pkg.use.mk 2014/10/01 19:14:21 1.57
+++ pkgsrc/mk/bsd.pkg.use.mk 2014/12/30 15:13:19 1.58
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: bsd.pkg.use.mk,v 1.57 2014/10/01 19:14:21 joerg Exp $ 1# $NetBSD: bsd.pkg.use.mk,v 1.58 2014/12/30 15:13:19 wiz Exp $
2# 2#
3# Turn USE_* macros into proper depedency logic. Included near the top of 3# Turn USE_* macros into proper depedency logic. Included near the top of
4# bsd.pkg.mk, after bsd.prefs.mk. 4# bsd.pkg.mk, after bsd.prefs.mk.
5# 5#
6# Package-settable variables: 6# Package-settable variables:
7# 7#
8# USE_BSD_MAKEFILE 8# USE_BSD_MAKEFILE
9# Should be set to "yes" whenever a package uses a BSD-style 9# Should be set to "yes" whenever a package uses a BSD-style
10# Makefile. These Makefiles typically end with a line including 10# Makefile. These Makefiles typically end with a line including
11# <bsd.prog.mk>. 11# <bsd.prog.mk>.
12 12
13# USE_IMAKE 13# USE_IMAKE
14# When set to "yes", means that the package uses imake as the 14# When set to "yes", means that the package uses imake as the
@@ -45,42 +45,34 @@ PLIST_SUBST+= IMAKE_GAMEMAN_SUFFIX=${IM @@ -45,42 +45,34 @@ PLIST_SUBST+= IMAKE_GAMEMAN_SUFFIX=${IM
45PLIST_SUBST+= IMAKE_MISCMAN_SUFFIX=${IMAKE_MISCMAN_SUFFIX:Q} 45PLIST_SUBST+= IMAKE_MISCMAN_SUFFIX=${IMAKE_MISCMAN_SUFFIX:Q}
46PLIST_SUBST+= IMAKE_MANNEWSUFFIX=${IMAKE_MANNEWSUFFIX:Q} 46PLIST_SUBST+= IMAKE_MANNEWSUFFIX=${IMAKE_MANNEWSUFFIX:Q}
47.endif 47.endif
48 48
49.if defined(USE_IMAKE) 49.if defined(USE_IMAKE)
50USE_X11BASE?= implied 50USE_X11BASE?= implied
51MAKE_FLAGS+= CC=${CC:Q} CXX=${CXX:Q} 51MAKE_FLAGS+= CC=${CC:Q} CXX=${CXX:Q}
52.endif 52.endif
53 53
54.if defined(USE_X11BASE) && ${X11_TYPE} != "modular" 54.if defined(USE_X11BASE) && ${X11_TYPE} != "modular"
55. include "x11.buildlink3.mk" 55. include "x11.buildlink3.mk"
56.endif 56.endif
57 57
58.if ${PKG_INSTALLATION_TYPE} == "pkgviews" 58.if defined(INSTALLATION_PREFIX)
59PREFIX= ${DEPOTBASE}/${PKGNAME} 
60.elif ${PKG_INSTALLATION_TYPE} == "overwrite" 
61. if defined(INSTALLATION_PREFIX) 
62PREFIX= ${INSTALLATION_PREFIX} 59PREFIX= ${INSTALLATION_PREFIX}
63. elif defined(USE_X11BASE) 60.elif defined(USE_X11BASE)
64PREFIX= ${X11PREFIX} 61PREFIX= ${X11PREFIX}
65. elif defined(USE_CROSSBASE) 62.elif defined(USE_CROSSBASE)
66PREFIX= ${CROSSBASE} 63PREFIX= ${CROSSBASE}
67. else 64.else
68PREFIX= ${LOCALBASE} 65PREFIX= ${LOCALBASE}
69. endif 
70.endif 
71 
72.if (${PKG_INSTALLATION_TYPE} == "pkgviews") && defined(INSTALLATION_PREFIX) 
73PKG_FAIL_REASON= "INSTALLATION_PREFIX can't be used in a pkgviews package" 
74.endif 66.endif
75 67
76############################################################################ 68############################################################################
77# General settings 69# General settings
78############################################################################ 70############################################################################
79 71
80### PKG_USE_KERBEROS 72### PKG_USE_KERBEROS
81 73
82.if defined(PKG_USE_KERBEROS) 74.if defined(PKG_USE_KERBEROS)
83CRYPTO?= uses Kerberos encryption code 75CRYPTO?= uses Kerberos encryption code
84BUILD_DEFS+= KERBEROS 76BUILD_DEFS+= KERBEROS
85.endif 77.endif
86 78

cvs diff -r1.352 -r1.353 pkgsrc/mk/bsd.prefs.mk (expand / switch to unified diff)

--- pkgsrc/mk/bsd.prefs.mk 2014/12/07 06:22:52 1.352
+++ pkgsrc/mk/bsd.prefs.mk 2014/12/30 15:13:19 1.353
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: bsd.prefs.mk,v 1.352 2014/12/07 06:22:52 obache Exp $ 1# $NetBSD: bsd.prefs.mk,v 1.353 2014/12/30 15:13:19 wiz Exp $
2# 2#
3# This file includes the mk.conf file, which contains the user settings. 3# This file includes the mk.conf file, which contains the user settings.
4# 4#
5# Packages should include this file before any of the .if directives, as 5# Packages should include this file before any of the .if directives, as
6# well as before modifying variables like CFLAGS, LDFLAGS, and so on. 6# well as before modifying variables like CFLAGS, LDFLAGS, and so on.
7# Otherwise the behavior may be unexpected. 7# Otherwise the behavior may be unexpected.
8# 8#
9# When mk.conf is included by this file, the following variables are 9# When mk.conf is included by this file, the following variables are
10# defined: 10# defined:
11# 11#
12# ACCEPTABLE_LICENSES 12# ACCEPTABLE_LICENSES
13# This variable is set to the list of Open Source licenses. See 13# This variable is set to the list of Open Source licenses. See
14# mk/license.mk for details. 14# mk/license.mk for details.
@@ -567,47 +567,26 @@ _CROSS_DESTDIR= ${CROSS_DESTDIR} @@ -567,47 +567,26 @@ _CROSS_DESTDIR= ${CROSS_DESTDIR}
567. if ${OBJECT_FMT} == "ELF" && \ 567. if ${OBJECT_FMT} == "ELF" && \
568 (${MACHINE_GNU_ARCH} == "arm" || \ 568 (${MACHINE_GNU_ARCH} == "arm" || \
569 ${MACHINE_ARCH} == "i386" || \ 569 ${MACHINE_ARCH} == "i386" || \
570 ${MACHINE_ARCH} == "m68k" || \ 570 ${MACHINE_ARCH} == "m68k" || \
571 ${MACHINE_ARCH} == "m68000" || \ 571 ${MACHINE_ARCH} == "m68000" || \
572 ${MACHINE_GNU_ARCH} == "sh" || \ 572 ${MACHINE_GNU_ARCH} == "sh" || \
573 ${MACHINE_GNU_ARCH} == "shle" || \ 573 ${MACHINE_GNU_ARCH} == "shle" || \
574 ${MACHINE_ARCH} == "sparc" || \ 574 ${MACHINE_ARCH} == "sparc" || \
575 ${MACHINE_ARCH} == "vax") 575 ${MACHINE_ARCH} == "vax")
576APPEND_ELF= elf 576APPEND_ELF= elf
577. endif 577. endif
578.endif 578.endif
579 579
580PKG_INSTALLATION_TYPES?= overwrite 
581# This is a whitespace-separated list of installation types supported 
582# by the package. 
583# 
584# *NOTE*: This variable *must* be set in the package Makefile *before* 
585# the inclusion of bsd.prefs.mk. 
586# 
587# Possible: any of: overwrite, pkgviews 
588# Default: overwrite 
589 
590# Set the style of installation to be performed for the package. The 
591# funky make variable modifiers just select the first word of the value 
592# stored in the referenced variable. 
593# 
594.for _pref_ in ${PKG_INSTALLATION_PREFS} 
595. if !empty(PKG_INSTALLATION_TYPES:M${_pref_}) 
596PKG_INSTALLATION_TYPE?= ${PKG_INSTALLATION_TYPES:M${_pref_}:S/^/_pkginsttype_/1:M_pkginsttype_*:S/^_pkginsttype_//} 
597. endif 
598.endfor 
599PKG_INSTALLATION_TYPE?= none 
600 
601# if the system is IPv6-ready, compile with IPv6 support turned on. 580# if the system is IPv6-ready, compile with IPv6 support turned on.
602.if empty(_OPSYS_HAS_INET6:M[nN][oO]) 581.if empty(_OPSYS_HAS_INET6:M[nN][oO])
603IPV6_READY= YES 582IPV6_READY= YES
604.else 583.else
605IPV6_READY= NO 584IPV6_READY= NO
606.endif 585.endif
607 586
608LOCALBASE?= /usr/pkg 587LOCALBASE?= /usr/pkg
609X11_TYPE?= modular 588X11_TYPE?= modular
610.if !empty(X11_TYPE:Mnative) 589.if !empty(X11_TYPE:Mnative)
611. if ${OPSYS} == "SunOS" 590. if ${OPSYS} == "SunOS"
612# On Solaris, we default to using OpenWindows for X11. 591# On Solaris, we default to using OpenWindows for X11.
613X11BASE?= /usr/openwin 592X11BASE?= /usr/openwin
@@ -658,29 +637,26 @@ IMAKE_LIBMAN_SUFFIX= 3 @@ -658,29 +637,26 @@ IMAKE_LIBMAN_SUFFIX= 3
658IMAKE_KERNMAN_SUFFIX= 4 637IMAKE_KERNMAN_SUFFIX= 4
659IMAKE_FILEMAN_SUFFIX= 5 638IMAKE_FILEMAN_SUFFIX= 5
660IMAKE_GAMEMAN_SUFFIX= 6 639IMAKE_GAMEMAN_SUFFIX= 6
661IMAKE_MISCMAN_SUFFIX= 7 640IMAKE_MISCMAN_SUFFIX= 7
662IMAKE_MAN_DIR= ${IMAKE_MAN_SOURCE_PATH}1 641IMAKE_MAN_DIR= ${IMAKE_MAN_SOURCE_PATH}1
663IMAKE_LIBMAN_DIR= ${IMAKE_MAN_SOURCE_PATH}3 642IMAKE_LIBMAN_DIR= ${IMAKE_MAN_SOURCE_PATH}3
664IMAKE_KERNMAN_DIR= ${IMAKE_MAN_SOURCE_PATH}4 643IMAKE_KERNMAN_DIR= ${IMAKE_MAN_SOURCE_PATH}4
665IMAKE_FILEMAN_DIR= ${IMAKE_MAN_SOURCE_PATH}5 644IMAKE_FILEMAN_DIR= ${IMAKE_MAN_SOURCE_PATH}5
666IMAKE_GAMEMAN_DIR= ${IMAKE_MAN_SOURCE_PATH}6 645IMAKE_GAMEMAN_DIR= ${IMAKE_MAN_SOURCE_PATH}6
667IMAKE_MISCMAN_DIR= ${IMAKE_MAN_SOURCE_PATH}7 646IMAKE_MISCMAN_DIR= ${IMAKE_MAN_SOURCE_PATH}7
668IMAKE_MANNEWSUFFIX= ${IMAKE_MAN_SUFFIX} 647IMAKE_MANNEWSUFFIX= ${IMAKE_MAN_SUFFIX}
669IMAKE_MANINSTALL?= maninstall 648IMAKE_MANINSTALL?= maninstall
670 649
671DEPOT_SUBDIR?= packages 
672DEPOTBASE= ${LOCALBASE}/${DEPOT_SUBDIR} 
673 
674# LINK_RPATH_FLAG publicly exports the linker flag used to set the 650# LINK_RPATH_FLAG publicly exports the linker flag used to set the
675# run-time library search path. 651# run-time library search path.
676# 652#
677.if defined(_OPSYS_LINKER_RPATH_FLAG) 653.if defined(_OPSYS_LINKER_RPATH_FLAG)
678LINKER_RPATH_FLAG= ${_OPSYS_LINKER_RPATH_FLAG} 654LINKER_RPATH_FLAG= ${_OPSYS_LINKER_RPATH_FLAG}
679.else 655.else
680LINKER_RPATH_FLAG?= ${_LINKER_RPATH_FLAG} 656LINKER_RPATH_FLAG?= ${_LINKER_RPATH_FLAG}
681.endif 657.endif
682 658
683# COMPILER_RPATH_FLAG publicly exports the compiler flag used to pass 659# COMPILER_RPATH_FLAG publicly exports the compiler flag used to pass
684# run-time library search path directives to the linker. 660# run-time library search path directives to the linker.
685# 661#
686.if defined(_OPSYS_COMPILER_RPATH_FLAG) 662.if defined(_OPSYS_COMPILER_RPATH_FLAG)

cvs diff -r1.7 -r1.8 pkgsrc/mk/buildlink3/BUILDLINK3_DG (expand / switch to unified diff)

--- pkgsrc/mk/buildlink3/BUILDLINK3_DG 2005/03/24 17:46:01 1.7
+++ pkgsrc/mk/buildlink3/BUILDLINK3_DG 2014/12/30 15:13:19 1.8
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1$NetBSD: BUILDLINK3_DG,v 1.7 2005/03/24 17:46:01 tv Exp $ 1$NetBSD: BUILDLINK3_DG,v 1.8 2014/12/30 15:13:19 wiz Exp $
2 2
3 0 Developer's guide to buildlink3 3 0 Developer's guide to buildlink3
4 ================================= 4 =================================
5 5
6This is a tutorial for pkgsrc developers to understand and to use the 6This is a tutorial for pkgsrc developers to understand and to use the
7buildlink3 framework in pkgsrc. 7buildlink3 framework in pkgsrc.
8 8
9 9
10 1 Changes between buildlink2 and buildlink3 10 1 Changes between buildlink2 and buildlink3
11 =========================================== 11 ===========================================
12 12
13The buildlink3 framework is a evolutionary descendant of the 13The buildlink3 framework is a evolutionary descendant of the
14buildlink2 framework that does a better job of adhering to the 14buildlink2 framework that does a better job of adhering to the
@@ -33,39 +33,26 @@ used instead of the system libraries if  @@ -33,39 +33,26 @@ used instead of the system libraries if
33 33
34buildlink3.mk files have two major differences over buildlink2.mk 34buildlink3.mk files have two major differences over buildlink2.mk
35files. The first, most noticeable difference is that buildlink3.mk 35files. The first, most noticeable difference is that buildlink3.mk
36generally don't contain a BUILDLINK_FILES definition. This is 36generally don't contain a BUILDLINK_FILES definition. This is
37because buildlink3 automatically determines which files to symlink 37because buildlink3 automatically determines which files to symlink
38into ${BUILDLINK_DIR} by examining the PLIST of the installed package. 38into ${BUILDLINK_DIR} by examining the PLIST of the installed package.
39The second difference is that buildlink3.mk files keep track of how 39The second difference is that buildlink3.mk files keep track of how
40"deep" we are in including buildlink3.mk files, and only creates 40"deep" we are in including buildlink3.mk files, and only creates
41dependencies on packages encountered at depth 1. This means that 41dependencies on packages encountered at depth 1. This means that
42packages that want to add a dependency must directly include the 42packages that want to add a dependency must directly include the
43buildlink3.mk file for that dependency. 43buildlink3.mk file for that dependency.
44 44
45 45
46 1.3 Support for pkgviews 
47 ======================== 
48 
49When building pkgviews packages, buildlink3 doesn't symlink files 
50into ${BUILDLINK_DIR} since it can safely refer to only a specific 
51package's files by passing the appropriate -I<dir> and -L<dir> flags 
52to the compiler, where <dir> points to a location in the package's 
53depot directory. When building "overwrite" packages, buildlink3 will 
54act and feel very much like buildlink2 but with more advanced wrapper 
55scripts, and there are provisions for allowing an "overwrite" package 
56to build against the viewed instance of a depoted package. 
57 
58 
59 2 Troubleshooting 46 2 Troubleshooting
60 ================= 47 =================
61 48
62Q1: Where can I see the actual command executed by the wrapper 49Q1: Where can I see the actual command executed by the wrapper
63 scripts? 50 scripts?
64 51
65A1: You should examine the contents of the ${WRKDIR}/.work.log file. 52A1: You should examine the contents of the ${WRKDIR}/.work.log file.
66 The lines preceded with [*] are the commands that are intercepted 53 The lines preceded with [*] are the commands that are intercepted
67 by the wrapper scripts, and the lines preceded with <.> are the 54 by the wrapper scripts, and the lines preceded with <.> are the
68 commands that are executed by the wrapper scripts. 55 commands that are executed by the wrapper scripts.
69 56
70 57
71Q2: Why can't I check the values of variables set by the buildlink3 58Q2: Why can't I check the values of variables set by the buildlink3

File Deleted: pkgsrc/mk/buildlink3/Attic/PKGVIEWS_UG

File Deleted: pkgsrc/mk/buildlink3/Attic/README

File Deleted: pkgsrc/mk/buildlink3/Attic/TODO

cvs diff -r1.231 -r1.232 pkgsrc/mk/buildlink3/bsd.buildlink3.mk (expand / switch to unified diff)

--- pkgsrc/mk/buildlink3/bsd.buildlink3.mk 2014/11/25 19:01:02 1.231
+++ pkgsrc/mk/buildlink3/bsd.buildlink3.mk 2014/12/30 15:13:19 1.232
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: bsd.buildlink3.mk,v 1.231 2014/11/25 19:01:02 joerg Exp $ 1# $NetBSD: bsd.buildlink3.mk,v 1.232 2014/12/30 15:13:19 wiz Exp $
2# 2#
3# Copyright (c) 2004 The NetBSD Foundation, Inc. 3# Copyright (c) 2004 The NetBSD Foundation, Inc.
4# All rights reserved. 4# All rights reserved.
5# 5#
6# This code is derived from software contributed to The NetBSD Foundation 6# This code is derived from software contributed to The NetBSD Foundation
7# by Johnny C. Lam. 7# by Johnny C. Lam.
8# 8#
9# Redistribution and use in source and binary forms, with or without 9# Redistribution and use in source and binary forms, with or without
10# modification, are permitted provided that the following conditions 10# modification, are permitted provided that the following conditions
11# are met: 11# are met:
12# 1. Redistributions of source code must retain the above copyright 12# 1. Redistributions of source code must retain the above copyright
13# notice, this list of conditions and the following disclaimer. 13# notice, this list of conditions and the following disclaimer.
14# 2. Redistributions in binary form must reproduce the above copyright 14# 2. Redistributions in binary form must reproduce the above copyright
@@ -195,27 +195,27 @@ MAKEFLAGS+= IGNORE_PKG.${_pkg_}=${IGNOR @@ -195,27 +195,27 @@ MAKEFLAGS+= IGNORE_PKG.${_pkg_}=${IGNOR
195# 195#
196_BLNK_PACKAGES= # empty 196_BLNK_PACKAGES= # empty
197.for _pkg_ in ${BUILDLINK_TREE:N-*:Mx11-links} ${BUILDLINK_TREE:N-*:Nx11-links} 197.for _pkg_ in ${BUILDLINK_TREE:N-*:Mx11-links} ${BUILDLINK_TREE:N-*:Nx11-links}
198. if empty(_BLNK_PACKAGES:M${_pkg_}) && !defined(IGNORE_PKG.${_pkg_}) 198. if empty(_BLNK_PACKAGES:M${_pkg_}) && !defined(IGNORE_PKG.${_pkg_})
199_BLNK_PACKAGES+= ${_pkg_} 199_BLNK_PACKAGES+= ${_pkg_}
200. endif 200. endif
201.endfor 201.endfor
202 202
203_VARGROUPS+= bl3 203_VARGROUPS+= bl3
204.for v in BINDIR CFLAGS CPPFLAGS DEPENDS LDFLAGS LIBS 204.for v in BINDIR CFLAGS CPPFLAGS DEPENDS LDFLAGS LIBS
205_SYS_VARS.bl3+= BUILDLINK_${v} 205_SYS_VARS.bl3+= BUILDLINK_${v}
206.endfor 206.endfor
207.for p in ${_BUILDLINK_TREE} 207.for p in ${_BUILDLINK_TREE}
208. for v in AUTO_VARS BUILTIN_MK CONTENTS_FILTER CPPFLAGS DEPMETHOD FILES_CMD INCDIRS IS_DEPOT LDFLAGS LIBDIRS PKGNAME PREFIX RPATHDIRS 208. for v in AUTO_VARS BUILTIN_MK CONTENTS_FILTER CPPFLAGS DEPMETHOD FILES_CMD INCDIRS LDFLAGS LIBDIRS PKGNAME PREFIX RPATHDIRS
209_SYS_VARS.bl3+= BUILDLINK_${v}.${p} 209_SYS_VARS.bl3+= BUILDLINK_${v}.${p}
210. endfor 210. endfor
211. for v in IGNORE_PKG USE_BUILTIN 211. for v in IGNORE_PKG USE_BUILTIN
212_SYS_VARS.bl3+= ${v}.${p} 212_SYS_VARS.bl3+= ${v}.${p}
213. endfor 213. endfor
214.endfor 214.endfor
215 215
216# By default, every package receives a full dependency. 216# By default, every package receives a full dependency.
217.for _pkg_ in ${_BLNK_PACKAGES} 217.for _pkg_ in ${_BLNK_PACKAGES}
218BUILDLINK_DEPMETHOD.${_pkg_}?= full 218BUILDLINK_DEPMETHOD.${_pkg_}?= full
219.endfor 219.endfor
220 220
221# _BLNK_DEPENDS contains all of the elements of _BLNK_PACKAGES for which 221# _BLNK_DEPENDS contains all of the elements of _BLNK_PACKAGES for which
@@ -280,29 +280,26 @@ ${_depmethod_}+= ${_BLNK_ADD_TO.${_depme @@ -280,29 +280,26 @@ ${_depmethod_}+= ${_BLNK_ADD_TO.${_depme
280### 280###
281.if defined(_PKGSRC_BARRIER) 281.if defined(_PKGSRC_BARRIER)
282 282
283# Generate default values for: 283# Generate default values for:
284# 284#
285# _BLNK_PKG_DBDIR.<pkg> contains all of the package metadata 285# _BLNK_PKG_DBDIR.<pkg> contains all of the package metadata
286# files for <pkg> 286# files for <pkg>
287# 287#
288# _BLNK_PKG_INFO.<pkg> pkg_info(1) with correct dbdir to get 288# _BLNK_PKG_INFO.<pkg> pkg_info(1) with correct dbdir to get
289# information for <pkg> 289# information for <pkg>
290# 290#
291# BUILDLINK_PKGNAME.<pkg> the name of the package 291# BUILDLINK_PKGNAME.<pkg> the name of the package
292# 292#
293# BUILDLINK_IS_DEPOT.<pkg> "yes" or "no" for whether <pkg> is a 
294# depoted package. 
295# 
296# BUILDLINK_PREFIX.<pkg> contains all of the installed files 293# BUILDLINK_PREFIX.<pkg> contains all of the installed files
297# for <pkg> 294# for <pkg>
298# 295#
299# BUILDLINK_CFLAGS.<pkg>, 296# BUILDLINK_CFLAGS.<pkg>,
300# BUILDLINK_CPPFLAGS.<pkg>, 297# BUILDLINK_CPPFLAGS.<pkg>,
301# BUILDLINK_LDFLAGS.<pkg> contain extra compiler options, -D..., -I... 298# BUILDLINK_LDFLAGS.<pkg> contain extra compiler options, -D..., -I...
302# and -L.../-Wl,-R options to be passed to the 299# and -L.../-Wl,-R options to be passed to the
303# compiler/linker so that building against 300# compiler/linker so that building against
304# <pkg> will work. 301# <pkg> will work.
305# 302#
306# BUILDLINK_LIBS.<pkg> contain -l... (library) options that can be 303# BUILDLINK_LIBS.<pkg> contain -l... (library) options that can be
307# automatically appended to the LIBS 304# automatically appended to the LIBS
308# variable when building against <pkg>. 305# variable when building against <pkg>.
@@ -325,27 +322,26 @@ ${_depmethod_}+= ${_BLNK_ADD_TO.${_depme @@ -325,27 +322,26 @@ ${_depmethod_}+= ${_BLNK_ADD_TO.${_depme
325# LIBDIRS,RPATHDIRS}.<pkg> should automatically 322# LIBDIRS,RPATHDIRS}.<pkg> should automatically
326# be added to the compiler/linker search paths. 323# be added to the compiler/linker search paths.
327# Defaults to "yes". 324# Defaults to "yes".
328# 325#
329.for _pkg_ in ${_BLNK_PACKAGES} 326.for _pkg_ in ${_BLNK_PACKAGES}
330# 327#
331# If we're using the built-in package, then provide sensible defaults. 328# If we're using the built-in package, then provide sensible defaults.
332# 329#
333USE_BUILTIN.${_pkg_}?= no 330USE_BUILTIN.${_pkg_}?= no
334. if !empty(USE_BUILTIN.${_pkg_}:M[yY][eE][sS]) 331. if !empty(USE_BUILTIN.${_pkg_}:M[yY][eE][sS])
335_BLNK_PKG_DBDIR.${_pkg_}?= _BLNK_PKG_DBDIR.${_pkg_}_not_found 332_BLNK_PKG_DBDIR.${_pkg_}?= _BLNK_PKG_DBDIR.${_pkg_}_not_found
336_BLNK_PKG_INFO.${_pkg_}?= ${TRUE} 333_BLNK_PKG_INFO.${_pkg_}?= ${TRUE}
337BUILDLINK_PKGNAME.${_pkg_}?= ${_pkg_} 334BUILDLINK_PKGNAME.${_pkg_}?= ${_pkg_}
338BUILDLINK_IS_DEPOT.${_pkg_}?= no 
339# Usual systems has builtin packages in /usr 335# Usual systems has builtin packages in /usr
340. if exists(/usr) 336. if exists(/usr)
341BUILDLINK_PREFIX.${_pkg_}?= /usr 337BUILDLINK_PREFIX.${_pkg_}?= /usr
342# Haiku OS has posix packages in /boot/sytem/develop (or /boot/common) 338# Haiku OS has posix packages in /boot/sytem/develop (or /boot/common)
343. elif exists(/boot/system/develop) 339. elif exists(/boot/system/develop)
344BUILDLINK_PREFIX.${_pkg_}?= /boot/system/develop 340BUILDLINK_PREFIX.${_pkg_}?= /boot/system/develop
345. elif exists(/boot/common) 341. elif exists(/boot/common)
346BUILDLINK_PREFIX.${_pkg_}?= /boot/common 342BUILDLINK_PREFIX.${_pkg_}?= /boot/common
347. else 343. else
348# XXX: elsewhere? 344# XXX: elsewhere?
349BUILDLINK_PREFIX.${_pkg_}?= # empty 345BUILDLINK_PREFIX.${_pkg_}?= # empty
350. endif 346. endif
351. if !empty(LIBABISUFFIX) 347. if !empty(LIBABISUFFIX)
@@ -355,65 +351,53 @@ BUILDLINK_LIBDIRS.${_pkg_}?= lib${LIBABI @@ -355,65 +351,53 @@ BUILDLINK_LIBDIRS.${_pkg_}?= lib${LIBABI
355# 351#
356# Set a default for _BLNK_PKG_DBDIR.<pkg>, which is the directory 352# Set a default for _BLNK_PKG_DBDIR.<pkg>, which is the directory
357# containing the package metadata. 353# containing the package metadata.
358# 354#
359. if !defined(_BLNK_PKG_DBDIR.${_pkg_}) 355. if !defined(_BLNK_PKG_DBDIR.${_pkg_})
360_BLNK_PKG_DBDIR.${_pkg_}?= # empty 356_BLNK_PKG_DBDIR.${_pkg_}?= # empty
361. for _depend_ in ${BUILDLINK_API_DEPENDS.${_pkg_}} 357. for _depend_ in ${BUILDLINK_API_DEPENDS.${_pkg_}}
362. if empty(_BLNK_PKG_DBDIR.${_pkg_}:M*not_found) 358. if empty(_BLNK_PKG_DBDIR.${_pkg_}:M*not_found)
363_BLNK_PKG_DBDIR.${_pkg_}!= \ 359_BLNK_PKG_DBDIR.${_pkg_}!= \
364 pkg=`${PKG_INFO} -E "${_depend_}" || ${TRUE}`; \ 360 pkg=`${PKG_INFO} -E "${_depend_}" || ${TRUE}`; \
365 case "$$pkg" in \ 361 case "$$pkg" in \
366 "") dir="_BLNK_PKG_DBDIR.${_pkg_}_not_found" ;; \ 362 "") dir="_BLNK_PKG_DBDIR.${_pkg_}_not_found" ;; \
367 *) dir="${_PKG_DBDIR}/$$pkg"; \ 363 *) dir="${_PKG_DBDIR}/$$pkg"; \
368 if [ -f $$dir/+DEPOT ]; then \ 
369 dir=`${HEAD} -1 $$dir/+DEPOT`; \ 
370 fi ;; \ 
371 esac; \ 364 esac; \
372 ${ECHO} $$dir 365 ${ECHO} $$dir
373. endif 366. endif
374. endfor 367. endfor
375. endif 368. endif
376. if empty(_BLNK_PKG_DBDIR.${_pkg_}:M*not_found) 369. if empty(_BLNK_PKG_DBDIR.${_pkg_}:M*not_found)
377MAKEVARS+= _BLNK_PKG_DBDIR.${_pkg_} 370MAKEVARS+= _BLNK_PKG_DBDIR.${_pkg_}
378. endif 371. endif
379 372
380. if empty(_BLNK_PKG_DBDIR.${_pkg_}:M*not_found) 373. if empty(_BLNK_PKG_DBDIR.${_pkg_}:M*not_found)
381_BLNK_PKG_INFO.${_pkg_}?= ${PKG_INFO_CMD} -K ${_BLNK_PKG_DBDIR.${_pkg_}:H} 374_BLNK_PKG_INFO.${_pkg_}?= ${PKG_INFO_CMD} -K ${_BLNK_PKG_DBDIR.${_pkg_}:H}
382. else 375. else
383_BLNK_PKG_INFO.${_pkg_}?= ${PKG_INFO_CMD} -K ${_PKG_DBDIR} 376_BLNK_PKG_INFO.${_pkg_}?= ${PKG_INFO_CMD} -K ${_PKG_DBDIR}
384. endif 377. endif
385 378
386BUILDLINK_PKGNAME.${_pkg_}?= ${_BLNK_PKG_DBDIR.${_pkg_}:T} 379BUILDLINK_PKGNAME.${_pkg_}?= ${_BLNK_PKG_DBDIR.${_pkg_}:T}
387. if exists(${_BLNK_PKG_DBDIR.${_pkg_}}/+VIEWS) 
388BUILDLINK_IS_DEPOT.${_pkg_}?= yes 
389. else 
390BUILDLINK_IS_DEPOT.${_pkg_}?= no 
391. endif 
392# 380#
393# Set BUILDLINK_PREFIX.<pkg> to the "PREFIX" value for the package. 381# Set BUILDLINK_PREFIX.<pkg> to the "PREFIX" value for the package.
394# 382#
395. if !defined(BUILDLINK_PREFIX.${_pkg_}) 383. if !defined(BUILDLINK_PREFIX.${_pkg_})
396. if !empty(BUILDLINK_IS_DEPOT.${_pkg_}:M[yY][eE][sS]) 384. if empty(BUILDLINK_PKGNAME.${_pkg_}:M*not_found)
397BUILDLINK_PREFIX.${_pkg_}= ${_BLNK_PKG_DBDIR.${_pkg_}} 
398. else 
399. if empty(BUILDLINK_PKGNAME.${_pkg_}:M*not_found) 
400BUILDLINK_PREFIX.${_pkg_}!= \ 385BUILDLINK_PREFIX.${_pkg_}!= \
401 ${TRUE} Computing BUILDLINK_PREFIX.${_pkg_:Q}; \ 386 ${TRUE} Computing BUILDLINK_PREFIX.${_pkg_:Q}; \
402 ${_BLNK_PKG_INFO.${_pkg_}} -qp ${BUILDLINK_PKGNAME.${_pkg_}} | \ 387 ${_BLNK_PKG_INFO.${_pkg_}} -qp ${BUILDLINK_PKGNAME.${_pkg_}} | \
403 ${SED} -e "s,^[^/]*,,;q" 388 ${SED} -e "s,^[^/]*,,;q"
404. else 389. else
405BUILDLINK_PREFIX.${_pkg_}= BUILDLINK_PREFIX.${_pkg_}_not_found 390BUILDLINK_PREFIX.${_pkg_}= BUILDLINK_PREFIX.${_pkg_}_not_found
406. endif 
407. endif 391. endif
408. endif 392. endif
409. if empty(BUILDLINK_PREFIX.${_pkg_}:M*not_found) 393. if empty(BUILDLINK_PREFIX.${_pkg_}:M*not_found)
410MAKEVARS+= BUILDLINK_PREFIX.${_pkg_} 394MAKEVARS+= BUILDLINK_PREFIX.${_pkg_}
411. endif 395. endif
412 396
413. if empty(BUILDLINK_PREFIX.${_pkg_}:N/usr:N/boot/common:N/) 397. if empty(BUILDLINK_PREFIX.${_pkg_}:N/usr:N/boot/common:N/)
414BUILDLINK_DIR.${_pkg_}= ${BUILDLINK_PREFIX.${_pkg_}} 398BUILDLINK_DIR.${_pkg_}= ${BUILDLINK_PREFIX.${_pkg_}}
415. else 399. else
416BUILDLINK_DIR.${_pkg_}= ${BUILDLINK_DIR} 400BUILDLINK_DIR.${_pkg_}= ${BUILDLINK_DIR}
417. endif 401. endif
418 402
419BUILDLINK_AUTO_VARS.${_pkg_}?= yes 403BUILDLINK_AUTO_VARS.${_pkg_}?= yes
@@ -487,35 +471,26 @@ BUILDLINK_LDFLAGS+= -L${_dir_} @@ -487,35 +471,26 @@ BUILDLINK_LDFLAGS+= -L${_dir_}
487. endif 471. endif
488. if !empty(BUILDLINK_RPATHDIRS.${_pkg_}) 472. if !empty(BUILDLINK_RPATHDIRS.${_pkg_})
489. for _dir_ in ${BUILDLINK_RPATHDIRS.${_pkg_}:S/^/${BUILDLINK_PREFIX.${_pkg_}}\//} 473. for _dir_ in ${BUILDLINK_RPATHDIRS.${_pkg_}:S/^/${BUILDLINK_PREFIX.${_pkg_}}\//}
490. if exists(${_dir_}) 474. if exists(${_dir_})
491. if empty(BUILDLINK_LDFLAGS:M${COMPILER_RPATH_FLAG}${_dir_}) 475. if empty(BUILDLINK_LDFLAGS:M${COMPILER_RPATH_FLAG}${_dir_})
492BUILDLINK_LDFLAGS+= ${COMPILER_RPATH_FLAG}${_dir_} 476BUILDLINK_LDFLAGS+= ${COMPILER_RPATH_FLAG}${_dir_}
493. endif 477. endif
494. endif 478. endif
495. endfor 479. endfor
496. endif 480. endif
497. endif 481. endif
498.endfor 482.endfor
499# 483#
500# Add the depot directory library directory for this package to the 
501# runtime library search path. 
502# 
503.if ${PKG_INSTALLATION_TYPE} == "pkgviews" 
504. if empty(BUILDLINK_LDFLAGS:M${COMPILER_RPATH_FLAG}${PREFIX}/lib) 
505BUILDLINK_LDFLAGS+= ${COMPILER_RPATH_FLAG}${PREFIX}/lib 
506. endif 
507.endif 
508# 
509# Add the default view library directories to the runtime library search 484# Add the default view library directories to the runtime library search
510# path so that wildcard dependencies on library packages can always be 485# path so that wildcard dependencies on library packages can always be
511# fulfilled through the default view. 486# fulfilled through the default view.
512# 487#
513.for _pkg_ in ${_BLNK_PACKAGES} 488.for _pkg_ in ${_BLNK_PACKAGES}
514. if !empty(BUILDLINK_RPATHDIRS.${_pkg_}) 489. if !empty(BUILDLINK_RPATHDIRS.${_pkg_})
515. for _dir_ in ${BUILDLINK_RPATHDIRS.${_pkg_}:S/^/${LOCALBASE}\//} 490. for _dir_ in ${BUILDLINK_RPATHDIRS.${_pkg_}:S/^/${LOCALBASE}\//}
516. if exists(${_dir_}) 491. if exists(${_dir_})
517. if empty(BUILDLINK_LDFLAGS:M${COMPILER_RPATH_FLAG}${_dir_}) 492. if empty(BUILDLINK_LDFLAGS:M${COMPILER_RPATH_FLAG}${_dir_})
518BUILDLINK_LDFLAGS+= ${COMPILER_RPATH_FLAG}${_dir_} 493BUILDLINK_LDFLAGS+= ${COMPILER_RPATH_FLAG}${_dir_}
519. endif 494. endif
520. endif 495. endif
521. endfor 496. endfor
@@ -605,65 +580,57 @@ buildlink-directories: @@ -605,65 +580,57 @@ buildlink-directories:
605# BUILDLINK_FILES.<pkg> 580# BUILDLINK_FILES.<pkg>
606# shell glob pattern relative to ${BUILDLINK_PREFIX.<pkg>} to be 581# shell glob pattern relative to ${BUILDLINK_PREFIX.<pkg>} to be
607# symlinked into ${BUILDLINK_DIR}, e.g. include/*.h 582# symlinked into ${BUILDLINK_DIR}, e.g. include/*.h
608# 583#
609# BUILDLINK_FILES_CMD.<pkg> 584# BUILDLINK_FILES_CMD.<pkg>
610# shell pipeline that outputs to stdout a list of files relative 585# shell pipeline that outputs to stdout a list of files relative
611# to ${BUILDLINK_PREFIX.<pkg>}. The resulting files are to be 586# to ${BUILDLINK_PREFIX.<pkg>}. The resulting files are to be
612# symlinked into ${BUILDLINK_DIR}. By default, this takes the 587# symlinked into ${BUILDLINK_DIR}. By default, this takes the
613# +CONTENTS of a <pkg> and filters it through 588# +CONTENTS of a <pkg> and filters it through
614# ${BUILDLINK_CONTENTS_FILTER.<pkg>}. 589# ${BUILDLINK_CONTENTS_FILTER.<pkg>}.
615# 590#
616# BUILDLINK_CONTENTS_FILTER.<pkg> 591# BUILDLINK_CONTENTS_FILTER.<pkg>
617# filter command that filters +CONTENTS input into a list of files 592# filter command that filters +CONTENTS input into a list of files
618# relative to ${BUILDLINK_PREFIX.<pkg>} on stdout. By default for 593# relative to ${BUILDLINK_PREFIX.<pkg>} on stdout. By default,
619# overwrite packages, BUILDLINK_CONTENTS_FILTER.<pkg> outputs the 594# BUILDLINK_CONTENTS_FILTER.<pkg> outputs the contents of the include
620# contents of the include and lib directories in the package 595# and lib directories in the package +CONTENTS.
621# +CONTENTS, and for pkgviews packages, it outputs any libtool 
622# archives in lib directories. 
623# 596#
624# BUILDLINK_FNAME_TRANSFORM.<pkg> 597# BUILDLINK_FNAME_TRANSFORM.<pkg>
625# sed arguments used to transform the name of the source filename 598# sed arguments used to transform the name of the source filename
626# into a destination filename, e.g. -e "s|/curses.h|/ncurses.h|g" 599# into a destination filename, e.g. -e "s|/curses.h|/ncurses.h|g"
627# 600#
628.for _pkg_ in ${_BLNK_PACKAGES} 601.for _pkg_ in ${_BLNK_PACKAGES}
629_BLNK_COOKIE.${_pkg_}= ${BUILDLINK_DIR}/.buildlink_${_pkg_}_done 602_BLNK_COOKIE.${_pkg_}= ${BUILDLINK_DIR}/.buildlink_${_pkg_}_done
630 603
631_BLNK_TARGETS+= buildlink-${_pkg_} 604_BLNK_TARGETS+= buildlink-${_pkg_}
632_BLNK_TARGETS.${_pkg_}= buildlink-${_pkg_}-message 605_BLNK_TARGETS.${_pkg_}= buildlink-${_pkg_}-message
633_BLNK_TARGETS.${_pkg_}+= ${_BLNK_COOKIE.${_pkg_}} 606_BLNK_TARGETS.${_pkg_}+= ${_BLNK_COOKIE.${_pkg_}}
634_BLNK_TARGETS.${_pkg_}+= buildlink-${_pkg_}-cookie 607_BLNK_TARGETS.${_pkg_}+= buildlink-${_pkg_}-cookie
635 608
636.PHONY: buildlink-${_pkg_} 609.PHONY: buildlink-${_pkg_}
637buildlink-${_pkg_}: ${_BLNK_TARGETS.${_pkg_}} 610buildlink-${_pkg_}: ${_BLNK_TARGETS.${_pkg_}}
638 611
639.PHONY: buildlink-${_pkg_}-message 612.PHONY: buildlink-${_pkg_}-message
640buildlink-${_pkg_}-message: 613buildlink-${_pkg_}-message:
641 ${RUN} \ 614 ${RUN} \
642 ${ECHO_BUILDLINK_MSG} "=> Linking ${_pkg_} files into ${BUILDLINK_DIR}." 615 ${ECHO_BUILDLINK_MSG} "=> Linking ${_pkg_} files into ${BUILDLINK_DIR}."
643 616
644.PHONY: buildlink-${_pkg_}-cookie 617.PHONY: buildlink-${_pkg_}-cookie
645buildlink-${_pkg_}-cookie: 618buildlink-${_pkg_}-cookie:
646 ${RUN} \ 619 ${RUN} \
647 ${TOUCH} ${TOUCH_FLAGS} ${_BLNK_COOKIE.${_pkg_}} 620 ${TOUCH} ${TOUCH_FLAGS} ${_BLNK_COOKIE.${_pkg_}}
648 621
649. if (${PKG_INSTALLATION_TYPE} == "pkgviews") && \ 
650 !empty(BUILDLINK_IS_DEPOT.${_pkg_}:M[yY][eE][sS]) 
651BUILDLINK_CONTENTS_FILTER.${_pkg_}?= \ 
652 ${EGREP} 'lib(/pkgconfig/.*\.pc$$|.*/lib[^/]*\.la$$)' 
653. else 
654BUILDLINK_CONTENTS_FILTER.${_pkg_}?= \ 622BUILDLINK_CONTENTS_FILTER.${_pkg_}?= \
655 ${EGREP} '(include.*/|\.h$$|\.idl$$|\.pc$$|/lib[^/]*\.[^/]*$$)' 623 ${EGREP} '(include.*/|\.h$$|\.idl$$|\.pc$$|/lib[^/]*\.[^/]*$$)'
656. endif 
657# XXX: Why not pkg_info -qL? 624# XXX: Why not pkg_info -qL?
658BUILDLINK_FILES_CMD.${_pkg_}?= \ 625BUILDLINK_FILES_CMD.${_pkg_}?= \
659 ${_BLNK_PKG_INFO.${_pkg_}} -f ${BUILDLINK_PKGNAME.${_pkg_}} | \ 626 ${_BLNK_PKG_INFO.${_pkg_}} -f ${BUILDLINK_PKGNAME.${_pkg_}} | \
660 ${SED} -n '/File:/s/^[ ]*File:[ ]*//p' | \ 627 ${SED} -n '/File:/s/^[ ]*File:[ ]*//p' | \
661 ${BUILDLINK_CONTENTS_FILTER.${_pkg_}} | ${CAT} 628 ${BUILDLINK_CONTENTS_FILTER.${_pkg_}} | ${CAT}
662 629
663# _BLNK_FILES_CMD.<pkg> combines BUILDLINK_FILES_CMD.<pkg> and 630# _BLNK_FILES_CMD.<pkg> combines BUILDLINK_FILES_CMD.<pkg> and
664# BUILDLINK_FILES.<pkg> into one command that outputs all of the files 631# BUILDLINK_FILES.<pkg> into one command that outputs all of the files
665# for <pkg> relative to ${BUILDLINK_PREFIX.<pkg>}. 632# for <pkg> relative to ${BUILDLINK_PREFIX.<pkg>}.
666# 633#
667_BLNK_FILES_CMD.${_pkg_}= ( 634_BLNK_FILES_CMD.${_pkg_}= (
668_BLNK_FILES_CMD.${_pkg_}+= ${BUILDLINK_FILES_CMD.${_pkg_}}; 635_BLNK_FILES_CMD.${_pkg_}+= ${BUILDLINK_FILES_CMD.${_pkg_}};
669.for _filepattern_ in ${BUILDLINK_FILES.${_pkg_}} 636.for _filepattern_ in ${BUILDLINK_FILES.${_pkg_}}
@@ -732,29 +699,27 @@ ${_BLNK_COOKIE.${_pkg_}}: @@ -732,29 +699,27 @@ ${_BLNK_COOKIE.${_pkg_}}:
732# linking against the libraries pointed to by symlinks in ${BUILDLINK_DIR}. 699# linking against the libraries pointed to by symlinks in ${BUILDLINK_DIR}.
733# 700#
734_BLNK_LT_ARCHIVE_FILTER.${_pkg_}= \ 701_BLNK_LT_ARCHIVE_FILTER.${_pkg_}= \
735 ${SED} ${_BLNK_LT_ARCHIVE_FILTER_SED_SCRIPT.${_pkg_}} 702 ${SED} ${_BLNK_LT_ARCHIVE_FILTER_SED_SCRIPT.${_pkg_}}
736 703
737_BLNK_SEP= \ \`\"':;, 704_BLNK_SEP= \ \`\"':;,
738_BLNK_LT_ARCHIVE_FILTER_SED_SCRIPT.${_pkg_}= # empty 705_BLNK_LT_ARCHIVE_FILTER_SED_SCRIPT.${_pkg_}= # empty
739# 706#
740# Modify the dependency_libs line by changing all full paths to other *.la 707# Modify the dependency_libs line by changing all full paths to other *.la
741# files into the canonical ${BUILDLINK_DIR} path. 708# files into the canonical ${BUILDLINK_DIR} path.
742# 709#
743_BLNK_LT_ARCHIVE_FILTER_SED_SCRIPT.${_pkg_}+= \ 710_BLNK_LT_ARCHIVE_FILTER_SED_SCRIPT.${_pkg_}+= \
744 -e "/^dependency_libs=/s,\([${_BLNK_SEP}]\)/usr\(/lib${LIBABISUFFIX}/[^${_BLNK_SEP}]*lib[^/${_BLNK_SEP}]*\.la[${_BLNK_SEP}]\),\\1${_BLNK_MANGLE_DIR.${BUILDLINK_DIR}}\\2,g" \ 711 -e "/^dependency_libs=/s,\([${_BLNK_SEP}]\)/usr\(/lib${LIBABISUFFIX}/[^${_BLNK_SEP}]*lib[^/${_BLNK_SEP}]*\.la[${_BLNK_SEP}]\),\\1${_BLNK_MANGLE_DIR.${BUILDLINK_DIR}}\\2,g" \
745 -e "/^dependency_libs=/s,\([${_BLNK_SEP}]\)/usr\(/lib${LIBABISUFFIX}/[^${_BLNK_SEP}]*lib[^/${_BLNK_SEP}]*\.la[${_BLNK_SEP}]\),\\1${_BLNK_MANGLE_DIR.${BUILDLINK_DIR}}\\2,g" \ 712 -e "/^dependency_libs=/s,\([${_BLNK_SEP}]\)/usr\(/lib${LIBABISUFFIX}/[^${_BLNK_SEP}]*lib[^/${_BLNK_SEP}]*\.la[${_BLNK_SEP}]\),\\1${_BLNK_MANGLE_DIR.${BUILDLINK_DIR}}\\2,g"
746 -e "/^dependency_libs=/s,\([${_BLNK_SEP}]\)${DEPOTBASE}/[^/${_BLNK_SEP}]*\(/[^${_BLNK_SEP}]*lib[^/${_BLNK_SEP}]*\.la[${_BLNK_SEP}]\),\\1${_BLNK_MANGLE_DIR.${BUILDLINK_DIR}}\\2,g" \ 
747 -e "/^dependency_libs=/s,\([${_BLNK_SEP}]\)${DEPOTBASE}/[^/${_BLNK_SEP}]*\(/[^${_BLNK_SEP}]*lib[^/${_BLNK_SEP}]*\.la[${_BLNK_SEP}]\),\\1${_BLNK_MANGLE_DIR.${BUILDLINK_DIR}}\\2,g" 
748 713
749.if ${X11_TYPE} != "modular" && ${X11BASE} != "/usr" 714.if ${X11_TYPE} != "modular" && ${X11BASE} != "/usr"
750_BLNK_LT_ARCHIVE_FILTER_SED_SCRIPT.${_pkg_}+= \ 715_BLNK_LT_ARCHIVE_FILTER_SED_SCRIPT.${_pkg_}+= \
751 -e "/^dependency_libs=/s,\([${_BLNK_SEP}]\)${X11BASE}\(/[^${_BLNK_SEP}]*lib[^/${_BLNK_SEP}]*\.la[${_BLNK_SEP}]\),\\1${_BLNK_MANGLE_DIR.${BUILDLINK_X11_DIR}}\\2,g" \ 716 -e "/^dependency_libs=/s,\([${_BLNK_SEP}]\)${X11BASE}\(/[^${_BLNK_SEP}]*lib[^/${_BLNK_SEP}]*\.la[${_BLNK_SEP}]\),\\1${_BLNK_MANGLE_DIR.${BUILDLINK_X11_DIR}}\\2,g" \
752 -e "/^dependency_libs=/s,\([${_BLNK_SEP}]\)${X11BASE}\(/[^${_BLNK_SEP}]*lib[^/${_BLNK_SEP}]*\.la[${_BLNK_SEP}]\),\\1${_BLNK_MANGLE_DIR.${BUILDLINK_X11_DIR}}\\2,g" 717 -e "/^dependency_libs=/s,\([${_BLNK_SEP}]\)${X11BASE}\(/[^${_BLNK_SEP}]*lib[^/${_BLNK_SEP}]*\.la[${_BLNK_SEP}]\),\\1${_BLNK_MANGLE_DIR.${BUILDLINK_X11_DIR}}\\2,g"
753.endif 718.endif
754 719
755_BLNK_LT_ARCHIVE_FILTER_SED_SCRIPT.${_pkg_}+= \ 720_BLNK_LT_ARCHIVE_FILTER_SED_SCRIPT.${_pkg_}+= \
756 -e "/^dependency_libs=/s,\([${_BLNK_SEP}]\)${LOCALBASE}\(/[^${_BLNK_SEP}]*lib[^/${_BLNK_SEP}]*\.la[${_BLNK_SEP}]\),\\1${_BLNK_MANGLE_DIR.${BUILDLINK_DIR}}\\2,g" \ 721 -e "/^dependency_libs=/s,\([${_BLNK_SEP}]\)${LOCALBASE}\(/[^${_BLNK_SEP}]*lib[^/${_BLNK_SEP}]*\.la[${_BLNK_SEP}]\),\\1${_BLNK_MANGLE_DIR.${BUILDLINK_DIR}}\\2,g" \
757 -e "/^dependency_libs=/s,\([${_BLNK_SEP}]\)${LOCALBASE}\(/[^${_BLNK_SEP}]*lib[^/${_BLNK_SEP}]*\.la[${_BLNK_SEP}]\),\\1${_BLNK_MANGLE_DIR.${BUILDLINK_DIR}}\\2,g" 722 -e "/^dependency_libs=/s,\([${_BLNK_SEP}]\)${LOCALBASE}\(/[^${_BLNK_SEP}]*lib[^/${_BLNK_SEP}]*\.la[${_BLNK_SEP}]\),\\1${_BLNK_MANGLE_DIR.${BUILDLINK_DIR}}\\2,g"
758 723
759# 724#
760# Modify the dependency_libs line by removing -L/usr/lib, which is implied. 725# Modify the dependency_libs line by removing -L/usr/lib, which is implied.
@@ -788,39 +753,35 @@ _BLNK_LT_ARCHIVE_FILTER_SED_SCRIPT.${_pk @@ -788,39 +753,35 @@ _BLNK_LT_ARCHIVE_FILTER_SED_SCRIPT.${_pk
788.endif 753.endif
789# 754#
790# Modify the dependency_libs line by cleaning up any leading and trailing 755# Modify the dependency_libs line by cleaning up any leading and trailing
791# whitespace. 756# whitespace.
792# 757#
793_BLNK_LT_ARCHIVE_FILTER_SED_SCRIPT.${_pkg_}+= \ 758_BLNK_LT_ARCHIVE_FILTER_SED_SCRIPT.${_pkg_}+= \
794 -e "/^dependency_libs=/s,^\(dependency_libs='\) *,\\1,g" \ 759 -e "/^dependency_libs=/s,^\(dependency_libs='\) *,\\1,g" \
795 -e "/^dependency_libs=/s, *'$$,',g" 760 -e "/^dependency_libs=/s, *'$$,',g"
796# 761#
797# Modify the libdir line to point to within ${BUILDLINK_DIR}. 762# Modify the libdir line to point to within ${BUILDLINK_DIR}.
798# This prevents libtool from looking into the original directory 763# This prevents libtool from looking into the original directory
799# for other *.la files. 764# for other *.la files.
800# 765#
801. if (${PKG_INSTALLATION_TYPE} == "overwrite") || \ 
802 !empty(BUILDLINK_IS_DEPOT.${_pkg_}:M[nN][oO]) 
803_BLNK_LT_ARCHIVE_FILTER_SED_SCRIPT.${_pkg_}+= \ 766_BLNK_LT_ARCHIVE_FILTER_SED_SCRIPT.${_pkg_}+= \
804 -e "/^libdir=/s,/usr\(/lib${LIBABISUFFIX}/[^${_BLNK_SEP}]*\),${BUILDLINK_DIR}\\1,g" \ 767 -e "/^libdir=/s,/usr\(/lib${LIBABISUFFIX}/[^${_BLNK_SEP}]*\),${BUILDLINK_DIR}\\1,g"
805 -e "/^libdir=/s,${DEPOTBASE}/[^/${_BLNK_SEP}]*\(/[^${_BLNK_SEP}]*\),${BUILDLINK_DIR}\\1,g" 
806 768
807_BLNK_LT_ARCHIVE_FILTER_SED_SCRIPT.${_pkg_}+= \ 769_BLNK_LT_ARCHIVE_FILTER_SED_SCRIPT.${_pkg_}+= \
808 -e "/^libdir=/s,${LOCALBASE}\(/[^${_BLNK_SEP}]*\),${BUILDLINK_DIR}\\1,g" 770 -e "/^libdir=/s,${LOCALBASE}\(/[^${_BLNK_SEP}]*\),${BUILDLINK_DIR}\\1,g"
809 771
810. if ${X11_TYPE} != "modular" && ${X11BASE} != "/usr" 772. if ${X11_TYPE} != "modular" && ${X11BASE} != "/usr"
811_BLNK_LT_ARCHIVE_FILTER_SED_SCRIPT.${_pkg_}+= \ 773_BLNK_LT_ARCHIVE_FILTER_SED_SCRIPT.${_pkg_}+= \
812 -e "/^libdir=/s,${X11BASE}\(/[^${_BLNK_SEP}]*\),${BUILDLINK_X11_DIR}\\1,g" 774 -e "/^libdir=/s,${X11BASE}\(/[^${_BLNK_SEP}]*\),${BUILDLINK_X11_DIR}\\1,g"
813. endif 
814. endif 775. endif
815.endfor 776.endfor
816 777
817# Include any BUILDLINK_TARGETS provided in buildlink3.mk files in 778# Include any BUILDLINK_TARGETS provided in buildlink3.mk files in
818# _BLNK_TARGETS. 779# _BLNK_TARGETS.
819# 780#
820_BLNK_TARGETS+= ${BUILDLINK_TARGETS} 781_BLNK_TARGETS+= ${BUILDLINK_TARGETS}
821 782
822# Add each of the targets in _BLNK_TARGETS as a prerequisite for the 783# Add each of the targets in _BLNK_TARGETS as a prerequisite for the
823# do-buildlink target. This ensures that all the buildlink magic happens 784# do-buildlink target. This ensures that all the buildlink magic happens
824# before any configure or build commands are called. 785# before any configure or build commands are called.
825# 786#
826.for _target_ in ${_BLNK_TARGETS} 787.for _target_ in ${_BLNK_TARGETS}
@@ -830,65 +791,48 @@ do-buildlink: ${_target_} @@ -830,65 +791,48 @@ do-buildlink: ${_target_}
830# _BLNK_PASSTHRU_DIRS contains the list of directories which we allow in 791# _BLNK_PASSTHRU_DIRS contains the list of directories which we allow in
831# preprocessor's header, linker's library, or the runtime library 792# preprocessor's header, linker's library, or the runtime library
832# search paths. The values of this list represent entire directory 793# search paths. The values of this list represent entire directory
833# trees under each named directory. Package makefiles may add to 794# trees under each named directory. Package makefiles may add to
834# its value through ${BUILDLINK_PASSTHRU_DIRS}. 795# its value through ${BUILDLINK_PASSTHRU_DIRS}.
835# 796#
836# _BLNK_PASSTHRU_RPATHDIRS contains an extra list of directories which we 797# _BLNK_PASSTHRU_RPATHDIRS contains an extra list of directories which we
837# allow in the runtime library search paths. Package makefiles may 798# allow in the runtime library search paths. Package makefiles may
838# add to its value through ${BUILDLINK_PASSTHRU_RPATHDIRS}. 799# add to its value through ${BUILDLINK_PASSTHRU_RPATHDIRS}.
839# 800#
840_BLNK_PASSTHRU_DIRS= # empty 801_BLNK_PASSTHRU_DIRS= # empty
841_BLNK_PASSTHRU_RPATHDIRS= # empty 802_BLNK_PASSTHRU_RPATHDIRS= # empty
842# 803#
843# Allow all of the depot directories for packages whose headers and 
844# libraries we use. 
845# 
846.for _pkg_ in ${_BLNK_PACKAGES} 
847. if !empty(BUILDLINK_IS_DEPOT.${_pkg_}:M[yY][eE][sS]) 
848_BLNK_PASSTHRU_DIRS+= ${BUILDLINK_PREFIX.${_pkg_}} 
849. endif 
850.endfor 
851# 
852# Allow the depot directory for the package we're building. 
853# 
854.if ${PKG_INSTALLATION_TYPE} == "pkgviews" 
855_BLNK_PASSTHRU_DIRS+= ${PREFIX} 
856.endif 
857# 
858# Allow any directories specified by the package or user. 804# Allow any directories specified by the package or user.
859# 805#
860_BLNK_PASSTHRU_DIRS+= ${BUILDLINK_PASSTHRU_DIRS} 806_BLNK_PASSTHRU_DIRS+= ${BUILDLINK_PASSTHRU_DIRS}
861# 807#
862# Strip out ${COMPILER_LIB_DIRS}, and ${COMPILER_INCLUDE_DIRS} as they're always 808# Strip out ${COMPILER_LIB_DIRS}, and ${COMPILER_INCLUDE_DIRS} as they're always
863# automatically added to all of the search paths. Also strip out 809# automatically added to all of the search paths. Also strip out
864# ${LOCALBASE} and ${X11BASE} to prevent silly mistakes. 810# ${LOCALBASE} and ${X11BASE} to prevent silly mistakes.
865# 811#
866.for _dir_ in ${COMPILER_LIB_DIRS} ${COMPILER_INCLUDE_DIRS} ${LOCALBASE} ${X11BASE} 812.for _dir_ in ${COMPILER_LIB_DIRS} ${COMPILER_INCLUDE_DIRS} ${LOCALBASE} ${X11BASE}
867_BLNK_PASSTHRU_DIRS:= ${_BLNK_PASSTHRU_DIRS:N${_dir_}} 813_BLNK_PASSTHRU_DIRS:= ${_BLNK_PASSTHRU_DIRS:N${_dir_}}
868.endfor 814.endfor
869# 815#
870# Allow all directories in the library subdirectories listed for each 816# Allow all directories in the library subdirectories listed for each
871# package to be in the runtime library search path. 817# package to be in the runtime library search path.
872# 818#
873.for _pkg_ in ${_BLNK_PACKAGES} 819.for _pkg_ in ${_BLNK_PACKAGES}
874. if !empty(BUILDLINK_IS_DEPOT.${_pkg_}:M[nN][oO]) 820. if !empty(BUILDLINK_LIBDIRS.${_pkg_})
875. if !empty(BUILDLINK_LIBDIRS.${_pkg_}) 821. for _dir_ in ${BUILDLINK_LIBDIRS.${_pkg_}}
876. for _dir_ in ${BUILDLINK_LIBDIRS.${_pkg_}} 822. if exists(${BUILDLINK_PREFIX.${_pkg_}}/${_dir_})
877. if exists(${BUILDLINK_PREFIX.${_pkg_}}/${_dir_}) 
878_BLNK_PASSTHRU_RPATHDIRS+= ${BUILDLINK_PREFIX.${_pkg_}}/${_dir_} 823_BLNK_PASSTHRU_RPATHDIRS+= ${BUILDLINK_PREFIX.${_pkg_}}/${_dir_}
879. endif 824. endif
880. endfor 825. endfor
881. endif 
882. endif 826. endif
883.endfor 827.endfor
884# 828#
885# Always allow ${LOCALBASE}/lib in the runtime library search path so 829# Always allow ${LOCALBASE}/lib in the runtime library search path so
886# that wildcard dependencies work correctly when installing from binary 830# that wildcard dependencies work correctly when installing from binary
887# packages. 831# packages.
888# 832#
889_BLNK_PASSTHRU_RPATHDIRS+= ${LOCALBASE}/lib 833_BLNK_PASSTHRU_RPATHDIRS+= ${LOCALBASE}/lib
890# 834#
891# Allow ${X11BASE}/lib in the runtime library search path for USE_X11 835# Allow ${X11BASE}/lib in the runtime library search path for USE_X11
892# packages so that X11 libraries can be found. 836# packages so that X11 libraries can be found.
893# 837#
894.if defined(USE_X11) && ${X11_TYPE} != "modular" 838.if defined(USE_X11) && ${X11_TYPE} != "modular"
@@ -906,58 +850,52 @@ _BLNK_PASSTHRU_RPATHDIRS+= ${BUILDLINK_P @@ -906,58 +850,52 @@ _BLNK_PASSTHRU_RPATHDIRS+= ${BUILDLINK_P
906_BLNK_PASSTHRU_RPATHDIRS:= ${_BLNK_PASSTHRU_RPATHDIRS:N${_dir_}} 850_BLNK_PASSTHRU_RPATHDIRS:= ${_BLNK_PASSTHRU_RPATHDIRS:N${_dir_}}
907.endfor 851.endfor
908 852
909_BLNK_MANGLE_DIRS= # empty 853_BLNK_MANGLE_DIRS= # empty
910_BLNK_MANGLE_DIRS+= ${BUILDLINK_DIR} 854_BLNK_MANGLE_DIRS+= ${BUILDLINK_DIR}
911.if ${X11_TYPE} != "modular" 855.if ${X11_TYPE} != "modular"
912_BLNK_MANGLE_DIRS+= ${BUILDLINK_X11_DIR} 856_BLNK_MANGLE_DIRS+= ${BUILDLINK_X11_DIR}
913.endif 857.endif
914_BLNK_MANGLE_DIRS+= ${WRKDIR} 858_BLNK_MANGLE_DIRS+= ${WRKDIR}
915_BLNK_MANGLE_DIRS+= ${_BLNK_PASSTHRU_DIRS} 859_BLNK_MANGLE_DIRS+= ${_BLNK_PASSTHRU_DIRS}
916_BLNK_MANGLE_DIRS+= ${_BLNK_PASSTHRU_RPATHDIRS} 860_BLNK_MANGLE_DIRS+= ${_BLNK_PASSTHRU_RPATHDIRS}
917_BLNK_MANGLE_DIRS+= ${COMPILER_INCLUDE_DIRS} 861_BLNK_MANGLE_DIRS+= ${COMPILER_INCLUDE_DIRS}
918_BLNK_MANGLE_DIRS+= ${COMPILER_LIB_DIRS} 862_BLNK_MANGLE_DIRS+= ${COMPILER_LIB_DIRS}
919.if ${PKG_INSTALLATION_TYPE} == "pkgviews" 
920_BLNK_MANGLE_DIRS+= ${PREFIX} 
921.endif 
922_BLNK_MANGLE_DIRS+= ${LOCALBASE} 863_BLNK_MANGLE_DIRS+= ${LOCALBASE}
923.if defined(USE_X11) && ${X11_TYPE} != "modular" 864.if defined(USE_X11) && ${X11_TYPE} != "modular"
924_BLNK_MANGLE_DIRS+= ${X11BASE} 865_BLNK_MANGLE_DIRS+= ${X11BASE}
925.endif 866.endif
926 867
927_BLNK_MANGLE_START= _bUiLdLiNk_ 868_BLNK_MANGLE_START= _bUiLdLiNk_
928_BLNK_MANGLE_END= \# 869_BLNK_MANGLE_END= \#
929.for _dir_ in ${_BLNK_MANGLE_DIRS} 870.for _dir_ in ${_BLNK_MANGLE_DIRS}
930_BLNK_MANGLE_DIR.${_dir_}= \ 871_BLNK_MANGLE_DIR.${_dir_}= \
931 ${_BLNK_MANGLE_START}${_dir_:S/\//_/g}${_BLNK_MANGLE_END} 872 ${_BLNK_MANGLE_START}${_dir_:S/\//_/g}${_BLNK_MANGLE_END}
932.endfor 873.endfor
933_BLNK_MANGLE_SED_PATTERN= \ 874_BLNK_MANGLE_SED_PATTERN= \
934 ${_BLNK_MANGLE_START}[^/ ${_BLNK_MANGLE_END}]*${_BLNK_MANGLE_END} 875 ${_BLNK_MANGLE_START}[^/ ${_BLNK_MANGLE_END}]*${_BLNK_MANGLE_END}
935 876
936_BLNK_PROTECT_DIRS= # empty 877_BLNK_PROTECT_DIRS= # empty
937_BLNK_UNPROTECT_DIRS= # empty 878_BLNK_UNPROTECT_DIRS= # empty
938 879
939_BLNK_PROTECT_DIRS+= ${BUILDLINK_DIR} 880_BLNK_PROTECT_DIRS+= ${BUILDLINK_DIR}
940.if ${X11_TYPE} != "modular" 881.if ${X11_TYPE} != "modular"
941_BLNK_PROTECT_DIRS+= ${BUILDLINK_X11_DIR} 882_BLNK_PROTECT_DIRS+= ${BUILDLINK_X11_DIR}
942.endif 883.endif
943_BLNK_PROTECT_DIRS+= ${WRKDIR} 884_BLNK_PROTECT_DIRS+= ${WRKDIR}
944_BLNK_PROTECT_DIRS+= ${_BLNK_PASSTHRU_DIRS} 885_BLNK_PROTECT_DIRS+= ${_BLNK_PASSTHRU_DIRS}
945 886
946_BLNK_UNPROTECT_DIRS+= ${COMPILER_INCLUDE_DIRS} 887_BLNK_UNPROTECT_DIRS+= ${COMPILER_INCLUDE_DIRS}
947_BLNK_UNPROTECT_DIRS+= ${COMPILER_LIB_DIRS} 888_BLNK_UNPROTECT_DIRS+= ${COMPILER_LIB_DIRS}
948.if ${PKG_INSTALLATION_TYPE} == "pkgviews" 
949_BLNK_UNPROTECT_DIRS+= ${PREFIX} 
950.endif 
951_BLNK_UNPROTECT_DIRS+= ${LOCALBASE} 889_BLNK_UNPROTECT_DIRS+= ${LOCALBASE}
952.if defined(USE_X11) && ${X11_TYPE} != "modular" 890.if defined(USE_X11) && ${X11_TYPE} != "modular"
953_BLNK_UNPROTECT_DIRS+= ${X11BASE} 891_BLNK_UNPROTECT_DIRS+= ${X11BASE}
954.endif 892.endif
955_BLNK_UNPROTECT_DIRS+= ${_BLNK_PASSTHRU_DIRS} 893_BLNK_UNPROTECT_DIRS+= ${_BLNK_PASSTHRU_DIRS}
956_BLNK_UNPROTECT_DIRS+= ${WRKDIR} 894_BLNK_UNPROTECT_DIRS+= ${WRKDIR}
957.if ${X11_TYPE} != "modular" 895.if ${X11_TYPE} != "modular"
958_BLNK_UNPROTECT_DIRS+= ${BUILDLINK_X11_DIR} 896_BLNK_UNPROTECT_DIRS+= ${BUILDLINK_X11_DIR}
959.endif 897.endif
960_BLNK_UNPROTECT_DIRS+= ${BUILDLINK_DIR} 898_BLNK_UNPROTECT_DIRS+= ${BUILDLINK_DIR}
961 899
962# Resolve some important directories to their phyiscal paths as symlinks 900# Resolve some important directories to their phyiscal paths as symlinks
963# tend to confuse buildlink3. 901# tend to confuse buildlink3.
@@ -1045,82 +983,67 @@ _CWRAPPERS_TRANSFORM+= R:${BUILDLINK_X11 @@ -1045,82 +983,67 @@ _CWRAPPERS_TRANSFORM+= R:${BUILDLINK_X11
1045.for _dir_ in ${_BLNK_PASSTHRU_DIRS} ${_BLNK_PASSTHRU_RPATHDIRS} 983.for _dir_ in ${_BLNK_PASSTHRU_DIRS} ${_BLNK_PASSTHRU_RPATHDIRS}
1046_BLNK_TRANSFORM+= rpath:${_dir_}:${_BLNK_MANGLE_DIR.${_dir_}} 984_BLNK_TRANSFORM+= rpath:${_dir_}:${_BLNK_MANGLE_DIR.${_dir_}}
1047_CWRAPPERS_TRANSFORM+= R:${_dir_}:${_dir_} 985_CWRAPPERS_TRANSFORM+= R:${_dir_}:${_dir_}
1048.endfor 986.endfor
1049# 987#
1050# Protect /usr/lib/* as they're all allowed to be specified for the 988# Protect /usr/lib/* as they're all allowed to be specified for the
1051# runtime library search path. 989# runtime library search path.
1052# 990#
1053.for _dir_ in ${SYSTEM_DEFAULT_RPATH:S/:/ /g} 991.for _dir_ in ${SYSTEM_DEFAULT_RPATH:S/:/ /g}
1054_BLNK_TRANSFORM+= sub-rpath:${_dir_}:${_BLNK_MANGLE_DIR.${_dir}} 992_BLNK_TRANSFORM+= sub-rpath:${_dir_}:${_BLNK_MANGLE_DIR.${_dir}}
1055_CWRAPPERS_TRANSFORM+= R:/usr/lib:/usr/lib 993_CWRAPPERS_TRANSFORM+= R:/usr/lib:/usr/lib
1056.endfor 994.endfor
1057# 995#
1058# Change references to ${DEPOTBASE}/<pkg> into ${LOCALBASE} so that 
1059# "overwrite" packages think headers and libraries for "pkgviews" packages 
1060# are just found in the default view. 
1061# 
1062.if ${PKG_INSTALLATION_TYPE} == "overwrite" 
1063_BLNK_TRANSFORM+= depot:${DEPOTBASE}:${LOCALBASE} 
1064.endif 
1065# 
1066# Convert direct paths to static libraries and libtool archives in 996# Convert direct paths to static libraries and libtool archives in
1067# ${LOCALBASE} or ${X11BASE} into references into ${BUILDLINK_DIR}. 997# ${LOCALBASE} or ${X11BASE} into references into ${BUILDLINK_DIR}.
1068# 998#
1069.if ${PKG_INSTALLATION_TYPE} == "overwrite" 
1070_BLNK_TRANSFORM+= P:${LOCALBASE}:${_BLNK_MANGLE_DIR.${BUILDLINK_DIR}} 999_BLNK_TRANSFORM+= P:${LOCALBASE}:${_BLNK_MANGLE_DIR.${BUILDLINK_DIR}}
1071_CWRAPPERS_TRANSFORM+= P:${X11BASE}:${BUILDLINK_X11_DIR} 1000_CWRAPPERS_TRANSFORM+= P:${X11BASE}:${BUILDLINK_X11_DIR}
1072. if defined(USE_X11) && ${X11_TYPE} != "modular" 1001.if defined(USE_X11) && ${X11_TYPE} != "modular"
1073_BLNK_TRANSFORM+= P:${X11BASE}:${_BLNK_MANGLE_DIR.${BUILDLINK_X11_DIR}} 1002_BLNK_TRANSFORM+= P:${X11BASE}:${_BLNK_MANGLE_DIR.${BUILDLINK_X11_DIR}}
1074_CWRAPPERS_TRANSFORM+= P:${LOCALBASE}:${BUILDLINK_DIR} 1003_CWRAPPERS_TRANSFORM+= P:${LOCALBASE}:${BUILDLINK_DIR}
1075. endif 
1076.endif 1004.endif
1077# 1005#
1078# Transform references to ${X11BASE} into ${BUILDLINK_X11_DIR}. 1006# Transform references to ${X11BASE} into ${BUILDLINK_X11_DIR}.
1079# (do so before transforming references to ${LOCALBASE} unless the 1007# (do so before transforming references to ${LOCALBASE} unless the
1080# ${X11BASE} path is contained in ${LOCALBASE}'s path) 1008# ${X11BASE} path is contained in ${LOCALBASE}'s path)
1081# 1009#
1082.if defined(USE_X11) && empty(LOCALBASE:M${X11BASE}*) && ${X11_TYPE} != "modular" 1010.if defined(USE_X11) && empty(LOCALBASE:M${X11BASE}*) && ${X11_TYPE} != "modular"
1083_BLNK_TRANSFORM+= I:${X11BASE}:${_BLNK_MANGLE_DIR.${BUILDLINK_X11_DIR}} 1011_BLNK_TRANSFORM+= I:${X11BASE}:${_BLNK_MANGLE_DIR.${BUILDLINK_X11_DIR}}
1084_BLNK_TRANSFORM+= L:${X11BASE}:${_BLNK_MANGLE_DIR.${BUILDLINK_X11_DIR}} 1012_BLNK_TRANSFORM+= L:${X11BASE}:${_BLNK_MANGLE_DIR.${BUILDLINK_X11_DIR}}
1085_CWRAPPERS_TRANSFORM+= I:${X11BASE}:${BUILDLINK_X11_DIR} 1013_CWRAPPERS_TRANSFORM+= I:${X11BASE}:${BUILDLINK_X11_DIR}
1086_CWRAPPERS_TRANSFORM+= L:${X11BASE}:${BUILDLINK_X11_DIR} 1014_CWRAPPERS_TRANSFORM+= L:${X11BASE}:${BUILDLINK_X11_DIR}
1087.endif 1015.endif
1088# 1016#
1089# Transform references to ${LOCALBASE} into ${BUILDLINK_DIR}. 1017# Transform references to ${LOCALBASE} into ${BUILDLINK_DIR}.
1090# 1018#
1091.if ${PKG_INSTALLATION_TYPE} == "overwrite" 
1092_BLNK_TRANSFORM+= I:${LOCALBASE}:${_BLNK_MANGLE_DIR.${BUILDLINK_DIR}} 1019_BLNK_TRANSFORM+= I:${LOCALBASE}:${_BLNK_MANGLE_DIR.${BUILDLINK_DIR}}
1093_BLNK_TRANSFORM+= L:${LOCALBASE}:${_BLNK_MANGLE_DIR.${BUILDLINK_DIR}} 1020_BLNK_TRANSFORM+= L:${LOCALBASE}:${_BLNK_MANGLE_DIR.${BUILDLINK_DIR}}
1094_CWRAPPERS_TRANSFORM+= I:${LOCALBASE}:${BUILDLINK_DIR} 1021_CWRAPPERS_TRANSFORM+= I:${LOCALBASE}:${BUILDLINK_DIR}
1095_CWRAPPERS_TRANSFORM+= L:${LOCALBASE}:${BUILDLINK_DIR} 1022_CWRAPPERS_TRANSFORM+= L:${LOCALBASE}:${BUILDLINK_DIR}
1096.endif 
1097# 1023#
1098# Transform references to ${X11BASE} into ${BUILDLINK_X11_DIR}. 1024# Transform references to ${X11BASE} into ${BUILDLINK_X11_DIR}.
1099# (do so only after transforming references to ${LOCALBASE} if the 1025# (do so only after transforming references to ${LOCALBASE} if the
1100# ${X11BASE} path is contained in ${LOCALBASE}'s path) 1026# ${X11BASE} path is contained in ${LOCALBASE}'s path)
1101# 1027#
1102.if defined(USE_X11) && !empty(LOCALBASE:M${X11BASE}*) && ${X11_TYPE} != "modular" 1028.if defined(USE_X11) && !empty(LOCALBASE:M${X11BASE}*) && ${X11_TYPE} != "modular"
1103_BLNK_TRANSFORM+= I:${X11BASE}:${_BLNK_MANGLE_DIR.${BUILDLINK_X11_DIR}} 1029_BLNK_TRANSFORM+= I:${X11BASE}:${_BLNK_MANGLE_DIR.${BUILDLINK_X11_DIR}}
1104_BLNK_TRANSFORM+= L:${X11BASE}:${_BLNK_MANGLE_DIR.${BUILDLINK_X11_DIR}} 1030_BLNK_TRANSFORM+= L:${X11BASE}:${_BLNK_MANGLE_DIR.${BUILDLINK_X11_DIR}}
1105_CWRAPPERS_TRANSFORM+= I:${X11BASE}:${BUILDLINK_X11_DIR} 1031_CWRAPPERS_TRANSFORM+= I:${X11BASE}:${BUILDLINK_X11_DIR}
1106_CWRAPPERS_TRANSFORM+= L:${X11BASE}:${BUILDLINK_X11_DIR} 1032_CWRAPPERS_TRANSFORM+= L:${X11BASE}:${BUILDLINK_X11_DIR}
1107.endif 1033.endif
1108# 1034#
1109# Protect any remaining references to ${PREFIX}, ${LOCALBASE}, or ${X11BASE}. 1035# Protect any remaining references to ${LOCALBASE}, or ${X11BASE}.
1110# 1036#
1111.if ${PKG_INSTALLATION_TYPE} == "pkgviews" 
1112_BLNK_TRANSFORM+= untransform:sub-mangle:${PREFIX}:${_BLNK_MANGLE_DIR.${PREFIX}} 
1113.endif 
1114_BLNK_TRANSFORM+= untransform:sub-mangle:${LOCALBASE}:${_BLNK_MANGLE_DIR.${LOCALBASE}} 1037_BLNK_TRANSFORM+= untransform:sub-mangle:${LOCALBASE}:${_BLNK_MANGLE_DIR.${LOCALBASE}}
1115.if defined(USE_X11) && ${X11_TYPE} != "modular" 1038.if defined(USE_X11) && ${X11_TYPE} != "modular"
1116_BLNK_TRANSFORM+= untransform:sub-mangle:${X11BASE}:${_BLNK_MANGLE_DIR.${X11BASE}} 1039_BLNK_TRANSFORM+= untransform:sub-mangle:${X11BASE}:${_BLNK_MANGLE_DIR.${X11BASE}}
1117.endif 1040.endif
1118# 1041#
1119# Explicitly remove everything else that's an absolute path, since we've 1042# Explicitly remove everything else that's an absolute path, since we've
1120# already protected the ones we care about. 1043# already protected the ones we care about.
1121# 1044#
1122_BLNK_TRANSFORM+= no-abspath 1045_BLNK_TRANSFORM+= no-abspath
1123# 1046#
1124# Undo the protection for the directories that we allow to be specified 1047# Undo the protection for the directories that we allow to be specified
1125# for the runtime library search path. 1048# for the runtime library search path.
1126# 1049#
@@ -1193,27 +1116,26 @@ _BLNK_LDFLAGS= -L${BUILDLINK_DIR}/lib @@ -1193,27 +1116,26 @@ _BLNK_LDFLAGS= -L${BUILDLINK_DIR}/lib
1193_WRAP_EXTRA_ARGS.CC+= ${_BLNK_CPPFLAGS} ${_BLNK_LDFLAGS} 1116_WRAP_EXTRA_ARGS.CC+= ${_BLNK_CPPFLAGS} ${_BLNK_LDFLAGS}
1194_WRAP_EXTRA_ARGS.CXX+= ${_BLNK_CPPFLAGS} ${_BLNK_LDFLAGS} 1117_WRAP_EXTRA_ARGS.CXX+= ${_BLNK_CPPFLAGS} ${_BLNK_LDFLAGS}
1195_WRAP_EXTRA_ARGS.CPP+= ${_BLNK_CPPFLAGS} 1118_WRAP_EXTRA_ARGS.CPP+= ${_BLNK_CPPFLAGS}
1196_WRAP_EXTRA_ARGS.FC+= ${_BLNK_CPPFLAGS} ${_BLNK_LDFLAGS} 1119_WRAP_EXTRA_ARGS.FC+= ${_BLNK_CPPFLAGS} ${_BLNK_LDFLAGS}
1197_WRAP_EXTRA_ARGS.LD+= ${_BLNK_LDFLAGS} 1120_WRAP_EXTRA_ARGS.LD+= ${_BLNK_LDFLAGS}
1198_WRAP_EXTRA_ARGS.LIBTOOL+= ${_BLNK_LDFLAGS} 1121_WRAP_EXTRA_ARGS.LIBTOOL+= ${_BLNK_LDFLAGS}
1199_WRAP_EXTRA_ARGS.SHLIBTOOL+= ${_BLNK_LDFLAGS} 1122_WRAP_EXTRA_ARGS.SHLIBTOOL+= ${_BLNK_LDFLAGS}
1200 1123
1201${WRAPPER_TMPDIR}/libtool-fix-la: ${BUILDLINK_SRCDIR}/libtool-fix-la 1124${WRAPPER_TMPDIR}/libtool-fix-la: ${BUILDLINK_SRCDIR}/libtool-fix-la
1202 ${RUN}${MKDIR} ${.TARGET:H} 1125 ${RUN}${MKDIR} ${.TARGET:H}
1203 ${RUN}${CAT} ${.ALLSRC} \ 1126 ${RUN}${CAT} ${.ALLSRC} \
1204 | ${SED} -e "s|@_BLNK_WRAP_LT_UNTRANSFORM_SED@|"${_BLNK_WRAP_LT_UNTRANSFORM_SED:Q}"|g" \ 1127 | ${SED} -e "s|@_BLNK_WRAP_LT_UNTRANSFORM_SED@|"${_BLNK_WRAP_LT_UNTRANSFORM_SED:Q}"|g" \
1205 -e "s|@BUILDLINK_DIR@|${BUILDLINK_DIR}|g" \ 1128 -e "s|@BUILDLINK_DIR@|${BUILDLINK_DIR}|g" \
1206 -e "s|@DEPOTBASE@|${DEPOTBASE}|g" \ 
1207 -e "s|@LOCALBASE@|${LOCALBASE}|g" \ 1129 -e "s|@LOCALBASE@|${LOCALBASE}|g" \
1208 -e "s|@WRKSRC@|${WRKSRC}|g" \ 1130 -e "s|@WRKSRC@|${WRKSRC}|g" \
1209 -e "s|@BASENAME@|"${BASENAME:Q}"|g" \ 1131 -e "s|@BASENAME@|"${BASENAME:Q}"|g" \
1210 -e "s|@DIRNAME@|"${DIRNAME:Q}"|g" \ 1132 -e "s|@DIRNAME@|"${DIRNAME:Q}"|g" \
1211 -e "s|@EGREP@|"${EGREP:Q}"|g" \ 1133 -e "s|@EGREP@|"${EGREP:Q}"|g" \
1212 -e "s|@MV@|"${MV:Q}"|g" \ 1134 -e "s|@MV@|"${MV:Q}"|g" \
1213 -e "s|@PWD@|"${PWD_CMD:Q}"|g" \ 1135 -e "s|@PWD@|"${PWD_CMD:Q}"|g" \
1214 -e "s|@RM@|"${RM:Q}"|g" \ 1136 -e "s|@RM@|"${RM:Q}"|g" \
1215 | ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET} 1137 | ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
1216 1138
1217${WRAPPER_TMPDIR}/buildcmd-libtool: ${BUILDLINK_SRCDIR}/buildcmd-libtool 1139${WRAPPER_TMPDIR}/buildcmd-libtool: ${BUILDLINK_SRCDIR}/buildcmd-libtool
1218 ${RUN}${MKDIR} ${.TARGET:H} 1140 ${RUN}${MKDIR} ${.TARGET:H}
1219 ${RUN}${CAT} ${.ALLSRC} \ 1141 ${RUN}${CAT} ${.ALLSRC} \

cvs diff -r1.8 -r1.9 pkgsrc/mk/buildlink3/libtool-fix-la (expand / switch to unified diff)

--- pkgsrc/mk/buildlink3/libtool-fix-la 2006/11/09 02:07:59 1.8
+++ pkgsrc/mk/buildlink3/libtool-fix-la 2014/12/30 15:13:19 1.9
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: libtool-fix-la,v 1.8 2006/11/09 02:07:59 rillig Exp $ 1# $NetBSD: libtool-fix-la,v 1.9 2014/12/30 15:13:19 wiz Exp $
2# 2#
3# Copyright (c) 2004 The NetBSD Foundation, Inc. 3# Copyright (c) 2004 The NetBSD Foundation, Inc.
4# All rights reserved. 4# All rights reserved.
5# 5#
6# This code is derived from software contributed to The NetBSD Foundation 6# This code is derived from software contributed to The NetBSD Foundation
7# by Johnny C. Lam. 7# by Johnny C. Lam.
8# 8#
9# Redistribution and use in source and binary forms, with or without 9# Redistribution and use in source and binary forms, with or without
10# modification, are permitted provided that the following conditions 10# modification, are permitted provided that the following conditions
11# are met: 11# are met:
12# 1. Redistributions of source code must retain the above copyright 12# 1. Redistributions of source code must retain the above copyright
13# notice, this list of conditions and the following disclaimer. 13# notice, this list of conditions and the following disclaimer.
14# 2. Redistributions in binary form must reproduce the above copyright 14# 2. Redistributions in binary form must reproduce the above copyright
@@ -36,33 +36,29 @@ @@ -36,33 +36,29 @@
36 36
37# For *.la files, in the "relink_command" line, we make the following 37# For *.la files, in the "relink_command" line, we make the following
38# replacements: 38# replacements:
39# 39#
40# "libfoo.la" -> "-L./.libs libfoo.la" 40# "libfoo.la" -> "-L./.libs libfoo.la"
41# "dirpath/libfoo.la" -> "-Ldirpath/.libs libfoo.la" 41# "dirpath/libfoo.la" -> "-Ldirpath/.libs libfoo.la"
42# 42#
43# This allows the libraries to be found within ${WRKSRC} during 43# This allows the libraries to be found within ${WRKSRC} during
44# relinking. We rely on the proper rpath settings to be set by libtool. 44# relinking. We rely on the proper rpath settings to be set by libtool.
45# 45#
46# For the *.lai files, in the "dependency_libs" line, we remove 46# For the *.lai files, in the "dependency_libs" line, we remove
47# redundant -Ldir and -llib options. We also make sure that we don't 47# redundant -Ldir and -llib options. We also make sure that we don't
48# ever reference other .la files, only referring to other libraries 48# ever reference other .la files, only referring to other libraries
49# via the usual "-L/path -llib" and making sure that /path is always 49# via the usual "-L/path -llib".
50# somewhere under the default view. This makes wildcard dependencies 
51# work for "overwrite" packages by letting libtool find libraries in 
52# the default view. 
53 50
54BUILDLINK_DIR="@BUILDLINK_DIR@" 51BUILDLINK_DIR="@BUILDLINK_DIR@"
55DEPOTBASE="@DEPOTBASE@" 
56LOCALBASE="@LOCALBASE@" 52LOCALBASE="@LOCALBASE@"
57WRKSRC="@WRKSRC@" 53WRKSRC="@WRKSRC@"
58 54
59basename="@BASENAME@" 55basename="@BASENAME@"
60dirname="@DIRNAME@" 56dirname="@DIRNAME@"
61egrep="@EGREP@" 57egrep="@EGREP@"
62mv="@MV@" 58mv="@MV@"
63pwd="@PWD@" 59pwd="@PWD@"
64rm="@RM@" 60rm="@RM@"
65 61
66wrksrc_physical=`cd ${WRKSRC}; $pwd` 62wrksrc_physical=`cd ${WRKSRC}; $pwd`
67labase=`$basename $lafile .la` 63labase=`$basename $lafile .la`
68ladir=`$dirname $lafile` 64ladir=`$dirname $lafile`
@@ -247,79 +243,60 @@ if $test -f $lafile; then @@ -247,79 +243,60 @@ if $test -f $lafile; then
247 # "-lm -lm" becomes just "-lm". 243 # "-lm -lm" becomes just "-lm".
248 ###################################### 244 ######################################
249 $prev) 245 $prev)
250 ;; 246 ;;
251 ###################################### 247 ######################################
252 # Skip all -R* options... rpath info 248 # Skip all -R* options... rpath info
253 # shouldn't go into the dependency_libs 249 # shouldn't go into the dependency_libs
254 # line. 250 # line.
255 ###################################### 251 ######################################
256 -R*) 252 -R*)
257 ;; 253 ;;
258 ###################################### 254 ######################################
259 # Skip directories that should never 255 # Skip directories that should never
260 # appear in the -L<dir> flags. Also 256 # appear in the -L<dir> flags.
261 # modify directories in ${DEPOTBASE} to 
262 # point to somewhere in the default view 
263 # ${LOCALBASE}, since we want "overwrite" 
264 # packages to think the libraries really 
265 # do just exist through the default view. 
266 ###################################### 257 ######################################
267 -L*) 258 -L*)
268 case $i in 259 case $i in
269 -L${BUILDLINK_DIR}/*) 260 -L${BUILDLINK_DIR}/*)
270 ;; 261 ;;
271 -L${WRKSRC}|-L${WRKSRC}/*) 262 -L${WRKSRC}|-L${WRKSRC}/*)
272 ;; 263 ;;
273 -L${DEPOTBASE}/*) 
274 i=`$echo "$i" | $sed -e "s,-L${DEPOTBASE}/[^/]*/,-L${LOCALBASE}/,"` 
275 case $L in 
276 *"$i "*) ;; 
277 *"$i") ;; 
278 *) L="$L $i" ;; 
279 esac 
280 ;; 
281 *) 264 *)
282 case $L in 265 case $L in
283 *"$i "*) ;; 266 *"$i "*) ;;
284 *"$i") ;; 267 *"$i") ;;
285 *) L="$L $i" ;; 268 *) L="$L $i" ;;
286 esac 269 esac
287 ;; 270 ;;
288 esac 271 esac
289 ;; 272 ;;
290 ###################################### 273 ######################################
291 # Libraries really do exist, so we want 274 # Libraries really do exist, so we want
292 # to keep any -L<dir> flags we've seen 275 # to keep any -L<dir> flags we've seen
293 # in the generated dependency_libs line. 276 # in the generated dependency_libs line.
294 ###################################### 277 ######################################
295 -l*) 278 -l*)
296 lexist=1 279 lexist=1
297 l="$l $i" 280 l="$l $i"
298 ;; 281 ;;
299 ###################################### 282 ######################################
300 # Libtool archives should be changed from 283 # Libtool archives should be changed from
301 # "/path/libfoo.la" to "-L/path -lfoo", 284 # "/path/libfoo.la" to "-L/path -lfoo",
302 # where /path is appropriately modified 285 # This works correctly with wildcard
303 # so that the depot directory is changed 
304 # to the views directory. This allows 
305 # the .la files to be used by either 
306 # "overwrite" or "pkgviews" packages and 
307 # works correctly with wildcard 
308 # dependencies. 286 # dependencies.
309 ###################################### 287 ######################################
310 *.la) 288 *.la)
311 dirbase=`$dirname $i` 289 dir=`$dirname $i`
312 dir=`$echo "X$dirbase" | $Xsed -e "s,^${DEPOTBASE}/[^/]*/,${LOCALBASE}/,"` 
313 case $L in 290 case $L in
314 *"-L$dir "*) ;; 291 *"-L$dir "*) ;;
315 *"-L$dir") ;; 292 *"-L$dir") ;;
316 *) L="$L -L$dir" ;; 293 *) L="$L -L$dir" ;;
317 esac 294 esac
318 libbase=`$basename $i .la` 295 libbase=`$basename $i .la`
319 lib="${libbase#lib}" 296 lib="${libbase#lib}"
320 lexist=1 297 lexist=1
321 l="$l -l$lib" 298 l="$l -l$lib"
322 deps_ok=no 299 deps_ok=no
323 ;; 300 ;;
324 ###################################### 301 ######################################
325 # Everything else Just Belongs. 302 # Everything else Just Belongs.

cvs diff -r1.251 -r1.252 pkgsrc/mk/defaults/mk.conf (expand / switch to unified diff)

--- pkgsrc/mk/defaults/mk.conf 2014/12/10 12:28:49 1.251
+++ pkgsrc/mk/defaults/mk.conf 2014/12/30 15:13:19 1.252
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: mk.conf,v 1.251 2014/12/10 12:28:49 wiz Exp $ 1# $NetBSD: mk.conf,v 1.252 2014/12/30 15:13:19 wiz Exp $
2# 2#
3 3
4# This file provides default values for variables that may be overridden 4# This file provides default values for variables that may be overridden
5# in the MAKECONF file, which is /etc/mk.conf by default. 5# in the MAKECONF file, which is /etc/mk.conf by default.
6# 6#
7# Note: This file is included after the MAKECONF file, so you cannot query 7# Note: This file is included after the MAKECONF file, so you cannot query
8# these default values in the MAKECONF using the ".if" and ".for" 8# these default values in the MAKECONF using the ".if" and ".for"
9# preprocessing directives. 9# preprocessing directives.
10 10
11# ************************************************************************ 11# ************************************************************************
12# NOTE TO PEOPLE EDITING THIS FILE - USE LEADING SPACES, NOT LEADING TABS. 12# NOTE TO PEOPLE EDITING THIS FILE - USE LEADING SPACES, NOT LEADING TABS.
13# ************************************************************************ 13# ************************************************************************
14 14
@@ -388,32 +388,26 @@ FETCH_USING?= auto @@ -388,32 +388,26 @@ FETCH_USING?= auto
388 388
389#FIX_SYSTEM_HEADERS= 389#FIX_SYSTEM_HEADERS=
390# Make pkgtools/posix_headers an automatic build dependency for all  390# Make pkgtools/posix_headers an automatic build dependency for all
391# packages except those in the pkgtools category. 391# packages except those in the pkgtools category.
392# Possible: "yes", not defined 392# Possible: "yes", not defined
393# Default: not defined 393# Default: not defined
394 394
395LIBTOOLIZE_PLIST?= yes 395LIBTOOLIZE_PLIST?= yes
396# This determines whether to expand libtool archives (.la files) in PLISTs 396# This determines whether to expand libtool archives (.la files) in PLISTs
397# into the represented library names. 397# into the represented library names.
398# Possible: yes, no 398# Possible: yes, no
399# Default: yes 399# Default: yes
400 400
401PKG_INSTALLATION_PREFS?= overwrite pkgviews 
402# This is a whitespace-separated list of installation types to try when 
403# building a package, in order of preference. 
404# Possible: any of: overwrite, pkgviews 
405# Default: overwrite pkgviews 
406 
407PKG_RESUME_TRANSFERS?= NO 401PKG_RESUME_TRANSFERS?= NO
408# Used in pkgsrc to resume transfers, if enabled the whole file won't be 402# Used in pkgsrc to resume transfers, if enabled the whole file won't be
409# downloaded from scratch again. 403# downloaded from scratch again.
410# Possible: yes or no. 404# Possible: yes or no.
411# Default: no. 405# Default: no.
412 406
413PKG_SYSCONFBASE?= ${PREFIX}/etc 407PKG_SYSCONFBASE?= ${PREFIX}/etc
414# This is the main config directory under which all package configuration 408# This is the main config directory under which all package configuration
415# files should be found. 409# files should be found.
416# Possible: any path you like 410# Possible: any path you like
417# Default: ${PREFIX}/etc 411# Default: ${PREFIX}/etc
418 412
419#INIT_SYSTEM= 413#INIT_SYSTEM=

cvs diff -r1.1 -r1.2 pkgsrc/mk/help/directories.help (expand / switch to unified diff)

--- pkgsrc/mk/help/directories.help 2008/01/19 22:41:48 1.1
+++ pkgsrc/mk/help/directories.help 2014/12/30 15:13:19 1.2
@@ -1,31 +1,30 @@ @@ -1,31 +1,30 @@
1# $NetBSD: directories.help,v 1.1 2008/01/19 22:41:48 rillig Exp $ 1# $NetBSD: directories.help,v 1.2 2014/12/30 15:13:19 wiz Exp $
2# 2#
3# This file contains some short documentation on the directories that 3# This file contains some short documentation on the directories that
4# are used within pkgsrc. 4# are used within pkgsrc.
5 5
6# PREFIX 6# PREFIX
7# This is the directory where the package should install its 7# This is the directory where the package should install its
8# files. The actual value depends on the variables 8# files. The actual value depends on the variables
9# PKG_INSTALLATION_TYPE, USE_X11BASE and USE_CROSSBASE. 9# USE_X11BASE and USE_CROSSBASE.
10# 10#
11# Tags: read-only, system-defined, non-overridable, etc. 11# Tags: read-only, system-defined, non-overridable, etc.
12# 12#
13# See also: 13# See also:
14# CROSSBASE, 14# CROSSBASE,
15# INSTALLATION_PREFIX, 15# INSTALLATION_PREFIX,
16# LOCALBASE, 16# LOCALBASE,
17# X11PREFIX, 17# X11PREFIX.
18# PKG_INSTALLATION_TYPE. 
19# 18#
20 19
21# LOCALBASE 20# LOCALBASE
22# This is the directory where all packages are usually installed. 21# This is the directory where all packages are usually installed.
23# It is set by the user, and packages must not modify it. 22# It is set by the user, and packages must not modify it.
24# 23#
25 24
26# PKG_SYSCONFBASE 25# PKG_SYSCONFBASE
27# PKG_SYSCONFDIR.* 26# PKG_SYSCONFDIR.*
28# These variables may be set in mk.conf to control where the 27# These variables may be set in mk.conf to control where the
29# configuration files are put. 28# configuration files are put.
30# 29#
31# See also: guide:faq.html#faq.conf 30# See also: guide:faq.html#faq.conf
@@ -35,27 +34,26 @@ @@ -35,27 +34,26 @@
35# This variable can be set by packages to select the variable 34# This variable can be set by packages to select the variable
36# which can then be overridden in mk.conf to change the directory 35# which can then be overridden in mk.conf to change the directory
37# where the configuration files go. 36# where the configuration files go.
38# 37#
39# Default value: ${PKGBASE} 38# Default value: ${PKGBASE}
40# 39#
41 40
42# PKG_SYSCONFDIR 41# PKG_SYSCONFDIR
43# This is the directory where the current package should install 42# This is the directory where the current package should install
44# its configuration files. It may be changed by the package to 43# its configuration files. It may be changed by the package to
45# point to a subdirectory of PKG_SYSCONFBASE. 44# point to a subdirectory of PKG_SYSCONFBASE.
46# 45#
47 46
48# TODO:PKG_SYSCONFDEPOTBASE 
49# TODO:PKG_SYSCONFBASEDIR 47# TODO:PKG_SYSCONFBASEDIR
50# 48#
51 49
52# PKGDIR 50# PKGDIR
53# The directory where the various files that define a package are 51# The directory where the various files that define a package are
54# read from. These are: 52# read from. These are:
55# 53#
56# * DESCR 54# * DESCR
57# * HEADER, HEADER_TEMPLATES 55# * HEADER, HEADER_TEMPLATES
58# * INSTALL, DEINSTALL 56# * INSTALL, DEINSTALL
59# * MESSAGE, MESSAGE.* 57# * MESSAGE, MESSAGE.*
60# * PLIST, PLIST.* 58# * PLIST, PLIST.*
61# * distinfo 59# * distinfo

cvs diff -r1.6 -r1.7 pkgsrc/mk/misc/can-be-built-here.mk (expand / switch to unified diff)

--- pkgsrc/mk/misc/can-be-built-here.mk 2008/11/05 08:24:23 1.6
+++ pkgsrc/mk/misc/can-be-built-here.mk 2014/12/30 15:13:19 1.7
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: can-be-built-here.mk,v 1.6 2008/11/05 08:24:23 rillig Exp $ 1# $NetBSD: can-be-built-here.mk,v 1.7 2014/12/30 15:13:19 wiz Exp $
2# 2#
3# This file checks whether a package can be built in the current pkgsrc 3# This file checks whether a package can be built in the current pkgsrc
4# environment. It checks the following variables: 4# environment. It checks the following variables:
5# 5#
6# * NOT_FOR_COMPILER, ONLY_FOR_COMPILER 6# * NOT_FOR_COMPILER, ONLY_FOR_COMPILER
7# * NOT_FOR_PLATFORM, ONLY_FOR_PLATFORM 7# * NOT_FOR_PLATFORM, ONLY_FOR_PLATFORM
8# * NOT_FOR_BULK_PLATFORM 8# * NOT_FOR_BULK_PLATFORM
9# * NOT_FOR_UNPRIVILEGED, ONLY_FOR_UNPRIVILEGED 9# * NOT_FOR_UNPRIVILEGED, ONLY_FOR_UNPRIVILEGED
10# * PKG_FAIL_REASON, PKG_SKIP_REASON 10# * PKG_FAIL_REASON, PKG_SKIP_REASON
11# 11#
12# It also depends on the following internal variables: 12# It also depends on the following internal variables:
13# 13#
14# NO_SKIP 14# NO_SKIP
@@ -119,37 +119,26 @@ _CBBH.fail= yes @@ -119,37 +119,26 @@ _CBBH.fail= yes
119.if defined(PKG_FAIL_REASON) && !empty(PKG_FAIL_REASON) 119.if defined(PKG_FAIL_REASON) && !empty(PKG_FAIL_REASON)
120_CBBH.fail= no 120_CBBH.fail= no
121.endif 121.endif
122 122
123# Check PKG_SKIP_REASON 123# Check PKG_SKIP_REASON
124_CBBH_CHECKS+= skip 124_CBBH_CHECKS+= skip
125_CBBH_MSGS.skip= "This package has set PKG_SKIP_REASON:" ${PKG_SKIP_REASON} 125_CBBH_MSGS.skip= "This package has set PKG_SKIP_REASON:" ${PKG_SKIP_REASON}
126 126
127_CBBH.skip= yes 127_CBBH.skip= yes
128.if defined(PKG_SKIP_REASON) && !empty(PKG_SKIP_REASON) 128.if defined(PKG_SKIP_REASON) && !empty(PKG_SKIP_REASON)
129_CBBH.skip= no 129_CBBH.skip= no
130.endif 130.endif
131 131
132# Check PKG_INSTALLATION_TYPES 
133_CBBH_CHECKS+= pkgviews 
134_CBBH_MSGS.pkgviews= "This package is not available for pkgviews." 
135 
136_CBBH.pkgviews= yes 
137.if ${PKG_INSTALLATION_PREFS} == "pkgviews overwrite" 
138. if empty(PKG_INSTALLATION_TYPES:Mpkgviews) 
139_CBBH.pkgviews= no 
140. endif 
141.endif 
142 
143# Collect and combine the results 132# Collect and combine the results
144_CBBH= yes 133_CBBH= yes
145_CBBH_MSGS= # none 134_CBBH_MSGS= # none
146.for c in ${_CBBH_CHECKS} 135.for c in ${_CBBH_CHECKS}
147. if ${_CBBH.${c}} != "yes" 136. if ${_CBBH.${c}} != "yes"
148_CBBH= no 137_CBBH= no
149_CBBH_MSGS+= ${_CBBH_MSGS.${c}} 138_CBBH_MSGS+= ${_CBBH_MSGS.${c}}
150. endif 139. endif
151.endfor 140.endfor
152 141
153# In the first line, this target prints either "yes" or "no", saying 142# In the first line, this target prints either "yes" or "no", saying
154# whether this package can be built. If the package can not be built, 143# whether this package can be built. If the package can not be built,
155# the reasons are given in the following lines. 144# the reasons are given in the following lines.

cvs diff -r1.1 -r1.2 pkgsrc/mk/pkgformat/README (expand / switch to unified diff)

--- pkgsrc/mk/pkgformat/README 2011/10/15 00:23:09 1.1
+++ pkgsrc/mk/pkgformat/README 2014/12/30 15:13:19 1.2
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1$NetBSD: README,v 1.1 2011/10/15 00:23:09 reed Exp $ 1$NetBSD: README,v 1.2 2014/12/30 15:13:19 wiz Exp $
2 2
3= Introduction = 3= Introduction =
4 4
5A package format is a packaging system that is supported by pkgsrc. 5A package format is a packaging system that is supported by pkgsrc.
6Currently, there is only one (the native pkgsrc tools), but maybe we can 6Currently, there is only one (the native pkgsrc tools), but maybe we can
7support RPM, dpkg or the Solaris native packages someday. It can also be 7support RPM, dpkg or the Solaris native packages someday. It can also be
8used to test new variants of the packaging tools. 8used to test new variants of the packaging tools.
9 9
10NOTE: The Google Summer of Code 2011 project includes rpm and debian 10NOTE: The Google Summer of Code 2011 project includes rpm and debian
11http://addpackageforma.sourceforge.net/ 11http://addpackageforma.sourceforge.net/
12 12
13The PKG_FORMAT variable is used to select the format. The default 13The PKG_FORMAT variable is used to select the format. The default
14format is ``pkg''. 14format is ``pkg''.
@@ -28,27 +28,26 @@ variables.) @@ -28,27 +28,26 @@ variables.)
28 28
29=== Packaging commands === 29=== Packaging commands ===
30 30
31The following variables all refer to shell commands, which must accept 31The following variables all refer to shell commands, which must accept
32some command line options that are detailed in the respective man pages. 32some command line options that are detailed in the respective man pages.
33(TODO: Find out which command line options are really used and which 33(TODO: Find out which command line options are really used and which
34ones are useful. Document them.) 34ones are useful. Document them.)
35 35
36* PKG_ADD 36* PKG_ADD
37* PKG_ADMIN 37* PKG_ADMIN
38* PKG_CREATE 38* PKG_CREATE
39* PKG_DELETE 39* PKG_DELETE
40* PKG_INFO 40* PKG_INFO
41* PKG_VIEW 
42* LINKFARM 41* LINKFARM
43* PKG_BEST_EXISTS 42* PKG_BEST_EXISTS
44 43
45The following variables must be defined so that they can be used in 44The following variables must be defined so that they can be used in
46shell commands. They may contain references to all other variables. 45shell commands. They may contain references to all other variables.
47 46
48* PKG_FILELIST_CMD 47* PKG_FILELIST_CMD
49 48
50XXX: Why isn't this variable in the previous list? 49XXX: Why isn't this variable in the previous list?
51 50
52== Make targets == 51== Make targets ==
53 52
54The following make targets must be implemented: 53The following make targets must be implemented:

cvs diff -r1.6 -r1.7 pkgsrc/mk/pkgformat/pkg/package.mk (expand / switch to unified diff)

--- pkgsrc/mk/pkgformat/pkg/package.mk 2014/12/07 05:09:02 1.6
+++ pkgsrc/mk/pkgformat/pkg/package.mk 2014/12/30 15:13:20 1.7
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: package.mk,v 1.6 2014/12/07 05:09:02 obache Exp $ 1# $NetBSD: package.mk,v 1.7 2014/12/30 15:13:20 wiz Exp $
2 2
3.if defined(PKG_SUFX) 3.if defined(PKG_SUFX)
4WARNINGS+= "PKG_SUFX is deprecated, please use PKG_COMPRESSION" 4WARNINGS+= "PKG_SUFX is deprecated, please use PKG_COMPRESSION"
5. if ${PKG_SUFX} == ".tgz" 5. if ${PKG_SUFX} == ".tgz"
6PKG_COMPRESSION= gzip 6PKG_COMPRESSION= gzip
7. elif ${PKG_SUFX} == ".tbz" 7. elif ${PKG_SUFX} == ".tbz"
8PKG_COMPRESSION= bzip2 8PKG_COMPRESSION= bzip2
9. else 9. else
10WARNINGS+= "Unsupported value for PKG_SUFX" 10WARNINGS+= "Unsupported value for PKG_SUFX"
11. endif 11. endif
12.endif 12.endif
13PKG_SUFX?= .tgz 13PKG_SUFX?= .tgz
14FILEBASE?= ${PKGBASE} 14FILEBASE?= ${PKGBASE}
@@ -58,29 +58,26 @@ stage-package-create: package-create @@ -58,29 +58,26 @@ stage-package-create: package-create
58stage-package-create: stage-install ${STAGE_PKGFILE} 58stage-package-create: stage-install ${STAGE_PKGFILE}
59.endif 59.endif
60 60
61_PKG_ARGS_PACKAGE+= ${_PKG_CREATE_ARGS} 61_PKG_ARGS_PACKAGE+= ${_PKG_CREATE_ARGS}
62_PKG_ARGS_PACKAGE+= -F ${PKG_COMPRESSION} 62_PKG_ARGS_PACKAGE+= -F ${PKG_COMPRESSION}
63.if ${_USE_DESTDIR} == "no" 63.if ${_USE_DESTDIR} == "no"
64_PKG_ARGS_PACKAGE+= -p ${PREFIX} 64_PKG_ARGS_PACKAGE+= -p ${PREFIX}
65.else 65.else
66_PKG_ARGS_PACKAGE+= -I ${PREFIX} -p ${DESTDIR}${PREFIX} 66_PKG_ARGS_PACKAGE+= -I ${PREFIX} -p ${DESTDIR}${PREFIX}
67. if ${_USE_DESTDIR} == "user-destdir" 67. if ${_USE_DESTDIR} == "user-destdir"
68_PKG_ARGS_PACKAGE+= -u ${REAL_ROOT_USER} -g ${REAL_ROOT_GROUP} 68_PKG_ARGS_PACKAGE+= -u ${REAL_ROOT_USER} -g ${REAL_ROOT_GROUP}
69. endif 69. endif
70.endif 70.endif
71.if ${PKG_INSTALLATION_TYPE} == "pkgviews" 
72_PKG_ARGS_PACKAGE+= -E 
73.endif 
74 71
75${STAGE_PKGFILE}: ${_CONTENTS_TARGETS} 72${STAGE_PKGFILE}: ${_CONTENTS_TARGETS}
76 ${RUN} ${MKDIR} ${.TARGET:H} 73 ${RUN} ${MKDIR} ${.TARGET:H}
77 @${STEP_MSG} "Creating binary package ${.TARGET}" 74 @${STEP_MSG} "Creating binary package ${.TARGET}"
78 ${RUN} tmpname=${.TARGET:S,${PKG_SUFX}$,.tmp${PKG_SUFX},}; \ 75 ${RUN} tmpname=${.TARGET:S,${PKG_SUFX}$,.tmp${PKG_SUFX},}; \
79 if ${PKG_CREATE} ${_PKG_ARGS_PACKAGE} "$$tmpname"; then \ 76 if ${PKG_CREATE} ${_PKG_ARGS_PACKAGE} "$$tmpname"; then \
80 ${MV} -f "$$tmpname" ${.TARGET}; \ 77 ${MV} -f "$$tmpname" ${.TARGET}; \
81 else \ 78 else \
82 exitcode=$$?; ${RM} -f "$$tmpname"; exit $$exitcode; \ 79 exitcode=$$?; ${RM} -f "$$tmpname"; exit $$exitcode; \
83 fi 80 fi
84 81
85.if ${PKGFILE} != ${STAGE_PKGFILE} 82.if ${PKGFILE} != ${STAGE_PKGFILE}
86${PKGFILE}: ${STAGE_PKGFILE} 83${PKGFILE}: ${STAGE_PKGFILE}

cvs diff -r1.4 -r1.5 pkgsrc/mk/pkgformat/pkg/pkgformat-vars.mk (expand / switch to unified diff)

--- pkgsrc/mk/pkgformat/pkg/pkgformat-vars.mk 2014/12/08 02:43:25 1.4
+++ pkgsrc/mk/pkgformat/pkg/pkgformat-vars.mk 2014/12/30 15:13:20 1.5
@@ -1,50 +1,44 @@ @@ -1,50 +1,44 @@
1# $NetBSD: pkgformat-vars.mk,v 1.4 2014/12/08 02:43:25 agc Exp $ 1# $NetBSD: pkgformat-vars.mk,v 1.5 2014/12/30 15:13:20 wiz Exp $
2# 2#
3# This Makefile fragment is included indirectly by bsd.prefs.mk and 3# This Makefile fragment is included indirectly by bsd.prefs.mk and
4# defines some variables which must be defined earlier than where 4# defines some variables which must be defined earlier than where
5# pkgformat.mk is included. 5# pkgformat.mk is included.
6# 6#
7 7
8PKGSRC_MESSAGE_RECIPIENTS?= # empty 8PKGSRC_MESSAGE_RECIPIENTS?= # empty
9 9
10.if !empty(PKGSRC_MESSAGE_RECIPIENTS) 10.if !empty(PKGSRC_MESSAGE_RECIPIENTS)
11USE_TOOLS+= mail 11USE_TOOLS+= mail
12.endif 12.endif
13 13
14.if defined(PKG_PRESERVE) 14.if defined(PKG_PRESERVE)
15USE_TOOLS+= date 15USE_TOOLS+= date
16.endif 16.endif
17 17
18# This is the package database directory for the default view. 18# This is the package database directory for the default view.
19PKG_DBDIR?= /var/db/pkg 19PKG_DBDIR?= /var/db/pkg
20 20
21# _PKG_DBDIR is the actual packages database directory where we register 21# _PKG_DBDIR is the actual packages database directory where we register
22# packages. 22# packages.
23# 23#
24.if ${PKG_INSTALLATION_TYPE} == "overwrite" 
25_PKG_DBDIR= ${_CROSS_DESTDIR}${PKG_DBDIR} 24_PKG_DBDIR= ${_CROSS_DESTDIR}${PKG_DBDIR}
26_HOST_PKG_DBDIR= ${HOST_PKG_DBDIR:U${PKG_DBDIR}} 25_HOST_PKG_DBDIR= ${HOST_PKG_DBDIR:U${PKG_DBDIR}}
27.elif ${PKG_INSTALLATION_TYPE} == "pkgviews" 
28_PKG_DBDIR= ${_CROSS_DESTDIR}${DEPOTBASE} 
29_HOST_PKG_DBDIR= ${HOST_DEPOTBASE:U${DEPOTBASE}} 
30.endif 
31 26
32PKG_ADD_CMD?= ${PKG_TOOLS_BIN}/pkg_add 27PKG_ADD_CMD?= ${PKG_TOOLS_BIN}/pkg_add
33PKG_ADMIN_CMD?= ${PKG_TOOLS_BIN}/pkg_admin 28PKG_ADMIN_CMD?= ${PKG_TOOLS_BIN}/pkg_admin
34PKG_CREATE_CMD?= ${PKG_TOOLS_BIN}/pkg_create 29PKG_CREATE_CMD?= ${PKG_TOOLS_BIN}/pkg_create
35PKG_DELETE_CMD?= ${PKG_TOOLS_BIN}/pkg_delete 30PKG_DELETE_CMD?= ${PKG_TOOLS_BIN}/pkg_delete
36PKG_INFO_CMD?= ${PKG_TOOLS_BIN}/pkg_info 31PKG_INFO_CMD?= ${PKG_TOOLS_BIN}/pkg_info
37PKG_VIEW_CMD?= ${PKG_TOOLS_BIN}/pkg_view 
38LINKFARM_CMD?= ${PKG_TOOLS_BIN}/linkfarm 32LINKFARM_CMD?= ${PKG_TOOLS_BIN}/linkfarm
39 33
40# Latest versions of tools required for correct pkgsrc operation. 34# Latest versions of tools required for correct pkgsrc operation.
41.if make(replace) && ${_USE_DESTDIR} != "no" 35.if make(replace) && ${_USE_DESTDIR} != "no"
42PKGTOOLS_REQD= 20100914 36PKGTOOLS_REQD= 20100914
43.else 37.else
44PKGTOOLS_REQD= 20090528 38PKGTOOLS_REQD= 20090528
45.endif 39.endif
46 40
47# Latest version of pkg_install required to extract packages 41# Latest version of pkg_install required to extract packages
48PKGTOOLS_VERSION_REQD= 20091115 42PKGTOOLS_VERSION_REQD= 20091115
49 43
50.if !defined(PKGTOOLS_VERSION) 44.if !defined(PKGTOOLS_VERSION)
@@ -61,47 +55,38 @@ _PKG_INSTALL_DEPENDS= yes @@ -61,47 +55,38 @@ _PKG_INSTALL_DEPENDS= yes
61AUDIT_PACKAGES?= ${PKG_ADMIN} 55AUDIT_PACKAGES?= ${PKG_ADMIN}
62_AUDIT_PACKAGES_CMD?= audit-pkg 56_AUDIT_PACKAGES_CMD?= audit-pkg
63_EXTRACT_PKGVULNDIR= ${PKG_ADMIN} config-var PKGVULNDIR 57_EXTRACT_PKGVULNDIR= ${PKG_ADMIN} config-var PKGVULNDIR
64DOWNLOAD_VULN_LIST?= ${PKG_ADMIN} fetch-pkg-vulnerabilities 58DOWNLOAD_VULN_LIST?= ${PKG_ADMIN} fetch-pkg-vulnerabilities
65_AUDIT_CONFIG_FILE= pkg_install.conf 59_AUDIT_CONFIG_FILE= pkg_install.conf
66_AUDIT_CONFIG_OPTION= IGNORE_URL 60_AUDIT_CONFIG_OPTION= IGNORE_URL
67 61
68# The binary pkg_install tools all need to consistently to refer to the 62# The binary pkg_install tools all need to consistently to refer to the
69# correct package database directory. 63# correct package database directory.
70# 64#
71PKGTOOLS_ARGS?= -K ${_PKG_DBDIR} 65PKGTOOLS_ARGS?= -K ${_PKG_DBDIR}
72HOST_PKGTOOLS_ARGS?= -K ${_HOST_PKG_DBDIR} 66HOST_PKGTOOLS_ARGS?= -K ${_HOST_PKG_DBDIR}
73 67
74# Views are rooted in ${LOCALBASE}, all packages are depoted in 
75# ${DEPOTBASE}, and the package database directory for the default view 
76# is in ${PKG_DBDIR}. 
77# 
78PKG_VIEW_ARGS?= -W ${LOCALBASE} -d ${DEPOTBASE} -k ${_CROSS_DESTDIR}${PKG_DBDIR} 
79HOST_PKG_VIEW_ARGS?= -W ${LOCALBASE} -d ${DEPOTBASE} -k ${PKG_DBDIR} 
80 
81PKG_ADD?= ${PKG_ADD_CMD} ${PKGTOOLS_ARGS} 68PKG_ADD?= ${PKG_ADD_CMD} ${PKGTOOLS_ARGS}
82PKG_ADMIN?= ${PKG_ADMIN_CMD} ${PKGTOOLS_ARGS} 69PKG_ADMIN?= ${PKG_ADMIN_CMD} ${PKGTOOLS_ARGS}
83PKG_CREATE?= ${PKG_CREATE_CMD} ${PKGTOOLS_ARGS} 70PKG_CREATE?= ${PKG_CREATE_CMD} ${PKGTOOLS_ARGS}
84PKG_DELETE?= ${PKG_DELETE_CMD} ${PKGTOOLS_ARGS} 71PKG_DELETE?= ${PKG_DELETE_CMD} ${PKGTOOLS_ARGS}
85PKG_INFO?= ${PKG_INFO_CMD} ${PKGTOOLS_ARGS} 72PKG_INFO?= ${PKG_INFO_CMD} ${PKGTOOLS_ARGS}
86PKG_VIEW?= ${PKG_VIEW_CMD} ${PKG_VIEW_ARGS} 
87LINKFARM?= ${LINKFARM_CMD} 73LINKFARM?= ${LINKFARM_CMD}
88 74
89HOST_PKG_ADD?= ${PKG_ADD_CMD} ${HOST_PKGTOOLS_ARGS} 75HOST_PKG_ADD?= ${PKG_ADD_CMD} ${HOST_PKGTOOLS_ARGS}
90HOST_PKG_ADMIN?= ${PKG_ADMIN_CMD} ${HOST_PKGTOOLS_ARGS} 76HOST_PKG_ADMIN?= ${PKG_ADMIN_CMD} ${HOST_PKGTOOLS_ARGS}
91HOST_PKG_CREATE?= ${PKG_CREATE_CMD} ${HOST_PKGTOOLS_ARGS} 77HOST_PKG_CREATE?= ${PKG_CREATE_CMD} ${HOST_PKGTOOLS_ARGS}
92HOST_PKG_DELETE?= ${PKG_DELETE_CMD} ${HOST_PKGTOOLS_ARGS} 78HOST_PKG_DELETE?= ${PKG_DELETE_CMD} ${HOST_PKGTOOLS_ARGS}
93HOST_PKG_INFO?= ${PKG_INFO_CMD} ${HOST_PKGTOOLS_ARGS} 79HOST_PKG_INFO?= ${PKG_INFO_CMD} ${HOST_PKGTOOLS_ARGS}
94HOST_PKG_VIEW?= ${PKG_VIEW_CMD} ${HOST_PKG_VIEW_ARGS} 
95HOST_LINKFARM?= ${LINKFARM_CMD} 80HOST_LINKFARM?= ${LINKFARM_CMD}
96 81
97# "${_PKG_BEST_EXISTS} pkgpattern" prints out the name of the installed 82# "${_PKG_BEST_EXISTS} pkgpattern" prints out the name of the installed
98# package that best matches pkgpattern. Use this instead of 83# package that best matches pkgpattern. Use this instead of
99# "${PKG_INFO} -e pkgpattern" if the latter would return more than one 84# "${PKG_INFO} -e pkgpattern" if the latter would return more than one
100# package name. 85# package name.
101# 86#
102_PKG_BEST_EXISTS?= ${PKG_INFO} -E 87_PKG_BEST_EXISTS?= ${PKG_INFO} -E
103_HOST_PKG_BEST_EXISTS?= ${HOST_PKG_INFO} -E 88_HOST_PKG_BEST_EXISTS?= ${HOST_PKG_INFO} -E
104 89
105# XXX Leave this here until all uses of this have been purged from the 90# XXX Leave this here until all uses of this have been purged from the
106# XXX public parts of pkgsrc. 91# XXX public parts of pkgsrc.
107# XXX 92# XXX

cvs diff -r1.1 -r1.2 pkgsrc/mk/pkgformat/pkg/pkgformat.mk (expand / switch to unified diff)

--- pkgsrc/mk/pkgformat/pkg/pkgformat.mk 2011/10/15 00:23:09 1.1
+++ pkgsrc/mk/pkgformat/pkg/pkgformat.mk 2014/12/30 15:13:20 1.2
@@ -1,27 +1,26 @@ @@ -1,27 +1,26 @@
1# $NetBSD: pkgformat.mk,v 1.1 2011/10/15 00:23:09 reed Exp $ 1# $NetBSD: pkgformat.mk,v 1.2 2014/12/30 15:13:20 wiz Exp $
2# 2#
3# This Makefile fragment provides variable and target overrides that are 3# This Makefile fragment provides variable and target overrides that are
4# specific to the pkgsrc native package format. 4# specific to the pkgsrc native package format.
5# 5#
6 6
7# PKG_FILELIST_CMD outputs the list of files owned by ${PKGNAME} as 7# PKG_FILELIST_CMD outputs the list of files owned by ${PKGNAME} as
8# registered on the system. 8# registered on the system.
9# 9#
10# For DESTDIR support, just use _DEPENDS_PLIST instead. 10# For DESTDIR support, just use _DEPENDS_PLIST instead.
11# 11#
12.if ${_USE_DESTDIR} == "no" 12.if ${_USE_DESTDIR} == "no"
13PKG_FILELIST_CMD= ${PKG_INFO} -qL ${PKGNAME:Q} 13PKG_FILELIST_CMD= ${PKG_INFO} -qL ${PKGNAME:Q}
14.else 14.else
15PKG_FILELIST_CMD= ${SED} -e "/^@/d" -e "s|^|${PREFIX}/|" ${_DEPENDS_PLIST} 15PKG_FILELIST_CMD= ${SED} -e "/^@/d" -e "s|^|${PREFIX}/|" ${_DEPENDS_PLIST}
16.endif 16.endif
17 17
18.include "depends.mk" 18.include "depends.mk"
19.include "check.mk" 19.include "check.mk"
20.include "metadata.mk" 20.include "metadata.mk"
21.include "install.mk" 21.include "install.mk"
22.include "deinstall.mk" 22.include "deinstall.mk"
23.include "replace.mk" 23.include "replace.mk"
24.include "package.mk" 24.include "package.mk"
25.include "views.mk" 
26 25
27.include "utility.mk" 26.include "utility.mk"

File Deleted: pkgsrc/mk/pkgformat/pkg/Attic/views.mk

cvs diff -r1.60 -r1.61 pkgsrc/mk/pkginstall/bsd.pkginstall.mk (expand / switch to unified diff)

--- pkgsrc/mk/pkginstall/bsd.pkginstall.mk 2014/10/12 23:44:32 1.60
+++ pkgsrc/mk/pkginstall/bsd.pkginstall.mk 2014/12/30 15:13:20 1.61
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: bsd.pkginstall.mk,v 1.60 2014/10/12 23:44:32 joerg Exp $ 1# $NetBSD: bsd.pkginstall.mk,v 1.61 2014/12/30 15:13:20 wiz Exp $
2# 2#
3# This Makefile fragment is included by bsd.pkg.mk and implements the 3# This Makefile fragment is included by bsd.pkg.mk and implements the
4# common INSTALL/DEINSTALL scripts framework. To use the pkginstall 4# common INSTALL/DEINSTALL scripts framework. To use the pkginstall
5# framework, simply set the relevant variables to customize the install 5# framework, simply set the relevant variables to customize the install
6# scripts to the package. 6# scripts to the package.
7# 7#
8# User-settable variables: 8# User-settable variables:
9# 9#
10# FONTS_VERBOSE indicates whether the +FONTS scriptlet will output a message 10# FONTS_VERBOSE indicates whether the +FONTS scriptlet will output a message
11# noting the actions taken if PKG_UPDATE_FONTS_DB is YES. It is either 11# noting the actions taken if PKG_UPDATE_FONTS_DB is YES. It is either
12# YES or NO and defaults to YES for PKG_DEVELOPERs, otherwise NO. 12# YES or NO and defaults to YES for PKG_DEVELOPERs, otherwise NO.
13# 13#
14# INFO_FILES_VERBOSE indicates whether the +INFO_FILES scriptlet will output 14# INFO_FILES_VERBOSE indicates whether the +INFO_FILES scriptlet will output
@@ -76,94 +76,85 @@ PKG_DB_TMPDIR?= ${WRKDIR}/.pkgdb @@ -76,94 +76,85 @@ PKG_DB_TMPDIR?= ${WRKDIR}/.pkgdb
76 76
77# These are the template scripts for the INSTALL/DEINSTALL scripts. 77# These are the template scripts for the INSTALL/DEINSTALL scripts.
78# Packages may do additional work in the INSTALL/DEINSTALL scripts by 78# Packages may do additional work in the INSTALL/DEINSTALL scripts by
79# overriding the variables DEINSTALL_TEMPLATES and INSTALL_TEMPLATES to 79# overriding the variables DEINSTALL_TEMPLATES and INSTALL_TEMPLATES to
80# point to additional script fragments. These bits are included after 80# point to additional script fragments. These bits are included after
81# the main install/deinstall script fragments. 81# the main install/deinstall script fragments.
82# 82#
83_HEADER_TMPL?= ${.CURDIR}/../../mk/pkginstall/header 83_HEADER_TMPL?= ${.CURDIR}/../../mk/pkginstall/header
84HEADER_TEMPLATES?= # empty 84HEADER_TEMPLATES?= # empty
85.if exists(${PKGDIR}/HEADER) && \ 85.if exists(${PKGDIR}/HEADER) && \
86 empty(HEADER_TEMPLATES:M${PKGDIR}/HEADER) 86 empty(HEADER_TEMPLATES:M${PKGDIR}/HEADER)
87HEADER_TEMPLATES+= ${PKGDIR}/HEADER 87HEADER_TEMPLATES+= ${PKGDIR}/HEADER
88.endif 88.endif
89_DEINSTALL_PRE_TMPL?= ${.CURDIR}/../../mk/pkginstall/deinstall-pre 
90DEINSTALL_TEMPLATES?= # empty 89DEINSTALL_TEMPLATES?= # empty
91.if exists(${PKGDIR}/DEINSTALL) && \ 90.if exists(${PKGDIR}/DEINSTALL) && \
92 empty(DEINSTALL_TEMPLATES:M${PKGDIR}/DEINSTALL) 91 empty(DEINSTALL_TEMPLATES:M${PKGDIR}/DEINSTALL)
93DEINSTALL_TEMPLATES+= ${PKGDIR}/DEINSTALL 92DEINSTALL_TEMPLATES+= ${PKGDIR}/DEINSTALL
94.endif 93.endif
95_DEINSTALL_TMPL?= ${.CURDIR}/../../mk/pkginstall/deinstall 94_DEINSTALL_TMPL?= ${.CURDIR}/../../mk/pkginstall/deinstall
96_INSTALL_UNPACK_TMPL?= # empty 95_INSTALL_UNPACK_TMPL?= # empty
97_INSTALL_TMPL?= ${.CURDIR}/../../mk/pkginstall/install 96_INSTALL_TMPL?= ${.CURDIR}/../../mk/pkginstall/install
98INSTALL_TEMPLATES?= # empty 97INSTALL_TEMPLATES?= # empty
99.if exists(${PKGDIR}/INSTALL) && \ 98.if exists(${PKGDIR}/INSTALL) && \
100 empty(INSTALL_TEMPLATES:M${PKGDIR}/INSTALL) 99 empty(INSTALL_TEMPLATES:M${PKGDIR}/INSTALL)
101INSTALL_TEMPLATES+= ${PKGDIR}/INSTALL 100INSTALL_TEMPLATES+= ${PKGDIR}/INSTALL
102.endif 101.endif
103_INSTALL_POST_TMPL?= ${.CURDIR}/../../mk/pkginstall/install-post 
104_INSTALL_DATA_TMPL?= # empty 102_INSTALL_DATA_TMPL?= # empty
105_FOOTER_TMPL?= ${.CURDIR}/../../mk/pkginstall/footer 103_FOOTER_TMPL?= ${.CURDIR}/../../mk/pkginstall/footer
106 104
107# _DEINSTALL_TEMPLATES and _INSTALL_TEMPLATES are the list of source 105# _DEINSTALL_TEMPLATES and _INSTALL_TEMPLATES are the list of source
108# files that are concatenated to form the DEINSTALL/INSTALL 106# files that are concatenated to form the DEINSTALL/INSTALL
109# scripts. 107# scripts.
110# 108#
111# _DEINSTALL_TEMPLATES_DFLT and _INSTALL_TEMPLATES_DFLT are the list of 109# _DEINSTALL_TEMPLATES_DFLT and _INSTALL_TEMPLATES_DFLT are the list of
112# template files minus any user-supplied templates. 110# template files minus any user-supplied templates.
113# 111#
114_DEINSTALL_TEMPLATES= ${_HEADER_TMPL} ${HEADER_TEMPLATES} \ 112_DEINSTALL_TEMPLATES= ${_HEADER_TMPL} ${HEADER_TEMPLATES} \
115 ${_DEINSTALL_PRE_TMPL} \ 
116 ${DEINSTALL_TEMPLATES} \ 113 ${DEINSTALL_TEMPLATES} \
117 ${_DEINSTALL_TMPL} \ 114 ${_DEINSTALL_TMPL} \
118 ${_FOOTER_TMPL} 115 ${_FOOTER_TMPL}
119_INSTALL_TEMPLATES= ${_HEADER_TMPL} ${HEADER_TEMPLATES} \ 116_INSTALL_TEMPLATES= ${_HEADER_TMPL} ${HEADER_TEMPLATES} \
120 ${_INSTALL_UNPACK_TMPL} \ 117 ${_INSTALL_UNPACK_TMPL} \
121 ${_INSTALL_TMPL} \ 118 ${_INSTALL_TMPL} \
122 ${INSTALL_TEMPLATES} \ 119 ${INSTALL_TEMPLATES} \
123 ${_INSTALL_POST_TMPL} \ 
124 ${_FOOTER_TMPL} \ 120 ${_FOOTER_TMPL} \
125 ${_INSTALL_DATA_TMPL} \ 121 ${_INSTALL_DATA_TMPL} \
126 122
127_DEINSTALL_TEMPLATES_DFLT= ${_HEADER_TMPL} \ 123_DEINSTALL_TEMPLATES_DFLT= ${_HEADER_TMPL} \
128 ${_DEINSTALL_PRE_TMPL} \ 
129 ${_DEINSTALL_TMPL} \ 124 ${_DEINSTALL_TMPL} \
130 ${_FOOTER_TMPL} 125 ${_FOOTER_TMPL}
131_INSTALL_TEMPLATES_DFLT= ${_HEADER_TMPL} \ 126_INSTALL_TEMPLATES_DFLT= ${_HEADER_TMPL} \
132 ${_INSTALL_TMPL} \ 127 ${_INSTALL_TMPL} \
133 ${_INSTALL_POST_TMPL} \ 
134 ${_FOOTER_TMPL} 128 ${_FOOTER_TMPL}
135 129
136# These are the list of source files that are concatenated to form the 130# These are the list of source files that are concatenated to form the
137# INSTALL/DEINSTALL scripts. 131# INSTALL/DEINSTALL scripts.
138# 132#
139DEINSTALL_SRC?= ${_DEINSTALL_TEMPLATES} 133DEINSTALL_SRC?= ${_DEINSTALL_TEMPLATES}
140INSTALL_SRC?= ${_INSTALL_TEMPLATES} 134INSTALL_SRC?= ${_INSTALL_TEMPLATES}
141 135
142# FILES_SUBST lists what to substitute in DEINSTALL/INSTALL scripts and in 136# FILES_SUBST lists what to substitute in DEINSTALL/INSTALL scripts and in
143# rc.d scripts. 137# rc.d scripts.
144# 138#
145FILES_SUBST+= PREFIX=${PREFIX:Q} 139FILES_SUBST+= PREFIX=${PREFIX:Q}
146FILES_SUBST+= LOCALBASE=${LOCALBASE:Q} 140FILES_SUBST+= LOCALBASE=${LOCALBASE:Q}
147FILES_SUBST+= X11BASE=${X11BASE:Q} 141FILES_SUBST+= X11BASE=${X11BASE:Q}
148FILES_SUBST+= DEPOTBASE=${DEPOTBASE:Q} 
149FILES_SUBST+= VARBASE=${VARBASE:Q} 142FILES_SUBST+= VARBASE=${VARBASE:Q}
150FILES_SUBST+= PKG_SYSCONFBASE=${PKG_SYSCONFBASE:Q} 143FILES_SUBST+= PKG_SYSCONFBASE=${PKG_SYSCONFBASE:Q}
151FILES_SUBST+= PKG_SYSCONFDEPOTBASE=${PKG_SYSCONFDEPOTBASE:Q} 
152FILES_SUBST+= PKG_SYSCONFBASEDIR=${PKG_SYSCONFBASEDIR:Q} 144FILES_SUBST+= PKG_SYSCONFBASEDIR=${PKG_SYSCONFBASEDIR:Q}
153FILES_SUBST+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR:Q} 145FILES_SUBST+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR:Q}
154FILES_SUBST+= CONF_DEPENDS=${CONF_DEPENDS:C/:.*//:Q} 146FILES_SUBST+= CONF_DEPENDS=${CONF_DEPENDS:C/:.*//:Q}
155FILES_SUBST+= PKGBASE=${PKGBASE:Q} 147FILES_SUBST+= PKGBASE=${PKGBASE:Q}
156FILES_SUBST+= PKG_INSTALLATION_TYPE=${PKG_INSTALLATION_TYPE:Q} 
157 148
158# PKG_USERS represents the users to create for the package. It is a 149# PKG_USERS represents the users to create for the package. It is a
159# space-separated list of elements of the form 150# space-separated list of elements of the form
160# 151#
161# user:group 152# user:group
162# 153#
163# The following variables are optional and specify further details of 154# The following variables are optional and specify further details of
164# the user accounts listed in PKG_USERS: 155# the user accounts listed in PKG_USERS:
165# 156#
166# PKG_UID.<user> is the hardcoded numeric UID for <user>. 157# PKG_UID.<user> is the hardcoded numeric UID for <user>.
167# PKG_GECOS.<user> is <user>'s description, as well as contact info. 158# PKG_GECOS.<user> is <user>'s description, as well as contact info.
168# PKG_HOME.<user> is the home directory for <user>. 159# PKG_HOME.<user> is the home directory for <user>.
169# PKG_SHELL.<user> is the login shell for <user>. 160# PKG_SHELL.<user> is the login shell for <user>.

cvs diff -r1.2 -r1.3 pkgsrc/mk/pkginstall/deinstall (expand / switch to unified diff)

--- pkgsrc/mk/pkginstall/deinstall 2007/07/18 18:01:03 1.2
+++ pkgsrc/mk/pkginstall/deinstall 2014/12/30 15:13:20 1.3
@@ -1,62 +1,38 @@ @@ -1,62 +1,38 @@
1# $NetBSD: deinstall,v 1.2 2007/07/18 18:01:03 jlam Exp $ 1# $NetBSD: deinstall,v 1.3 2014/12/30 15:13:20 wiz Exp $
2 2
3case ${STAGE} in 3case ${STAGE} in
4VIEW-DEINSTALL) 4DEINSTALL)
5 case ${_PKG_CONFIG} in 
6 yes) 
7 case ${PKG_SYSCONFDEPOTBASE} in 
8 "") 
9 ${TEST} ! -x ./+FILES || 
10 ./+FILES VIEW-REMOVE ${PREFIX} ${PKG_PREFIX} 
11 ;; 
12 *) 
13 ${SETENV} PLIST_IGNORE_FILES="${CONF_IGNORE_FILES}" \ 
14 ${LINKFARM} -D -t ${PKG_SYSCONFVIEWBASE} -d ${PKG_SYSCONFDEPOTBASE} ${PKGNAME} 
15 ${RMDIR} -p ${PKG_SYSCONFVIEWBASE} 2>/dev/null || ${TRUE} 
16 ;; 
17 esac 
18 ;; 
19 esac 
20 # 5 #
21 # Unregister info files. 6 # Unregister info files.
22 # 7 #
23 ${TEST} ! -x ./+INFO_FILES || 8 ${TEST} ! -x ./+INFO_FILES ||
24 ./+INFO_FILES REMOVE ${PKG_METADATA_DIR} 9 ./+INFO_FILES REMOVE ${PKG_METADATA_DIR}
25 # 10 #
26 # Remove shells from /etc/shells. 11 # Remove shells from /etc/shells.
27 # 12 #
28 ${TEST} ! -x ./+SHELL || 13 ${TEST} ! -x ./+SHELL ||
29 ./+SHELL REMOVE ${PKG_METADATA_DIR} 14 ./+SHELL REMOVE ${PKG_METADATA_DIR}
30 ${TEST} ! -x ./+SHELL || 15 ${TEST} ! -x ./+SHELL ||
31 ./+SHELL CHECK-REMOVE ${PKG_METADATA_DIR} 16 ./+SHELL CHECK-REMOVE ${PKG_METADATA_DIR}
32 ;; 
33 17
34DEINSTALL) 
35 # Remove configuration files if they don't differ from the default 18 # Remove configuration files if they don't differ from the default
36 # config file. 19 # config file.
37 # 20 #
38 ${TEST} ! -x ./+FILES || 21 ${TEST} ! -x ./+FILES ||
39 ./+FILES REMOVE ${PKG_METADATA_DIR} 22 ./+FILES REMOVE ${PKG_METADATA_DIR}
40 ;; 23 ;;
41 24
42POST-DEINSTALL) 25POST-DEINSTALL)
43 if [ "${PKG_INSTALLATION_TYPE}" = "pkgviews" -a \ 
44 "${_PKG_CONFIG}" = "yes" -a -n "${CONF_DEPENDS}" ]; then 
45 if [ -h ${PKG_SYSCONFDIR} ]; then 
46 ${RM} -f ${PKG_SYSCONFDIR} 
47 fi 
48 ${RMDIR} -p `${DIRNAME} ${PKG_SYSCONFDIR}` 2>/dev/null || ${TRUE} 
49 fi 
50 # 26 #
51 # Update any fonts databases. 27 # Update any fonts databases.
52 # 28 #
53 ${TEST} ! -x ./+FONTS || 29 ${TEST} ! -x ./+FONTS ||
54 ./+FONTS ${PKG_METADATA_DIR} 30 ./+FONTS ${PKG_METADATA_DIR}
55 # 31 #
56 # Rebuild the system run-time library search path database. 32 # Rebuild the system run-time library search path database.
57 # 33 #
58 ${TEST} ! -x ./+SHLIBS || 34 ${TEST} ! -x ./+SHLIBS ||
59 ./+SHLIBS REMOVE ${PKG_METADATA_DIR} 35 ./+SHLIBS REMOVE ${PKG_METADATA_DIR}
60 # 36 #
61 # Remove empty directories and unused users/groups. 37 # Remove empty directories and unused users/groups.
62 # 38 #

cvs diff -r1.2 -r1.3 pkgsrc/mk/pkginstall/header (expand / switch to unified diff)

--- pkgsrc/mk/pkginstall/header 2006/07/19 22:26:26 1.2
+++ pkgsrc/mk/pkginstall/header 2014/12/30 15:13:20 1.3
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1#!@SH@ 1#!@SH@
2# 2#
3# $NetBSD: header,v 1.2 2006/07/19 22:26:26 jlam Exp $ 3# $NetBSD: header,v 1.3 2014/12/30 15:13:20 wiz Exp $
4 4
5SELF="$0" 5SELF="$0"
6PKGNAME="$1" 6PKGNAME="$1"
7STAGE="$2" 7STAGE="$2"
8shift 2 8shift 2
9 9
10AWK="@AWK@" 10AWK="@AWK@"
11BASENAME="@BASENAME@" 11BASENAME="@BASENAME@"
12CAT="@CAT@" 12CAT="@CAT@"
13CHGRP="@CHGRP@" 13CHGRP="@CHGRP@"
14CHMOD="@CHMOD@" 14CHMOD="@CHMOD@"
15CHOWN="@CHOWN@" 15CHOWN="@CHOWN@"
16CMP="@CMP@" 16CMP="@CMP@"
@@ -44,44 +44,31 @@ SORT="@SORT@" @@ -44,44 +44,31 @@ SORT="@SORT@"
44SU="@SU@" 44SU="@SU@"
45TEST="@TEST@" 45TEST="@TEST@"
46TOUCH="@TOUCH@" 46TOUCH="@TOUCH@"
47TR="@TR@" 47TR="@TR@"
48TRUE="@TRUE@" 48TRUE="@TRUE@"
49XARGS="@XARGS@" 49XARGS="@XARGS@"
50 50
51CURDIR=`${PWD_CMD}` 51CURDIR=`${PWD_CMD}`
52: ${PKG_METADATA_DIR=${CURDIR}} 52: ${PKG_METADATA_DIR=${CURDIR}}
53PKGBASE="@PKGBASE@" 53PKGBASE="@PKGBASE@"
54 54
55LOCALBASE="@LOCALBASE@" 55LOCALBASE="@LOCALBASE@"
56X11BASE="@X11BASE@" 56X11BASE="@X11BASE@"
57DEPOTBASE="@DEPOTBASE@" 
58PREFIX="@PREFIX@" 57PREFIX="@PREFIX@"
59case ${PKG_PREFIX} in 
60${LOCALBASE}/*) VIEW="${PKG_PREFIX#${LOCALBASE}/}" ;; 
61*) VIEW="" ;; 
62esac 
63 58
64PKG_SYSCONFBASE="@PKG_SYSCONFBASE@" 59PKG_SYSCONFBASE="@PKG_SYSCONFBASE@"
65PKG_SYSCONFDEPOTBASE="@PKG_SYSCONFDEPOTBASE@" 
66PKG_SYSCONFBASEDIR="@PKG_SYSCONFBASEDIR@" 60PKG_SYSCONFBASEDIR="@PKG_SYSCONFBASEDIR@"
67PKG_SYSCONFDIR="@PKG_SYSCONFDIR@" 61PKG_SYSCONFDIR="@PKG_SYSCONFDIR@"
68CONF_DEPENDS="@CONF_DEPENDS@" 62CONF_DEPENDS="@CONF_DEPENDS@"
69 63
70case ${VIEW} in 
71"") PKG_SYSCONFVIEWBASE="${PKG_SYSCONFBASE}" ;; 
72*) PKG_SYSCONFVIEWBASE="${PKG_SYSCONFBASE}/${VIEW}" ;; 
73esac 
74 
75CONF_IGNORE_FILES="*[~#] *.OLD *.orig *,v .pkgsrc */.pkgsrc" 64CONF_IGNORE_FILES="*[~#] *.OLD *.orig *,v .pkgsrc */.pkgsrc"
76 65
77PKG_INSTALLATION_TYPE="@PKG_INSTALLATION_TYPE@" 
78 
79case "${PKG_CONFIG:-@PKG_CONFIG@}" in 66case "${PKG_CONFIG:-@PKG_CONFIG@}" in
80[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) 67[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
81 _PKG_CONFIG=yes 68 _PKG_CONFIG=yes
82 ;; 69 ;;
83[Nn][Oo]|[Ff][Aa][Ll][Ss][Ee]|[Oo][Ff][Ff]|0) 70[Nn][Oo]|[Ff][Aa][Ll][Ss][Ee]|[Oo][Ff][Ff]|0)
84 _PKG_CONFIG=yes 71 _PKG_CONFIG=yes
85 ;; 72 ;;
86esac 73esac
87 74

cvs diff -r1.2 -r1.3 pkgsrc/mk/pkginstall/install (expand / switch to unified diff)

--- pkgsrc/mk/pkginstall/install 2007/07/18 18:01:03 1.2
+++ pkgsrc/mk/pkginstall/install 2014/12/30 15:13:20 1.3
@@ -1,49 +1,32 @@ @@ -1,49 +1,32 @@
1# $NetBSD: install,v 1.2 2007/07/18 18:01:03 jlam Exp $ 1# $NetBSD: install,v 1.3 2014/12/30 15:13:20 wiz Exp $
2 2
3case ${STAGE} in 3case ${STAGE} in
4PRE-INSTALL) 4PRE-INSTALL)
5 # 5 #
6 # Unpack the helper scriptlets. 6 # Unpack the helper scriptlets.
7 # 7 #
8 ${SH} ${SELF} ${PKGNAME} UNPACK 8 ${SH} ${SELF} ${PKGNAME} UNPACK
9 # 9 #
10 # Require that necessary users and groups exist or else fail the 10 # Require that necessary users and groups exist or else fail the
11 # installation of the package. 11 # installation of the package.
12 # 12 #
13 ${TEST} ! -x ./+USERGROUP || 13 ${TEST} ! -x ./+USERGROUP ||
14 { ./+USERGROUP ADD ${PKG_METADATA_DIR} 14 { ./+USERGROUP ADD ${PKG_METADATA_DIR}
15 if ./+USERGROUP CHECK-ADD ${PKG_METADATA_DIR}; then 15 if ./+USERGROUP CHECK-ADD ${PKG_METADATA_DIR}; then
16 : 16 :
17 else 17 else
18 exit 1 18 exit 1
19 fi; } 19 fi; }
20 # 
21 # Create package directories at pre-install time. 
22 # 
23 if [ "${PKG_INSTALLATION_TYPE}" = "pkgviews" -a \ 
24 "${_PKG_CONFIG}" = "yes" -a -n "${CONF_DEPENDS}" ]; then 
25 pkg=`${PKG_ADMIN} -b -d ${DEPOTBASE} -s "" lsbest "${CONF_DEPENDS}"` 
26 sysconfdir=`${PKG_INFO} -B -K ${DEPOTBASE} $pkg | \ 
27 ${AWK} '/^PKG_SYSCONFDIR=/ { \ 
28 gsub("^PKG_SYSCONFDIR=[ ]*", ""); \ 
29 print; \ 
30 }' \ 
31 ` 
32 if [ -d $sysconfdir -a ! -d ${PKG_SYSCONFDIR} ]; then 
33 ${MKDIR} -p `${DIRNAME} ${PKG_SYSCONFDIR}` 
34 ${LN} -sf $sysconfdir ${PKG_SYSCONFDIR} 
35 fi 
36 fi 
37 ${TEST} ! -x ./+DIRS || 20 ${TEST} ! -x ./+DIRS ||
38 ./+DIRS ADD ${PKG_METADATA_DIR} 21 ./+DIRS ADD ${PKG_METADATA_DIR}
39 ${TEST} ! -x ./+DIRS || 22 ${TEST} ! -x ./+DIRS ||
40 ./+DIRS PERMS ${PKG_METADATA_DIR} 23 ./+DIRS PERMS ${PKG_METADATA_DIR}
41 ;; 24 ;;
42 25
43POST-INSTALL) 26POST-INSTALL)
44 # 27 #
45 # Rebuild the system run-time library search path database. 28 # Rebuild the system run-time library search path database.
46 # 29 #
47 ${TEST} ! -x ./+SHLIBS || 30 ${TEST} ! -x ./+SHLIBS ||
48 ./+SHLIBS ADD ${PKG_METADATA_DIR} 31 ./+SHLIBS ADD ${PKG_METADATA_DIR}
49 # 32 #
@@ -64,39 +47,29 @@ POST-INSTALL) @@ -64,39 +47,29 @@ POST-INSTALL)
64 ${TEST} ! -x ./+FONTS || 47 ${TEST} ! -x ./+FONTS ||
65 ./+FONTS ${PKG_METADATA_DIR} 48 ./+FONTS ${PKG_METADATA_DIR}
66 49
67 # Check for any missing bits after we're finished installing. 50 # Check for any missing bits after we're finished installing.
68 # 51 #
69 ${TEST} ! -x ./+DIRS || 52 ${TEST} ! -x ./+DIRS ||
70 ./+DIRS CHECK-ADD ${PKG_METADATA_DIR} 53 ./+DIRS CHECK-ADD ${PKG_METADATA_DIR}
71 ${TEST} ! -x ./+DIRS || 54 ${TEST} ! -x ./+DIRS ||
72 ./+DIRS CHECK-PERMS ${PKG_METADATA_DIR} 55 ./+DIRS CHECK-PERMS ${PKG_METADATA_DIR}
73 ${TEST} ! -x ./+FILES || 56 ${TEST} ! -x ./+FILES ||
74 ./+FILES CHECK-ADD ${PKG_METADATA_DIR} 57 ./+FILES CHECK-ADD ${PKG_METADATA_DIR}
75 ${TEST} ! -x ./+FILES || 58 ${TEST} ! -x ./+FILES ||
76 ./+FILES CHECK-PERMS ${PKG_METADATA_DIR} 59 ./+FILES CHECK-PERMS ${PKG_METADATA_DIR}
77 ;; 
78 60
79VIEW-INSTALL) 
80 # 61 #
81 # Register shells in /etc/shells. 62 # Register shells in /etc/shells.
82 # 63 #
83 ${TEST} ! -x ./+SHELL || 64 ${TEST} ! -x ./+SHELL ||
84 ./+SHELL ADD ${PKG_METADATA_DIR} 65 ./+SHELL ADD ${PKG_METADATA_DIR}
85 ${TEST} ! -x ./+SHELL || 66 ${TEST} ! -x ./+SHELL ||
86 ./+SHELL CHECK-ADD ${PKG_METADATA_DIR} 67 ./+SHELL CHECK-ADD ${PKG_METADATA_DIR}
87 # 68 #
88 # Register info files. 69 # Register info files.
89 # 70 #
90 ${TEST} ! -x ./+INFO_FILES || 71 ${TEST} ! -x ./+INFO_FILES ||
91 ./+INFO_FILES ADD ${PKG_METADATA_DIR} 72 ./+INFO_FILES ADD ${PKG_METADATA_DIR}
92 
93 # If ${PKG_SYSCONFBASE} points outside of ${PREFIX}, then add the 
94 # package config files to the proper view. 
95 # 
96 if [ "${_PKG_CONFIG}" = "yes" -a -n "${PKG_SYSCONFDEPOTBASE}" ]; then 
97 ${SETENV} PLIST_IGNORE_FILES="${CONF_IGNORE_FILES}" \ 
98 ${LINKFARM} -t ${PKG_SYSCONFVIEWBASE} -d ${PKG_SYSCONFDEPOTBASE} ${PKGNAME} 
99 fi 
100 ;; 73 ;;
101esac 74esac
102 75

File Deleted: pkgsrc/mk/pkginstall/Attic/deinstall-pre

File Deleted: pkgsrc/mk/pkginstall/Attic/install-post

cvs diff -r1.8 -r1.9 pkgsrc/mk/pkginstall/files (expand / switch to unified diff)

--- pkgsrc/mk/pkginstall/files 2012/04/21 10:22:32 1.8
+++ pkgsrc/mk/pkginstall/files 2014/12/30 15:13:20 1.9
@@ -1,39 +1,37 @@ @@ -1,39 +1,37 @@
1# $NetBSD: files,v 1.8 2012/04/21 10:22:32 wiz Exp $ 1# $NetBSD: files,v 1.9 2014/12/30 15:13:20 wiz Exp $
2# 2#
3# Generate a +FILES script that reference counts config files that are 3# Generate a +FILES script that reference counts config files that are
4# required for the proper functioning of the package. 4# required for the proper functioning of the package.
5# 5#
6case "${STAGE},$1" in 6case "${STAGE},$1" in
7UNPACK,|UNPACK,+FILES) 7UNPACK,|UNPACK,+FILES)
8 ${CAT} > ./+FILES << 'EOF' 8 ${CAT} > ./+FILES << 'EOF'
9#!@SH@ 9#!@SH@
10# 10#
11# +FILES - reference-counted configuration file management script 11# +FILES - reference-counted configuration file management script
12# 12#
13# Usage: ./+FILES ADD|REMOVE|PERMS [metadatadir] 13# Usage: ./+FILES ADD|REMOVE|PERMS [metadatadir]
14# ./+FILES VIEW-REMOVE depotdir viewdir 
15# ./+FILES CHECK-ADD|CHECK-REMOVE|CHECK-PERMS [metadatadir] 14# ./+FILES CHECK-ADD|CHECK-REMOVE|CHECK-PERMS [metadatadir]
16# 15#
17# This script supports two actions, ADD and REMOVE, that will add or 16# This script supports two actions, ADD and REMOVE, that will add or
18# remove the configuration files needed by the package associated with 17# remove the configuration files needed by the package associated with
19# <metadatadir>. The CHECK-ADD action will check whether any files 18# <metadatadir>. The CHECK-ADD action will check whether any files
20# needed by the package are missing, and print an informative message 19# needed by the package are missing, and print an informative message
21# noting those files. The CHECK-REMOVE action will check whether 20# noting those files. The CHECK-REMOVE action will check whether
22# any files needed by the package still exist, and print an informative 21# any files needed by the package still exist, and print an informative
23# message noting those files. The CHECK-ADD and CHECK-REMOVE actions 22# message noting those files. The CHECK-ADD and CHECK-REMOVE actions
24# return non-zero if they detect either missing or existing files, 23# return non-zero if they detect either missing or existing files,
25# respectively. The VIEW-REMOVE action will remove from <viewdir> the 24# respectively. The PERMS action
26# links to the configuration files in <depotdir>. The PERMS action 
27# will correct any ownership or permission discrepancies between the 25# will correct any ownership or permission discrepancies between the
28# existing files and the data in this script, and the CHECK-PERMS 26# existing files and the data in this script, and the CHECK-PERMS
29# action will check whether any files have the wrong ownership or 27# action will check whether any files have the wrong ownership or
30# permission and print an informative message noting those files. The 28# permission and print an informative message noting those files. The
31# CHECK-PERMS action will return non-zero if it detects files with 29# CHECK-PERMS action will return non-zero if it detects files with
32# wrong ownership or permissions. 30# wrong ownership or permissions.
33# 31#
34# Lines starting with "# FILE: " are data read by this script that 32# Lines starting with "# FILE: " are data read by this script that
35# name the files that this package requires to exist to function 33# name the files that this package requires to exist to function
36# correctly, along with the locations of the example files, e.g. 34# correctly, along with the locations of the example files, e.g.
37# 35#
38# # FILE: /etc/bar.conf c /example/bar.conf 36# # FILE: /etc/bar.conf c /example/bar.conf
39# # FILE: /etc/baz/conf c /example/baz.conf 0600 foo-user foo-group 37# # FILE: /etc/baz/conf c /example/baz.conf 0600 foo-user foo-group
@@ -88,41 +86,32 @@ case "${PKG_CONFIG_PERMS:-@PKG_CONFIG_PE @@ -88,41 +86,32 @@ case "${PKG_CONFIG_PERMS:-@PKG_CONFIG_PE
88[Nn][Oo]|[Ff][Aa][Ll][Ss][Ee]|[Oo][Ff][Ff]|0) 86[Nn][Oo]|[Ff][Aa][Ll][Ss][Ee]|[Oo][Ff][Ff]|0)
89 _PKG_CONFIG_PERMS=no 87 _PKG_CONFIG_PERMS=no
90 ;; 88 ;;
91esac 89esac
92case "${PKG_RCD_SCRIPTS:-@PKG_RCD_SCRIPTS@}" in 90case "${PKG_RCD_SCRIPTS:-@PKG_RCD_SCRIPTS@}" in
93[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) 91[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
94 _PKG_RCD_SCRIPTS=yes 92 _PKG_RCD_SCRIPTS=yes
95 ;; 93 ;;
96[Nn][Oo]|[Ff][Aa][Ll][Ss][Ee]|[Oo][Ff][Ff]|0) 94[Nn][Oo]|[Ff][Aa][Ll][Ss][Ee]|[Oo][Ff][Ff]|0)
97 _PKG_RCD_SCRIPTS=no 95 _PKG_RCD_SCRIPTS=no
98 ;; 96 ;;
99esac 97esac
100 98
101case $ACTION in 99CURDIR=`${PWD_CMD}`
102VIEW-REMOVE) 100PKG_METADATA_DIR="${2-${CURDIR}}"
103 DEPOTDIR="$2" 101: ${PKGNAME=${PKG_METADATA_DIR##*/}}
104 VIEWDIR="$3" 102: ${PKG_DBDIR=${PKG_METADATA_DIR%/*}}
105 ${TEST} -n "${DEPOTDIR}" -a -n "${VIEWDIR}" || exit 0 103: ${PKG_REFCOUNT_DBDIR=${PKG_DBDIR}.refcount}
106 ;; 104PKG_REFCOUNT_FILES_DBDIR="${PKG_REFCOUNT_DBDIR}/files"
107*) 
108 CURDIR=`${PWD_CMD}` 
109 PKG_METADATA_DIR="${2-${CURDIR}}" 
110 : ${PKGNAME=${PKG_METADATA_DIR##*/}} 
111 : ${PKG_DBDIR=${PKG_METADATA_DIR%/*}} 
112 : ${PKG_REFCOUNT_DBDIR=${PKG_DBDIR}.refcount} 
113 PKG_REFCOUNT_FILES_DBDIR="${PKG_REFCOUNT_DBDIR}/files" 
114 ;; 
115esac 
116 105
117exitcode=0 106exitcode=0
118case $ACTION in 107case $ACTION in
119ADD) 108ADD)
120 ${SED} -n "/^\# FILE: /{s/^\# FILE: //;p;}" ${SELF} | ${SORT} -u | 109 ${SED} -n "/^\# FILE: /{s/^\# FILE: //;p;}" ${SELF} | ${SORT} -u |
121 while read file f_flags f_eg f_mode f_user f_group; do 110 while read file f_flags f_eg f_mode f_user f_group; do
122 case $file in 111 case $file in
123 "") continue ;; 112 "") continue ;;
124 [!/]*) file="${PKG_PREFIX}/$file" ;; 113 [!/]*) file="${PKG_PREFIX}/$file" ;;
125 esac 114 esac
126 case $f_flags in 115 case $f_flags in
127 *c*) ;; 116 *c*) ;;
128 *) continue ;; 117 *) continue ;;
@@ -244,42 +233,26 @@ PERMS) @@ -244,42 +233,26 @@ PERMS)
244 *) ${CHOWN} $f_user $file ;; 233 *) ${CHOWN} $f_user $file ;;
245 esac 234 esac
246 case $f_group in 235 case $f_group in
247 "") ;; 236 "") ;;
248 *) ${CHGRP} $f_group $file ;; 237 *) ${CHGRP} $f_group $file ;;
249 esac 238 esac
250 case $f_mode in 239 case $f_mode in
251 "") ;; 240 "") ;;
252 *) ${CHMOD} $f_mode $file ;; 241 *) ${CHMOD} $f_mode $file ;;
253 esac 242 esac
254 done 243 done
255 ;; 244 ;;
256 245
257VIEW-REMOVE) 
258 ${SED} -n "/^\# FILE: /{s/^\# FILE: //;p;}" ${SELF} | ${SORT} -ru | 
259 while read file f_flags f_eg f_mode f_user f_group; do 
260 case $file in 
261 ${DEPOTDIR}/*) link="${VIEWDIR}/${file#${DEPOTDIR}/}" ;; 
262 [!/]*) link="${VIEWDIR}/$file" ;; 
263 *) continue ;; 
264 esac 
265 dir="${link%[^/]*}" 
266 if ${TEST} -h "$link"; then 
267 ${RM} -f $link 
268 ${RMDIR} -p $dir 2>/dev/null || ${TRUE} 
269 fi 
270 done 
271 ;; 
272 
273CHECK-ADD) 246CHECK-ADD)
274 ${SED} -n "/^\# FILE: /{s/^\# FILE: //;p;}" ${SELF} | ${SORT} -ru | 247 ${SED} -n "/^\# FILE: /{s/^\# FILE: //;p;}" ${SELF} | ${SORT} -ru |
275 { while read file f_flags f_eg f_mode f_user f_group; do 248 { while read file f_flags f_eg f_mode f_user f_group; do
276 case $file in 249 case $file in
277 "") continue ;; 250 "") continue ;;
278 [!/]*) file="${PKG_PREFIX}/$file" ;; 251 [!/]*) file="${PKG_PREFIX}/$file" ;;
279 esac 252 esac
280 ${TEST} ! -f "$file" || continue 253 ${TEST} ! -f "$file" || continue
281 case $f_flags in 254 case $f_flags in
282 *c*) ;; 255 *c*) ;;
283 *) continue ;; 256 *) continue ;;
284 esac 257 esac
285 case $f_eg in 258 case $f_eg in
@@ -421,25 +394,24 @@ CHECK-PERMS) @@ -421,25 +394,24 @@ CHECK-PERMS)
421 done 394 done
422 case "$printed_header" in 395 case "$printed_header" in
423 yes) ${ECHO} "" 396 yes) ${ECHO} ""
424 ${ECHO} "===========================================================================" 397 ${ECHO} "==========================================================================="
425 exit 1 398 exit 1
426 ;; 399 ;;
427 esac; } 400 esac; }
428 ${TEST} $? -eq 0 || exitcode=1 401 ${TEST} $? -eq 0 || exitcode=1
429 ${RM} -fr $tmpdir 402 ${RM} -fr $tmpdir
430 ;; 403 ;;
431 404
432*) 405*)
433 ${ECHO} "Usage: ./+FILES ADD|REMOVE|PERMS [metadatadir]" 406 ${ECHO} "Usage: ./+FILES ADD|REMOVE|PERMS [metadatadir]"
434 ${ECHO} " ./+FILES VIEW-REMOVE depotdir viewdir" 
435 ${ECHO} " ./+FILES CHECK-ADD|CHECK-REMOVE|CHECK-PERMS [metadatadir]" 407 ${ECHO} " ./+FILES CHECK-ADD|CHECK-REMOVE|CHECK-PERMS [metadatadir]"
436 ;; 408 ;;
437esac 409esac
438exit $exitcode 410exit $exitcode
439 411
440EOF 412EOF
441 ${SED} -n "/^\# FILE: /p" ${SELF} >> ./+FILES 413 ${SED} -n "/^\# FILE: /p" ${SELF} >> ./+FILES
442 ${CHMOD} +x ./+FILES 414 ${CHMOD} +x ./+FILES
443 ;; 415 ;;
444esac 416esac
445 417

cvs diff -r1.47 -r1.48 pkgsrc/mk/plist/plist.mk (expand / switch to unified diff)

--- pkgsrc/mk/plist/plist.mk 2014/10/09 13:44:51 1.47
+++ pkgsrc/mk/plist/plist.mk 2014/12/30 15:13:20 1.48
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: plist.mk,v 1.47 2014/10/09 13:44:51 wiz Exp $ 1# $NetBSD: plist.mk,v 1.48 2014/12/30 15:13:20 wiz Exp $
2# 2#
3# This Makefile fragment handles the creation of PLISTs for use by 3# This Makefile fragment handles the creation of PLISTs for use by
4# pkg_create(8). 4# pkg_create(8).
5# 5#
6# The following variables affect the PLIST generation: 6# The following variables affect the PLIST generation:
7# 7#
8# PLIST_TYPE specifies whether the generated PLIST is derived 8# PLIST_TYPE specifies whether the generated PLIST is derived
9# automatically from the installed files, or if the PLIST entries 9# automatically from the installed files, or if the PLIST entries
10# are listed in files. Valid values are "dynamic" and "static", 10# are listed in files. Valid values are "dynamic" and "static",
11# and the default value is "static". 11# and the default value is "static".
12# 12#
13# PLIST_VARS is the list of names corresponding to automatic variables 13# PLIST_VARS is the list of names corresponding to automatic variables
14# generated by plist.mk to simplify having conditionally-present 14# generated by plist.mk to simplify having conditionally-present
@@ -40,29 +40,26 @@ @@ -40,29 +40,26 @@
40# IGNORE_INFO_DIRS is a list of ${PREFIX}-relative paths that do 40# IGNORE_INFO_DIRS is a list of ${PREFIX}-relative paths that do
41# *not* contain info files. 41# *not* contain info files.
42# 42#
43 43
44_VARGROUPS+= plist 44_VARGROUPS+= plist
45_USER_VARS.plist= # none 45_USER_VARS.plist= # none
46_PKG_VARS.plist= PLIST_SUBST PLIST_VARS PLIST_SRC GENERATE_PLIST 46_PKG_VARS.plist= PLIST_SUBST PLIST_VARS PLIST_SRC GENERATE_PLIST
47_SYS_VARS.plist= PLIST_TYPE PLIST 47_SYS_VARS.plist= PLIST_TYPE PLIST
48 48
49PLIST_VARS?= # empty 49PLIST_VARS?= # empty
50PLIST_AWK?= # empty 50PLIST_AWK?= # empty
51PLIST_AWK_ENV?= # empty 51PLIST_AWK_ENV?= # empty
52 52
53.if ${PKG_INSTALLATION_TYPE} == "pkgviews" 
54PLIST_TYPE?= dynamic 
55.endif 
56PLIST_TYPE?= static 53PLIST_TYPE?= static
57 54
58###################################################################### 55######################################################################
59 56
60.if exists(${PKGDIR}/PLIST.common) 57.if exists(${PKGDIR}/PLIST.common)
61PLIST_SRC_DFLT+= ${PKGDIR}/PLIST.common 58PLIST_SRC_DFLT+= ${PKGDIR}/PLIST.common
62.endif 59.endif
63.if exists(${PKGDIR}/PLIST.${OPSYS}) 60.if exists(${PKGDIR}/PLIST.${OPSYS})
64PLIST_SRC_DFLT+= ${PKGDIR}/PLIST.${OPSYS} 61PLIST_SRC_DFLT+= ${PKGDIR}/PLIST.${OPSYS}
65.endif 62.endif
66.if exists(${PKGDIR}/PLIST.${MACHINE_ARCH:C/i[3-6]86/i386/g}) 63.if exists(${PKGDIR}/PLIST.${MACHINE_ARCH:C/i[3-6]86/i386/g})
67PLIST_SRC_DFLT+= ${PKGDIR}/PLIST.${MACHINE_ARCH:C/i[3-6]86/i386/g} 64PLIST_SRC_DFLT+= ${PKGDIR}/PLIST.${MACHINE_ARCH:C/i[3-6]86/i386/g}
68.endif 65.endif
@@ -217,42 +214,26 @@ _SHLIB_AWKFILE.none= ${.CURDIR}/../../mk @@ -217,42 +214,26 @@ _SHLIB_AWKFILE.none= ${.CURDIR}/../../mk
217 214
218###################################################################### 215######################################################################
219 216
220# GENERATE_PLIST is a sequence of commands, terminating in a semicolon, 217# GENERATE_PLIST is a sequence of commands, terminating in a semicolon,
221# that outputs contents for a PLIST to stdout and is appended to 218# that outputs contents for a PLIST to stdout and is appended to
222# the contents of ${PLIST_SRC}. 219# the contents of ${PLIST_SRC}.
223# 220#
224.if empty(PLIST_SRC) 221.if empty(PLIST_SRC)
225GENERATE_PLIST?= ${ECHO} "@comment "${PKGNAME:Q}" has no files."; 222GENERATE_PLIST?= ${ECHO} "@comment "${PKGNAME:Q}" has no files.";
226.else 223.else
227GENERATE_PLIST?= ${TRUE}; 224GENERATE_PLIST?= ${TRUE};
228.endif 225.endif
229 226
230.if ${PKG_INSTALLATION_TYPE} == "pkgviews" 
231# 
232# _PLIST_IGNORE_FILES basically mirrors the list of ignored files found 
233# in pkg_views(1). It's used by the dynamic PLIST generator to skip 
234# adding the named files to the PLIST. 
235# 
236_PLIST_IGNORE_FILES+= +* # package metadata files 
237. if defined(INFO_FILES) 
238_PLIST_IGNORE_FILES+= ${PKGINFODIR}/dir 
239. endif 
240_PLIST_IGNORE_FILES+= *[~\#] *.OLD *.orig *,v # scratch config files 
241. if !empty(CONF_DEPENDS) 
242_PLIST_IGNORE_FILES+= ${PKG_SYSCONFDIR:S,^${PREFIX}/,,} 
243. endif 
244_PLIST_IGNORE_FILES+= ${PLIST_IGNORE_FILES} 
245.endif 
246_BUILD_DEFS+= _PLIST_IGNORE_FILES 227_BUILD_DEFS+= _PLIST_IGNORE_FILES
247 228
248.if ${PLIST_TYPE} == "dynamic" 229.if ${PLIST_TYPE} == "dynamic"
249_PLIST_IGNORE_CMD= \ 230_PLIST_IGNORE_CMD= \
250 ( while read i; do \ 231 ( while read i; do \
251 ignore=no; \ 232 ignore=no; \
252 for p in ${_PLIST_IGNORE_FILES}; do \ 233 for p in ${_PLIST_IGNORE_FILES}; do \
253 case "$$i" in \ 234 case "$$i" in \
254 $$p) ignore=yes; break ;; \ 235 $$p) ignore=yes; break ;; \
255 esac; \ 236 esac; \
256 done; \ 237 done; \
257 [ "$$ignore" = "yes" ] || ${ECHO} "$$i"; \ 238 [ "$$ignore" = "yes" ] || ${ECHO} "$$i"; \
258 done ) 239 done )

cvs diff -r1.9 -r1.10 pkgsrc/mk/wrapper/gen-transform.sh (expand / switch to unified diff)

--- pkgsrc/mk/wrapper/gen-transform.sh 2014/09/02 14:23:00 1.9
+++ pkgsrc/mk/wrapper/gen-transform.sh 2014/12/30 15:13:20 1.10
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1#! @WRAPPER_SHELL@ 1#! @WRAPPER_SHELL@
2# 2#
3# $NetBSD: gen-transform.sh,v 1.9 2014/09/02 14:23:00 jperkin Exp $ 3# $NetBSD: gen-transform.sh,v 1.10 2014/12/30 15:13:20 wiz Exp $
4# 4#
5# Copyright (c) 2004 The NetBSD Foundation, Inc. 5# Copyright (c) 2004 The NetBSD Foundation, Inc.
6# All rights reserved. 6# All rights reserved.
7# 7#
8# This code is derived from software contributed to The NetBSD Foundation 8# This code is derived from software contributed to The NetBSD Foundation
9# by Johnny C. Lam. 9# by Johnny C. Lam.
10# 10#
11# Redistribution and use in source and binary forms, with or without 11# Redistribution and use in source and binary forms, with or without
12# modification, are permitted provided that the following conditions 12# modification, are permitted provided that the following conditions
13# are met: 13# are met:
14# 1. Redistributions of source code must retain the above copyright 14# 1. Redistributions of source code must retain the above copyright
15# notice, this list of conditions and the following disclaimer. 15# notice, this list of conditions and the following disclaimer.
16# 2. Redistributions in binary form must reproduce the above copyright 16# 2. Redistributions in binary form must reproduce the above copyright
@@ -62,36 +62,26 @@ rpath_options="-Wl,--rpath, -Wl,-rpath-l @@ -62,36 +62,26 @@ rpath_options="-Wl,--rpath, -Wl,-rpath-l
62###################################################################### 62######################################################################
63gen() 63gen()
64{ 64{
65 _sep=" \`\"':;," 65 _sep=" \`\"':;,"
66 66
67 _action=$1; shift 67 _action=$1; shift
68 save_IFS="${IFS}"; IFS=":" 68 save_IFS="${IFS}"; IFS=":"
69 set -- $1 69 set -- $1
70 IFS="${save_IFS}" 70 IFS="${save_IFS}"
71 _cmd="$1"; shift 71 _cmd="$1"; shift
72 72
73 case $_cmd in 73 case $_cmd in
74 ############################################################### 74 ###############################################################
75 # depot:src:dst 
76 # Change "src/<dir>/*" into "dst/*", and the same in -I and 
77 # -L options. 
78 ############################################################### 
79 depot) 
80 gen $_action "opt-depot:$1:$2" 
81 gen $_action "opt-depot:-I$1:-I$2" 
82 gen $_action "opt-depot:-L$1:-L$2" 
83 ;; 
84 ############################################################### 
85 # I:src:dst 75 # I:src:dst
86 # Change "src" into "dst" and "src/*" into "dst/*" in -I 76 # Change "src" into "dst" and "src/*" into "dst/*" in -I
87 # options for transform, and back for untransform. 77 # options for transform, and back for untransform.
88 ############################################################### 78 ###############################################################
89 I) 79 I)
90 case $_action in 80 case $_action in
91 transform) 81 transform)
92 $debug_log $wrapperlog " (gen-transform) $_cmd: $@" 82 $debug_log $wrapperlog " (gen-transform) $_cmd: $@"
93 gen $_action "opt:-I$1:-I$2" 83 gen $_action "opt:-I$1:-I$2"
94 gen $_action "opt-sub:-I$1:-I$2" 84 gen $_action "opt-sub:-I$1:-I$2"
95 ;; 85 ;;
96 untransform) 86 untransform)
97 $debug_log $wrapperlog " (gen-transform) $_cmd: $@" 87 $debug_log $wrapperlog " (gen-transform) $_cmd: $@"
@@ -211,47 +201,26 @@ gen() @@ -211,47 +201,26 @@ gen()
211 $echo "s|^$1\([$_sep]\)|$2\1|g" 201 $echo "s|^$1\([$_sep]\)|$2\1|g"
212 $echo "s|^$1$|$2|g" 202 $echo "s|^$1$|$2|g"
213 ;; 203 ;;
214 untransform) 204 untransform)
215 $debug_log $wrapperlog " (gen-transform) $_cmd: $@" 205 $debug_log $wrapperlog " (gen-transform) $_cmd: $@"
216 $echo "s|\([$_sep]\)$1\([$_sep]\)|\1$2\2|g" 206 $echo "s|\([$_sep]\)$1\([$_sep]\)|\1$2\2|g"
217 $echo "s|\([$_sep]\)$1\([$_sep]\)|\1$2\2|g" 207 $echo "s|\([$_sep]\)$1\([$_sep]\)|\1$2\2|g"
218 $echo "s|\([$_sep]\)$1$|\1$2|g" 208 $echo "s|\([$_sep]\)$1$|\1$2|g"
219 $echo "s|^$1\([$_sep]\)|$2\1|g" 209 $echo "s|^$1\([$_sep]\)|$2\1|g"
220 $echo "s|^$1$|$2|g" 210 $echo "s|^$1$|$2|g"
221 ;; 211 ;;
222 esac 212 esac
223 ;; 213 ;;
224 ############################################################### 
225 # opt-depot:src:dst 
226 # Change "src/<dir>/*" into "dst/*". 
227 ############################################################### 
228 opt-depot) 
229 case $_action in 
230 transform) 
231 $debug_log $wrapperlog " (gen-transform) $_cmd: $@" 
232 $echo "s|^$1/[^/$_sep]*\(/[^$_sep]*[$_sep]\)|$2\1|g" 
233 $echo "s|^$1/[^/$_sep]*\(/[^$_sep]*\)$|$2\1|g" 
234 ;; 
235 untransform) 
236 $debug_log $wrapperlog " (gen-transform) $_cmd: $@" 
237 $echo "s|\([$_sep]\)$1/[^/$_sep]*\(/[^$_sep]*[$_sep]\)|\1$2\2|g" 
238 $echo "s|\([$_sep]\)$1/[^/$_sep]*\(/[^$_sep]*[$_sep]\)|\1$2\2|g" 
239 $echo "s|\([$_sep]\)$1/[^/$_sep]*\(/[^$_sep]*\)$|\1$2\2|g" 
240 $echo "s|^$1/[^/$_sep]*\(/[^$_sep]*[$_sep]\)|$2\1|g" 
241 $echo "s|^$1/[^/$_sep]*\(/[^$_sep]*\)$|$2\1|g" 
242 ;; 
243 esac 
244 ;; 
245 ############################################################## 214 ##############################################################
246 # opt-sub:src:dst 215 # opt-sub:src:dst
247 # Change "src/*" into "dst/*". 216 # Change "src/*" into "dst/*".
248 ############################################################## 217 ##############################################################
249 opt-sub) 218 opt-sub)
250 $debug_log $wrapperlog " (gen-transform) $_cmd: $@" 219 $debug_log $wrapperlog " (gen-transform) $_cmd: $@"
251 gen $_action "opt-sub-trailer:$1::$2:" 220 gen $_action "opt-sub-trailer:$1::$2:"
252 ;; 221 ;;
253 ############################################################## 222 ##############################################################
254 # opt-sub-trailer:src:src_trailer:dst:dst_trailer 223 # opt-sub-trailer:src:src_trailer:dst:dst_trailer
255 # Change "src/*src_trailer" into "dst/*dst_trailer", 224 # Change "src/*src_trailer" into "dst/*dst_trailer",
256 # where "src/*" matches "src" plus subdirectories. 225 # where "src/*" matches "src" plus subdirectories.
257 ############################################################## 226 ##############################################################

cvs diff -r1.44 -r1.45 pkgsrc/net/openslp/Makefile (expand / switch to unified diff)

--- pkgsrc/net/openslp/Makefile 2014/10/09 14:06:46 1.44
+++ pkgsrc/net/openslp/Makefile 2014/12/30 15:13:20 1.45
@@ -1,26 +1,24 @@ @@ -1,26 +1,24 @@
1# $NetBSD: Makefile,v 1.44 2014/10/09 14:06:46 wiz Exp $ 1# $NetBSD: Makefile,v 1.45 2014/12/30 15:13:20 wiz Exp $
2 2
3DISTNAME= openslp-1.2.1 3DISTNAME= openslp-1.2.1
4PKGREVISION= 7 4PKGREVISION= 7
5CATEGORIES= net 5CATEGORIES= net
6MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=openslp/} 6MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=openslp/}
7 7
8MAINTAINER= pkgsrc-users@NetBSD.org 8MAINTAINER= pkgsrc-users@NetBSD.org
9HOMEPAGE= http://www.openslp.org/ 9HOMEPAGE= http://www.openslp.org/
10COMMENT= Open-source implementation of the Service Location Protocol 10COMMENT= Open-source implementation of the Service Location Protocol
11 11
12# Needs pkgviews-enabled automake 
13 
14USE_TOOLS+= automake bison lex pax 12USE_TOOLS+= automake bison lex pax
15USE_LIBTOOL= yes 13USE_LIBTOOL= yes
16GNU_CONFIGURE= yes 14GNU_CONFIGURE= yes
17CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q} 15CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q}
18CONFIGURE_ARGS+= --localstatedir=${VARBASE:Q} 16CONFIGURE_ARGS+= --localstatedir=${VARBASE:Q}
19CONFIGURE_ARGS+= --enable-slpv2-security 17CONFIGURE_ARGS+= --enable-slpv2-security
20INSTALL_MAKE_FLAGS= ${MAKE_FLAGS} sysconfdir=${EGDIR} DOC_DIR=${DOCDIR} 18INSTALL_MAKE_FLAGS= ${MAKE_FLAGS} sysconfdir=${EGDIR} DOC_DIR=${DOCDIR}
21 19
22DOCDIR= ${PREFIX}/share/doc/${PKGBASE} 20DOCDIR= ${PREFIX}/share/doc/${PKGBASE}
23EGDIR= ${PREFIX}/share/examples/${PKGBASE} 21EGDIR= ${PREFIX}/share/examples/${PKGBASE}
24 22
25CONFS= slp.conf slp.reg slp.spi 23CONFS= slp.conf slp.reg slp.spi
26CONF_FILES= # empty 24CONF_FILES= # empty

cvs diff -r1.3 -r1.4 pkgsrc/pkgtools/cwrappers/files/bin/fixup-libtool.c (expand / switch to unified diff)

--- pkgsrc/pkgtools/cwrappers/files/bin/fixup-libtool.c 2014/12/06 22:35:24 1.3
+++ pkgsrc/pkgtools/cwrappers/files/bin/fixup-libtool.c 2014/12/30 15:13:20 1.4
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: fixup-libtool.c,v 1.3 2014/12/06 22:35:24 riz Exp $ */ 1/* $NetBSD: fixup-libtool.c,v 1.4 2014/12/30 15:13:20 wiz Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2009 Joerg Sonnenberger <joerg@NetBSD.org>. 4 * Copyright (c) 2009 Joerg Sonnenberger <joerg@NetBSD.org>.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 10 *
11 * 1. Redistributions of source code must retain the above copyright 11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer. 12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright 13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in 14 * notice, this list of conditions and the following disclaimer in
@@ -135,27 +135,26 @@ process_option(struct processing_option  @@ -135,27 +135,26 @@ process_option(struct processing_option
135 (int)len, (int)len, line); 135 (int)len, (int)len, line);
136 process_option(opt, tmp, strlen(tmp), 136 process_option(opt, tmp, strlen(tmp),
137 in_relink); 137 in_relink);
138 free(tmp); 138 free(tmp);
139 return; 139 return;
140 } 140 }
141 if (wrksrc) { 141 if (wrksrc) {
142 wlen = strlen(wrksrc); 142 wlen = strlen(wrksrc);
143 143
144 if (wlen <= len - 2 && 144 if (wlen <= len - 2 &&
145 strncmp(line + 2, wrksrc, wlen) == 0 && 145 strncmp(line + 2, wrksrc, wlen) == 0 &&
146 (line[wlen + 2] == '/' || wlen + 2 == len)) 146 (line[wlen + 2] == '/' || wlen + 2 == len))
147 return; 147 return;
148 /* XXX Check for DEPOTBASE */ 
149 } 148 }
150 } 149 }
151 i = wrapper_hash2(line, len) & (LIBPATH_HASH - 1); 150 i = wrapper_hash2(line, len) & (LIBPATH_HASH - 1);
152 TAILQ_FOREACH(arg, opt->hashtab + i, link) { 151 TAILQ_FOREACH(arg, opt->hashtab + i, link) {
153 if (strncmp(arg->val, line, len) == 0 && 152 if (strncmp(arg->val, line, len) == 0 &&
154 arg->val[len] == '\0') 153 arg->val[len] == '\0')
155 break; 154 break;
156 } 155 }
157 if (arg != NULL) 156 if (arg != NULL)
158 return; 157 return;
159 158
160 arg = argument_new(xstrndup(line, len)); 159 arg = argument_new(xstrndup(line, len));
161 TAILQ_INSERT_TAIL(opt->hashtab + i, arg, link); 160 TAILQ_INSERT_TAIL(opt->hashtab + i, arg, link);

cvs diff -r1.1 -r1.2 pkgsrc/pkgtools/cwrappers/files/doc/unimplemented.txt (expand / switch to unified diff)

--- pkgsrc/pkgtools/cwrappers/files/doc/unimplemented.txt 2014/09/17 12:40:56 1.1
+++ pkgsrc/pkgtools/cwrappers/files/doc/unimplemented.txt 2014/12/30 15:13:20 1.2
@@ -30,15 +30,13 @@ Platform specific processing: @@ -30,15 +30,13 @@ Platform specific processing:
30- All platforms but Darwin have _USE_RPATH=yes. Shouldn't Darwin just 30- All platforms but Darwin have _USE_RPATH=yes. Shouldn't Darwin just
31 filter out the rpath rules in a platform specific transformation phase? 31 filter out the rpath rules in a platform specific transformation phase?
32 32
33Transform: 33Transform:
34 34
35- opt:foo:bar: Replace all options matching foo with bar. foo might be 35- opt:foo:bar: Replace all options matching foo with bar. foo might be
36 fnmatch expression. Earlier than other transformations. If bar is empty, 36 fnmatch expression. Earlier than other transformations. If bar is empty,
37 option is dropped. 37 option is dropped.
38 38
39Libtool: 39Libtool:
40 40
41- Drop -L, -l, -Wl,* if not in link mode 41- Drop -L, -l, -Wl,* if not in link mode
42 -> see first point 42 -> see first point
43 
44- pkgviews support 

cvs diff -r1.7 -r1.8 pkgsrc/pkgtools/pkg_install/DESCR (expand / switch to unified diff)

--- pkgsrc/pkgtools/pkg_install/DESCR 2009/02/02 12:34:59 1.7
+++ pkgsrc/pkgtools/pkg_install/DESCR 2014/12/30 15:13:20 1.8
@@ -1,19 +1,17 @@ @@ -1,19 +1,17 @@
1pkg_install contains the core package management and administration 1pkg_install contains the core package management and administration
2utilities for pkgsrc, a multi-platform source and binary package 2utilities for pkgsrc, a multi-platform source and binary package
3system developed and maintained by The NetBSD Project and volunteers 3system developed and maintained by The NetBSD Project and volunteers
4from around the globe. 4from around the globe.
5 5
6The following tools are included: 6The following tools are included:
7 7
8pkg_add install and upgrade binary packages 8pkg_add install and upgrade binary packages
9pkg_admin perform various pkgsrc administrative tasks 9pkg_admin perform various pkgsrc administrative tasks
10pkg_create create software package distributions 10pkg_create create software package distributions
11pkg_delete delete installed packages 11pkg_delete delete installed packages
12pkg_info display information about installed or binary packages 12pkg_info display information about installed or binary packages
13pkg_view manage package views 
14linkfarm manage symbolic links for package views 
15 13
16For the following tools compatibility wrappers are included: 14For the following tools compatibility wrappers are included:
17 15
18audit-packages audit installed packages for security vulnerabilities 16audit-packages audit installed packages for security vulnerabilities
19download-vulnerability-list download the latest vulnerabilities list 17download-vulnerability-list download the latest vulnerabilities list

cvs diff -r1.203 -r1.204 pkgsrc/pkgtools/pkg_install/Makefile (expand / switch to unified diff)

--- pkgsrc/pkgtools/pkg_install/Makefile 2014/03/14 22:09:04 1.203
+++ pkgsrc/pkgtools/pkg_install/Makefile 2014/12/30 15:13:20 1.204
@@ -1,23 +1,22 @@ @@ -1,23 +1,22 @@
1# $NetBSD: Makefile,v 1.203 2014/03/14 22:09:04 ryoon Exp $ 1# $NetBSD: Makefile,v 1.204 2014/12/30 15:13:20 wiz Exp $
2 2
3# Notes to package maintainers: 3# Notes to package maintainers:
4# 4#
5# Updating this package does not automatically necessitate bumping 5# Updating this package does not automatically necessitate bumping
6# PKGTOOLS_REQD in bsd.pkg.mk. Do so if and only if there is a critical 6# PKGTOOLS_REQD in bsd.pkg.mk. Do so if and only if there is a critical
7# change in the pkg_* tools that pkgsrc relies on for proper operation. 7# change in the pkg_* tools that pkgsrc relies on for proper operation.
8 8
9PKGNAME= pkg_install-${VERSION} 9PKGNAME= pkg_install-${VERSION}
10PKGREVISION= 1 
11CATEGORIES= pkgtools 10CATEGORIES= pkgtools
12 11
13MAINTAINER= agc@NetBSD.org 12MAINTAINER= agc@NetBSD.org
14HOMEPAGE= http://www.pkgsrc.org/ 13HOMEPAGE= http://www.pkgsrc.org/
15COMMENT= Package management and administration tools for pkgsrc 14COMMENT= Package management and administration tools for pkgsrc
16LICENSE= modified-bsd 15LICENSE= modified-bsd
17 16
18BOOTSTRAP_PKG= yes 17BOOTSTRAP_PKG= yes
19SKIP_LICENSE_CHECK= yes 18SKIP_LICENSE_CHECK= yes
20 19
21CONFLICTS+= audit-packages-[0-9]* 20CONFLICTS+= audit-packages-[0-9]*
22 21
23GNU_CONFIGURE= yes 22GNU_CONFIGURE= yes

cvs diff -r1.27 -r1.28 pkgsrc/pkgtools/pkg_install/files/add/main.c (expand / switch to unified diff)

--- pkgsrc/pkgtools/pkg_install/files/add/main.c 2010/09/14 22:26:18 1.27
+++ pkgsrc/pkgtools/pkg_install/files/add/main.c 2014/12/30 15:13:20 1.28
@@ -1,23 +1,23 @@ @@ -1,23 +1,23 @@
1/* $NetBSD: main.c,v 1.27 2010/09/14 22:26:18 gdt Exp $ */ 1/* $NetBSD: main.c,v 1.28 2014/12/30 15:13:20 wiz Exp $ */
2 2
3#if HAVE_CONFIG_H 3#if HAVE_CONFIG_H
4#include "config.h" 4#include "config.h"
5#endif 5#endif
6#include <nbcompat.h> 6#include <nbcompat.h>
7#if HAVE_SYS_CDEFS_H 7#if HAVE_SYS_CDEFS_H
8#include <sys/cdefs.h> 8#include <sys/cdefs.h>
9#endif 9#endif
10__RCSID("$NetBSD: main.c,v 1.27 2010/09/14 22:26:18 gdt Exp $"); 10__RCSID("$NetBSD: main.c,v 1.28 2014/12/30 15:13:20 wiz Exp $");
11 11
12/* 12/*
13 * 13 *
14 * FreeBSD install - a package for the installation and maintainance 14 * FreeBSD install - a package for the installation and maintainance
15 * of non-core utilities. 15 * of non-core utilities.
16 * 16 *
17 * Redistribution and use in source and binary forms, with or without 17 * Redistribution and use in source and binary forms, with or without
18 * modification, are permitted provided that the following conditions 18 * modification, are permitted provided that the following conditions
19 * are met: 19 * are met:
20 * 1. Redistributions of source code must retain the above copyright 20 * 1. Redistributions of source code must retain the above copyright
21 * notice, this list of conditions and the following disclaimer. 21 * notice, this list of conditions and the following disclaimer.
22 * 2. Redistributions in binary form must reproduce the above copyright 22 * 2. Redistributions in binary form must reproduce the above copyright
23 * notice, this list of conditions and the following disclaimer in the 23 * notice, this list of conditions and the following disclaimer in the
@@ -29,56 +29,52 @@ __RCSID("$NetBSD: main.c,v 1.27 2010/09/ @@ -29,56 +29,52 @@ __RCSID("$NetBSD: main.c,v 1.27 2010/09/
29 * This is the add module. 29 * This is the add module.
30 * 30 *
31 */ 31 */
32 32
33#if HAVE_ERR_H 33#if HAVE_ERR_H
34#include <err.h> 34#include <err.h>
35#endif 35#endif
36#if HAVE_SYS_PARAM_H 36#if HAVE_SYS_PARAM_H
37#include <sys/param.h> 37#include <sys/param.h>
38#endif 38#endif
39#include "lib.h" 39#include "lib.h"
40#include "add.h" 40#include "add.h"
41 41
42static char Options[] = "AC:DIK:LP:RVW:fhm:np:t:Uuvw:"; 42static char Options[] = "AC:DIK:P:RVfhm:np:t:Uuv";
43 43
44char *Destdir = NULL; 44char *Destdir = NULL;
45char *OverrideMachine = NULL; 45char *OverrideMachine = NULL;
46char *Prefix = NULL; 46char *Prefix = NULL;
47char *View = NULL; 
48char *Viewbase = NULL; 
49Boolean NoView = FALSE; 
50Boolean NoInstall = FALSE; 47Boolean NoInstall = FALSE;
51Boolean NoRecord = FALSE; 48Boolean NoRecord = FALSE;
52Boolean Automatic = FALSE; 49Boolean Automatic = FALSE;
53Boolean ForceDepends = FALSE; 50Boolean ForceDepends = FALSE;
54/* 51/*
55 * Normally, updating fails if the dependencies of a depending package 52 * Normally, updating fails if the dependencies of a depending package
56 * are not satisfied by the package to be updated. ForceDepending 53 * are not satisfied by the package to be updated. ForceDepending
57 * turns that failure into a warning. 54 * turns that failure into a warning.
58 */ 55 */
59Boolean ForceDepending = FALSE; 56Boolean ForceDepending = FALSE;
60 57
61int LicenseCheck = 0; 58int LicenseCheck = 0;
62int Replace = 0; 59int Replace = 0;
63int ReplaceSame = 0; 60int ReplaceSame = 0;
64 61
65static void 62static void
66usage(void) 63usage(void)
67{ 64{
68 (void) fprintf(stderr, "%s\n%s\n%s\n%s\n", 65 (void) fprintf(stderr, "%s\n%s\n%s\n%s\n",
69 "usage: pkg_add [-AfhILnRuVv] [-C config] [-P destdir] [-K pkg_dbdir]", 66 "usage: pkg_add [-AfhInRuVv] [-C config] [-P destdir] [-K pkg_dbdir]",
70 " [-m machine] [-p prefix] [-s verification-type", 67 " [-m machine] [-p prefix] [-s verification-type]\n",
71 " [-W viewbase] [-w view]\n", 
72 " [[ftp|http]://[user[:password]@]host[:port]][/path/]pkg-name ..."); 68 " [[ftp|http]://[user[:password]@]host[:port]][/path/]pkg-name ...");
73 exit(1); 69 exit(1);
74} 70}
75 71
76int 72int
77main(int argc, char **argv) 73main(int argc, char **argv)
78{ 74{
79 int ch, error=0; 75 int ch, error=0;
80 lpkg_head_t pkgs; 76 lpkg_head_t pkgs;
81 77
82 setprogname(argv[0]); 78 setprogname(argv[0]);
83 while ((ch = getopt(argc, argv, Options)) != -1) { 79 while ((ch = getopt(argc, argv, Options)) != -1) {
84 switch (ch) { 80 switch (ch) {
@@ -102,30 +98,26 @@ main(int argc, char **argv) @@ -102,30 +98,26 @@ main(int argc, char **argv)
102 Force = TRUE; 98 Force = TRUE;
103 ForceDepends = TRUE; 99 ForceDepends = TRUE;
104 ForceDepending = TRUE; 100 ForceDepending = TRUE;
105 break; 101 break;
106 102
107 case 'I': 103 case 'I':
108 NoInstall = TRUE; 104 NoInstall = TRUE;
109 break; 105 break;
110 106
111 case 'K': 107 case 'K':
112 pkgdb_set_dir(optarg, 3); 108 pkgdb_set_dir(optarg, 3);
113 break; 109 break;
114 110
115 case 'L': 
116 NoView = TRUE; 
117 break; 
118 
119 case 'R': 111 case 'R':
120 NoRecord = TRUE; 112 NoRecord = TRUE;
121 break; 113 break;
122 114
123 case 'm': 115 case 'm':
124 OverrideMachine = optarg; 116 OverrideMachine = optarg;
125 break; 117 break;
126 118
127 case 'n': 119 case 'n':
128 Fake = TRUE; 120 Fake = TRUE;
129 Verbose = TRUE; 121 Verbose = TRUE;
130 break; 122 break;
131 123
@@ -140,34 +132,26 @@ main(int argc, char **argv) @@ -140,34 +132,26 @@ main(int argc, char **argv)
140 132
141 case 'u': 133 case 'u':
142 Replace = 1; 134 Replace = 1;
143 break; 135 break;
144 136
145 case 'V': 137 case 'V':
146 show_version(); 138 show_version();
147 /* NOTREACHED */ 139 /* NOTREACHED */
148 140
149 case 'v': 141 case 'v':
150 Verbose = TRUE; 142 Verbose = TRUE;
151 break; 143 break;
152 144
153 case 'W': 
154 Viewbase = optarg; 
155 break; 
156 
157 case 'w': 
158 View = optarg; 
159 break; 
160 
161 case 'h': 145 case 'h':
162 case '?': 146 case '?':
163 default: 147 default:
164 usage(); 148 usage();
165 break; 149 break;
166 } 150 }
167 } 151 }
168 argc -= optind; 152 argc -= optind;
169 argv += optind; 153 argv += optind;
170 154
171 pkg_install_config(); 155 pkg_install_config();
172 156
173 if (Destdir != NULL) { 157 if (Destdir != NULL) {

cvs diff -r1.105 -r1.106 pkgsrc/pkgtools/pkg_install/files/add/perform.c (expand / switch to unified diff)

--- pkgsrc/pkgtools/pkg_install/files/add/perform.c 2013/09/02 10:28:44 1.105
+++ pkgsrc/pkgtools/pkg_install/files/add/perform.c 2014/12/30 15:13:20 1.106
@@ -1,22 +1,22 @@ @@ -1,22 +1,22 @@
1/* $NetBSD: perform.c,v 1.105 2013/09/02 10:28:44 jperkin Exp $ */ 1/* $NetBSD: perform.c,v 1.106 2014/12/30 15:13:20 wiz Exp $ */
2#if HAVE_CONFIG_H 2#if HAVE_CONFIG_H
3#include "config.h" 3#include "config.h"
4#endif 4#endif
5#include <nbcompat.h> 5#include <nbcompat.h>
6#if HAVE_SYS_CDEFS_H 6#if HAVE_SYS_CDEFS_H
7#include <sys/cdefs.h> 7#include <sys/cdefs.h>
8#endif 8#endif
9__RCSID("$NetBSD: perform.c,v 1.105 2013/09/02 10:28:44 jperkin Exp $"); 9__RCSID("$NetBSD: perform.c,v 1.106 2014/12/30 15:13:20 wiz Exp $");
10 10
11/*- 11/*-
12 * Copyright (c) 2003 Grant Beattie <grant@NetBSD.org> 12 * Copyright (c) 2003 Grant Beattie <grant@NetBSD.org>
13 * Copyright (c) 2005 Dieter Baron <dillo@NetBSD.org> 13 * Copyright (c) 2005 Dieter Baron <dillo@NetBSD.org>
14 * Copyright (c) 2007 Roland Illig <rillig@NetBSD.org> 14 * Copyright (c) 2007 Roland Illig <rillig@NetBSD.org>
15 * Copyright (c) 2008, 2009 Joerg Sonnenberger <joerg@NetBSD.org> 15 * Copyright (c) 2008, 2009 Joerg Sonnenberger <joerg@NetBSD.org>
16 * Copyright (c) 2010 Thomas Klausner <wiz@NetBSD.org> 16 * Copyright (c) 2010 Thomas Klausner <wiz@NetBSD.org>
17 * All rights reserved. 17 * All rights reserved.
18 * 18 *
19 * Redistribution and use in source and binary forms, with or without 19 * Redistribution and use in source and binary forms, with or without
20 * modification, are permitted provided that the following conditions 20 * modification, are permitted provided that the following conditions
21 * are met: 21 * are met:
22 * 22 *
@@ -65,27 +65,26 @@ struct pkg_meta { @@ -65,27 +65,26 @@ struct pkg_meta {
65 char *meta_contents; 65 char *meta_contents;
66 char *meta_comment; 66 char *meta_comment;
67 char *meta_desc; 67 char *meta_desc;
68 char *meta_mtree; 68 char *meta_mtree;
69 char *meta_build_version; 69 char *meta_build_version;
70 char *meta_build_info; 70 char *meta_build_info;
71 char *meta_size_pkg; 71 char *meta_size_pkg;
72 char *meta_size_all; 72 char *meta_size_all;
73 char *meta_required_by; 73 char *meta_required_by;
74 char *meta_display; 74 char *meta_display;
75 char *meta_install; 75 char *meta_install;
76 char *meta_deinstall; 76 char *meta_deinstall;
77 char *meta_preserve; 77 char *meta_preserve;
78 char *meta_views; 
79 char *meta_installed_info; 78 char *meta_installed_info;
80}; 79};
81 80
82struct pkg_task { 81struct pkg_task {
83 char *pkgname; 82 char *pkgname;
84 83
85 const char *prefix; 84 const char *prefix;
86 char *install_prefix; 85 char *install_prefix;
87 86
88 char *logdir; 87 char *logdir;
89 char *install_logdir; 88 char *install_logdir;
90 char *install_logdir_real; 89 char *install_logdir_real;
91 char *other_version; 90 char *other_version;
@@ -111,27 +110,26 @@ static const struct pkg_meta_desc { @@ -111,27 +110,26 @@ static const struct pkg_meta_desc {
111} pkg_meta_descriptors[] = { 110} pkg_meta_descriptors[] = {
112 { offsetof(struct pkg_meta, meta_contents), CONTENTS_FNAME, 1, 0644 }, 111 { offsetof(struct pkg_meta, meta_contents), CONTENTS_FNAME, 1, 0644 },
113 { offsetof(struct pkg_meta, meta_comment), COMMENT_FNAME, 1, 0444}, 112 { offsetof(struct pkg_meta, meta_comment), COMMENT_FNAME, 1, 0444},
114 { offsetof(struct pkg_meta, meta_desc), DESC_FNAME, 1, 0444}, 113 { offsetof(struct pkg_meta, meta_desc), DESC_FNAME, 1, 0444},
115 { offsetof(struct pkg_meta, meta_install), INSTALL_FNAME, 0, 0555 }, 114 { offsetof(struct pkg_meta, meta_install), INSTALL_FNAME, 0, 0555 },
116 { offsetof(struct pkg_meta, meta_deinstall), DEINSTALL_FNAME, 0, 0555 }, 115 { offsetof(struct pkg_meta, meta_deinstall), DEINSTALL_FNAME, 0, 0555 },
117 { offsetof(struct pkg_meta, meta_display), DISPLAY_FNAME, 0, 0444 }, 116 { offsetof(struct pkg_meta, meta_display), DISPLAY_FNAME, 0, 0444 },
118 { offsetof(struct pkg_meta, meta_mtree), MTREE_FNAME, 0, 0444 }, 117 { offsetof(struct pkg_meta, meta_mtree), MTREE_FNAME, 0, 0444 },
119 { offsetof(struct pkg_meta, meta_build_version), BUILD_VERSION_FNAME, 0, 0444 }, 118 { offsetof(struct pkg_meta, meta_build_version), BUILD_VERSION_FNAME, 0, 0444 },
120 { offsetof(struct pkg_meta, meta_build_info), BUILD_INFO_FNAME, 0, 0444 }, 119 { offsetof(struct pkg_meta, meta_build_info), BUILD_INFO_FNAME, 0, 0444 },
121 { offsetof(struct pkg_meta, meta_size_pkg), SIZE_PKG_FNAME, 0, 0444 }, 120 { offsetof(struct pkg_meta, meta_size_pkg), SIZE_PKG_FNAME, 0, 0444 },
122 { offsetof(struct pkg_meta, meta_size_all), SIZE_ALL_FNAME, 0, 0444 }, 121 { offsetof(struct pkg_meta, meta_size_all), SIZE_ALL_FNAME, 0, 0444 },
123 { offsetof(struct pkg_meta, meta_preserve), PRESERVE_FNAME, 0, 0444 }, 122 { offsetof(struct pkg_meta, meta_preserve), PRESERVE_FNAME, 0, 0444 },
124 { offsetof(struct pkg_meta, meta_views), VIEWS_FNAME, 0, 0444 }, 
125 { offsetof(struct pkg_meta, meta_required_by), REQUIRED_BY_FNAME, 0, 0644 }, 123 { offsetof(struct pkg_meta, meta_required_by), REQUIRED_BY_FNAME, 0, 0644 },
126 { offsetof(struct pkg_meta, meta_installed_info), INSTALLED_INFO_FNAME, 0, 0644 }, 124 { offsetof(struct pkg_meta, meta_installed_info), INSTALLED_INFO_FNAME, 0, 0644 },
127 { 0, NULL, 0, 0 }, 125 { 0, NULL, 0, 0 },
128}; 126};
129 127
130static int pkg_do(const char *, int, int); 128static int pkg_do(const char *, int, int);
131 129
132static int 130static int
133end_of_version(const char *opsys, const char *version_end) 131end_of_version(const char *opsys, const char *version_end)
134{ 132{
135 if (*version_end == '\0') 133 if (*version_end == '\0')
136 return 1; 134 return 1;
137 135
@@ -1169,50 +1167,26 @@ check_dependencies(struct pkg_task *pkg) @@ -1169,50 +1167,26 @@ check_dependencies(struct pkg_task *pkg)
1169 } 1167 }
1170 if (pkg->dep_length + 1 >= pkg->dep_allocated) { 1168 if (pkg->dep_length + 1 >= pkg->dep_allocated) {
1171 char **tmp; 1169 char **tmp;
1172 pkg->dep_allocated = 2 * pkg->dep_allocated + 1; 1170 pkg->dep_allocated = 2 * pkg->dep_allocated + 1;
1173 pkg->dependencies = xrealloc(pkg->dependencies, 1171 pkg->dependencies = xrealloc(pkg->dependencies,
1174 pkg->dep_allocated * sizeof(*tmp)); 1172 pkg->dep_allocated * sizeof(*tmp));
1175 } 1173 }
1176 pkg->dependencies[pkg->dep_length++] = best_installed; 1174 pkg->dependencies[pkg->dep_length++] = best_installed;
1177 } 1175 }
1178 1176
1179 return status; 1177 return status;
1180} 1178}
1181 1179
1182/* 
1183 * If this package uses pkg_views, register it in the default view. 
1184 */ 
1185static void 
1186pkg_register_views(struct pkg_task *pkg) 
1187{ 
1188 if (Fake || NoView || pkg->meta_data.meta_views == NULL) 
1189 return; 
1190 
1191 if (Verbose) { 
1192 printf("%s/pkg_view -d %s %s%s %s%s %sadd %s\n", 
1193 BINDIR, pkgdb_get_dir(), 
1194 View ? "-w " : "", View ? View : "", 
1195 Viewbase ? "-W " : "", Viewbase ? Viewbase : "", 
1196 Verbose ? "-v " : "", pkg->pkgname); 
1197 } 
1198 
1199 fexec_skipempty(BINDIR "/pkg_view", "-d", pkgdb_get_dir(), 
1200 View ? "-w " : "", View ? View : "", 
1201 Viewbase ? "-W " : "", Viewbase ? Viewbase : "", 
1202 Verbose ? "-v " : "", "add", pkg->pkgname, 
1203 (void *)NULL); 
1204} 
1205 
1206static int 1180static int
1207preserve_meta_data_file(struct pkg_task *pkg, const char *name) 1181preserve_meta_data_file(struct pkg_task *pkg, const char *name)
1208{ 1182{
1209 char *old_file, *new_file; 1183 char *old_file, *new_file;
1210 int rv; 1184 int rv;
1211 1185
1212 if (Fake) 1186 if (Fake)
1213 return 0; 1187 return 0;
1214 1188
1215 old_file = pkgdb_pkg_file(pkg->other_version, name); 1189 old_file = pkgdb_pkg_file(pkg->other_version, name);
1216 new_file = xasprintf("%s/%s", pkg->install_logdir, name); 1190 new_file = xasprintf("%s/%s", pkg->install_logdir, name);
1217 rv = 0; 1191 rv = 0;
1218 if (rename(old_file, new_file) == -1 && errno != ENOENT) { 1192 if (rename(old_file, new_file) == -1 && errno != ENOENT) {
@@ -1423,32 +1397,27 @@ pkg_do(const char *pkgpath, int mark_aut @@ -1423,32 +1397,27 @@ pkg_do(const char *pkgpath, int mark_aut
1423 1397
1424 if (check_pkgtools_version(pkg)) 1398 if (check_pkgtools_version(pkg))
1425 goto clean_memory; 1399 goto clean_memory;
1426 1400
1427 if (check_vulnerable(pkg)) 1401 if (check_vulnerable(pkg))
1428 goto clean_memory; 1402 goto clean_memory;
1429 1403
1430 if (check_license(pkg)) 1404 if (check_license(pkg))
1431 goto clean_memory; 1405 goto clean_memory;
1432 1406
1433 if (pkg->meta_data.meta_mtree != NULL) 1407 if (pkg->meta_data.meta_mtree != NULL)
1434 warnx("mtree specification in pkg `%s' ignored", pkg->pkgname); 1408 warnx("mtree specification in pkg `%s' ignored", pkg->pkgname);
1435 1409
1436 if (pkg->meta_data.meta_views != NULL) { 1410 pkg->logdir = xasprintf("%s/%s", config_pkg_dbdir, pkg->pkgname);
1437 pkg->logdir = xstrdup(pkg->prefix); 
1438 pkgdb_set_dir(dirname_of(pkg->logdir), 4); 
1439 } else { 
1440 pkg->logdir = xasprintf("%s/%s", config_pkg_dbdir, pkg->pkgname); 
1441 } 
1442 1411
1443 if (Destdir != NULL) 1412 if (Destdir != NULL)
1444 pkg->install_logdir = xasprintf("%s/%s", Destdir, pkg->logdir); 1413 pkg->install_logdir = xasprintf("%s/%s", Destdir, pkg->logdir);
1445 else 1414 else
1446 pkg->install_logdir = xstrdup(pkg->logdir); 1415 pkg->install_logdir = xstrdup(pkg->logdir);
1447 1416
1448 if (NoRecord && !Fake) { 1417 if (NoRecord && !Fake) {
1449 const char *tmpdir; 1418 const char *tmpdir;
1450 1419
1451 tmpdir = getenv("TMPDIR"); 1420 tmpdir = getenv("TMPDIR");
1452 if (tmpdir == NULL) 1421 if (tmpdir == NULL)
1453 tmpdir = "/tmp"; 1422 tmpdir = "/tmp";
1454 1423
@@ -1529,28 +1498,26 @@ pkg_do(const char *pkgpath, int mark_aut @@ -1529,28 +1498,26 @@ pkg_do(const char *pkgpath, int mark_aut
1529 /* XXX keep +INSTALL_INFO for updates? */ 1498 /* XXX keep +INSTALL_INFO for updates? */
1530 /* XXX keep +PRESERVE for updates? */ 1499 /* XXX keep +PRESERVE for updates? */
1531 if (mark_automatic) 1500 if (mark_automatic)
1532 mark_as_automatic_installed(pkg->pkgname, 1); 1501 mark_as_automatic_installed(pkg->pkgname, 1);
1533 1502
1534 pkg_register_depends(pkg); 1503 pkg_register_depends(pkg);
1535 1504
1536 if (Verbose) 1505 if (Verbose)
1537 printf("Package %s registered in %s\n", pkg->pkgname, pkg->install_logdir); 1506 printf("Package %s registered in %s\n", pkg->pkgname, pkg->install_logdir);
1538 1507
1539 if (pkg->meta_data.meta_display != NULL) 1508 if (pkg->meta_data.meta_display != NULL)
1540 fputs(pkg->meta_data.meta_display, stdout); 1509 fputs(pkg->meta_data.meta_display, stdout);
1541 1510
1542 pkg_register_views(pkg); 
1543 
1544 status = 0; 1511 status = 0;
1545 goto clean_memory; 1512 goto clean_memory;
1546 1513
1547nuke_pkg: 1514nuke_pkg:
1548 if (!Fake) { 1515 if (!Fake) {
1549 if (pkg->other_version) { 1516 if (pkg->other_version) {
1550 warnx("Updating of %s to %s failed.", 1517 warnx("Updating of %s to %s failed.",
1551 pkg->other_version, pkg->pkgname); 1518 pkg->other_version, pkg->pkgname);
1552 warnx("Remember to run pkg_admin rebuild-tree after fixing this."); 1519 warnx("Remember to run pkg_admin rebuild-tree after fixing this.");
1553 } 1520 }
1554 delete_package(FALSE, &pkg->plist, FALSE, Destdir); 1521 delete_package(FALSE, &pkg->plist, FALSE, Destdir);
1555 } 1522 }
1556 1523

cvs diff -r1.45 -r1.46 pkgsrc/pkgtools/pkg_install/files/add/pkg_add.1 (expand / switch to unified diff)

--- pkgsrc/pkgtools/pkg_install/files/add/pkg_add.1 2010/09/14 22:26:18 1.45
+++ pkgsrc/pkgtools/pkg_install/files/add/pkg_add.1 2014/12/30 15:13:20 1.46
@@ -1,48 +1,46 @@ @@ -1,48 +1,46 @@
1.\" $NetBSD: pkg_add.1,v 1.45 2010/09/14 22:26:18 gdt Exp $ 1.\" $NetBSD: pkg_add.1,v 1.46 2014/12/30 15:13:20 wiz Exp $
2.\" 2.\"
3.\" FreeBSD install - a package for the installation and maintenance 3.\" FreeBSD install - a package for the installation and maintenance
4.\" of non-core utilities. 4.\" of non-core utilities.
5.\" 5.\"
6.\" Redistribution and use in source and binary forms, with or without 6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions 7.\" modification, are permitted provided that the following conditions
8.\" are met: 8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright 9.\" 1. Redistributions of source code must retain the above copyright
10.\" notice, this list of conditions and the following disclaimer. 10.\" notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\" notice, this list of conditions and the following disclaimer in the 12.\" notice, this list of conditions and the following disclaimer in the
13.\" documentation and/or other materials provided with the distribution. 13.\" documentation and/or other materials provided with the distribution.
14.\" 14.\"
15.\" Jordan K. Hubbard 15.\" Jordan K. Hubbard
16.\" 16.\"
17.\" 17.\"
18.\" @(#)pkg_add.1 18.\" @(#)pkg_add.1
19.\" 19.\"
20.Dd June 16, 2010 20.Dd December 27, 2014
21.Dt PKG_ADD 1 21.Dt PKG_ADD 1
22.Os 22.Os
23.Sh NAME 23.Sh NAME
24.Nm pkg_add 24.Nm pkg_add
25.Nd a utility for installing and upgrading software package distributions 25.Nd a utility for installing and upgrading software package distributions
26.Sh SYNOPSIS 26.Sh SYNOPSIS
27.Nm 27.Nm
28.Op Fl AfILnRUuVv 28.Op Fl AfInRUuVv
29.Op Fl C Ar config 29.Op Fl C Ar config
30.Op Fl K Ar pkg_dbdir 30.Op Fl K Ar pkg_dbdir
31.Op Fl m Ar machine 31.Op Fl m Ar machine
32.Op Fl P Ar destdir 32.Op Fl P Ar destdir
33.Op Fl p Ar prefix 33.Op Fl p Ar prefix
34.Op Fl W Ar viewbase 
35.Op Fl w Ar view 
36.Ar Oo Oo Li ftp|http Oc Ns Li :// Ns Oo Ar user Oc Ns \ 34.Ar Oo Oo Li ftp|http Oc Ns Li :// Ns Oo Ar user Oc Ns \
37Oo Li \&: Ns Ar password Oc \ 35Oo Li \&: Ns Ar password Oc \
38Ns Li @ Oc Ns Ar host Ns Oo Li \&: Ns Ar port Oc Ns \ 36Ns Li @ Oc Ns Ar host Ns Oo Li \&: Ns Ar port Oc Ns \
39Oo Li / Ns Ar path/ Oc Ns Ar pkg-name ... 37Oo Li / Ns Ar path/ Oc Ns Ar pkg-name ...
40.Sh DESCRIPTION 38.Sh DESCRIPTION
41The 39The
42.Nm 40.Nm
43command is used to extract and upgrade packages that have been 41command is used to extract and upgrade packages that have been
44previously created with the 42previously created with the
45.Xr pkg_create 1 43.Xr pkg_create 1
46command. 44command.
47Packages are prepared collections of pre-built binaries, documentation, 45Packages are prepared collections of pre-built binaries, documentation,
48configurations, installation instructions and/or other files. 46configurations, installation instructions and/or other files.
@@ -132,28 +130,26 @@ This flag also overrides the fatal error @@ -132,28 +130,26 @@ This flag also overrides the fatal error
132architecture the package was built on differ from that of the host. 130architecture the package was built on differ from that of the host.
133.It Fl D 131.It Fl D
134Force updating even if the dependencies of depending packages are not 132Force updating even if the dependencies of depending packages are not
135satisfied by the new package. 133satisfied by the new package.
136This is used by "make replace", after which one would typically 134This is used by "make replace", after which one would typically
137replace the depending packages. 135replace the depending packages.
138.It Fl I 136.It Fl I
139If an installation script exists for a given package, do not execute it. 137If an installation script exists for a given package, do not execute it.
140.It Fl K Ar pkg_dbdir 138.It Fl K Ar pkg_dbdir
141Override the value of the 139Override the value of the
142.Dv PKG_DBDIR 140.Dv PKG_DBDIR
143configuration option with the value 141configuration option with the value
144.Ar pkg_dbdir . 142.Ar pkg_dbdir .
145.It Fl L 
146Don't add the package to any views after installation. 
147.It Fl m 143.It Fl m
148Override the machine architecture returned by uname with 144Override the machine architecture returned by uname with
149.Ar machine . 145.Ar machine .
150.It Fl n 146.It Fl n
151Don't actually install a package, just report the steps that 147Don't actually install a package, just report the steps that
152would be taken if it was. 148would be taken if it was.
153.It Fl P Ar destdir 149.It Fl P Ar destdir
154Prefix all file and directory names with 150Prefix all file and directory names with
155.Ar destdir . 151.Ar destdir .
156For packages without install scripts this has the same behavior as 152For packages without install scripts this has the same behavior as
157using 153using
158.Xr chroot 8 . 154.Xr chroot 8 .
159.It Fl p Ar prefix 155.It Fl p Ar prefix
@@ -169,34 +165,26 @@ you know what you are doing! @@ -169,34 +165,26 @@ you know what you are doing!
169Replace an already installed version from a package. 165Replace an already installed version from a package.
170Implies 166Implies
171.Fl u . 167.Fl u .
172.It Fl u 168.It Fl u
173If the package that's being installed is already installed, 169If the package that's being installed is already installed,
174an update is performed. 170an update is performed.
175Installed dependent packages are updated recursively, if they are too 171Installed dependent packages are updated recursively, if they are too
176old to fulfill the dependencies of the to-be-installed version. 172old to fulfill the dependencies of the to-be-installed version.
177See below for a more detailed description of the process. 173See below for a more detailed description of the process.
178.It Fl V 174.It Fl V
179Print version number and exit. 175Print version number and exit.
180.It Fl v 176.It Fl v
181Turn on verbose output. 177Turn on verbose output.
182.It Fl W Ar viewbase 
183Passed down to 
184.Xr pkg_view 1 
185for managed views. 
186.It Fl w Ar view 
187Passed down to 
188.Xr pkg_view 1 
189for managed views. 
190.El 178.El
191.Pp 179.Pp
192One or more 180One or more
193.Ar pkg-name 181.Ar pkg-name
194arguments may be specified, each being either a file containing the 182arguments may be specified, each being either a file containing the
195package (these usually ending with the 183package (these usually ending with the
196.Dq .tgz 184.Dq .tgz
197suffix) or a 185suffix) or a
198URL pointing at a file available on an ftp or web site. 186URL pointing at a file available on an ftp or web site.
199Thus you may extract files directly from their anonymous ftp or WWW 187Thus you may extract files directly from their anonymous ftp or WWW
200locations (e.g., 188locations (e.g.,
201.Nm 189.Nm
202ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/i386/3.1_2007Q2/shells/bash-3.2.9.tgz 190ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/i386/3.1_2007Q2/shells/bash-3.2.9.tgz
@@ -327,31 +315,26 @@ Keyword denoting that the script is to p @@ -327,31 +315,26 @@ Keyword denoting that the script is to p
327after the package has been installed. 315after the package has been installed.
328.El 316.El
329.It 317.It
330After installation is complete, a copy of the packing list, 318After installation is complete, a copy of the packing list,
331.Ar deinstall 319.Ar deinstall
332script, description, and display files are copied into 320script, description, and display files are copied into
333.Pa \*[Lt]PKG_DBDIR\*[Gt]/\*[Lt]pkg-name\*[Gt] 321.Pa \*[Lt]PKG_DBDIR\*[Gt]/\*[Lt]pkg-name\*[Gt]
334for subsequent possible use by 322for subsequent possible use by
335.Xr pkg_delete 1 . 323.Xr pkg_delete 1 .
336Any package dependencies are recorded in the other packages' 324Any package dependencies are recorded in the other packages'
337.Pa +REQUIRED_BY 325.Pa +REQUIRED_BY
338file. 326file.
339.It 327.It
340If the package is a depoted package, then add it to the registered 
341by calling 
342.Xr pkg_view 1 
343accordingly. 
344.It 
345Finally, if we were upgrading a package, any 328Finally, if we were upgrading a package, any
346.Pa +REQUIRED_BY 329.Pa +REQUIRED_BY
347file that was moved aside before upgrading was started is now moved 330file that was moved aside before upgrading was started is now moved
348back into place. 331back into place.
349.El 332.El
350.Pp 333.Pp
351The 334The
352.Ar install 335.Ar install
353script is called with the environment variable 336script is called with the environment variable
354.Ev PKG_PREFIX 337.Ev PKG_PREFIX
355set to the installation prefix (see the 338set to the installation prefix (see the
356.Fl p 339.Fl p
357option above). 340option above).
@@ -376,29 +359,26 @@ flag was given to @@ -376,29 +359,26 @@ flag was given to
376.Ev PKG_DESTDIR 359.Ev PKG_DESTDIR
377will be set to 360will be set to
378.Ar destdir . 361.Ar destdir .
379Additionally, 362Additionally,
380.Ev PKG_METADATA_DIR 363.Ev PKG_METADATA_DIR
381and 364and
382.Ev PKG_REFCOUNT_DBDIR 365.Ev PKG_REFCOUNT_DBDIR
383are prefixed with 366are prefixed with
384.Ar destdir . 367.Ar destdir .
385.Sh ENVIRONMENT 368.Sh ENVIRONMENT
386See 369See
387.Xr pkg_install.conf 5 370.Xr pkg_install.conf 5
388for options, that can also be specified using the environment. 371for options, that can also be specified using the environment.
389Packages using views are also affected by the environment variables 
390documented for 
391.Xr pkg_view 1 . 
392.Sh EXAMPLES 372.Sh EXAMPLES
393In all cases, 373In all cases,
394.Nm 374.Nm
395will try to install binary packages listed in dependencies list. 375will try to install binary packages listed in dependencies list.
396.Pp 376.Pp
397You can specify a compiled binary package explicitly on the command line. 377You can specify a compiled binary package explicitly on the command line.
398.Bd -literal 378.Bd -literal
399# pkg_add /usr/pkgsrc/packages/All/tcsh-6.14.00.tgz 379# pkg_add /usr/pkgsrc/packages/All/tcsh-6.14.00.tgz
400.Ed 380.Ed
401.Pp 381.Pp
402If you omit the version number, 382If you omit the version number,
403.Nm 383.Nm
404will install the latest version available. 384will install the latest version available.

cvs diff -r1.62 -r1.63 pkgsrc/pkgtools/pkg_install/files/admin/main.c (expand / switch to unified diff)

--- pkgsrc/pkgtools/pkg_install/files/admin/main.c 2013/08/03 11:45:14 1.62
+++ pkgsrc/pkgtools/pkg_install/files/admin/main.c 2014/12/30 15:13:20 1.63
@@ -1,23 +1,23 @@ @@ -1,23 +1,23 @@
1/* $NetBSD: main.c,v 1.62 2013/08/03 11:45:14 obache Exp $ */ 1/* $NetBSD: main.c,v 1.63 2014/12/30 15:13:20 wiz Exp $ */
2 2
3#if HAVE_CONFIG_H 3#if HAVE_CONFIG_H
4#include "config.h" 4#include "config.h"
5#endif 5#endif
6#include <nbcompat.h> 6#include <nbcompat.h>
7#if HAVE_SYS_CDEFS_H 7#if HAVE_SYS_CDEFS_H
8#include <sys/cdefs.h> 8#include <sys/cdefs.h>
9#endif 9#endif
10__RCSID("$NetBSD: main.c,v 1.62 2013/08/03 11:45:14 obache Exp $"); 10__RCSID("$NetBSD: main.c,v 1.63 2014/12/30 15:13:20 wiz Exp $");
11 11
12/*- 12/*-
13 * Copyright (c) 1999-2009 The NetBSD Foundation, Inc. 13 * Copyright (c) 1999-2009 The NetBSD Foundation, Inc.
14 * All rights reserved. 14 * All rights reserved.
15 * 15 *
16 * This code is derived from software contributed to The NetBSD Foundation 16 * This code is derived from software contributed to The NetBSD Foundation
17 * by Hubert Feyrer <hubert@feyrer.de> and 17 * by Hubert Feyrer <hubert@feyrer.de> and
18 * by Joerg Sonnenberger <joerg@NetBSD.org>. 18 * by Joerg Sonnenberger <joerg@NetBSD.org>.
19 * 19 *
20 * Redistribution and use in source and binary forms, with or without 20 * Redistribution and use in source and binary forms, with or without
21 * modification, are permitted provided that the following conditions 21 * modification, are permitted provided that the following conditions
22 * are met: 22 * are met:
23 * 1. Redistributions of source code must retain the above copyright 23 * 1. Redistributions of source code must retain the above copyright
@@ -93,28 +93,26 @@ static const char Options[] = "C:K:SVbd: @@ -93,28 +93,26 @@ static const char Options[] = "C:K:SVbd:
93int quiet, verbose; 93int quiet, verbose;
94 94
95static void set_unset_variable(char **, Boolean); 95static void set_unset_variable(char **, Boolean);
96 96
97/* print usage message and exit */ 97/* print usage message and exit */
98void  98void
99usage(void) 99usage(void)
100{ 100{
101 (void) fprintf(stderr, "usage: %s [-bqSVv] [-C config] [-d lsdir] [-K pkg_dbdir] [-s sfx] command [args ...]\n" 101 (void) fprintf(stderr, "usage: %s [-bqSVv] [-C config] [-d lsdir] [-K pkg_dbdir] [-s sfx] command [args ...]\n"
102 "Where 'commands' and 'args' are:\n" 102 "Where 'commands' and 'args' are:\n"
103 " rebuild - rebuild pkgdb from +CONTENTS files\n" 103 " rebuild - rebuild pkgdb from +CONTENTS files\n"
104 " rebuild-tree - rebuild +REQUIRED_BY files from forward deps\n" 104 " rebuild-tree - rebuild +REQUIRED_BY files from forward deps\n"
105 " check [pkg ...] - check md5 checksum of installed files\n" 105 " check [pkg ...] - check md5 checksum of installed files\n"
106 " add pkg ... - add pkg files to database\n" 
107 " delete pkg ... - delete file entries for pkg in database\n" 
108 " set variable=value pkg ... - set installation variable for package\n" 106 " set variable=value pkg ... - set installation variable for package\n"
109 " unset variable pkg ... - unset installation variable for package\n" 107 " unset variable pkg ... - unset installation variable for package\n"
110 " lsall /path/to/pkgpattern - list all pkgs matching the pattern\n" 108 " lsall /path/to/pkgpattern - list all pkgs matching the pattern\n"
111 " lsbest /path/to/pkgpattern - list pkgs matching the pattern best\n" 109 " lsbest /path/to/pkgpattern - list pkgs matching the pattern best\n"
112 " dump - dump database\n" 110 " dump - dump database\n"
113 " pmatch pattern pkg - returns true if pkg matches pattern, otherwise false\n" 111 " pmatch pattern pkg - returns true if pkg matches pattern, otherwise false\n"
114 " fetch-pkg-vulnerabilities [-s] - fetch new vulnerability file\n" 112 " fetch-pkg-vulnerabilities [-s] - fetch new vulnerability file\n"
115 " check-pkg-vulnerabilities [-s] <file> - check syntax and checksums of the vulnerability file\n" 113 " check-pkg-vulnerabilities [-s] <file> - check syntax and checksums of the vulnerability file\n"
116 " audit [-es] [-t type] ... - check installed packages for vulnerabilities\n" 114 " audit [-es] [-t type] ... - check installed packages for vulnerabilities\n"
117 " audit-pkg [-es] [-t type] ... - check listed packages for vulnerabilities\n" 115 " audit-pkg [-es] [-t type] ... - check listed packages for vulnerabilities\n"
118 " audit-batch [-es] [-t type] ... - check packages in listed files for vulnerabilities\n" 116 " audit-batch [-es] [-t type] ... - check packages in listed files for vulnerabilities\n"
119 " audit-history [-t type] ... - print all advisories for package names\n" 117 " audit-history [-t type] ... - print all advisories for package names\n"
120 " check-license <condition> - check if condition is acceptable\n" 118 " check-license <condition> - check if condition is acceptable\n"
@@ -210,35 +208,26 @@ add_pkg(const char *pkgdir, void *vp) @@ -210,35 +208,26 @@ add_pkg(const char *pkgdir, void *vp)
210 case PLIST_OPTION: 208 case PLIST_OPTION:
211 case PLIST_PKGCFL: 209 case PLIST_PKGCFL:
212 case PLIST_BLDDEP: 210 case PLIST_BLDDEP:
213 break; 211 break;
214 } 212 }
215 } 213 }
216 free_plist(&Plist); 214 free_plist(&Plist);
217 fclose(f); 215 fclose(f);
218 pkgdb_close(); 216 pkgdb_close();
219 217
220 return 0; 218 return 0;
221} 219}
222 220
223static void 
224delete1pkg(const char *pkgdir) 
225{ 
226 if (!pkgdb_open(ReadWrite)) 
227 err(EXIT_FAILURE, "cannot open pkgdb"); 
228 (void) pkgdb_remove_pkg(pkgdir); 
229 pkgdb_close(); 
230} 
231 
232static void  221static void
233rebuild(void) 222rebuild(void)
234{ 223{
235 char *cachename; 224 char *cachename;
236 struct pkgdb_count count; 225 struct pkgdb_count count;
237 226
238 count.files = 0; 227 count.files = 0;
239 count.directories = 0; 228 count.directories = 0;
240 count.packages = 0; 229 count.packages = 0;
241 230
242 cachename = pkgdb_get_database(); 231 cachename = pkgdb_get_database();
243 if (unlink(cachename) != 0 && errno != ENOENT) 232 if (unlink(cachename) != 0 && errno != ENOENT)
244 err(EXIT_FAILURE, "unlink %s", cachename); 233 err(EXIT_FAILURE, "unlink %s", cachename);
@@ -506,41 +495,26 @@ main(int argc, char *argv[]) @@ -506,41 +495,26 @@ main(int argc, char *argv[])
506 printf("%s\n", p); 495 printf("%s\n", p);
507 else 496 else
508 printf("%s/%s\n", dir, p); 497 printf("%s/%s\n", dir, p);
509 free(p); 498 free(p);
510 } 499 }
511  500
512 argv++; 501 argv++;
513 } 502 }
514 } else if (strcasecmp(argv[0], "list") == 0 || 503 } else if (strcasecmp(argv[0], "list") == 0 ||
515 strcasecmp(argv[0], "dump") == 0) { 504 strcasecmp(argv[0], "dump") == 0) {
516 505
517 pkgdb_dump(); 506 pkgdb_dump();
518 507
519 } else if (strcasecmp(argv[0], "add") == 0) { 
520 struct pkgdb_count count; 
521 
522 count.files = 0; 
523 count.directories = 0; 
524 count.packages = 0; 
525 
526 for (++argv; *argv != NULL; ++argv) 
527 add_pkg(*argv, &count); 
528 } else if (strcasecmp(argv[0], "delete") == 0) { 
529 argv++; /* "delete" */ 
530 while (*argv != NULL) { 
531 delete1pkg(*argv); 
532 argv++; 
533 } 
534 } else if (strcasecmp(argv[0], "set") == 0) { 508 } else if (strcasecmp(argv[0], "set") == 0) {
535 argv++; /* "set" */ 509 argv++; /* "set" */
536 set_unset_variable(argv, FALSE); 510 set_unset_variable(argv, FALSE);
537 } else if (strcasecmp(argv[0], "unset") == 0) { 511 } else if (strcasecmp(argv[0], "unset") == 0) {
538 argv++; /* "unset" */ 512 argv++; /* "unset" */
539 set_unset_variable(argv, TRUE); 513 set_unset_variable(argv, TRUE);
540 } else if (strcasecmp(argv[0], "config-var") == 0) { 514 } else if (strcasecmp(argv[0], "config-var") == 0) {
541 argv++; 515 argv++;
542 if (argv == NULL || argv[1] != NULL) 516 if (argv == NULL || argv[1] != NULL)
543 errx(EXIT_FAILURE, "config-var takes exactly one argument"); 517 errx(EXIT_FAILURE, "config-var takes exactly one argument");
544 pkg_install_show_variable(argv[0]); 518 pkg_install_show_variable(argv[0]);
545 } else if (strcasecmp(argv[0], "check-license") == 0) { 519 } else if (strcasecmp(argv[0], "check-license") == 0) {
546 if (argv[1] == NULL) 520 if (argv[1] == NULL)

cvs diff -r1.33 -r1.34 pkgsrc/pkgtools/pkg_install/files/admin/pkg_admin.1 (expand / switch to unified diff)

--- pkgsrc/pkgtools/pkg_install/files/admin/pkg_admin.1 2012/12/17 04:34:02 1.33
+++ pkgsrc/pkgtools/pkg_install/files/admin/pkg_admin.1 2014/12/30 15:13:20 1.34
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1.\" $NetBSD: pkg_admin.1,v 1.33 2012/12/17 04:34:02 agc Exp $ 1.\" $NetBSD: pkg_admin.1,v 1.34 2014/12/30 15:13:20 wiz Exp $
2.\" 2.\"
3.\" Copyright (c) 1999-2010 The NetBSD Foundation, Inc. 3.\" Copyright (c) 1999-2010 The NetBSD Foundation, Inc.
4.\" All rights reserved. 4.\" All rights reserved.
5.\" 5.\"
6.\" This code is derived from software contributed to The NetBSD Foundation 6.\" This code is derived from software contributed to The NetBSD Foundation
7.\" by Hubert Feyrer <hubert@feyrer.de>. 7.\" by Hubert Feyrer <hubert@feyrer.de>.
8.\" 8.\"
9.\" Redistribution and use in source and binary forms, with or without 9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions 10.\" modification, are permitted provided that the following conditions
11.\" are met: 11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright 12.\" 1. Redistributions of source code must retain the above copyright
13.\" notice, this list of conditions and the following disclaimer. 13.\" notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright 14.\" 2. Redistributions in binary form must reproduce the above copyright
@@ -24,27 +24,27 @@ @@ -24,27 +24,27 @@
24.\" 24.\"
25.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 25.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
26.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 26.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
27.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 27.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 28.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
29.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 29.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 30.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 31.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 32.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 33.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 34.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35.\" POSSIBILITY OF SUCH DAMAGE. 35.\" POSSIBILITY OF SUCH DAMAGE.
36.\" 36.\"
37.Dd December 14, 2012 37.Dd December 27, 2014
38.Dt PKG_ADMIN 1 38.Dt PKG_ADMIN 1
39.Os 39.Os
40.Sh NAME 40.Sh NAME
41.Nm pkg_admin 41.Nm pkg_admin
42.Nd perform various administrative tasks to the pkg system 42.Nd perform various administrative tasks to the pkg system
43.Sh SYNOPSIS 43.Sh SYNOPSIS
44.Nm 44.Nm
45.Op Fl bqSVv 45.Op Fl bqSVv
46.Op Fl C Ar config 46.Op Fl C Ar config
47.Op Fl d Ar lsdir 47.Op Fl d Ar lsdir
48.Op Fl K Ar pkg_dbdir 48.Op Fl K Ar pkg_dbdir
49.Op Fl s Ar sfx_pattern 49.Op Fl s Ar sfx_pattern
50.Ar command Op args ... 50.Ar command Op args ...
@@ -96,33 +96,26 @@ Set the shell glob pattern for package s @@ -96,33 +96,26 @@ Set the shell glob pattern for package s
96names for 96names for
97.Cm lsall 97.Cm lsall
98and 98and
99.Cm lsbest . 99.Cm lsbest .
100The default pattern is ".t[bg]z". 100The default pattern is ".t[bg]z".
101.It Fl V 101.It Fl V
102Print version number and exit. 102Print version number and exit.
103.It Fl v 103.It Fl v
104Be more verbose. 104Be more verbose.
105.El 105.El
106.Pp 106.Pp
107The following commands are supported: 107The following commands are supported:
108.Bl -tag -width indent 108.Bl -tag -width indent
109.It Cm add Ar pkg ... 
110For each listed package, write the absolute pathnames of the files listed in 
111its 
112.Pa +CONTENTS 
113file together with the package they belong to into the package database. 
114This should be used only by 
115.Xr pkg_view 1 . 
116.It Cm audit Oo Fl es Oc Oo Fl t Ar type Oc Oo Ar pkg Oc ... 109.It Cm audit Oo Fl es Oc Oo Fl t Ar type Oc Oo Ar pkg Oc ...
117Check the listed installed packages for vulnerabilities. 110Check the listed installed packages for vulnerabilities.
118If no package is given, check all installed packages. 111If no package is given, check all installed packages.
119If 112If
120.Fl e 113.Fl e
121is given, override the 114is given, override the
122.Dv CHECK_END_OF_LIFE 115.Dv CHECK_END_OF_LIFE
123option from 116option from
124.Xr pkg_install.conf 5 117.Xr pkg_install.conf 5
125with 118with
126.Qq Li yes . 119.Qq Li yes .
127If 120If
128.Fl s 121.Fl s
@@ -177,31 +170,26 @@ is given, also check the embedded signat @@ -177,31 +170,26 @@ is given, also check the embedded signat
177Reports if 170Reports if
178.Ar file 171.Ar file
179is a correctly signed package. 172is a correctly signed package.
180.It Cm check-single-license Ar license 173.It Cm check-single-license Ar license
181Check if 174Check if
182.Ar license 175.Ar license
183is a valid license name and if it is in the set of acceptable licenses. 176is a valid license name and if it is in the set of acceptable licenses.
184Prints either yes or no to stdout if the condition can be parsed, 177Prints either yes or no to stdout if the condition can be parsed,
185otherwise it exits with error. 178otherwise it exits with error.
186.It Cm config-var Ar variable 179.It Cm config-var Ar variable
187Print the current value of 180Print the current value of
188.Ar variable 181.Ar variable
189as used after parsing the configuration file. 182as used after parsing the configuration file.
190.It Cm delete Ar pkg ... 
191For each listed package, remove all file entries in the package database that 
192belong to the package. 
193This should be used only by 
194.Xr pkg_view 1 . 
195.It Cm dump 183.It Cm dump
196Dump the contents of the package database, similar to 184Dump the contents of the package database, similar to
197.Cm pkg_info -F . 185.Cm pkg_info -F .
198Columns are printed for the key field used in the pkgdb - the filename -, 186Columns are printed for the key field used in the pkgdb - the filename -,
199and the data field - the package the file belongs to. 187and the data field - the package the file belongs to.
200.It Cm fetch-pkg-vulnerabilities Oo Fl su Oc 188.It Cm fetch-pkg-vulnerabilities Oo Fl su Oc
201Fetch a new pkg-vulnerabilities file, check the format and if 189Fetch a new pkg-vulnerabilities file, check the format and if
202.Fl s 190.Fl s
203is given the signature. 191is given the signature.
204If all checks are passed, write it to pkgdb. 192If all checks are passed, write it to pkgdb.
205If 193If
206.Fl u 194.Fl u
207is given, the fetch is conditional and the file transfer is only done if 195is given, the fetch is conditional and the file transfer is only done if
@@ -300,25 +288,24 @@ Remove an installation variable. @@ -300,25 +288,24 @@ Remove an installation variable.
300See 288See
301.Xr pkg_install.conf 5 289.Xr pkg_install.conf 5
302for options, that can also be specified using the environment. 290for options, that can also be specified using the environment.
303.Sh FILES 291.Sh FILES
304.Bl -tag -width /var/db/pkg/pkgdb.byfile.db -compact 292.Bl -tag -width /var/db/pkg/pkgdb.byfile.db -compact
305.It Pa /var/db/pkg/pkgdb.byfile.db 293.It Pa /var/db/pkg/pkgdb.byfile.db
306.It Pa /var/db/pkg/\*[Lt]pkg\*[Gt]/+CONTENTS 294.It Pa /var/db/pkg/\*[Lt]pkg\*[Gt]/+CONTENTS
307.El 295.El
308.Sh SEE ALSO 296.Sh SEE ALSO
309.Xr pkg_add 1 , 297.Xr pkg_add 1 ,
310.Xr pkg_create 1 , 298.Xr pkg_create 1 ,
311.Xr pkg_delete 1 , 299.Xr pkg_delete 1 ,
312.Xr pkg_info 1 , 300.Xr pkg_info 1 ,
313.Xr pkg_view 1 , 
314.Xr pkg_install.conf 5 , 301.Xr pkg_install.conf 5 ,
315.Xr pkgsrc 7 302.Xr pkgsrc 7
316.Sh HISTORY 303.Sh HISTORY
317The 304The
318.Nm 305.Nm
319command first appeared in 306command first appeared in
320.Nx 1.4 . 307.Nx 1.4 .
321.Sh AUTHORS 308.Sh AUTHORS
322The 309The
323.Nm 310.Nm
324command was written by Hubert Feyrer. 311command was written by Hubert Feyrer.

cvs diff -r1.15 -r1.16 pkgsrc/pkgtools/pkg_install/files/create/build.c (expand / switch to unified diff)

--- pkgsrc/pkgtools/pkg_install/files/create/build.c 2010/04/20 00:39:13 1.15
+++ pkgsrc/pkgtools/pkg_install/files/create/build.c 2014/12/30 15:13:20 1.16
@@ -1,23 +1,23 @@ @@ -1,23 +1,23 @@
1/* $NetBSD: build.c,v 1.15 2010/04/20 00:39:13 joerg Exp $ */ 1/* $NetBSD: build.c,v 1.16 2014/12/30 15:13:20 wiz Exp $ */
2 2
3#if HAVE_CONFIG_H 3#if HAVE_CONFIG_H
4#include "config.h" 4#include "config.h"
5#endif 5#endif
6#include <nbcompat.h> 6#include <nbcompat.h>
7#if HAVE_SYS_CDEFS_H 7#if HAVE_SYS_CDEFS_H
8#include <sys/cdefs.h> 8#include <sys/cdefs.h>
9#endif 9#endif
10__RCSID("$NetBSD: build.c,v 1.15 2010/04/20 00:39:13 joerg Exp $"); 10__RCSID("$NetBSD: build.c,v 1.16 2014/12/30 15:13:20 wiz Exp $");
11 11
12/*- 12/*-
13 * Copyright (c) 2007 Joerg Sonnenberger <joerg@NetBSD.org>. 13 * Copyright (c) 2007 Joerg Sonnenberger <joerg@NetBSD.org>.
14 * All rights reserved. 14 * All rights reserved.
15 * 15 *
16 * This code was developed as part of Google's Summer of Code 2007 program. 16 * This code was developed as part of Google's Summer of Code 2007 program.
17 * 17 *
18 * Redistribution and use in source and binary forms, with or without 18 * Redistribution and use in source and binary forms, with or without
19 * modification, are permitted provided that the following conditions 19 * modification, are permitted provided that the following conditions
20 * are met: 20 * are met:
21 * 21 *
22 * 1. Redistributions of source code must retain the above copyright 22 * 1. Redistributions of source code must retain the above copyright
23 * notice, this list of conditions and the following disclaimer. 23 * notice, this list of conditions and the following disclaimer.
@@ -83,27 +83,26 @@ __RCSID("$NetBSD: build.c,v 1.15 2010/04 @@ -83,27 +83,26 @@ __RCSID("$NetBSD: build.c,v 1.15 2010/04
83#include <archive_entry.h> 83#include <archive_entry.h>
84 84
85static struct memory_file *contents_file; 85static struct memory_file *contents_file;
86static struct memory_file *comment_file; 86static struct memory_file *comment_file;
87static struct memory_file *desc_file; 87static struct memory_file *desc_file;
88static struct memory_file *install_file; 88static struct memory_file *install_file;
89static struct memory_file *deinstall_file; 89static struct memory_file *deinstall_file;
90static struct memory_file *display_file; 90static struct memory_file *display_file;
91static struct memory_file *build_version_file; 91static struct memory_file *build_version_file;
92static struct memory_file *build_info_file; 92static struct memory_file *build_info_file;
93static struct memory_file *size_pkg_file; 93static struct memory_file *size_pkg_file;
94static struct memory_file *size_all_file; 94static struct memory_file *size_all_file;
95static struct memory_file *preserve_file; 95static struct memory_file *preserve_file;
96static struct memory_file *views_file; 
97 96
98static void 97static void
99write_meta_file(struct memory_file *file, struct archive *archive) 98write_meta_file(struct memory_file *file, struct archive *archive)
100{ 99{
101 struct archive_entry *entry; 100 struct archive_entry *entry;
102 101
103 entry = archive_entry_new(); 102 entry = archive_entry_new();
104 archive_entry_set_pathname(entry, file->name); 103 archive_entry_set_pathname(entry, file->name);
105 archive_entry_copy_stat(entry, &file->st); 104 archive_entry_copy_stat(entry, &file->st);
106 105
107 archive_entry_set_uname(entry, file->owner); 106 archive_entry_set_uname(entry, file->owner);
108 archive_entry_set_gname(entry, file->group); 107 archive_entry_set_gname(entry, file->group);
109 108
@@ -282,28 +281,26 @@ make_dist(const char *pkg, const char *s @@ -282,28 +281,26 @@ make_dist(const char *pkg, const char *s
282 write_meta_file(deinstall_file, archive); 281 write_meta_file(deinstall_file, archive);
283 if (Display) 282 if (Display)
284 write_meta_file(display_file, archive); 283 write_meta_file(display_file, archive);
285 if (BuildVersion) 284 if (BuildVersion)
286 write_meta_file(build_version_file, archive); 285 write_meta_file(build_version_file, archive);
287 if (BuildInfo) 286 if (BuildInfo)
288 write_meta_file(build_info_file, archive); 287 write_meta_file(build_info_file, archive);
289 if (SizePkg) 288 if (SizePkg)
290 write_meta_file(size_pkg_file, archive); 289 write_meta_file(size_pkg_file, archive);
291 if (SizeAll) 290 if (SizeAll)
292 write_meta_file(size_all_file, archive); 291 write_meta_file(size_all_file, archive);
293 if (Preserve) 292 if (Preserve)
294 write_meta_file(preserve_file, archive); 293 write_meta_file(preserve_file, archive);
295 if (create_views) 
296 write_meta_file(views_file, archive); 
297 294
298 initial_cwd = getcwd(NULL, 0); 295 initial_cwd = getcwd(NULL, 0);
299 296
300 for (p = plist->head; p; p = p->next) { 297 for (p = plist->head; p; p = p->next) {
301 if (p->type == PLIST_FILE) { 298 if (p->type == PLIST_FILE) {
302 write_normal_file(p->name, archive, resolver, owner, group); 299 write_normal_file(p->name, archive, resolver, owner, group);
303 } else if (p->type == PLIST_CWD) { 300 } else if (p->type == PLIST_CWD) {
304 chdir(p->name); 301 chdir(p->name);
305 } else if (p->type == PLIST_IGNORE) { 302 } else if (p->type == PLIST_IGNORE) {
306 p = p->next; 303 p = p->next;
307 } else if (p->type == PLIST_CHOWN) { 304 } else if (p->type == PLIST_CHOWN) {
308 if (p->name != NULL) 305 if (p->name != NULL)
309 owner = p->name; 306 owner = p->name;
@@ -397,26 +394,24 @@ pkg_build(const char *pkg, const char *f @@ -397,26 +394,24 @@ pkg_build(const char *pkg, const char *f
397 } 394 }
398 if (SizePkg) { 395 if (SizePkg) {
399 size_pkg_file = load_and_add(plist, SizePkg, 396 size_pkg_file = load_and_add(plist, SizePkg,
400 SIZE_PKG_FNAME, 0444); 397 SIZE_PKG_FNAME, 0444);
401 } 398 }
402 if (SizeAll) { 399 if (SizeAll) {
403 size_all_file = load_and_add(plist, SizeAll, 400 size_all_file = load_and_add(plist, SizeAll,
404 SIZE_ALL_FNAME, 0444); 401 SIZE_ALL_FNAME, 0444);
405 } 402 }
406 if (Preserve) { 403 if (Preserve) {
407 preserve_file = load_and_add(plist, Preserve, 404 preserve_file = load_and_add(plist, Preserve,
408 PRESERVE_FNAME, 0444); 405 PRESERVE_FNAME, 0444);
409 } 406 }
410 if (create_views) 
411 views_file = make_and_add(plist, VIEWS_FNAME, xstrdup(""), 0444); 
412 407
413 /* Finally, write out the packing list */ 408 /* Finally, write out the packing list */
414 stringify_plist(plist, &plist_buf, &plist_len, realprefix); 409 stringify_plist(plist, &plist_buf, &plist_len, realprefix);
415 contents_file = make_memory_file(CONTENTS_FNAME, plist_buf, plist_len, 410 contents_file = make_memory_file(CONTENTS_FNAME, plist_buf, plist_len,
416 DefaultOwner, DefaultGroup, 0644); 411 DefaultOwner, DefaultGroup, 0644);
417 412
418 /* And stick it into a tar ball */ 413 /* And stick it into a tar ball */
419 make_dist(pkg, suffix, plist); 414 make_dist(pkg, suffix, plist);
420 415
421 return TRUE; /* Success */ 416 return TRUE; /* Success */
422} 417}

cvs diff -r1.14 -r1.15 pkgsrc/pkgtools/pkg_install/files/create/create.h (expand / switch to unified diff)

--- pkgsrc/pkgtools/pkg_install/files/create/create.h 2009/11/05 16:22:32 1.14
+++ pkgsrc/pkgtools/pkg_install/files/create/create.h 2014/12/30 15:13:20 1.15
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: create.h,v 1.14 2009/11/05 16:22:32 joerg Exp $ */ 1/* $NetBSD: create.h,v 1.15 2014/12/30 15:13:20 wiz Exp $ */
2 2
3/* from FreeBSD Id: create.h,v 1.13 1997/10/08 07:46:19 charnier Exp */ 3/* from FreeBSD Id: create.h,v 1.13 1997/10/08 07:46:19 charnier Exp */
4 4
5/* 5/*
6 * FreeBSD install - a package for the installation and maintainance 6 * FreeBSD install - a package for the installation and maintainance
7 * of non-core utilities. 7 * of non-core utilities.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
11 * are met: 11 * are met:
12 * 1. Redistributions of source code must retain the above copyright 12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer. 13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright 14 * 2. Redistributions in binary form must reproduce the above copyright
@@ -48,27 +48,26 @@ extern char *BuildPkgdeps; @@ -48,27 +48,26 @@ extern char *BuildPkgdeps;
48extern char *Pkgcfl; 48extern char *Pkgcfl;
49extern char *BuildVersion; 49extern char *BuildVersion;
50extern char *BuildInfo; 50extern char *BuildInfo;
51extern char *SizePkg; 51extern char *SizePkg;
52extern char *SizeAll; 52extern char *SizeAll;
53extern char *Preserve; 53extern char *Preserve;
54extern char *realprefix; 54extern char *realprefix;
55extern char *DefaultOwner; 55extern char *DefaultOwner;
56extern char *DefaultGroup; 56extern char *DefaultGroup;
57extern const char *CompressionType; 57extern const char *CompressionType;
58extern int PlistOnly; 58extern int PlistOnly;
59extern int RelativeLinks; 59extern int RelativeLinks;
60extern int update_pkgdb; 60extern int update_pkgdb;
61extern int create_views; 
62 61
63void check_list(package_t *, const char *); 62void check_list(package_t *, const char *);
64void copy_plist(char *, package_t *); 63void copy_plist(char *, package_t *);
65 64
66struct memory_file 65struct memory_file
67 *load_memory_file(const char *, const char *, 66 *load_memory_file(const char *, const char *,
68 const char *, const char *, mode_t); 67 const char *, const char *, mode_t);
69struct memory_file 68struct memory_file
70 *make_memory_file(const char *, void *, size_t, 69 *make_memory_file(const char *, void *, size_t,
71 const char *, const char *, mode_t); 70 const char *, const char *, mode_t);
72void free_memory_file(struct memory_file *); 71void free_memory_file(struct memory_file *);
73 72
74int pkg_perform(const char *); 73int pkg_perform(const char *);

cvs diff -r1.19 -r1.20 pkgsrc/pkgtools/pkg_install/files/create/main.c (expand / switch to unified diff)

--- pkgsrc/pkgtools/pkg_install/files/create/main.c 2010/01/22 13:30:41 1.19
+++ pkgsrc/pkgtools/pkg_install/files/create/main.c 2014/12/30 15:13:20 1.20
@@ -1,100 +1,95 @@ @@ -1,100 +1,95 @@
1/* $NetBSD: main.c,v 1.19 2010/01/22 13:30:41 joerg Exp $ */ 1/* $NetBSD: main.c,v 1.20 2014/12/30 15:13:20 wiz Exp $ */
2 2
3#if HAVE_CONFIG_H 3#if HAVE_CONFIG_H
4#include "config.h" 4#include "config.h"
5#endif 5#endif
6#include <nbcompat.h> 6#include <nbcompat.h>
7#if HAVE_SYS_CDEFS_H 7#if HAVE_SYS_CDEFS_H
8#include <sys/cdefs.h> 8#include <sys/cdefs.h>
9#endif 9#endif
10__RCSID("$NetBSD: main.c,v 1.19 2010/01/22 13:30:41 joerg Exp $"); 10__RCSID("$NetBSD: main.c,v 1.20 2014/12/30 15:13:20 wiz Exp $");
11 11
12/* 12/*
13 * FreeBSD install - a package for the installation and maintainance 13 * FreeBSD install - a package for the installation and maintainance
14 * of non-core utilities. 14 * of non-core utilities.
15 * 15 *
16 * Jordan K. Hubbard 16 * Jordan K. Hubbard
17 * 18 July 1993 17 * 18 July 1993
18 * 18 *
19 * This is the create module. 19 * This is the create module.
20 * 20 *
21 */ 21 */
22 22
23#if HAVE_ERR_H 23#if HAVE_ERR_H
24#include <err.h> 24#include <err.h>
25#endif 25#endif
26#include "lib.h" 26#include "lib.h"
27#include "create.h" 27#include "create.h"
28 28
29static const char Options[] = "B:C:D:EF:I:K:L:OP:S:T:UVb:c:d:f:g:i:k:ln:p:r:s:u:v"; 29static const char Options[] = "B:C:D:F:I:K:L:OP:S:T:UVb:c:d:f:g:i:k:ln:p:r:s:u:v";
30 30
31char *Prefix = NULL; 31char *Prefix = NULL;
32char *Comment = NULL; 32char *Comment = NULL;
33char *Desc = NULL; 33char *Desc = NULL;
34char *Display = NULL; 34char *Display = NULL;
35char *Install = NULL; 35char *Install = NULL;
36char *DeInstall = NULL; 36char *DeInstall = NULL;
37char *Contents = NULL; 37char *Contents = NULL;
38char *Pkgdeps = NULL; 38char *Pkgdeps = NULL;
39char *BuildPkgdeps = NULL; 39char *BuildPkgdeps = NULL;
40char *Pkgcfl = NULL; 40char *Pkgcfl = NULL;
41char *BuildVersion = NULL; 41char *BuildVersion = NULL;
42char *BuildInfo = NULL; 42char *BuildInfo = NULL;
43char *SizePkg = NULL; 43char *SizePkg = NULL;
44char *SizeAll = NULL; 44char *SizeAll = NULL;
45char *Preserve = NULL; 45char *Preserve = NULL;
46char *DefaultOwner = NULL; 46char *DefaultOwner = NULL;
47char *DefaultGroup = NULL; 47char *DefaultGroup = NULL;
48char *realprefix = NULL; 48char *realprefix = NULL;
49const char *CompressionType = NULL; 49const char *CompressionType = NULL;
50int update_pkgdb = 1; 50int update_pkgdb = 1;
51int create_views = 0; 
52int PlistOnly = 0; 51int PlistOnly = 0;
53int RelativeLinks = 0; 52int RelativeLinks = 0;
54Boolean File2Pkg = FALSE; 53Boolean File2Pkg = FALSE;
55 54
56static void 55static void
57usage(void) 56usage(void)
58{ 57{
59 fprintf(stderr, 58 fprintf(stderr,
60 "usage: pkg_create [-ElOUVv] [-B build-info-file] [-b build-version-file]\n" 59 "usage: pkg_create [-lOUVv] [-B build-info-file] [-b build-version-file]\n"
61 " [-C cpkgs] [-D displayfile] [-F compression] \n" 60 " [-C cpkgs] [-D displayfile] [-F compression] \n"
62 " [-I realprefix] [-i iscript]\n" 61 " [-I realprefix] [-i iscript]\n"
63 " [-K pkg_dbdir] [-k dscript]\n" 62 " [-K pkg_dbdir] [-k dscript]\n"
64 " [-n preserve-file] [-P dpkgs] [-p prefix] [-r rscript]\n" 63 " [-n preserve-file] [-P dpkgs] [-p prefix] [-r rscript]\n"
65 " [-S size-all-file] [-s size-pkg-file]\n" 64 " [-S size-all-file] [-s size-pkg-file]\n"
66 " [-T buildpkgs] [-u owner] [-g group]\n" 65 " [-T buildpkgs] [-u owner] [-g group]\n"
67 " -c comment -d description -f packlist\n" 66 " -c comment -d description -f packlist\n"
68 " pkg-name\n"); 67 " pkg-name\n");
69 exit(1); 68 exit(1);
70} 69}
71 70
72int 71int
73main(int argc, char **argv) 72main(int argc, char **argv)
74{ 73{
75 int ch; 74 int ch;
76 75
77 setprogname(argv[0]); 76 setprogname(argv[0]);
78 while ((ch = getopt(argc, argv, Options)) != -1) 77 while ((ch = getopt(argc, argv, Options)) != -1)
79 switch (ch) { 78 switch (ch) {
80 case 'v': 79 case 'v':
81 Verbose = TRUE; 80 Verbose = TRUE;
82 break; 81 break;
83 82
84 case 'E': 
85 create_views = 1; 
86 break; 
87 
88 case 'F': 83 case 'F':
89 CompressionType = optarg; 84 CompressionType = optarg;
90 break; 85 break;
91 86
92 case 'I': 87 case 'I':
93 realprefix = optarg; 88 realprefix = optarg;
94 break; 89 break;
95 90
96 case 'O': 91 case 'O':
97 PlistOnly = 1; 92 PlistOnly = 1;
98 break; 93 break;
99 94
100 case 'U': 95 case 'U':

cvs diff -r1.25 -r1.26 pkgsrc/pkgtools/pkg_install/files/create/pkg_create.1 (expand / switch to unified diff)

--- pkgsrc/pkgtools/pkg_install/files/create/pkg_create.1 2010/04/20 00:39:13 1.25
+++ pkgsrc/pkgtools/pkg_install/files/create/pkg_create.1 2014/12/30 15:13:20 1.26
@@ -1,111 +1,69 @@ @@ -1,111 +1,69 @@
1.\" $NetBSD: pkg_create.1,v 1.25 2010/04/20 00:39:13 joerg Exp $ 1.\" $NetBSD: pkg_create.1,v 1.26 2014/12/30 15:13:20 wiz Exp $
2.\" 2.\"
3.\" FreeBSD install - a package for the installation and maintenance 3.\" FreeBSD install - a package for the installation and maintenance
4.\" of non-core utilities. 4.\" of non-core utilities.
5.\" 5.\"
6.\" Redistribution and use in source and binary forms, with or without 6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions 7.\" modification, are permitted provided that the following conditions
8.\" are met: 8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright 9.\" 1. Redistributions of source code must retain the above copyright
10.\" notice, this list of conditions and the following disclaimer. 10.\" notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\" notice, this list of conditions and the following disclaimer in the 12.\" notice, this list of conditions and the following disclaimer in the
13.\" documentation and/or other materials provided with the distribution. 13.\" documentation and/or other materials provided with the distribution.
14.\" 14.\"
15.\" Jordan K. Hubbard 15.\" Jordan K. Hubbard
16.\" 16.\"
17.\" 17.\"
18.\" @(#)pkg_create.1 18.\" @(#)pkg_create.1
19.\" from FreeBSD Id: pkg_create.1,v 1.19 1997/05/02 22:00:05 max Exp 19.\" from FreeBSD Id: pkg_create.1,v 1.19 1997/05/02 22:00:05 max Exp
20.\" 20.\"
21.\" hacked up by John Kohl for NetBSD--fixed a few bugs, extended keywords, 21.\" hacked up by John Kohl for NetBSD--fixed a few bugs, extended keywords,
22.\" added dependency tracking, etc. 22.\" added dependency tracking, etc.
23.\" 23.\"
24.\" [jkh] Took John's changes back and made some additional extensions for 24.\" [jkh] Took John's changes back and made some additional extensions for
25.\" better integration with FreeBSD's new ports collection. 25.\" better integration with FreeBSD's new ports collection.
26.\" 26.\"
27.Dd January 20, 2010 27.Dd December 27, 2014
28.Dt PKG_CREATE 1 28.Dt PKG_CREATE 1
29.Os 29.Os
30.Sh NAME 30.Sh NAME
31.Nm pkg_create 31.Nm pkg_create
32.Nd a utility for creating software package distributions 32.Nd a utility for creating software package distributions
33.Sh SYNOPSIS 33.Sh SYNOPSIS
34.Nm 34.Nm
35.Op Fl ElOUVv 35.Op Fl lOUVv
36.Bk -words 
37.Op Fl B Ar build-info-file 36.Op Fl B Ar build-info-file
38.Ek 
39.Bk -words 
40.Op Fl b Ar build-version-file 37.Op Fl b Ar build-version-file
41.Ek 
42.Bk -words 
43.Op Fl C Ar cpkgs 38.Op Fl C Ar cpkgs
44.Ek 
45.Bk -words 
46.Op Fl D Ar displayfile 39.Op Fl D Ar displayfile
47.Ek 
48.Bk -words 
49.Op Fl F Ar compression 40.Op Fl F Ar compression
50.Ek 
51.Bk -words 
52.Op Fl g Ar group 41.Op Fl g Ar group
53.Ek 
54.Bk -words 
55.Op Fl I Ar realprefix 42.Op Fl I Ar realprefix
56.Ek 
57.Bk -words 
58.Op Fl i Ar iscript 43.Op Fl i Ar iscript
59.Ek 
60.Bk -words 
61.Op Fl K Ar pkg_dbdir 44.Op Fl K Ar pkg_dbdir
62.Ek 
63.Bk -words 
64.Op Fl k Ar dscript 45.Op Fl k Ar dscript
65.Ek 
66.Bk -words 
67.Op Fl n Ar preserve-file 46.Op Fl n Ar preserve-file
68.Ek 
69.Bk -words 
70.Op Fl P Ar dpkgs 47.Op Fl P Ar dpkgs
71.Ek 
72.Bk -words 
73.Op Fl T Ar buildpkgs 
74.Ek 
75.Bk -words 
76.Op Fl p Ar prefix 48.Op Fl p Ar prefix
77.Ek 
78.Bk -words 
79.Op Fl S Ar size-all-file 49.Op Fl S Ar size-all-file
80.Ek 
81.Bk -words 
82.Op Fl s Ar size-pkg-file 50.Op Fl s Ar size-pkg-file
83.Ek 51.Op Fl T Ar buildpkgs
84.Bk -words 
85.Op Fl t Ar template 52.Op Fl t Ar template
86.Ek 
87.Bk -words 
88.Op Fl u Ar owner 53.Op Fl u Ar owner
89.Ek 
90.Bk -words 
91.Fl c Ar comment 54.Fl c Ar comment
92.Ek 
93.Bk -words 
94.Fl d Ar description 55.Fl d Ar description
95.Ek 
96.Bk -words 
97.Fl f Ar packlist 56.Fl f Ar packlist
98.Ek 
99.Ar pkg-name 57.Ar pkg-name
100.Sh DESCRIPTION 58.Sh DESCRIPTION
101The 59The
102.Nm 60.Nm
103command is used to create packages that will subsequently be fed to 61command is used to create packages that will subsequently be fed to
104one of the package extraction/info utilities. 62one of the package extraction/info utilities.
105The input description and command line arguments for the creation of a 63The input description and command line arguments for the creation of a
106package are not really meant to be human-generated, though it is easy 64package are not really meant to be human-generated, though it is easy
107enough to do so. 65enough to do so.
108It is more expected that you will use a front-end tool for 66It is more expected that you will use a front-end tool for
109the job rather than muddling through it yourself. 67the job rather than muddling through it yourself.
110Nonetheless, a short description of the input syntax is included in this 68Nonetheless, a short description of the input syntax is included in this
111document. 69document.
@@ -148,28 +106,26 @@ or, if preceded by @@ -148,28 +106,26 @@ or, if preceded by
148.Cm - , 106.Cm - ,
149the argument itself. 107the argument itself.
150This string should also give some idea of which version of the product 108This string should also give some idea of which version of the product
151(if any) the package represents. 109(if any) the package represents.
152.It Fl D Ar displayfile 110.It Fl D Ar displayfile
153Display the file after installing the package. 111Display the file after installing the package.
154Useful for things like legal notices on almost-free software, etc. 112Useful for things like legal notices on almost-free software, etc.
155.It Fl d Ar [-]desc 113.It Fl d Ar [-]desc
156Fetch long description for package from file 114Fetch long description for package from file
157.Ar desc 115.Ar desc
158or, if preceded by 116or, if preceded by
159.Cm - , 117.Cm - ,
160the argument itself. 118the argument itself.
161.It Fl E 
162Add an empty views file to the package. 
163.It Fl F Ar compression 119.It Fl F Ar compression
164Use 120Use
165.Ar compression 121.Ar compression
166as compression algorithm. 122as compression algorithm.
167This overrides the heuristic to guess the compression type from the 123This overrides the heuristic to guess the compression type from the
168output name. 124output name.
169Currently supported values are bzip2, gzip, none and xz. 125Currently supported values are bzip2, gzip, none and xz.
170.It Fl f Ar packlist 126.It Fl f Ar packlist
171Fetch 127Fetch
172.Pq packing list 128.Pq packing list
173for package from the file 129for package from the file
174.Ar packlist 130.Ar packlist
175or 131or

cvs diff -r1.30 -r1.31 pkgsrc/pkgtools/pkg_install/files/delete/pkg_delete.1 (expand / switch to unified diff)

--- pkgsrc/pkgtools/pkg_install/files/delete/pkg_delete.1 2010/02/25 06:56:23 1.30
+++ pkgsrc/pkgtools/pkg_install/files/delete/pkg_delete.1 2014/12/30 15:13:20 1.31
@@ -1,33 +1,33 @@ @@ -1,33 +1,33 @@
1.\" $NetBSD: pkg_delete.1,v 1.30 2010/02/25 06:56:23 wiz Exp $ 1.\" $NetBSD: pkg_delete.1,v 1.31 2014/12/30 15:13:20 wiz Exp $
2.\" 2.\"
3.\" FreeBSD install - a package for the installation and maintenance 3.\" FreeBSD install - a package for the installation and maintenance
4.\" of non-core utilities. 4.\" of non-core utilities.
5.\" 5.\"
6.\" Redistribution and use in source and binary forms, with or without 6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions 7.\" modification, are permitted provided that the following conditions
8.\" are met: 8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright 9.\" 1. Redistributions of source code must retain the above copyright
10.\" notice, this list of conditions and the following disclaimer. 10.\" notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\" notice, this list of conditions and the following disclaimer in the 12.\" notice, this list of conditions and the following disclaimer in the
13.\" documentation and/or other materials provided with the distribution. 13.\" documentation and/or other materials provided with the distribution.
14.\" 14.\"
15.\" Jordan K. Hubbard 15.\" Jordan K. Hubbard
16.\" 16.\"
17.\" 17.\"
18.\" from FreeBSD: @(#)pkg_delete.1 18.\" from FreeBSD: @(#)pkg_delete.1
19.\" 19.\"
20.Dd January 20, 2010 20.Dd December 27, 2014
21.Dt PKG_DELETE 1 21.Dt PKG_DELETE 1
22.Os 22.Os
23.Sh NAME 23.Sh NAME
24.Nm pkg_delete 24.Nm pkg_delete
25.Nd a utility for deleting previously installed software package distributions 25.Nd a utility for deleting previously installed software package distributions
26.Sh SYNOPSIS 26.Sh SYNOPSIS
27.Nm 27.Nm
28.Op Fl ADFfkNnORrVv 28.Op Fl ADFfkNnORrVv
29.Op Fl K Ar pkg_dbdir 29.Op Fl K Ar pkg_dbdir
30.Op Fl P Ar destdir 30.Op Fl P Ar destdir
31.Op Fl p Ar prefix 31.Op Fl p Ar prefix
32.Ar pkg-name ... 32.Ar pkg-name ...
33.Sh DESCRIPTION 33.Sh DESCRIPTION
@@ -211,44 +211,37 @@ If a @@ -211,44 +211,37 @@ If a
211.Cm deinstall 211.Cm deinstall
212script exists for the package, it is executed before and after 212script exists for the package, it is executed before and after
213any files are removed. 213any files are removed.
214It is this script's responsibility to clean up any additional messy details 214It is this script's responsibility to clean up any additional messy details
215around the package's installation, since all 215around the package's installation, since all
216.Nm 216.Nm
217knows how to do is delete the files created in the original distribution. 217knows how to do is delete the files created in the original distribution.
218The 218The
219.Ic deinstall 219.Ic deinstall
220script is called as: 220script is called as:
221.Bd -filled -offset indent -compact 221.Bd -filled -offset indent -compact
222.Cm deinstall 222.Cm deinstall
223.Aq Ar pkg-name 223.Aq Ar pkg-name
224.Ar VIEW-DEINSTALL 
225.Ed 
226before removing the package from a view, and as: 
227.Bd -filled -offset indent -compact 
228.Cm deinstall 
229.Aq Ar pkg-name 
230.Ar DEINSTALL 224.Ar DEINSTALL
231.Ed 225.Ed
232before deleting all files and as: 226before deleting all files and as:
233.Bd -filled -offset indent -compact 227.Bd -filled -offset indent -compact
234.Cm deinstall 228.Cm deinstall
235.Aq Ar pkg-name 229.Aq Ar pkg-name
236.Ar POST-DEINSTALL 230.Ar POST-DEINSTALL
237.Ed 231.Ed
238after deleting them. 232after deleting them.
239Passing the keywords 233Passing the keywords
240.Ar VIEW-DEINSTALL , 234.Ar DEINSTALL
241.Ar DEINSTALL , 
242and 235and
243.Ar POST-DEINSTALL 236.Ar POST-DEINSTALL
244lets you potentially write only one program/script that handles all 237lets you potentially write only one program/script that handles all
245aspects of installation and deletion. 238aspects of installation and deletion.
246.Pp 239.Pp
247All scripts are called with the environment variable 240All scripts are called with the environment variable
248.Ev PKG_PREFIX 241.Ev PKG_PREFIX
249set to the installation prefix (see the 242set to the installation prefix (see the
250.Fl p 243.Fl p
251option above). 244option above).
252This allows a package author to write a script 245This allows a package author to write a script
253that reliably performs some action on the directory where the package 246that reliably performs some action on the directory where the package
254is installed, even if the user might have changed it by specifying the 247is installed, even if the user might have changed it by specifying the

cvs diff -r1.12 -r1.13 pkgsrc/pkgtools/pkg_install/files/delete/pkg_delete.c (expand / switch to unified diff)

--- pkgsrc/pkgtools/pkg_install/files/delete/pkg_delete.c 2011/09/29 23:30:21 1.12
+++ pkgsrc/pkgtools/pkg_install/files/delete/pkg_delete.c 2014/12/30 15:13:20 1.13
@@ -24,27 +24,27 @@ @@ -24,27 +24,27 @@
24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
25 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 25 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 26 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
27 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 * SUCH DAMAGE. 28 * SUCH DAMAGE.
29 */ 29 */
30#if HAVE_CONFIG_H 30#if HAVE_CONFIG_H
31#include "config.h" 31#include "config.h"
32#endif 32#endif
33#include <nbcompat.h> 33#include <nbcompat.h>
34#if HAVE_SYS_CDEFS_H 34#if HAVE_SYS_CDEFS_H
35#include <sys/cdefs.h> 35#include <sys/cdefs.h>
36#endif 36#endif
37__RCSID("$NetBSD: pkg_delete.c,v 1.12 2011/09/29 23:30:21 wiz Exp $"); 37__RCSID("$NetBSD: pkg_delete.c,v 1.13 2014/12/30 15:13:20 wiz Exp $");
38 38
39#if HAVE_ERR_H 39#if HAVE_ERR_H
40#include <err.h> 40#include <err.h>
41#endif 41#endif
42#include <stdio.h> 42#include <stdio.h>
43#include <stdlib.h> 43#include <stdlib.h>
44 44
45#include "lib.h" 45#include "lib.h"
46 46
47static const char *pkgdb; 47static const char *pkgdb;
48static const char *destdir; 48static const char *destdir;
49static const char *prefix; 49static const char *prefix;
50 50
@@ -388,103 +388,49 @@ find_preserve_pkgs(lpkg_head_t *pkgs) @@ -388,103 +388,49 @@ find_preserve_pkgs(lpkg_head_t *pkgs)
388 "for deletion:"); 388 "for deletion:");
389 found_preserve = 1; 389 found_preserve = 1;
390 fprintf(stderr, "\t%s\n", lpp->lp_name); 390 fprintf(stderr, "\t%s\n", lpp->lp_name);
391 } 391 }
392 if (!found_preserve) 392 if (!found_preserve)
393 return 0; 393 return 0;
394 if (Force == 0 || (!unregister_only && Force == 1)) 394 if (Force == 0 || (!unregister_only && Force == 1))
395 return 1; 395 return 1;
396 fprintf(stderr, "...but will delete them anyway\n"); 396 fprintf(stderr, "...but will delete them anyway\n");
397 return 0; 397 return 0;
398} 398}
399 399
400/* 400/*
401 * Remove package from view. This is calling pkg_deinstall again. 
402 */ 
403static int 
404remove_pkg_from_view(const char *pkg) 
405{ 
406 char line[MaxPathSize], *fname, *eol; 
407 FILE *fp; 
408 
409 fname = pkgdb_pkg_file(pkg, VIEWS_FNAME); 
410 if (isemptyfile(fname)) { 
411 free(fname); 
412 return 0; 
413 } 
414 if ((fp = fopen(fname, "r")) == NULL) { 
415 warn("Unable to open `%s', aborting", fname); 
416 free(fname); 
417 return 1; 
418 } 
419 free(fname); 
420 while (fgets(line, sizeof(line), fp) != NULL) { 
421 if ((eol = strrchr(line, '\n')) != NULL) 
422 *eol = '\0'; 
423 if (Verbose || Fake) 
424 printf("Deleting package `%s' instance from `%s' view\n", 
425 pkg, line); 
426 if (Fake) 
427 continue; 
428 if (fexec_skipempty(BINDIR "/pkg_delete", "-K", line, 
429 Fake ? "-n" : "", 
430 (Force > 1) ? "-f" : "", 
431 (Force > 0) ? "-f" : "", 
432 pkg, NULL) != 0) { 
433 warnx("Unable to delete package `%s' from view `%s'", 
434 pkg, line); 
435 fclose(fp); 
436 return 1; 
437 } 
438 } 
439 fclose(fp); 
440 return 0;  
441} 
442 
443/* 
444 * Run the +DEINSTALL script. Depending on whether this is 401 * Run the +DEINSTALL script. Depending on whether this is
445 * a depoted package and whether this pre- or post-deinstall phase, 402 * pre- or post-deinstall phase, different arguments are passed down.
446 * different arguments are passed down. 
447 */ 403 */
448static int 404static int
449run_deinstall_script(const char *pkg, int do_postdeinstall) 405run_deinstall_script(const char *pkg, int do_postdeinstall)
450{ 406{
451 const char *target, *text; 407 const char *target, *text;
452 char *fname, *fname2, *pkgdir; 408 char *fname, *pkgdir;
453 int rv; 409 int rv;
454 410
455 fname = pkgdb_pkg_file(pkg, DEINSTALL_FNAME); 411 fname = pkgdb_pkg_file(pkg, DEINSTALL_FNAME);
456 if (!fexists(fname)) { 412 if (!fexists(fname)) {
457 free(fname); 413 free(fname);
458 return 0; 414 return 0;
459 } 415 }
460 416
461 fname2 = pkgdb_pkg_file(pkg, DEPOT_FNAME); 417 if (do_postdeinstall) {
462 if (fexists(fname2)) { 
463 if (do_postdeinstall) { 
464 free(fname); 
465 free(fname2); 
466 return 0; 
467 } 
468 target = "VIEW-DEINSTALL"; 
469 text = "view deinstall"; 
470 } else if (do_postdeinstall) { 
471 target = "POST-DEINSTALL"; 418 target = "POST-DEINSTALL";
472 text = "post-deinstall"; 419 text = "post-deinstall";
473 } else { 420 } else {
474 target = "DEINSTALL"; 421 target = "DEINSTALL";
475 text = "deinstall"; 422 text = "deinstall";
476 } 423 }
477 free(fname2); 
478 424
479 if (Fake) { 425 if (Fake) {
480 printf("Would execute %s script with argument %s now\n", 426 printf("Would execute %s script with argument %s now\n",
481 text, target); 427 text, target);
482 free(fname); 428 free(fname);
483 return 0; 429 return 0;
484 } 430 }
485 431
486 pkgdir = pkgdb_pkg_dir(pkg); 432 pkgdir = pkgdb_pkg_dir(pkg);
487 if (chmod(fname, 0555)) 433 if (chmod(fname, 0555))
488 warn("chmod of `%s' failed", fname); 434 warn("chmod of `%s' failed", fname);
489 rv = fcexec(pkgdir, fname, pkg, target, NULL); 435 rv = fcexec(pkgdir, fname, pkg, target, NULL);
490 if (rv) 436 if (rv)
@@ -531,77 +477,26 @@ remove_line(const char *fname, const cha @@ -531,77 +477,26 @@ remove_line(const char *fname, const cha
531 } 477 }
532 478
533 if (rename(fname_tmp, fname) == -1) { 479 if (rename(fname_tmp, fname) == -1) {
534 warn("Unable to rename `%s' to `%s'", fname_tmp, fname); 480 warn("Unable to rename `%s' to `%s'", fname_tmp, fname);
535 rv = 1; 481 rv = 1;
536 } else 482 } else
537 rv = 0; 483 rv = 0;
538 remove(fname_tmp); 484 remove(fname_tmp);
539 485
540 return rv; 486 return rv;
541} 487}
542 488
543/* 489/*
544 * Unregister the package from the depot it is registered in. 
545 */ 
546static int 
547remove_pkg_from_depot(const char *pkg) 
548{ 
549 FILE *fp; 
550 char line[MaxPathSize], *eol; 
551 char *fname, *fname2; 
552 int rv; 
553 
554 fname = pkgdb_pkg_file(pkg, DEPOT_FNAME); 
555 if (isemptyfile(fname)) { 
556 free(fname); 
557 return 0; 
558 } 
559 
560 if (Verbose) 
561 printf("Attempting to remove the `%s' registration " 
562 "on package `%s'\n", fname, pkg); 
563 
564 if (Fake) { 
565 free(fname); 
566 return 1; 
567 } 
568 
569 if ((fp = fopen(fname, "r")) == NULL) { 
570 warn("Unable to open `%s' file", fname); 
571 free(fname); 
572 return 1; 
573 } 
574 if (fgets(line, sizeof(line), fp) == NULL) { 
575 fclose(fp); 
576 warnx("Empty depot file `%s'", fname); 
577 free(fname); 
578 return 1; 
579 } 
580 if ((eol = strrchr(line, '\n')) != NULL) 
581 *eol = '\0'; 
582 fclose(fp); 
583 free(fname); 
584 
585 fname = pkgdb_pkg_file(pkg, VIEWS_FNAME); 
586 fname2 = pkgdb_pkg_file(pkg, VIEWS_FNAME_TMP); 
587 rv = remove_line(fname, fname2, line); 
588 free(fname2); 
589 free(fname); 
590 
591 return rv; 
592} 
593 
594/* 
595 * remove_depend is used as iterator function below. 490 * remove_depend is used as iterator function below.
596 * The passed-in package name should be removed from the 491 * The passed-in package name should be removed from the
597 * +REQUIRED_BY list of the dependency. Such an entry 492 * +REQUIRED_BY list of the dependency. Such an entry
598 * can miss in a fully correct package database, if the pattern 493 * can miss in a fully correct package database, if the pattern
599 * matches more than one package. 494 * matches more than one package.
600 */ 495 */
601static int 496static int
602remove_depend(const char *cur_pkg, void *cookie) 497remove_depend(const char *cur_pkg, void *cookie)
603{ 498{
604 const char *pkg = cookie; 499 const char *pkg = cookie;
605 char *fname, *fname2; 500 char *fname, *fname2;
606 int rv; 501 int rv;
607 502
@@ -617,48 +512,39 @@ remove_depend(const char *cur_pkg, void  @@ -617,48 +512,39 @@ remove_depend(const char *cur_pkg, void
617 free(fname2); 512 free(fname2);
618 free(fname); 513 free(fname);
619 514
620 return rv; 515 return rv;
621} 516}
622 517
623static int 518static int
624remove_pkg(const char *pkg) 519remove_pkg(const char *pkg)
625{ 520{
626 FILE *fp; 521 FILE *fp;
627 char *fname, *pkgdir; 522 char *fname, *pkgdir;
628 package_t plist; 523 package_t plist;
629 plist_t *p; 524 plist_t *p;
630 int is_depoted_pkg, rv, late_error; 525 int rv, late_error;
631 526
632 if (pkgdb_update_only) 527 if (pkgdb_update_only)
633 return pkgdb_remove_pkg(pkg) ? 0 : 1; 528 return pkgdb_remove_pkg(pkg) ? 0 : 1;
634 529
635 fname = pkgdb_pkg_file(pkg, CONTENTS_FNAME); 530 fname = pkgdb_pkg_file(pkg, CONTENTS_FNAME);
636 if (!fexists(fname)) { 531 if (!fexists(fname)) {
637 warnx("package `%s' is not installed, `%s' missing", pkg, fname); 532 warnx("package `%s' is not installed, `%s' missing", pkg, fname);
638 free(fname); 533 free(fname);
639 return 1; 534 return 1;
640 } 535 }
641 free(fname); 536 free(fname);
642 537
643 /* +REQUIRED_BY and +PRESERVE already checked */ 
644 if (remove_pkg_from_view(pkg)) 
645 return 1; 
646 
647 /* 
648 * The views related code has bad error handling, if e.g. 
649 * the deinstall script fails, the package remains unregistered. 
650 */ 
651 
652 fname = pkgdb_pkg_file(pkg, CONTENTS_FNAME); 538 fname = pkgdb_pkg_file(pkg, CONTENTS_FNAME);
653 if ((fp = fopen(fname, "r")) == NULL) { 539 if ((fp = fopen(fname, "r")) == NULL) {
654 warnx("Failed to open `%s'", fname); 540 warnx("Failed to open `%s'", fname);
655 free(fname); 541 free(fname);
656 return 1; 542 return 1;
657 } 543 }
658 read_plist(&plist, fp); 544 read_plist(&plist, fp);
659 fclose(fp); 545 fclose(fp);
660 546
661 /* 547 /*
662 * If a prefix has been provided, remove the first @cwd and 548 * If a prefix has been provided, remove the first @cwd and
663 * prepend that prefix. This allows removing packages without 549 * prepend that prefix. This allows removing packages without
664 * @cwd if really necessary. pkg_admin rebuild is likely needed 550 * @cwd if really necessary. pkg_admin rebuild is likely needed
@@ -702,71 +588,55 @@ remove_pkg(const char *pkg) @@ -702,71 +588,55 @@ remove_pkg(const char *pkg)
702 * XXX but this is problematic for missing or changed files. 588 * XXX but this is problematic for missing or changed files.
703 * XXX At least the inability to remove files at all should 589 * XXX At least the inability to remove files at all should
704 * XXX be handled though. 590 * XXX be handled though.
705 */ 591 */
706 } 592 }
707 593
708 /* 594 /*
709 * Past the point of no return. Files are gone, all that is left 595 * Past the point of no return. Files are gone, all that is left
710 * is cleaning up registered dependencies and removing the meta data. 596 * is cleaning up registered dependencies and removing the meta data.
711 * Errors in the remaining part are counted, but don't stop the 597 * Errors in the remaining part are counted, but don't stop the
712 * processing. 598 * processing.
713 */ 599 */
714 600
715 fname = pkgdb_pkg_file(pkg, DEPOT_FNAME); 601 for (p = plist.head; p; p = p->next) {
716 if (fexists(fname)) { 602 if (p->type != PLIST_PKGDEP)
717 late_error |= remove_pkg_from_depot(pkg); 603 continue;
718 /* XXX error checking */ 604 if (Verbose)
719 } else { 605 printf("Attempting to remove dependency "
720 for (p = plist.head; p; p = p->next) { 606 "on package `%s'\n", p->name);
721 if (p->type != PLIST_PKGDEP) 607 if (Fake)
722 continue; 608 continue;
723 if (Verbose) 609 match_installed_pkgs(p->name, remove_depend,
724 printf("Attempting to remove dependency " 610 __UNCONST(pkg));
725 "on package `%s'\n", p->name); 
726 if (Fake) 
727 continue; 
728 match_installed_pkgs(p->name, remove_depend, 
729 __UNCONST(pkg)); 
730 } 
731 } 611 }
732 free(fname); 
733 612
734 free_plist(&plist); 613 free_plist(&plist);
735 614
736 if (!no_deinstall && !unregister_only) 615 if (!no_deinstall && !unregister_only)
737 late_error |= run_deinstall_script(pkg, 1); 616 late_error |= run_deinstall_script(pkg, 1);
738 617
739 fname = pkgdb_pkg_file(pkg, VIEWS_FNAME); 
740 if (fexists(fname)) 
741 is_depoted_pkg = TRUE; 
742 else 
743 is_depoted_pkg = FALSE; 
744 free(fname); 
745 
746 if (Fake) 618 if (Fake)
747 return 0; 619 return 0;
748 620
749 /* 621 /*
750 * Kill the pkgdb subdirectory. The files have been removed, so 622 * Kill the pkgdb subdirectory. The files have been removed, so
751 * this is way beyond the point of no return. 623 * this is way beyond the point of no return.
752 */ 624 */
753 pkgdir = pkgdb_pkg_dir(pkg); 625 pkgdir = pkgdb_pkg_dir(pkg);
754 (void) remove_files(pkgdir, "+*"); 626 (void) remove_files(pkgdir, "+*");
755 rv = 1; 627 rv = 1;
756 if (isemptydir(pkgdir)&& rmdir(pkgdir) == 0) 628 if (isemptydir(pkgdir)&& rmdir(pkgdir) == 0)
757 rv = 0; 629 rv = 0;
758 else if (is_depoted_pkg) 
759 warnx("Depot directory `%s' is not empty", pkgdir); 
760 else if (!Force) 630 else if (!Force)
761 warnx("Couldn't remove package directory in `%s'", pkgdir); 631 warnx("Couldn't remove package directory in `%s'", pkgdir);
762 else if (recursive_remove(pkgdir, 1)) 632 else if (recursive_remove(pkgdir, 1))
763 warn("Couldn't remove package directory `%s'", pkgdir); 633 warn("Couldn't remove package directory `%s'", pkgdir);
764 else 634 else
765 warnx("Package directory `%s' forcefully removed", pkgdir); 635 warnx("Package directory `%s' forcefully removed", pkgdir);
766 free(pkgdir); 636 free(pkgdir);
767 637
768 return rv | late_error; 638 return rv | late_error;
769} 639}
770 640
771int 641int
772main(int argc, char *argv[]) 642main(int argc, char *argv[])

cvs diff -r1.21 -r1.22 pkgsrc/pkgtools/pkg_install/files/info/info.h (expand / switch to unified diff)

--- pkgsrc/pkgtools/pkg_install/files/info/info.h 2009/09/11 18:00:13 1.21
+++ pkgsrc/pkgtools/pkg_install/files/info/info.h 2014/12/30 15:13:20 1.22
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: info.h,v 1.21 2009/09/11 18:00:13 joerg Exp $ */ 1/* $NetBSD: info.h,v 1.22 2014/12/30 15:13:20 wiz Exp $ */
2 2
3/* from FreeBSD Id: info.h,v 1.10 1997/02/22 16:09:40 peter Exp */ 3/* from FreeBSD Id: info.h,v 1.10 1997/02/22 16:09:40 peter Exp */
4 4
5/*- 5/*-
6 * Copyright (c) 2008 Joerg Sonnenberger <joerg@NetBSD.org>. 6 * Copyright (c) 2008 Joerg Sonnenberger <joerg@NetBSD.org>.
7 * All rights reserved. 7 * All rights reserved.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
11 * are met: 11 * are met:
12 * 12 *
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -58,27 +58,26 @@ struct pkg_meta { @@ -58,27 +58,26 @@ struct pkg_meta {
58 char *meta_contents; 58 char *meta_contents;
59 char *meta_comment; 59 char *meta_comment;
60 char *meta_desc; 60 char *meta_desc;
61 char *meta_mtree; 61 char *meta_mtree;
62 char *meta_build_version; 62 char *meta_build_version;
63 char *meta_build_info; 63 char *meta_build_info;
64 char *meta_size_pkg; 64 char *meta_size_pkg;
65 char *meta_size_all; 65 char *meta_size_all;
66 char *meta_required_by; 66 char *meta_required_by;
67 char *meta_display; 67 char *meta_display;
68 char *meta_install; 68 char *meta_install;
69 char *meta_deinstall; 69 char *meta_deinstall;
70 char *meta_preserve; 70 char *meta_preserve;
71 char *meta_views; 
72 char *meta_installed_info; 71 char *meta_installed_info;
73 int is_installed; 72 int is_installed;
74}; 73};
75 74
76#ifndef MAXINDEXSIZE 75#ifndef MAXINDEXSIZE
77#define MAXINDEXSIZE 60 76#define MAXINDEXSIZE 60
78#endif 77#endif
79 78
80#ifndef MAXNAMESIZE 79#ifndef MAXNAMESIZE
81#define MAXNAMESIZE 20 80#define MAXNAMESIZE 20
82#endif 81#endif
83 82
84#define SHOW_COMMENT 0x00001 83#define SHOW_COMMENT 0x00001

cvs diff -r1.61 -r1.62 pkgsrc/pkgtools/pkg_install/files/info/perform.c (expand / switch to unified diff)

--- pkgsrc/pkgtools/pkg_install/files/info/perform.c 2010/02/20 04:40:03 1.61
+++ pkgsrc/pkgtools/pkg_install/files/info/perform.c 2014/12/30 15:13:20 1.62
@@ -1,29 +1,29 @@ @@ -1,29 +1,29 @@
1/* $NetBSD: perform.c,v 1.61 2010/02/20 04:40:03 joerg Exp $ */ 1/* $NetBSD: perform.c,v 1.62 2014/12/30 15:13:20 wiz Exp $ */
2 2
3#if HAVE_CONFIG_H 3#if HAVE_CONFIG_H
4#include "config.h" 4#include "config.h"
5#endif 5#endif
6#include <nbcompat.h> 6#include <nbcompat.h>
7#if HAVE_SYS_CDEFS_H 7#if HAVE_SYS_CDEFS_H
8#include <sys/cdefs.h> 8#include <sys/cdefs.h>
9#endif 9#endif
10#if HAVE_SYS_QUEUE_H 10#if HAVE_SYS_QUEUE_H
11#include <sys/queue.h> 11#include <sys/queue.h>
12#endif 12#endif
13#if HAVE_SYS_WAIT_H 13#if HAVE_SYS_WAIT_H
14#include <sys/wait.h> 14#include <sys/wait.h>
15#endif 15#endif
16__RCSID("$NetBSD: perform.c,v 1.61 2010/02/20 04:40:03 joerg Exp $"); 16__RCSID("$NetBSD: perform.c,v 1.62 2014/12/30 15:13:20 wiz Exp $");
17 17
18/*- 18/*-
19 * Copyright (c) 2008 Joerg Sonnenberger <joerg@NetBSD.org>. 19 * Copyright (c) 2008 Joerg Sonnenberger <joerg@NetBSD.org>.
20 * All rights reserved. 20 * All rights reserved.
21 * 21 *
22 * Redistribution and use in source and binary forms, with or without 22 * Redistribution and use in source and binary forms, with or without
23 * modification, are permitted provided that the following conditions 23 * modification, are permitted provided that the following conditions
24 * are met: 24 * are met:
25 * 25 *
26 * 1. Redistributions of source code must retain the above copyright 26 * 1. Redistributions of source code must retain the above copyright
27 * notice, this list of conditions and the following disclaimer. 27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright 28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in 29 * notice, this list of conditions and the following disclaimer in
@@ -100,29 +100,28 @@ __RCSID("$NetBSD: perform.c,v 1.61 2010/ @@ -100,29 +100,28 @@ __RCSID("$NetBSD: perform.c,v 1.61 2010/
100 100
101#define LOAD_CONTENTS (1 << 0) 101#define LOAD_CONTENTS (1 << 0)
102#define LOAD_COMMENT (1 << 1) 102#define LOAD_COMMENT (1 << 1)
103#define LOAD_DESC (1 << 2) 103#define LOAD_DESC (1 << 2)
104#define LOAD_INSTALL (1 << 3) 104#define LOAD_INSTALL (1 << 3)
105#define LOAD_DEINSTALL (1 << 4) 105#define LOAD_DEINSTALL (1 << 4)
106#define LOAD_DISPLAY (1 << 5) 106#define LOAD_DISPLAY (1 << 5)
107#define LOAD_MTREE (1 << 6) 107#define LOAD_MTREE (1 << 6)
108#define LOAD_BUILD_VERSION (1 << 7) 108#define LOAD_BUILD_VERSION (1 << 7)
109#define LOAD_BUILD_INFO (1 << 8) 109#define LOAD_BUILD_INFO (1 << 8)
110#define LOAD_SIZE_PKG (1 << 9) 110#define LOAD_SIZE_PKG (1 << 9)
111#define LOAD_SIZE_ALL (1 << 10) 111#define LOAD_SIZE_ALL (1 << 10)
112#define LOAD_PRESERVE (1 << 11) 112#define LOAD_PRESERVE (1 << 11)
113#define LOAD_VIEWS (1 << 12) 113#define LOAD_REQUIRED_BY (1 << 12)
114#define LOAD_REQUIRED_BY (1 << 13) 114#define LOAD_INSTALLED_INFO (1 << 13)
115#define LOAD_INSTALLED_INFO (1 << 14) 
116 115
117static const struct pkg_meta_desc { 116static const struct pkg_meta_desc {
118 size_t entry_offset; 117 size_t entry_offset;
119 const char *entry_filename; 118 const char *entry_filename;
120 int entry_mask; 119 int entry_mask;
121 int required_file; 120 int required_file;
122} pkg_meta_descriptors[] = { 121} pkg_meta_descriptors[] = {
123 { offsetof(struct pkg_meta, meta_contents), CONTENTS_FNAME, 122 { offsetof(struct pkg_meta, meta_contents), CONTENTS_FNAME,
124 LOAD_CONTENTS, 1}, 123 LOAD_CONTENTS, 1},
125 { offsetof(struct pkg_meta, meta_comment), COMMENT_FNAME, 124 { offsetof(struct pkg_meta, meta_comment), COMMENT_FNAME,
126 LOAD_COMMENT, 1 }, 125 LOAD_COMMENT, 1 },
127 { offsetof(struct pkg_meta, meta_desc), DESC_FNAME, 126 { offsetof(struct pkg_meta, meta_desc), DESC_FNAME,
128 LOAD_DESC, 1 }, 127 LOAD_DESC, 1 },
@@ -134,28 +133,26 @@ static const struct pkg_meta_desc { @@ -134,28 +133,26 @@ static const struct pkg_meta_desc {
134 LOAD_DISPLAY, 0 }, 133 LOAD_DISPLAY, 0 },
135 { offsetof(struct pkg_meta, meta_mtree), MTREE_FNAME, 134 { offsetof(struct pkg_meta, meta_mtree), MTREE_FNAME,
136 LOAD_MTREE, 0 }, 135 LOAD_MTREE, 0 },
137 { offsetof(struct pkg_meta, meta_build_version), BUILD_VERSION_FNAME, 136 { offsetof(struct pkg_meta, meta_build_version), BUILD_VERSION_FNAME,
138 LOAD_BUILD_VERSION, 0 }, 137 LOAD_BUILD_VERSION, 0 },
139 { offsetof(struct pkg_meta, meta_build_info), BUILD_INFO_FNAME, 138 { offsetof(struct pkg_meta, meta_build_info), BUILD_INFO_FNAME,
140 LOAD_BUILD_INFO, 0 }, 139 LOAD_BUILD_INFO, 0 },
141 { offsetof(struct pkg_meta, meta_size_pkg), SIZE_PKG_FNAME, 140 { offsetof(struct pkg_meta, meta_size_pkg), SIZE_PKG_FNAME,
142 LOAD_SIZE_PKG, 0 }, 141 LOAD_SIZE_PKG, 0 },
143 { offsetof(struct pkg_meta, meta_size_all), SIZE_ALL_FNAME, 142 { offsetof(struct pkg_meta, meta_size_all), SIZE_ALL_FNAME,
144 LOAD_SIZE_ALL, 0 }, 143 LOAD_SIZE_ALL, 0 },
145 { offsetof(struct pkg_meta, meta_preserve), PRESERVE_FNAME, 144 { offsetof(struct pkg_meta, meta_preserve), PRESERVE_FNAME,
146 LOAD_PRESERVE, 0 }, 145 LOAD_PRESERVE, 0 },
147 { offsetof(struct pkg_meta, meta_views), VIEWS_FNAME, 
148 LOAD_VIEWS, 0 }, 
149 { offsetof(struct pkg_meta, meta_required_by), REQUIRED_BY_FNAME, 146 { offsetof(struct pkg_meta, meta_required_by), REQUIRED_BY_FNAME,
150 LOAD_REQUIRED_BY, 0 }, 147 LOAD_REQUIRED_BY, 0 },
151 { offsetof(struct pkg_meta, meta_installed_info), INSTALLED_INFO_FNAME, 148 { offsetof(struct pkg_meta, meta_installed_info), INSTALLED_INFO_FNAME,
152 LOAD_INSTALLED_INFO, 0 }, 149 LOAD_INSTALLED_INFO, 0 },
153 { 0, NULL, 0, 0 }, 150 { 0, NULL, 0, 0 },
154}; 151};
155 152
156static int desired_meta_data; 153static int desired_meta_data;
157 154
158static void 155static void
159free_pkg_meta(struct pkg_meta *meta) 156free_pkg_meta(struct pkg_meta *meta)
160{ 157{
161 const struct pkg_meta_desc *descr; 158 const struct pkg_meta_desc *descr;

cvs diff -r1.64 -r1.65 pkgsrc/pkgtools/pkg_install/files/lib/lib.h (expand / switch to unified diff)

--- pkgsrc/pkgtools/pkg_install/files/lib/lib.h 2010/06/16 23:02:49 1.64
+++ pkgsrc/pkgtools/pkg_install/files/lib/lib.h 2014/12/30 15:13:21 1.65
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: lib.h,v 1.64 2010/06/16 23:02:49 joerg Exp $ */ 1/* $NetBSD: lib.h,v 1.65 2014/12/30 15:13:21 wiz Exp $ */
2 2
3/* from FreeBSD Id: lib.h,v 1.25 1997/10/08 07:48:03 charnier Exp */ 3/* from FreeBSD Id: lib.h,v 1.25 1997/10/08 07:48:03 charnier Exp */
4 4
5/* 5/*
6 * FreeBSD install - a package for the installation and maintainance 6 * FreeBSD install - a package for the installation and maintainance
7 * of non-core utilities. 7 * of non-core utilities.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
11 * are met: 11 * are met:
12 * 1. Redistributions of source code must retain the above copyright 12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer. 13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright 14 * 2. Redistributions in binary form must reproduce the above copyright
@@ -106,29 +106,26 @@ enum { @@ -106,29 +106,26 @@ enum {
106#define DESC_FNAME "+DESC" 106#define DESC_FNAME "+DESC"
107#define INSTALL_FNAME "+INSTALL" 107#define INSTALL_FNAME "+INSTALL"
108#define DEINSTALL_FNAME "+DEINSTALL" 108#define DEINSTALL_FNAME "+DEINSTALL"
109#define REQUIRED_BY_FNAME "+REQUIRED_BY" 109#define REQUIRED_BY_FNAME "+REQUIRED_BY"
110#define REQUIRED_BY_FNAME_TMP "+REQUIRED_BY.tmp" 110#define REQUIRED_BY_FNAME_TMP "+REQUIRED_BY.tmp"
111#define DISPLAY_FNAME "+DISPLAY" 111#define DISPLAY_FNAME "+DISPLAY"
112#define MTREE_FNAME "+MTREE_DIRS" 112#define MTREE_FNAME "+MTREE_DIRS"
113#define BUILD_VERSION_FNAME "+BUILD_VERSION" 113#define BUILD_VERSION_FNAME "+BUILD_VERSION"
114#define BUILD_INFO_FNAME "+BUILD_INFO" 114#define BUILD_INFO_FNAME "+BUILD_INFO"
115#define INSTALLED_INFO_FNAME "+INSTALLED_INFO" 115#define INSTALLED_INFO_FNAME "+INSTALLED_INFO"
116#define SIZE_PKG_FNAME "+SIZE_PKG" 116#define SIZE_PKG_FNAME "+SIZE_PKG"
117#define SIZE_ALL_FNAME "+SIZE_ALL" 117#define SIZE_ALL_FNAME "+SIZE_ALL"
118#define PRESERVE_FNAME "+PRESERVE" 118#define PRESERVE_FNAME "+PRESERVE"
119#define VIEWS_FNAME "+VIEWS" 
120#define VIEWS_FNAME_TMP "+VIEWS.tmp" 
121#define DEPOT_FNAME "+DEPOT" 
122 119
123/* The names of special variables */ 120/* The names of special variables */
124#define AUTOMATIC_VARNAME "automatic" 121#define AUTOMATIC_VARNAME "automatic"
125 122
126/* Prefix for extended PLIST cmd */ 123/* Prefix for extended PLIST cmd */
127#define CMD_CHAR '@'  124#define CMD_CHAR '@'
128 125
129/* The name of the "prefix" environment variable given to scripts */ 126/* The name of the "prefix" environment variable given to scripts */
130#define PKG_PREFIX_VNAME "PKG_PREFIX" 127#define PKG_PREFIX_VNAME "PKG_PREFIX"
131 128
132/* The name of the "destdir" environment variable given to scripts */ 129/* The name of the "destdir" environment variable given to scripts */
133#define PKG_DESTDIR_VNAME "PKG_DESTDIR" 130#define PKG_DESTDIR_VNAME "PKG_DESTDIR"
134 131
@@ -353,27 +350,26 @@ int pkgdb_store(const char *, const  @@ -353,27 +350,26 @@ int pkgdb_store(const char *, const
353char *pkgdb_retrieve(const char *); 350char *pkgdb_retrieve(const char *);
354int pkgdb_dump(void); 351int pkgdb_dump(void);
355int pkgdb_remove(const char *); 352int pkgdb_remove(const char *);
356int pkgdb_remove_pkg(const char *); 353int pkgdb_remove_pkg(const char *);
357char *pkgdb_refcount_dir(void); 354char *pkgdb_refcount_dir(void);
358char *pkgdb_get_database(void); 355char *pkgdb_get_database(void);
359const char *pkgdb_get_dir(void); 356const char *pkgdb_get_dir(void);
360/* 357/*
361 * Priorities: 358 * Priorities:
362 * 0 builtin default 359 * 0 builtin default
363 * 1 config file 360 * 1 config file
364 * 2 environment 361 * 2 environment
365 * 3 command line 362 * 3 command line
366 * 4 destdir/views reset 
367 */ 363 */
368void pkgdb_set_dir(const char *, int); 364void pkgdb_set_dir(const char *, int);
369char *pkgdb_pkg_dir(const char *); 365char *pkgdb_pkg_dir(const char *);
370char *pkgdb_pkg_file(const char *, const char *); 366char *pkgdb_pkg_file(const char *, const char *);
371 367
372/* List of packages functions */ 368/* List of packages functions */
373lpkg_t *alloc_lpkg(const char *); 369lpkg_t *alloc_lpkg(const char *);
374lpkg_t *find_on_queue(lpkg_head_t *, const char *); 370lpkg_t *find_on_queue(lpkg_head_t *, const char *);
375void free_lpkg(lpkg_t *); 371void free_lpkg(lpkg_t *);
376 372
377/* Read pkg_vulnerabilities from file */ 373/* Read pkg_vulnerabilities from file */
378struct pkg_vulnerabilities *read_pkg_vulnerabilities_file(const char *, int, int); 374struct pkg_vulnerabilities *read_pkg_vulnerabilities_file(const char *, int, int);
379/* Read pkg_vulnerabilities from memory */ 375/* Read pkg_vulnerabilities from memory */

cvs diff -r1.166 -r1.167 pkgsrc/pkgtools/pkg_install/files/lib/version.h (expand / switch to unified diff)

--- pkgsrc/pkgtools/pkg_install/files/lib/version.h 2013/09/02 10:28:44 1.166
+++ pkgsrc/pkgtools/pkg_install/files/lib/version.h 2014/12/30 15:13:21 1.167
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: version.h,v 1.166 2013/09/02 10:28:44 jperkin Exp $ */ 1/* $NetBSD: version.h,v 1.167 2014/12/30 15:13:21 wiz Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2001 Thomas Klausner. All rights reserved. 4 * Copyright (c) 2001 Thomas Klausner. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright 11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the 12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution. 13 * documentation and/or other materials provided with the distribution.
14 * 14 *
@@ -17,16 +17,16 @@ @@ -17,16 +17,16 @@
17 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */ 25 */
26 26
27#ifndef _INST_LIB_VERSION_H_ 27#ifndef _INST_LIB_VERSION_H_
28#define _INST_LIB_VERSION_H_ 28#define _INST_LIB_VERSION_H_
29 29
30#define PKGTOOLS_VERSION 20130902 30#define PKGTOOLS_VERSION 20141227
31 31
32#endif /* _INST_LIB_VERSION_H_ */ 32#endif /* _INST_LIB_VERSION_H_ */

File Deleted: pkgsrc/pkgtools/pkg_install/files/view/Attic/Makefile.in

File Deleted: pkgsrc/pkgtools/pkg_install/files/view/Attic/linkfarm.1

File Deleted: pkgsrc/pkgtools/pkg_install/files/view/Attic/linkfarm.cat1

File Deleted: pkgsrc/pkgtools/pkg_install/files/view/Attic/pkg_view.sh.in

File Deleted: pkgsrc/pkgtools/pkg_install/files/view/Attic/linkfarm.sh.in

File Deleted: pkgsrc/pkgtools/pkg_install/files/view/Attic/pkg_view.1

cvs diff -r1.58 -r1.59 pkgsrc/pkgtools/x11-links/buildlink3.mk (expand / switch to unified diff)

--- pkgsrc/pkgtools/x11-links/buildlink3.mk 2014/06/14 21:06:52 1.58
+++ pkgsrc/pkgtools/x11-links/buildlink3.mk 2014/12/30 15:13:21 1.59
@@ -1,31 +1,31 @@ @@ -1,31 +1,31 @@
1# $NetBSD: buildlink3.mk,v 1.58 2014/06/14 21:06:52 jperkin Exp $ 1# $NetBSD: buildlink3.mk,v 1.59 2014/12/30 15:13:21 wiz Exp $
2# 2#
3# Don't include this file manually! It will be included as necessary 3# Don't include this file manually! It will be included as necessary
4# by bsd.buildlink3.mk. 4# by bsd.buildlink3.mk.
5 5
6# x11-links is sorted first in mk/buildlink3/bsd.buildlink3.mk, 6# x11-links is sorted first in mk/buildlink3/bsd.buildlink3.mk,
7# so that symlinks created from it can be overriden by other packages. 7# so that symlinks created from it can be overriden by other packages.
8# 8#
9 9
10BUILDLINK_TREE+= x11-links 10BUILDLINK_TREE+= x11-links
11 11
12.if !defined(X11_LINKS_BUILDLINK3_MK) 12.if !defined(X11_LINKS_BUILDLINK3_MK)
13X11_LINKS_BUILDLINK3_MK:= 13X11_LINKS_BUILDLINK3_MK:=
14 14
15BUILDLINK_API_DEPENDS.x11-links+= x11-links>=0.91 15BUILDLINK_API_DEPENDS.x11-links+= x11-links>=0.91
16BUILDLINK_PKGSRCDIR.x11-links?= ../../pkgtools/x11-links 16BUILDLINK_PKGSRCDIR.x11-links?= ../../pkgtools/x11-links
17BUILDLINK_DEPMETHOD.x11-links?= build 17BUILDLINK_DEPMETHOD.x11-links?= build
18 18
19# Force all of the helper programs, headers and libraries to be symlinked 19# Force all of the helper programs, headers and libraries to be symlinked
20# into ${BUILDLINK_X11_DIR}, even in the "pkgviews" case. 20# into ${BUILDLINK_X11_DIR}.
21# 21#
22BUILDLINK_CONTENTS_FILTER.x11-links= \ 22BUILDLINK_CONTENTS_FILTER.x11-links= \
23 ${EGREP} '(bin/.*|include.*/|\.h$$|\.pc$$|/lib[^/]*$$)' 23 ${EGREP} '(bin/.*|include.*/|\.h$$|\.pc$$|/lib[^/]*$$)'
24 24
25# Rename the symlinks so that they appear in ${BUILDLINK_X11_DIR}/include 25# Rename the symlinks so that they appear in ${BUILDLINK_X11_DIR}/include
26# and ${BUILDLINK_X11_DIR}/lib. 26# and ${BUILDLINK_X11_DIR}/lib.
27# 27#
28BUILDLINK_FNAME_TRANSFORM.x11-links+= -e "s|/share/x11-links/|/|" 28BUILDLINK_FNAME_TRANSFORM.x11-links+= -e "s|/share/x11-links/|/|"
29.endif # X11_LINKS_BUILDLINK3_MK 29.endif # X11_LINKS_BUILDLINK3_MK
30 30
31BUILDLINK_TREE+= -x11-links 31BUILDLINK_TREE+= -x11-links

cvs diff -r1.20 -r1.21 pkgsrc/security/nikto/Makefile (expand / switch to unified diff)

--- pkgsrc/security/nikto/Makefile 2014/05/29 23:37:20 1.20
+++ pkgsrc/security/nikto/Makefile 2014/12/30 15:13:21 1.21
@@ -1,34 +1,31 @@ @@ -1,34 +1,31 @@
1# $NetBSD: Makefile,v 1.20 2014/05/29 23:37:20 wiz Exp $ 1# $NetBSD: Makefile,v 1.21 2014/12/30 15:13:21 wiz Exp $
2 2
3DISTNAME= nikto-1.36 3DISTNAME= nikto-1.36
4PKGREVISION= 3 4PKGREVISION= 3
5CATEGORIES= security www 5CATEGORIES= security www
6MASTER_SITES= http://www.cirt.net/nikto/ 6MASTER_SITES= http://www.cirt.net/nikto/
7 7
8MAINTAINER= pkgsrc-users@NetBSD.org 8MAINTAINER= pkgsrc-users@NetBSD.org
9HOMEPAGE= http://www.cirt.net/code/nikto.shtml 9HOMEPAGE= http://www.cirt.net/code/nikto.shtml
10COMMENT= URL scanner used to search for known vulnerable CGIs on websites 10COMMENT= URL scanner used to search for known vulnerable CGIs on websites
11 11
12DEPENDS+= p5-Net-SSLeay>=1.20:../../security/p5-Net-SSLeay 12DEPENDS+= p5-Net-SSLeay>=1.20:../../security/p5-Net-SSLeay
13DEPENDS+= nmap>=2.00:../../net/nmap 13DEPENDS+= nmap>=2.00:../../net/nmap
14 14
15USE_TOOLS+= perl:run 15USE_TOOLS+= perl:run
16REPLACE_PERL= nikto.pl 16REPLACE_PERL= nikto.pl
17NO_BUILD= YES 17NO_BUILD= YES
18 18
19# NOTE: this package will not work with pkgviews due to a hardcoded 
20# location for nmap. 
21# 
22SUBST_CLASSES+= conf 19SUBST_CLASSES+= conf
23SUBST_STAGE.conf= post-patch 20SUBST_STAGE.conf= post-patch
24SUBST_FILES.conf= config.txt 21SUBST_FILES.conf= config.txt
25SUBST_SED.conf= -e "s|@PREFIX@|${PREFIX}|g" 22SUBST_SED.conf= -e "s|@PREFIX@|${PREFIX}|g"
26SUBST_MESSAGE.conf= Fixing PREFIX in files. 23SUBST_MESSAGE.conf= Fixing PREFIX in files.
27 24
28CONF_FILES= ${PREFIX}/share/examples/nikto/config.txt \ 25CONF_FILES= ${PREFIX}/share/examples/nikto/config.txt \
29 ${PREFIX}/share/nikto/config.txt 26 ${PREFIX}/share/nikto/config.txt
30 27
31INSTALLATION_DIRS= bin libdata/nikto/docs libdata/nikto/plugins \ 28INSTALLATION_DIRS= bin libdata/nikto/docs libdata/nikto/plugins \
32 share/doc/nikto share/examples/nikto share/nikto 29 share/doc/nikto share/examples/nikto share/nikto
33 30
34do-install: 31do-install: