summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2008-05-23 12:31:24 +0000
committerjoerg <joerg@pkgsrc.org>2008-05-23 12:31:24 +0000
commitb1448e9df82a096fceb9a2a661a907b361eb9010 (patch)
tree0eaf1cc6c4aab63678874823ab5ae580ba5fab0a /mk
parent087c3fe7b525fa03be29c96104c7aab567d381a7 (diff)
downloadpkgsrc-b1448e9df82a096fceb9a2a661a907b361eb9010.tar.gz
PKGNAME_NOREV is used to define the DIST_SUBDIR in some places, so
ensure it is defined with the rest of the PKGNAME_* variables before including the phase variable files.
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.pkg.mk50
1 files changed, 31 insertions, 19 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index 17f9b0d6131..24c934b1cdf 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1943 2008/05/22 16:27:22 joerg Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1944 2008/05/23 12:31:24 joerg Exp $
#
# This file is in the public domain.
#
@@ -21,6 +21,36 @@
.include "misc/common.mk"
+############################################################################
+# Transform package Makefile variables and set defaults
+# This is the early set used directly or indirectly in
+# the phase variables.
+############################################################################
+
+##### PKGBASE, PKGNAME[_NOREV], PKGVERSION
+
+PKGBASE?= ${PKGNAME:C/-[^-]*$//}
+PKGVERSION?= ${PKGNAME:C/^.*-//}
+PKGVERSION?= ${PKGNAME:C/^.*-//}
+.if defined(PKGREVISION) && !empty(PKGREVISION) && (${PKGREVISION} != "0")
+. if defined(PKGNAME)
+PKGNAME_NOREV:= ${PKGNAME}
+PKGNAME:= ${PKGNAME}nb${PKGREVISION}
+. else
+PKGNAME?= ${DISTNAME}nb${PKGREVISION}
+PKGNAME_NOREV= ${DISTNAME}
+. endif
+.else
+PKGNAME?= ${DISTNAME}
+PKGNAME_NOREV= ${PKGNAME}
+.endif
+PKGVERSION_NOREV= ${PKGNAME_NOREV:C/^.*-//}
+
+####
+
+############################################################################
+# Allow various phases to define the default variables
+############################################################################
.if defined(EMUL_PLATFORMS) && !empty(EMUL_PLATFORMS)
. include "emulator/emulator.mk"
.endif
@@ -57,24 +87,6 @@ LICENSE= ${LICENCE}
ACCEPTABLE_LICENSES= ${ACCEPTABLE_LICENCES}
.endif
-##### PKGBASE, PKGNAME[_NOREV], PKGVERSION
-
-PKGBASE?= ${PKGNAME:C/-[^-]*$//}
-PKGVERSION?= ${PKGNAME:C/^.*-//}
-PKGVERSION?= ${PKGNAME:C/^.*-//}
-.if defined(PKGREVISION) && !empty(PKGREVISION) && (${PKGREVISION} != "0")
-. if defined(PKGNAME)
-PKGNAME_NOREV:= ${PKGNAME}
-PKGNAME:= ${PKGNAME}nb${PKGREVISION}
-. else
-PKGNAME?= ${DISTNAME}nb${PKGREVISION}
-PKGNAME_NOREV= ${DISTNAME}
-. endif
-.else
-PKGNAME?= ${DISTNAME}
-PKGNAME_NOREV= ${PKGNAME}
-.endif
-PKGVERSION_NOREV= ${PKGNAME_NOREV:C/^.*-//}
# A meta-package is a package that does not have any files and whose
# only purpose is to depend on other packages, giving that collection