On Thu, 21 Aug 2014 14:10:02 +0400 (MSK) Vadim Zhukov
<[email protected]> wrote:

> 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?

I'd strongly prefer the behaviour you are proposing over the current
behaviour - if you can find the name/version split reliably.

Christopher

> --
> 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]*-*}
> 



-- 
http://gmerlin.de
OpenPGP: http://gmerlin.de/christopher.pub
F190 D013 8F01 AA53 E080  3F3C F17F B0A1 D44E 4FEE

Attachment: signature.asc
Description: PGP signature

Reply via email to