Tue Oct 27 08:53:58 2020 UTC ()
mpg123: Simplify option selection.

Don't use a version check that will break as soon as we make a NetBSD 10.


(nia)
diff -r1.6 -r1.7 pkgsrc/audio/mpg123/options.mk

cvs diff -r1.6 -r1.7 pkgsrc/audio/mpg123/options.mk (expand / switch to unified diff)

--- pkgsrc/audio/mpg123/options.mk 2020/08/01 23:44:06 1.6
+++ pkgsrc/audio/mpg123/options.mk 2020/10/27 08:53:57 1.7
@@ -1,43 +1,40 @@ @@ -1,43 +1,40 @@
1# $NetBSD: options.mk,v 1.6 2020/08/01 23:44:06 tsutsui Exp $ 1# $NetBSD: options.mk,v 1.7 2020/10/27 08:53:57 nia Exp $
2 2
3PKG_OPTIONS_VAR= PKG_OPTIONS.mpg123 3PKG_OPTIONS_VAR= PKG_OPTIONS.mpg123
4PKG_OPTIONS_OPTIONAL_GROUPS= fpu 4PKG_OPTIONS_OPTIONAL_GROUPS= fpu
5PKG_SUPPORTED_OPTIONS= mpg123-fifo 5PKG_SUPPORTED_OPTIONS= mpg123-fifo
6PKG_SUGGESTED_OPTIONS+= mpg123-fifo 6PKG_SUGGESTED_OPTIONS+= mpg123-fifo
 7PKG_OPTIONS_GROUP.fpu= mpg123-with-fpu
7 8
8.include "../../mk/bsd.fast.prefs.mk" 9.include "../../mk/bsd.fast.prefs.mk"
9 10
10.if (${MACHINE_ARCH} == "i386") 11# x86-dither causes text relocations and doesn't work with the Sun linker
11. if empty(MACHINE_PLATFORM:MDarwin-11.*-i386) && \ 12# Don't enable it by default.
12 empty(MACHINE_PLATFORM:MSunOS-*) && \ 13.if ${MACHINE_ARCH} == "i386"
13 empty(MACHINE_PLATFORM:MNetBSD-[89]*-i386) 14PKG_OPTIONS_GROUP.fpu+= mpg123-x86-dither
14PKG_OPTIONS_GROUP.fpu= mpg123-x86-dither mpg123-with-fpu 15.endif
15PKG_SUGGESTED_OPTIONS+= mpg123-x86-dither 16
16. else 17.if ${MACHINE_ARCH} == "aarch64"
17PKG_OPTIONS_GROUP.fpu= mpg123-with-fpu 18PKG_OPTIONS_GROUP.fpu+= mpg123-neon64 mpg123-aarch64
18PKG_SUGGESTED_OPTIONS+= mpg123-with-fpu 
19. endif 
20.elif !empty(MACHINE_ARCH:M*arm*) && empty(MACHINE_ARCH:M*hf*) 
21PKG_OPTIONS_GROUP.fpu= mpg123-with-fpu  
22.elif (${MACHINE_ARCH} == "aarch64") 
23PKG_OPTIONS_GROUP.fpu= mpg123-neon64 mpg123-aarch64 
24PKG_SUGGESTED_OPTIONS+= mpg123-aarch64 19PKG_SUGGESTED_OPTIONS+= mpg123-aarch64
25.elif (${MACHINE_ARCH} == "powerpc") 20.elif ${MACHINE_ARCH} == "powerpc"
26PKG_OPTIONS_GROUP.fpu= mpg123-altivec mpg123-with-fpu 21PKG_OPTIONS_GROUP.fpu+= mpg123-altivec
27PKG_SUGGESTED_OPTIONS+= mpg123-altivec 22PKG_SUGGESTED_OPTIONS+= mpg123-altivec
28.else 23.else
29PKG_OPTIONS_GROUP.fpu= mpg123-with-fpu 24# Avoid using floating point on softfloat ARM.
 25. if !(!empty(MACHINE_ARCH:M*arm*) && empty(MACHINE_ARCH:M*hf*))
30PKG_SUGGESTED_OPTIONS+= mpg123-with-fpu 26PKG_SUGGESTED_OPTIONS+= mpg123-with-fpu
 27. endif
31.endif 28.endif
32 29
33.include "../../mk/bsd.options.mk" 30.include "../../mk/bsd.options.mk"
34 31
35.if !empty(PKG_OPTIONS:Mmpg123-with-fpu) 32.if !empty(PKG_OPTIONS:Mmpg123-with-fpu)
36CONFIGURE_ARGS+= --with-cpu=generic_fpu 33CONFIGURE_ARGS+= --with-cpu=generic_fpu
37.elif !empty(PKG_OPTIONS:Mmpg123-altivec) 34.elif !empty(PKG_OPTIONS:Mmpg123-altivec)
38CONFIGURE_ARGS+= --with-cpu=altivec 35CONFIGURE_ARGS+= --with-cpu=altivec
39.elif !empty(PKG_OPTIONS:Mmpg123-x86-dither) 36.elif !empty(PKG_OPTIONS:Mmpg123-x86-dither)
40CONFIGURE_ARGS+= --with-cpu=x86_dither 37CONFIGURE_ARGS+= --with-cpu=x86_dither
41.elif !empty(PKG_OPTIONS:Mmpg123-altivec) 38.elif !empty(PKG_OPTIONS:Mmpg123-altivec)
42CONFIGURE_ARGS+= --with-cpu=altivec 39CONFIGURE_ARGS+= --with-cpu=altivec
43.elif !empty(PKG_OPTIONS:Mmpg123-neon64) 40.elif !empty(PKG_OPTIONS:Mmpg123-neon64)