From 490349007ec3c1f2aa04f3a1ba0509fd5234a175 Mon Sep 17 00:00:00 2001 From: Seungbae Shin Date: Thu, 16 Jul 2015 17:33:11 +0900 Subject: [PATCH] Enable ogg with flac disable Change-Id: Ic80c209ea2396952fd175c44568a5fc78bfb2b73 --- configure.ac | 25 ++++++++++--------------- packaging/libsndfile.spec | 20 ++++++++++---------- src/flac.c | 2 +- 3 files changed, 21 insertions(+), 26 deletions(-) diff --git a/configure.ac b/configure.ac index f0fccb0..c16f46d 100644 --- a/configure.ac +++ b/configure.ac @@ -136,7 +136,7 @@ AC_ARG_ENABLE(alsa, AC_HELP_STRING([--disable-alsa], [disable use of ALSA])) AC_ARG_ENABLE(external-libs, - AC_HELP_STRING([--disable-external-libs], [disable use of FLAC, Ogg and Vorbis [[default=no]]])) + AC_HELP_STRING([--disable-external-libs], [disable use of Ogg and Vorbis [[default=no]]])) AC_ARG_ENABLE(octave, AC_HELP_STRING([--enable-octave], [disable building of GNU Octave module])) @@ -297,7 +297,7 @@ else fi #==================================================================================== -# Check for Ogg, Vorbis and FLAC. +# Check for Ogg, Vorbis. HAVE_EXTERNAL_LIBS=0 EXTERNAL_CFLAGS="" @@ -308,13 +308,8 @@ PKG_PROG_PKG_CONFIG if test -n "$PKG_CONFIG" ; then if test x$enable_external_libs = xno ; then - AC_MSG_WARN([[*** External libs (FLAC, Ogg, Vorbis) disabled. ***]]) + AC_MSG_WARN([[*** External libs (Ogg, Vorbis) disabled. ***]]) else - PKG_CHECK_MOD_VERSION(FLAC, flac >= 1.2.1, ac_cv_flac=yes, ac_cv_flac=no) - - # Make sure the FLAC_CFLAGS value is sane. - FLAC_CFLAGS=`echo $FLAC_CLFAGS | $SED "s/FLAC$//"` - PKG_CHECK_MOD_VERSION(OGG, ogg >= 1.1.3, ac_cv_ogg=yes, ac_cv_ogg=no) if test x$enable_experimental = xyes ; then @@ -332,15 +327,15 @@ if test -n "$PKG_CONFIG" ; then enable_external_libs=yes fi - if test x$ac_cv_flac$ac_cv_ogg$ac_cv_vorbis$ac_cv_vorbisenc = "xyesyesyesyes" ; then + if test x$ac_cv_ogg$ac_cv_vorbis$ac_cv_vorbisenc = "xyesyesyes" ; then HAVE_EXTERNAL_LIBS=1 enable_external_libs=yes - EXTERNAL_CFLAGS="$FLAC_CFLAGS $OGG_CFLAGS $VORBISENC_CFLAGS $SPEEX_CFLAGS" - EXTERNAL_LIBS="$FLAC_LIBS $VORBISENC_LIBS $SPEEX_LIBS" + EXTERNAL_CFLAGS="$OGG_CFLAGS $VORBISENC_CFLAGS $SPEEX_CFLAGS" + EXTERNAL_LIBS="$VORBISENC_LIBS $SPEEX_LIBS" else echo - AC_MSG_WARN([[*** One or more of the external libraries (ie libflac, libogg and]]) + AC_MSG_WARN([[*** One or more of the external libraries (ie libogg and]]) AC_MSG_WARN([[*** libvorbis) is either missing (possibly only the development]]) AC_MSG_WARN([[*** headers) or is of an unsupported version.]]) AC_MSG_WARN([[***]]) @@ -351,7 +346,7 @@ if test -n "$PKG_CONFIG" ; then fi fi -AC_DEFINE_UNQUOTED([HAVE_EXTERNAL_LIBS], $HAVE_EXTERNAL_LIBS, [Will be set to 1 if flac, ogg and vorbis are available.]) +AC_DEFINE_UNQUOTED([HAVE_EXTERNAL_LIBS], $HAVE_EXTERNAL_LIBS, [Will be set to 1 if ogg and vorbis are available.]) #==================================================================================== # Check for libsqlite3 (only used in regtest). @@ -653,13 +648,13 @@ AC_MSG_RESULT([ Experimental code : ................... ${enable_experimental:-no} Using ALSA in example programs : ...... ${enable_alsa:-no} - External FLAC/Ogg/Vorbis : ............ ${enable_external_libs:-no} + External Ogg/Vorbis : ............ ${enable_external_libs:-no} ]) if test -z "$PKG_CONFIG" ; then echo " *****************************************************************" echo " *** The pkg-config program is missing. ***" - echo " *** External FLAC/Ogg/Vorbis libs cannot be found without it. ***" + echo " *** External Ogg/Vorbis libs cannot be found without it. ***" echo " *** http://pkg-config.freedesktop.org/wiki/ ***" echo " *****************************************************************" echo diff --git a/packaging/libsndfile.spec b/packaging/libsndfile.spec index cdb2b38..97e0658 100644 --- a/packaging/libsndfile.spec +++ b/packaging/libsndfile.spec @@ -4,13 +4,11 @@ Release: 0 License: LGPL-2.1+ Summary: C library for reading and writing sound files Group: Multimedia/Audio -BuildRequires: pkgconfig(alsa) BuildRequires: gcc-c++ BuildRequires: libtool -BuildRequires: libvorbis-devel BuildRequires: pkg-config -BuildRequires: speex-devel -BuildRequires: sqlite-devel +BuildRequires: pkgconfig(ogg) +BuildRequires: pkgconfig(vorbis) Url: http://www.mega-nerd.com/libsndfile/ Source: libsndfile-%{version}.tar.gz Source2: baselibs.conf @@ -43,11 +41,9 @@ cp %{SOURCE1001} . autoreconf --force --install CFLAGS="%{optflags} %{warn_flags}" export CFLAGS -%configure --disable-silent-rules \ - --disable-static \ - --enable-sqlite \ - --with-pic \ - --enable-experimental +%configure --disable-static \ + --disable-dependency-tracking \ + --disable-sqlite --disable-alsa make %{?_smp_mflags} %check @@ -56,6 +52,9 @@ make check popd %install +rm -rf %{buildroot} +mkdir -p %{buildroot}/usr/share/license +cp COPYING %{buildroot}/usr/share/license/%{name} %make_install # remove programs; built in another spec file rm -rf %{buildroot}%{_bindir} @@ -68,11 +67,12 @@ rm -rf %{buildroot}%{_datadir}/doc/libsndfile1-dev %postun -p /sbin/ldconfig -%files +%files %manifest %{name}.manifest %defattr(-, root, root) %license COPYING %{_libdir}/libsndfile.so.1* +/usr/share/license/%{name} %files devel %manifest %{name}.manifest diff --git a/src/flac.c b/src/flac.c index 7949b0a..787c82b 100644 --- a/src/flac.c +++ b/src/flac.c @@ -29,7 +29,7 @@ #include "sndfile.h" #include "common.h" -#if HAVE_EXTERNAL_LIBS +#if 0 #include #include -- 2.7.4