Skip to content
Snippets Groups Projects
Commit dc79cd6e authored by Vittorio Giovara's avatar Vittorio Giovara Committed by Tristan Matthews
Browse files

contrib: add flac rules and patches

Dependency required by sndfile.

Based on VideoLan code by Rémi Denis-Courmont et al.
Refs: #46617

Change-Id: I04f4608deb3d013cd7d55f8c73a8fac54185b5ae
parent ed09d172
No related branches found
No related tags found
No related merge requests found
9f62a83c2041ec6f02c0df65b796a920a0cd6ba6c2c034bb69535bca5df57ed69f96fe4bb41c0d5ccc229241d90efd2c7ec3785662b5a582a8e20e2e991e6477 flac-1.3.0.tar.xz
--- flac/src/libFLAC/flac.pc.in.orig 2013-05-05 14:05:30.059024229 +0200
+++ flac/src/libFLAC/flac.pc.in 2013-05-05 14:06:25.529822137 +0200
@@ -7,6 +7,6 @@
Description: Free Lossless Audio Codec Library
Version: @VERSION@
Requires.private: @OGG_PACKAGE@
-Libs: -L${libdir} -lFLAC
+Libs: -L${libdir} -lFLAC -logg
Libs.private: -lm
Cflags: -I${includedir}
# FLAC
FLAC_VERSION := 1.3.0
FLAC_URL := http://downloads.xiph.org/releases/flac/flac-$(FLAC_VERSION).tar.xz
PKGS += flac
ifeq ($(call need_pkg,"flac"),)
PKGS_FOUND += flac
endif
$(TARBALLS)/flac-$(FLAC_VERSION).tar.xz:
$(call download,$(FLAC_URL))
.sum-flac: flac-$(FLAC_VERSION).tar.xz
flac: flac-$(FLAC_VERSION).tar.xz .sum-flac
$(UNPACK)
$(APPLY) $(SRC)/flac/libFLAC-pc.patch
ifdef HAVE_DARWIN_OS
cd $(UNPACK_DIR) && sed -e 's,-dynamiclib,-dynamiclib -arch $(ARCH),' -i.orig configure
endif
ifdef HAVE_ANDROID
ifeq ($(ANDROID_ABI), x86)
# cpu.c:130:29: error: sys/ucontext.h: No such file or directory
# defining USE_OBSOLETE_SIGCONTEXT_FLAVOR allows us to bypass that
cd $(UNPACK_DIR) && sed -i.orig -e s/"# undef USE_OBSOLETE_SIGCONTEXT_FLAVOR"/"#define USE_OBSOLETE_SIGCONTEXT_FLAVOR"/g src/libFLAC/cpu.c
endif
endif
$(UPDATE_AUTOCONFIG)
$(MOVE)
FLACCONF := $(HOSTCONF) \
--disable-thorough-tests \
--disable-doxygen-docs \
--disable-xmms-plugin \
--disable-cpplibs \
--disable-oggtest
# TODO? --enable-sse
ifdef HAVE_DARWIN_OS
ifneq ($(findstring $(ARCH),i386 x86_64),)
FLACCONF += --disable-asm-optimizations
endif
endif
DEPS_flac = ogg $(DEPS_ogg)
.flac: flac
cd $< && $(HOSTVARS) ./configure $(FLACCONF)
cd $</include && $(MAKE) install
cd $</src && $(MAKE) -C share install && $(MAKE) -C libFLAC install
touch $@
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment