PKGNAME=flac
PKGSEC=libs
PKGDEP="libogg"
BUILDDEP="doxygen"
BUILDDEP__RETRO=""
# FIXME: ACBS does not handle suffixed dependencies via archgroups properly.
BUILDDEP__ARMV4="${BUILDDEP__RETRO}"
BUILDDEP__ARMV6HF="${BUILDDEP__RETRO}"
BUILDDEP__ARMV7HF="${BUILDDEP__RETRO}"
BUILDDEP__I486="${BUILDDEP__RETRO}"
BUILDDEP__LOONGSON2F="${BUILDDEP__RETRO}"
BUILDDEP__M68K="${BUILDDEP__RETRO}"
BUILDDEP__POWERPC="${BUILDDEP__RETRO}"
BUILDDEP__PPC64="${BUILDDEP__RETRO}"
PKGDES="Tools and runtime for the Free Lossless Audio Codec (FLAC)"

AUTOTOOLS_AFTER=(
    '--enable-largefile'
    '--enable-doxygen-docs'
    '--enable-cpplibs'
    '--disable-oss-fuzzers'
    '--enable-ogg'
    '--enable-programs'
    '--enable-examples'
    '--disable-version-from-git'
    '--enable-multithreading'
    '--disable-rpath'
    '--enable-year2038'
)
# Note: From configure's help...
#
#   --disable-avx	Disable AVX, AVX2 optimizations. There is runtime
# 			detection of CPU features, so disabling is only
#			necessary when a compiler does not know about them
AUTOTOOLS_AFTER__AMD64=(
    "${AUTOTOOLS_AFTER[@]}"
    '--enable-avx'
)
AUTOTOOLS_AFTER__RETRO=(
    "${AUTOTOOLS_AFTER[@]}"
    '--disable-doxygen-docs'
)

PKGBREAK="akode<=14.1.2-2 allegro<=1:5.2.6.0-1 audacious<=4.4.2-1 \
          audacity<=3.7.3 audiocd-kio<=23.08.5-1 \
          audiofile<=0.3.6git20160829-6 cmus<=2.11.0-2 deadbeef<=1.10.0 \
          easytag<=2.4.3-4 gstreamer<=1.26.0-1 k3b<=23.08.5-2 \
          k3b-trinity<=14.1.2-2 kid3<=3.9.5 kwave<=23.08.5-1 \
          libfishsound<=1.0.1 libsndfile<=1.2.0-2 mixxx<=2.5.0 \
          mkvtoolnix<=91.0 mocp<=2.6.0~svn.r3005 mpd<=0.24.3 \
          musescore<=4.3.2-1 musicfox<=4.6.0-1 openmpt<=0.7.13 \
          opus-tools<=0.2-1 qmmp<=1.6.5-2 readymedia<=1.3.3 scummvm<=2.9.0 \
          sdl-sound<=1.0.3-11 sfml<=2.5.1-2 sox<=14.4.2-6 \
          tdemultimedia<=14.1.2-1 timidity++<=2.15.0-2 vlc<=3.0.21-5 \
          vorbis-tools<=1.4.0-4 xine-lib<=1.2.13-3"

AB_FLAGS_O3=1

# Needed by Afterglow, whereas FAIL_ARCH defaults to mainline-only.
FAIL_ARCH="!(mainline|retro)"
