tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Loosing mandatory DISTNAME



Hi,

Now, all package must define DISTNAME.
But basicall, some kind of packages require no distfile.
(meta-package, in-place source, and so on).
Those packages now define DISTNAME as PKGNAME, empty MASTER_SITES and DISTFILES.
It is circuitous definition.

How about apply following patch and change to
just define PKGNAME?

Index: bsd.pkg.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/bsd.pkg.mk,v
retrieving revision 1.1951
diff -u -r1.1951 bsd.pkg.mk
--- bsd.pkg.mk  19 Aug 2008 17:28:24 -0000      1.1951
+++ bsd.pkg.mk  25 Aug 2008 02:56:23 -0000
@@ -155,8 +155,12 @@
 .  endif
 .endif # USE_IMAKE

-.if !defined(CATEGORIES) || !defined(DISTNAME)
-PKG_FAIL_REASON+='CATEGORIES and DISTNAME are mandatory.'
+.if !defined(CATEGORIES)
+PKG_FAIL_REASON+='CATEGORIES is mandatory.'
+.endif
+
+.if !defined(PKGNAME) && !defined(DISTNAME)
+PKG_FAIL_REASON+='PKGNAME and/or DISTNAME are mandatory.'
 .endif

 .if defined(PKG_PATH)

Index: fetch/bsd.fetch-vars.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/fetch/bsd.fetch-vars.mk,v
retrieving revision 1.11
diff -u -r1.11 bsd.fetch-vars.mk
--- fetch/bsd.fetch-vars.mk     22 May 2008 20:11:55 -0000      1.11
+++ fetch/bsd.fetch-vars.mk     25 Aug 2008 12:34:39 -0000
@@ -36,7 +36,9 @@
 #DISTDIR?=               ${PKGSRCDIR}/distfiles

 _DISTDIR=              ${DISTDIR}/${DIST_SUBDIR}
+.if defined(DISTNAME) && !empty(DISTNAME)
 DEFAULT_DISTFILES=     ${DISTNAME}${EXTRACT_SUFX}
+.endif
 DISTFILES?=            ${DEFAULT_DISTFILES}

 # File lists, defined early to allow tool dependencies.

-- 
"Of course I love NetBSD":-)
OBATA Akio / obache%NetBSD.org@localhost


Home | Main Index | Thread Index | Old Index