Tue Mar 26 15:09:35 2013 UTC ()
Subst paths for both test and install.

In the configure stage, tell pkglint to find *.map in ${FILESDIR}.
That lets tests run even when pkglint isn't installed (which means
it also makes the tests less wrong when pkglint is installed!).

In the install stage, tell pkglint to find *.map under ${PREFIX},
as before (no functional change to the installed package).

Specify USE_TOOLS=perl to quell pkglint. :-)


(schmonz)
diff -r1.425 -r1.426 pkgsrc/pkgtools/pkglint/Makefile

cvs diff -r1.425 -r1.426 pkgsrc/pkgtools/pkglint/Makefile (expand / switch to unified diff)

--- pkgsrc/pkgtools/pkglint/Makefile 2013/03/26 15:08:28 1.425
+++ pkgsrc/pkgtools/pkglint/Makefile 2013/03/26 15:09:35 1.426
@@ -1,56 +1,61 @@ @@ -1,56 +1,61 @@
1# $NetBSD: Makefile,v 1.425 2013/03/26 15:08:28 schmonz Exp $ 1# $NetBSD: Makefile,v 1.426 2013/03/26 15:09:35 schmonz Exp $
2 2
3# Note: if you update the version number, please have a look at the 3# Note: if you update the version number, please have a look at the
4# changes between the CVS tag "pkglint_current" and HEAD. 4# changes between the CVS tag "pkglint_current" and HEAD.
5# After updating, please re-set the CVS tag to HEAD. 5# After updating, please re-set the CVS tag to HEAD.
6DISTNAME= pkglint-4.127 6DISTNAME= pkglint-4.127
7CATEGORIES= pkgtools 7CATEGORIES= pkgtools
8MASTER_SITES= # none 8MASTER_SITES= # none
9DISTFILES= # none 9DISTFILES= # none
10 10
11OWNER= wiz@NetBSD.org 11OWNER= wiz@NetBSD.org
12HOMEPAGE= http://www.NetBSD.org/docs/pkgsrc/ 12HOMEPAGE= http://www.NetBSD.org/docs/pkgsrc/
13COMMENT= Verifier for NetBSD packages 13COMMENT= Verifier for NetBSD packages
14 14
15DEPENDS+= p5-Digest-SHA1-[0-9]*:../../security/p5-Digest-SHA1 15DEPENDS+= p5-Digest-SHA1-[0-9]*:../../security/p5-Digest-SHA1
16DEPENDS+= p5-enum>=1.016:../../devel/p5-enum 16DEPENDS+= p5-enum>=1.016:../../devel/p5-enum
17DEPENDS+= p5-pkgsrc-Dewey>=1.0:../../pkgtools/p5-pkgsrc-Dewey 17DEPENDS+= p5-pkgsrc-Dewey>=1.0:../../pkgtools/p5-pkgsrc-Dewey
18 18
19BUILD_DEPENDS+= p5-Test-Trap-[0-9]*:../../devel/p5-Test-Trap 19BUILD_DEPENDS+= p5-Test-Trap-[0-9]*:../../devel/p5-Test-Trap
20 20
21PKG_INSTALLATION_TYPES= overwrite pkgviews 21PKG_INSTALLATION_TYPES= overwrite pkgviews
22 22
23WRKSRC= ${WRKDIR} 23WRKSRC= ${WRKDIR}
24NO_CHECKSUM= yes 24NO_CHECKSUM= yes
25USE_LANGUAGES= # none 25USE_LANGUAGES= # none
 26USE_TOOLS+= perl
26AUTO_MKDIRS= yes 27AUTO_MKDIRS= yes
27 28
28.include "../../mk/bsd.prefs.mk" 29.include "../../mk/bsd.prefs.mk"
29 30
30SUBST_CLASSES+= pkglint 31SUBST_CLASSES+= pkglint
31SUBST_STAGE.pkglint= post-configure 32SUBST_STAGE.pkglint= post-configure
32SUBST_FILES.pkglint+= build.pl pkglint.pl pkglint.t plist-clash.pl 33SUBST_FILES.pkglint+= build.pl pkglint.pl pkglint.t plist-clash.pl
33.if defined(BATCH) 34.if defined(BATCH)
34SUBST_SED.pkglint+= -e s\|@PKGSRCDIR@\|/usr/pkgsrc\|g 35SUBST_SED.pkglint+= -e s\|@PKGSRCDIR@\|/usr/pkgsrc\|g
35.else 36.else
36SUBST_SED.pkglint+= -e s\|@PKGSRCDIR@\|${PKGSRCDIR}\|g 37SUBST_SED.pkglint+= -e s\|@PKGSRCDIR@\|${PKGSRCDIR}\|g
37.endif 38.endif
38SUBST_SED.pkglint+= -e s\|@PREFIX@\|${PREFIX}\|g 39SUBST_SED.pkglint+= -e s\|@PREFIX@\|${PREFIX}\|g
39SUBST_SED.pkglint+= -e s\|@DISTVER@\|${DISTNAME:S/pkglint-//}\|g 40SUBST_SED.pkglint+= -e s\|@DISTVER@\|${DISTNAME:S/pkglint-//}\|g
40SUBST_SED.pkglint+= -e s\|@MAKE@\|${MAKE:Q}\|g 41SUBST_SED.pkglint+= -e s\|@MAKE@\|${MAKE:Q}\|g
41SUBST_SED.pkglint+= -e s\|@PERL@\|${PERL5:Q}\|g 42SUBST_SED.pkglint+= -e s\|@PERL@\|${PERL5:Q}\|g
42SUBST_SED.pkglint+= -e s\|@DATADIR@\|${PREFIX}/share/pkglint\|g 43SUBST_SED.pkglint+= -e s\|@DATADIR@\|${FILESDIR}\|g
43#SUBST_SED.pkglint+= -e s\|@DATADIR@\|/usr/pkgsrc/pkgtools/pkglint/files\|g 44
 45SUBST_CLASSES+= mappaths
 46SUBST_STAGE.mappaths= pre-install
 47SUBST_FILES.mappaths+= pkglint.pl
 48SUBST_SED.mappaths+= -e s\|${FILESDIR}\|${PREFIX}/share/pkglint\|g
44 49
45# Note: This target is only intended for use by the pkglint author. 50# Note: This target is only intended for use by the pkglint author.
46.PHONY: quick-install 51.PHONY: quick-install
47quick-install: 52quick-install:
48 ${RM} -rf ${WRKSRC} 53 ${RM} -rf ${WRKSRC}
49 ${MKDIR} ${WRKSRC} 54 ${MKDIR} ${WRKSRC}
50 ${MAKE} do-extract subst-pkglint do-build do-install selftest clean 55 ${MAKE} do-extract subst-pkglint do-build do-install selftest clean
51 56
52do-extract: 57do-extract:
53 cd ${FILESDIR} && ${CP} build.pl pkglint.0 pkglint.1 pkglint.pl pkglint.t plist-clash.pl ${WRKSRC} 58 cd ${FILESDIR} && ${CP} build.pl pkglint.0 pkglint.1 pkglint.pl pkglint.t plist-clash.pl ${WRKSRC}
54 mkdir ${WRKSRC}/PkgLint 59 mkdir ${WRKSRC}/PkgLint
55 cd ${FILESDIR} && ${CP} PkgLint/*.pm ${WRKSRC}/PkgLint 60 cd ${FILESDIR} && ${CP} PkgLint/*.pm ${WRKSRC}/PkgLint
56 61