On Tue, Aug 07, 2018 at 10:57:51AM +0200, Sebastien Marie wrote:
> Hi,
> 
> I would like to see added a RUST_ARCHS variable in
> infrastructure/mk/arch-defines.mk in order to simplify some ports, and
> keep all the stuff in sync.
> 
> The diff below:
> - adds RUST_ARCHS and make the PROPERTIES 'rust' available to ports
> - makes lang/rust to use the variable in ONLY_FOR_ARCHS
> - makes x11/gnome/librsvg to use the property to build different version
>   depending the availability of rust on the arch.
> 
> Thanks.
> -- 
> Sebastien Marie
> 
> Index: infrastructure/mk/arch-defines.mk
> ===================================================================
> RCS file: /cvs/ports/infrastructure/mk/arch-defines.mk,v
> retrieving revision 1.51
> diff -u -p -r1.51 arch-defines.mk
> --- infrastructure/mk/arch-defines.mk 26 Jul 2018 13:23:01 -0000      1.51
> +++ infrastructure/mk/arch-defines.mk 7 Aug 2018 08:49:45 -0000
> @@ -25,6 +25,7 @@ MONO_ARCHS = amd64 i386
>  OCAML_NATIVE_ARCHS = i386 amd64
>  OCAML_NATIVE_DYNLINK_ARCHS = i386 amd64
>  GO_ARCHS = amd64 i386
> +RUST_ARCHS = amd64 i386 aarch64
>  
>  # arches where the base compiler is clang
>  CLANG_ARCHS = aarch64 amd64 arm i386
> @@ -41,7 +42,8 @@ GCC49_ARCHS =amd64 arm hppa i386 mips64 
>  CXX11_ARCHS = ${CLANG_ARCHS} ${GCC49_ARCHS}
>  
>  .for PROP in ALL APM BE LE LP64 CLANG GCC4 GCC3 GCC49 MONO LLVM \
> -                     CXX11 OCAML_NATIVE OCAML_NATIVE_DYNLINK GO LLD
> +                     CXX11 OCAML_NATIVE OCAML_NATIVE_DYNLINK GO \
> +                     LLD RUST
>  .  for A B in ${MACHINE_ARCH} ${ARCH}
>  .    if !empty(${PROP}_ARCHS:M$A) || !empty(${PROP}_ARCHS:M$B)
>  PROPERTIES += ${PROP:L}
> Index: lang/rust/Makefile
> ===================================================================
> RCS file: /cvs/ports/lang/rust/Makefile,v
> retrieving revision 1.76
> diff -u -p -r1.76 Makefile
> --- lang/rust/Makefile        6 Aug 2018 19:07:50 -0000       1.76
> +++ lang/rust/Makefile        7 Aug 2018 08:39:48 -0000
> @@ -1,8 +1,6 @@
>  # $OpenBSD: Makefile,v 1.76 2018/08/06 19:07:50 landry Exp $
>  
> -# snapshots are only available these archs;
> -# sync with MACHINE_ARCH conditional in x11/gnome/librsvg (STABLE_VERSION)
> -ONLY_FOR_ARCHS =     aarch64 amd64 i386
> +ONLY_FOR_ARCHS =     ${RUST_ARCHS}
>  
>  .if "${MACHINE_ARCH}" == "i386"
>  DPB_PROPERTIES =     lonesome
> Index: x11/gnome/librsvg/Makefile
> ===================================================================
> RCS file: /cvs/ports/x11/gnome/librsvg/Makefile,v
> retrieving revision 1.127
> diff -u -p -r1.127 Makefile
> --- x11/gnome/librsvg/Makefile        12 Jul 2018 12:23:45 -0000      1.127
> +++ x11/gnome/librsvg/Makefile        7 Aug 2018 08:47:11 -0000
> @@ -10,9 +10,8 @@ DISTFILES=          librsvg-${STABLE_VERSION}${E
>  
>  REVISION=            0
>  
> -# sync with lang/rust ONLY_FOR_ARCHS
> -.if ${MACHINE_ARCH} == "aarch64" || ${MACHINE_ARCH} == "amd64" || \
> -     ${MACHINE_ARCH} == "i386"
> +.include <bsd.port.arch.mk>
> +.if ${PROPERTIES:Mrust}
>  SHARED_LIBS +=  rsvg-2               39.0     # 44.5
>  GNOME_VERSION=               ${STABLE_VERSION}
>  BUILD_DEPENDS=               lang/rust
Sounds good. 

Reply via email to