tech-pkg archive

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

Re: librsvg



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.

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index