Subject: Re: pkgtools and PKG_TOOLS_PREFIX
To: None <tech-pkg@netbsd.org>
From: Joerg Sonnenberger <joerg@britannica.bec.de>
List: tech-pkg
Date: 07/10/2007 00:43:26
--gBBFr7Ir9EOA20Yy
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Wed, Jul 04, 2007 at 05:16:57PM +0000, Johnny C. Lam wrote:
> Could you prepare and post a patch for this change for review?

Attached.

Joerg

--gBBFr7Ir9EOA20Yy
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="pkg_tools_prefix.diff"

Index: mtree/Makefile
===================================================================
RCS file: /home/joerg/repo/netbsd/pkgsrc/pkgtools/mtree/Makefile,v
retrieving revision 1.21
diff -u -r1.21 Makefile
--- mtree/Makefile	12 Apr 2007 14:36:40 -0000	1.21
+++ mtree/Makefile	9 Jul 2007 22:40:25 -0000
@@ -9,16 +9,5 @@
 
 NO_PKGTOOLS_REQD_CHECK=	# defined
 
-PKG_TOOLS_PREFIX=	${PKG_TOOLS_BIN:C|/[^/]?bin$||}
-
-# XXX This breaks for those who set their own LOCALBASE to "/usr" and also
-# XXX set PKGMANDIR to be other than "share/man".
-# XXX
-.if !empty(PKG_TOOLS_PREFIX:M/usr)
-PKGMANDIR=		share/man
-.endif
-
 .include "../../pkgtools/libnbcompat/inplace.mk"
 .include "../../mk/bsd.pkg.mk"
-
-PREFIX:=	${PKG_TOOLS_PREFIX}
Index: pax/Makefile
===================================================================
RCS file: /home/joerg/repo/netbsd/pkgsrc/pkgtools/pax/Makefile,v
retrieving revision 1.14
diff -u -r1.14 Makefile
--- pax/Makefile	12 Apr 2007 14:36:40 -0000	1.14
+++ pax/Makefile	9 Jul 2007 22:40:18 -0000
@@ -9,16 +9,5 @@
 
 NO_PKGTOOLS_REQD_CHECK=	yes
 
-PKG_TOOLS_PREFIX=	${PKG_TOOLS_BIN:C|/[^/]?bin$||}
-
-# XXX This breaks for those who set their own LOCALBASE to "/usr" and also
-# XXX set PKGMANDIR to be other than "share/man".
-# XXX
-.if !empty(PKG_TOOLS_PREFIX:M/usr)
-PKGMANDIR=		share/man
-.endif
-
 .include "../../pkgtools/libnbcompat/inplace.mk"
 .include "../../mk/bsd.pkg.mk"
-
-PREFIX:=	${PKG_TOOLS_PREFIX}
Index: pkg_install/Makefile
===================================================================
RCS file: /home/joerg/repo/netbsd/pkgsrc/pkgtools/pkg_install/Makefile,v
retrieving revision 1.130
diff -u -r1.130 Makefile
--- pkg_install/Makefile	11 Mar 2007 22:05:03 -0000	1.130
+++ pkg_install/Makefile	9 Jul 2007 22:39:31 -0000
@@ -66,25 +66,9 @@
 
 .include "../../mk/bsd.prefs.mk"
 
-PKG_TOOLS_PREFIX=	${PKG_TOOLS_BIN:C|/[^/]?bin$||}
 VERSION!=		${AWK} -F '"' '/PKGTOOLS_VERSION/ {print $$2}' \
 			${FILESDIR}/lib/version.h
 
-# XXX This breaks for those who set their own LOCALBASE to "/usr" and also
-# XXX set PKGMANDIR to be other than "share/man".
-# XXX
-.if !empty(PKG_TOOLS_PREFIX:M/usr)
-PKGMANDIR=		share/man
-.endif
-
-# If ${PKG_TOOLS_PREFIX} doesn't match ${LOCALBASE}, then don't run
-# check-files since it's likely ${PKG_TOOLS_PREFIX} contains directories
-# that shouldn't be checked.
-#
-.if ${PKG_TOOLS_PREFIX} != ${LOCALBASE}
-CHECK_FILES_SUPPORTED=	no
-.endif
-
 do-extract:
 	@${CP} -R ${FILESDIR} ${WRKSRC}
 
@@ -99,5 +83,3 @@
 
 .include "../../pkgtools/libnbcompat/inplace.mk"
 .include "../../mk/bsd.pkg.mk"
-
-PREFIX:=	${PKG_TOOLS_PREFIX}
Index: tnftp/Makefile
===================================================================
RCS file: /home/joerg/repo/netbsd/pkgsrc/pkgtools/tnftp/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- tnftp/Makefile	12 Apr 2007 14:36:41 -0000	1.2
+++ tnftp/Makefile	9 Jul 2007 22:40:04 -0000
@@ -9,20 +9,7 @@
 
 NO_PKGTOOLS_REQD_CHECK=	yes
 
-PKG_TOOLS_PREFIX=	${PKG_TOOLS_BIN:C|/[^/]?bin$||}
-
-# XXX This breaks for those who set their own LOCALBASE to "/usr" and also
-# XXX set PKGMANDIR to be other than "share/man".
-# XXX
-.if !empty(PKG_TOOLS_PREFIX:M/usr)
-PKGMANDIR=		share/man
-.endif
-
-.if ${PKG_TOOLS_PREFIX} == ${LOCALBASE}
 CONFLICTS+=	kth-krb4-[0-9]*
 CONFLICTS+=	lukemftp-[0-9]*
-.endif
 
 .include "../../mk/bsd.pkg.mk"
-
-PREFIX:=	${PKG_TOOLS_PREFIX}

--gBBFr7Ir9EOA20Yy--