Skip to content

Commit

Permalink
[osx/ios] changed from using internal build of libflac to xxx-depends…
Browse files Browse the repository at this point in the history
… and removed internal osx/ios build bits
  • Loading branch information
davilla committed Mar 23, 2011
1 parent 53a87a8 commit 5484610
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 53 deletions.
8 changes: 0 additions & 8 deletions Makefile.in
Expand Up @@ -115,11 +115,6 @@ PAPCODEC_DIRS+= \
lib/asap
endif

ifeq ($(findstring osx,@ARCH@),osx)
PAPCODEC_DIRS+= \
lib/libflac
endif

LIB_DIRS=\
lib/cximage-6.0 \
lib/libexif \
Expand Down Expand Up @@ -438,9 +433,6 @@ libid3tag: dllloader
$(MAKE) -C lib/libid3tag
papcodecs: dllloader dvdpcodecs
$(MAKE) -C lib/xbadpcm
ifeq ($(findstring osx,@ARCH@), osx)
$(MAKE) -C lib/libflac
endif
$(MAKE) -C lib/vgmstream
$(MAKE) -C lib/timidity
$(MAKE) -C lib/nosefart
Expand Down
29 changes: 2 additions & 27 deletions configure.in
Expand Up @@ -551,6 +551,7 @@ AC_CHECK_HEADER([vorbis/vorbisfile.h],, AC_MSG_ERROR($missing_library))
AC_CHECK_HEADER([vorbis/vorbisenc.h],, AC_MSG_ERROR($missing_library))
AC_CHECK_HEADER([libmodplug/modplug.h],, AC_MSG_ERROR($missing_library))
AC_CHECK_HEADER([wavpack/wavpack.h],, AC_MSG_ERROR($missing_library))
AC_CHECK_HEADER([FLAC/stream_decoder.h],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([ass], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([bz2], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([jpeg], [main],, AC_MSG_ERROR($missing_library)) # check for cximage
Expand Down Expand Up @@ -627,7 +628,6 @@ if test "$host_vendor" = "apple" ; then
AC_CHECK_LIB([SDL], [main],, AC_MSG_ERROR($missing_library))
fi
else
AC_CHECK_HEADER([FLAC/stream_decoder.h],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([SDL_mixer], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([dl], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([resolv], [main],, AC_MSG_ERROR($missing_library))
Expand Down Expand Up @@ -678,12 +678,10 @@ if [[ "$host_vendor" = "apple" ]]; then
HOST_NOT_APPLE=0
fi

if test "$host_vendor" != "apple"; then
XB_FIND_SONAME([FLAC], [FLAC])
fi
XB_FIND_SONAME([MAD], [mad])
XB_FIND_SONAME([OGG], [ogg])
XB_FIND_SONAME([CURL], [curl])
XB_FIND_SONAME([FLAC], [FLAC])
XB_FIND_SONAME([VORBIS], [vorbis])
XB_FIND_SONAME([VORBISENC], [vorbisenc])
XB_FIND_SONAME([VORBISFILE], [vorbisfile])
Expand Down Expand Up @@ -1408,11 +1406,6 @@ OUTPUT_FILES="Makefile \
tools/TexturePacker/Makefile \
tools/EventClients/Clients/OSXRemote/Makefile"

if test "$host_vendor" = "apple"; then
OUTPUT_FILES="$OUTPUT_FILES \
lib/libflac/Makefile"
fi

# Line below is used so we can use AM_INIT_AUTOMAKE. The corresponding
# .dummy.am does nothing.
AC_CONFIG_FILES([.dummy])
Expand Down Expand Up @@ -1553,24 +1546,6 @@ XB_CONFIG_MODULE([lib/python], [
fi
], [$USE_EXTERNAL_PYTHON])

XB_CONFIG_MODULE([lib/libflac/flac-1.2.1], [
if test "$host_vendor" = "apple" ; then
rm -f config.cache
CFLAGS="$CFLAGS -fno-common" \
LDFLAGS="$LDFLAGS" \
./configure -C \
--host=$host_alias \
--build=$build_alias \
--target=$target_alias \
--with-pic \
--disable-asm-optimizations \
--disable-xmms-plugin \
--disable-cpplibs \
CC="$CC" \
CXX="$CXX"
fi
], [$HOST_NOT_APPLE])

XB_CONFIG_MODULE([lib/ffmpeg], [
if test "$host_vendor" = "apple" ; then
./configure \
Expand Down
6 changes: 1 addition & 5 deletions lib/DllLibFlac.h
Expand Up @@ -24,11 +24,7 @@
#if (defined HAVE_CONFIG_H) && (!defined WIN32)
#include "config.h"
#endif
#if defined(_LINUX) && !defined(__APPLE__) || defined(WIN32)
#include <FLAC/stream_decoder.h>
#else
#include "libflac/flac-1.2.1/include/FLAC/stream_decoder.h"
#endif
#include <FLAC/stream_decoder.h>
#include "DynamicDll.h"
#include "utils/log.h"

Expand Down
7 changes: 0 additions & 7 deletions lib/libflac/Makefile.in
Expand Up @@ -10,12 +10,6 @@ FLAC_LIB=$(FLAC_SYSDIR)/$(FLAC_SO)

all: $(FLAC_LIB)

ifeq ($(findstring osx,$(ARCH)), osx)
$(FLAC_LIB): flac-1.2.1/src/libFLAC/.libs/libFLAC.a
$(CC) $(SYSROOT) $(LDFLAGS) -bundle -undefined dynamic_lookup -read_only_relocs suppress -fPIC \
-Wl,-alias_list,@abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper_mach_alias -o $@ \
@abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.o flac-1.2.1/src/libFLAC/.libs/*.o
else
ifneq (@USE_EXTERNAL_LIBFLAC@,1)
$(FLAC_LIB): flac-1.2.1/src/libFLAC/.libs/libFLAC.a
$(CC) $(CFLAGS) -shared -fpic -o $@ -rdynamic \
Expand All @@ -26,7 +20,6 @@ $(FLAC_LIB):
$(CC) $(CFLAGS) -shared -fpic -o $@ -rdynamic -lFLAC \
`cat @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.def` @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.o
endif
endif

flac-1.2.1/src/libFLAC/.libs/libFLAC.a: compile
ifneq (@USE_EXTERNAL_LIBFLAC@,1)
Expand Down
2 changes: 1 addition & 1 deletion tools/osx/ios-depends/Makefile
Expand Up @@ -7,7 +7,7 @@ SUBDIRS = \
liblzo liblzo2 freetype2 fontconfig \
openssl libssh2 curl \
jpeg tiff libpng libogg \
libvorbis libmad fribidi libwavpack libmpeg2 \
libvorbis libflac libmad fribidi libwavpack libmpeg2 \
faad2 libass libcdio libsamplerate librtmp \
libmicrohttpd libmodplug libbluray \
samba python26 mysqlclient boost
Expand Down
2 changes: 1 addition & 1 deletion tools/osx/osx-depends/Makefile
Expand Up @@ -6,7 +6,7 @@ SUBDIRS = \
liblzo liblzo2 freetype2 fontconfig \
openssl libssh2 curl \
jpeg tiff libpng libogg \
libvorbis libmad fribidi libwavpack libmpeg2 \
libvorbis libflac libmad fribidi libwavpack libmpeg2 \
faad2 libass libcdio libsamplerate librtmp \
libGLEW libsdl libsdl_mixer libsdl_image \
libmicrohttpd libmodplug libbluray \
Expand Down
5 changes: 1 addition & 4 deletions xbmc/DllPaths_generated.h.in
Expand Up @@ -62,11 +62,8 @@
#endif
#define DLL_PATH_YM_CODEC "special://xbmcbin/system/players/paplayer/stsoundlibrary-@ARCH@.so"
#define DLL_PATH_SHN_CODEC "special://xbmcbin/system/players/paplayer/libshnplay-@ARCH@.so"
#if defined(_LINUX) && !defined(__APPLE__)

#define DLL_PATH_FLAC_CODEC "@FLAC_SONAME@"
#else
#define DLL_PATH_FLAC_CODEC "special://xbmcbin/system/players/paplayer/libFLAC-@ARCH@.so"
#endif
#define DLL_PATH_MODPLUG_CODEC "@MODPLUG_SONAME@"
#define DLL_PATH_OGG_CODEC "@VORBISFILE_SONAME@"

Expand Down

0 comments on commit 5484610

Please sign in to comment.