tech-pkg archive

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

Re: librsvg



David Holland <dholland-pkgtech%netbsd.org@localhost> writes:

> On Wed, May 29, 2019 at 02:48:10PM +0200, Edgar Fu? wrote:
>  > > So how about this?
>  > Shouldn't this better go to lang/rust/foo.mk in large parts?
>  > Otherwise, it will get copy-pasted for other packages and run out of sync.
>
> Yes...
>
> Suggestion: put something like this in lang/rust/platforms.mk:
>
>    ------
> .for _RUST_ARCH in aarch64 armv7 i386 powerpc sparc64 x86_64
> .for _RUST_OS in Darwin FreeBSD Linux NetBSD SunOS
> RUST_PLATFORMS+=	${_RUST_OS}-*-${_RUST_ARCH}
> .endfor
> .endfor
>
> PLATFORM_SUPPORTS_RUST?=	no
> .for _RUST_PLATFORM in ${RUST_PLATFORMS}
> .if !empty(MACHINE_PLATFORM:M${_RUST_PLATFORM})
> PLATFORM_SUPPORTS_RUST=		yes
> .endif
> .endfor
>    ------
>
> This both centralizes the logic (and allows for addenda when the list
> of platforms ceases to be a tidy cartesian product) and also provides
> a platform list so you can do things like
>
> BROKEN_EXCEPT_FOR_PLATFORM+=	${RUST_PLATFORMS}
>
> which I'm sure will be useful in the not very distant future.

That all sounds good to me, and if you would like to do this (nowish,
rather than the day before the freeze), please go right ahead.  I am
pretty sure there would be no objections.


What you are proposing is functionally the same as what we have now, and
thus you should not feel the slightest reason to hold off based on the
following:

I really doubt that OS x ARCH is sufficient, as I am pretty sure that if
I tried to build rust on netbsd-6 it would fail.  And if not, netbsd-5
would probably fail.  I realize that there are systems we "don't
support", but I think we should correctly return the "is-rust-ok"
predicate, so they run the shiny version of things like librsvg.

But as you say, this should be done in one place.

For this reason, I would lean to just setting "PLATFORM_SUPPORTS_RUST"
to yes or no, and not try to enumerate the set of supported platforms,
because while OS x ARCH is ok, OS x ARCH x VERSION gets big.




Home | Main Index | Thread Index | Old Index