On 11/15/10 19:31, Marc Espie wrote:
> So now we have
> *DEPENDS = pkgspec:pkgpath
> in an uniform way, with pkgspec: completely omitted when it's the
> default stem-*
> 
> The idea is to remove as much noise as possible and it's already working
> great
> 
> Compare:
> 
> -RUN_DEPENDS=   :desktop-file-utils-*:devel/desktop-file-utils \
> -               :shared-mime-info->=0.21:misc/shared-mime-info
> 
> +RUN_DEPENDS=   devel/desktop-file-utils \
> +               shared-mime-info->=0.21:misc/shared-mime-info
> 
> 
> but it might still be a bit too complex, especially since the most frequent
> spec is "this stem past that version", so STEM-
> +RUN_DEPENDS=   devel/desktop-file-utils \
> +               STEM->=0.21:misc/shared-mime-info
> 
> still a bit of line noise.  Dropping STEM- altogether looks unnatural
> +RUN_DEPENDS=   devel/desktop-file-utils \
> +               >=0.21:misc/shared-mime-info
> 
> let's tack the number at the end instead:
> +RUN_DEPENDS=   devel/desktop-file-utils \
> +               misc/shared-mime-info>=0.21

So you drop the dash after the stem path here? While I do find that
notation at least as readable, if not more so, it could possibly cause
confusion vs the "shared-mime-info->=0.21:..." notation.

Just my two cents as a non-porter.

/Alexander

> 
> looks intuitive, and we're left with only a few (very few ports) with
> explicit pkgspecs.
> 
> 
> The problem with this is that those depends are no longer easily parsable
> and contain something that's not a real path.
> 
> So let's ask make to rewrite things before the shell sees anything.
> Yeah, the syntax is totally barbaric, but it says "if you see a depends
> that's ONLY a path (no : and a / should be present) followed by <=>, then
> cut it at the first <=>, and rewrite it backwards with STEM at front.
> 
> Try this with make describe in say, misc/screen, and see groff coming out as:
> 
> screen-4.0.3p2|misc/screen||multi-screen window 
> manager|misc/screen/pkg/DESCR|The OpenBSD ports mailing-list 
> <po...@openbsd.org>|misc||STEM->=1.15.47p2:textproc/groff||any|y|y|y|y
> 
> as should be.
> 
> Unless someone has better ideas/comments, I think we're going to go that
> route.
> 
> 
> Index: bsd.port.mk
> ===================================================================
> RCS file: /cvs/ports/infrastructure/mk/bsd.port.mk,v
> retrieving revision 1.1058
> diff -u -p -r1.1058 bsd.port.mk
> --- bsd.port.mk       14 Nov 2010 11:17:36 -0000      1.1058
> +++ bsd.port.mk       15 Nov 2010 18:24:22 -0000
> @@ -563,7 +563,7 @@ ERRORS += "Fatal: no flavors for this po
>  
>  USE_GROFF ?= No
>  .if ${USE_GROFF:L} == "yes"
> -BUILD_DEPENDS += groff->=1.15.4.7p2:textproc/groff
> +BUILD_DEPENDS += textproc/groff>=1.15.47p2
>  _PKG_ARGS += -DUSE_GROFF=1
>  .endif
>  
> @@ -1425,12 +1425,12 @@ _CHECK_DEPENDS =
>  # normalization of depends to remove extra :
>  .for _v in BUILD LIB RUN REGRESS
>  _CHECK_DEPENDS +:= ${${_v}_DEPENDS}
> -${_v}_DEPENDS := ${${_v}_DEPENDS:S/^://:S/^://}
> +${_v}_DEPENDS := 
> ${${_v}_DEPENDS:S/^://:S/^://:C,^([^:]+/[^:<=>]+)([<=>][^:]+)$,STEM-\2:\1,}
>  .endfor
>  .for _s in ${MULTI_PACKAGES}
>  .  for _v in RUN LIB
>  _CHECK_DEPENDS +:= ${${_v}_DEPENDS${_s}}
> -${_v}_DEPENDS${_s} := ${${_v}_DEPENDS${_s}:S/^://:S/^://}
> +${_v}_DEPENDS${_s} := 
> ${${_v}_DEPENDS${_s}:S/^://:S/^://:C,^([^:]+/[^:<=>]+)([<=>][^:]+)$,STEM-\2:\1,}
>  .  endfor
>  .endfor

Reply via email to