LICENSE   := BSD
VERSION   := 1.3.2
DOWNLOADS := flac.archive

# See https://downloads.xiph.org/releases/flac/SHA256SUMS.txt

URL(flac) := http://downloads.xiph.org/releases/flac/flac-$(VERSION).tar.xz
SHA(flac) := 91cfc3ed61dc40f47f050a109b08610667d73477af6ef36dcad31c31a4a8d53f
DIR(flac) := src/lib/flac

DIRS := include/FLAC  include/FLAC++
DIR_CONTENT(include/FLAC)   := src/lib/flac/include/FLAC/*.h
DIR_CONTENT(include/FLAC++) := src/lib/flac/include/FLAC++/*.h

_dirs: src/lib/flac/include/config.h

src/lib/flac/include/config.h: src/lib/flac/config.h.in
	@$(MSG_GENERATE)$@
	$(VERBOSE) sed \
		-e 's/#undef PACKAGE_VERSION/#define PACKAGE_VERSION "$(VERSION)"/'\
		-e 's/#undef FLAC__HAS_OGG/#define FLAC__HAS_OGG 1/' \
		-e 's/#undef HAVE_LROUND/#define HAVE_LROUND 1/' \
			$< > $@

src/lib/flac/config.h.in: $(DOWNLOADS)
