Here is what I'm thinking of: put SUBPACKAGE name by default right
before version instead of making it FLAVOR-like one. This is the
way it's done more often at least. I.e., in case of PKGNAME=foo-1.0
and MULTI_PACKAGES=-main -bar this will result in the following
packages by default:

${PKGNAME-main} == foo-1.0
${PKGNAME-bar}  == foo-bar-1.0

If this way is accepted in general, I'll try to look for the fallout
and provide the full diff, suitable for bulk test. I expect more
"-" than "+" lines there. :) So - any opinions?

--
WBR,
  Vadim Zhukov


Index: bsd.port.mk
===================================================================
RCS file: /cvs/ports/infrastructure/mk/bsd.port.mk,v
retrieving revision 1.1277
diff -u -p -r1.1277 bsd.port.mk
--- bsd.port.mk 11 Aug 2014 11:34:42 -0000      1.1277
+++ bsd.port.mk 21 Aug 2014 10:00:00 -0000
@@ -606,11 +606,12 @@ FULLPKGNAME- = ${FULLPKGNAME}
 ERRORS += "Warning: FULLPKGNAME${_s} defined but no FULLPKGPATH${_s}"
 .      endif
 .    else
-.      if defined(PKGNAME${_s})
-FULLPKGNAME${_s} = ${PKGNAME${_s}}${FLAVOR_EXT}
+.      if "${_s}" == "-main"
+         PKGNAME${_s} ?= ${PKGNAME}
 .      else
-FULLPKGNAME${_s} = ${PKGNAME}${_s}${FLAVOR_EXT}
+         PKGNAME${_s} ?= ${PKGNAME:C/-[0-9]/${_s}&/}
 .      endif
+FULLPKGNAME${_s} = ${PKGNAME${_s}}${FLAVOR_EXT}
 .    endif
 # XXX see comments above for !MULTI_PACKAGES case
 .    if ${FULLPKGNAME${_s}:M*-[0-9]*-*}

Reply via email to