diff options
author | montellese <montellese@xbmc.org> | 2015-08-03 14:07:46 +0200 |
---|---|---|
committer | montellese <montellese@kodi.tv> | 2015-08-10 18:17:44 +0200 |
commit | 6f8171f53992fc2eaabf71f6fa47ebed1da0d43d (patch) | |
tree | bc506b674ce3ebb3c29c123a3cb75aff79bb9279 | |
parent | fe837c4eab8f2776ac3980a243ae419fef5b1119 (diff) |
[depends] integrate crossguid as a static library
-rw-r--r-- | configure.ac | 29 | ||||
-rw-r--r-- | docs/README.linux | 2 | ||||
-rw-r--r-- | tools/darwin/Configurations/App.xcconfig.in | 2 | ||||
-rw-r--r-- | tools/depends/target/Makefile | 2 | ||||
-rw-r--r-- | tools/depends/target/crossguid/Makefile | 71 |
5 files changed, 103 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 601e17ae13..df87c0cb80 100644 --- a/configure.ac +++ b/configure.ac @@ -605,6 +605,7 @@ case $host in build_shared_lib=yes ;; i*86*-linux-gnu*|i*86*-*-linux-uclibc*) + target_platform=target_linux ARCH="i486-linux" if test "$use_cpu" = "no" -a "$cross_compiling" = "yes"; then use_arch="x86" @@ -626,6 +627,7 @@ case $host in fi ;; x86_64-*-linux-gnu*|x86_64-*-linux-uclibc*) + target_platform=target_linux ARCH="x86_64-linux" if test "$use_cpu" = "no" -a "$cross_compiling" = "yes"; then use_arch="x86_64" @@ -634,10 +636,12 @@ case $host in USE_STATIC_FFMPEG=1 ;; i386-*-freebsd*) + target_platform=target_linux ARCH="x86-freebsd" MAKE="gmake" ;; amd64-*-freebsd*) + target_platform=target_linux ARCH="x86_64-freebsd" MAKE="gmake" ;; @@ -682,6 +686,7 @@ case $host in ARCH="powerpc64-linux" ;; arm*-*-linux-gnu*|arm*-*-linux-uclibc*) + target_platform=target_linux ARCH="arm" use_arch="arm" use_joystick=no @@ -705,6 +710,7 @@ case $host in build_shared_lib=yes ;; mips*-*-linux-gnu*) + target_platform=target_linux ARCH="mips" use_arch="mips" use_joystick=no @@ -847,6 +853,9 @@ if test "$host_vendor" = "apple" ; then LIBS="$LIBS -framework QuartzCore" LIBS="$LIBS -framework SystemConfiguration" LIBS="$LIBS -framework VideoDecodeAcceleration" + else + #arm/ios + LIBS="$LIBS -framework CoreFoundation" fi elif test "$target_platform" = "target_raspberry_pi"; then ARCH="arm" @@ -1168,6 +1177,26 @@ int main() { )]) AC_LANG_POP([C++]) +if test "${target_platform}" = "target_linux" || test "${target_platform}" = "target_raspberry_pi"; then + PKG_CHECK_MODULES([UUID], [uuid],, AC_MSG_ERROR(libuuid not found)) +fi + +AC_MSG_CHECKING("for libcrossguid") +AC_LANG_PUSH([C++]) +SAVED_LIBS="$LIBS" +LIBS="$LIBS -lcrossguid $UUID_LIBS" +AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [#include <guid.h>], + [Guid dummy])], + [AC_MSG_RESULT(yes); SAVED_LIBS="$SAVED_LIBS $LDFLAGS -lcrossguid $UUID_LIBS"], + [AC_MSG_ERROR(crossguid not found)]) +LIBS="$SAVED_LIBS" +AC_LANG_POP([C++]) +if test "${target_platform}" = "target_android"; then + CXXFLAGS="$CXXFLAGS -DGUID_ANDROID" +fi + PKG_CHECK_MODULES([YAJL], [yajl >= 2], [INCLUDES="$INCLUDES $YAJL_CFLAGS"; LIBS="$LIBS $YAJL_LIBS"; YAJL_FOUND="true"], [AC_COMPILE_IFELSE( diff --git a/docs/README.linux b/docs/README.linux index b60b8fe024..f060409650 100644 --- a/docs/README.linux +++ b/docs/README.linux @@ -58,7 +58,7 @@ Build-Depends: autoconf, automake, autopoint, autotools-dev, cmake, curl, libusb-dev, libva-dev, libvdpau-dev, libvorbis-dev, libxinerama-dev, libxml2-dev, libxmu-dev, libxrandr-dev, libxslt1-dev, libxt-dev, libyajl-dev (>=2.0), lsb-release, nasm [!amd64], python-dev, python-imaging, python-support, swig, unzip, yasm, zip, - zlib1g-dev + zlib1g-dev, uuid-dev Note: For developers and anyone else who compiles frequently it is recommended to use ccache. diff --git a/tools/darwin/Configurations/App.xcconfig.in b/tools/darwin/Configurations/App.xcconfig.in index 5a063a4dfb..9d92607184 100644 --- a/tools/darwin/Configurations/App.xcconfig.in +++ b/tools/darwin/Configurations/App.xcconfig.in @@ -25,7 +25,7 @@ HEADER_SEARCH_PATHS = $(inherited) $SRCROOT xbmc xbmc/linux xbmc/osx xbmc/cores/ LIBRARY_SEARCH_PATHS = $(inherited) $(SRCROOT) $(SRCROOT)/xbmc/interfaces/json-rpc "$(SRCROOT)/xbmc/interfaces/python" "$(SRCROOT)/xbmc/interfaces/legacy" FRAMEWORK_SEARCH_PATHS = $(inherited) "$(SDKROOT)/System/Library/PrivateFrameworks/" "$(SDKROOT)/System/Library/Frameworks/" -XBMC_OTHER_LDFLAGS_COMMON = $(inherited) -Wl,-headerpad_max_install_names -Wl,-all_load -L$XBMC_DEPENDS/lib -lbz2 -lintl -lexpat -lssl -lgpg-error -lresolv -lffi -lssh -llzo2 -lpcre -lpcrecpp -lfribidi -lfreetype -lfontconfig -lsqlite3 -ltinyxml -lmicrohttpd -lsmbclient -lpython2.6 -lyajl -ljpeg -lcrypto -lgcrypt -lavdevice -lavfilter -lavcodec -lavformat -lpostproc -lavutil -lswresample -lswscale -ltag -L$XBMC_DEPENDS/lib/mysql -lmysqlclient -lxml2 -lxslt -lnettle -lgmp -lhogweed -lgnutls -lsquish +XBMC_OTHER_LDFLAGS_COMMON = $(inherited) -Wl,-headerpad_max_install_names -Wl,-all_load -L$XBMC_DEPENDS/lib -lbz2 -lintl -lexpat -lssl -lgpg-error -lresolv -lffi -lssh -llzo2 -lpcre -lpcrecpp -lfribidi -lfreetype -lfontconfig -lsqlite3 -ltinyxml -lmicrohttpd -lsmbclient -lpython2.6 -lyajl -ljpeg -lcrypto -lgcrypt -lavdevice -lavfilter -lavcodec -lavformat -lpostproc -lavutil -lswresample -lswscale -ltag -L$XBMC_DEPENDS/lib/mysql -lmysqlclient -lxml2 -lxslt -lnettle -lgmp -lhogweed -lgnutls -lsquish -lcrossguid CLANG_CXX_LANGUAGE_STANDARD = c++0x CLANG_CXX_LIBRARY = libc++ diff --git a/tools/depends/target/Makefile b/tools/depends/target/Makefile index f05c68c895..14ef4e9b3b 100644 --- a/tools/depends/target/Makefile +++ b/tools/depends/target/Makefile @@ -15,7 +15,7 @@ DEPENDS = \ python26 libshairplay \ libplist libcec libbluray boost tinyxml dummy-libxbmc \ libamplayer libssh taglib libusb libnfs libmp3lame \ - pythonmodule-pil libxslt ffmpeg platform + pythonmodule-pil libxslt ffmpeg platform crossguid FFMPEG_DEPENDS = gnutls diff --git a/tools/depends/target/crossguid/Makefile b/tools/depends/target/crossguid/Makefile new file mode 100644 index 0000000000..dedcd74764 --- /dev/null +++ b/tools/depends/target/crossguid/Makefile @@ -0,0 +1,71 @@ +-include ../../Makefile.include +DEPS = Makefile + +# lib name, version +LIBNAME=crossguid +VERSION=8f399e8bd4 +SOURCE=$(LIBNAME)-$(VERSION) +ARCHIVE=$(SOURCE).tar.gz + + +ifeq ($(CROSS_COMPILING), yes) + DEPS += ../../Makefile.include +else + CXXFLAGS += -std=c++11 + ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) + + ifeq ($(PLATFORM),) + PLATFORM = native + TARBALLS_LOCATION = $(ROOT_DIR) + BASE_URL := http://mirrors.kodi.tv/build-deps/sources + RETRIEVE_TOOL := curl -Ls --create-dirs -f -O + ARCHIVE_TOOL := tar --strip-components=1 -xf + endif +endif + + +# define specifying the native GUID implementation to use +GUID_PLATFORM_DEFINE=GUID_LIBUUID +ifeq ($(OS),android) + GUID_PLATFORM_DEFINE=GUID_ANDROID +endif +ifeq ($(OS),osx) + GUID_PLATFORM_DEFINE=GUID_CFUUID +endif +ifeq ($(OS),ios) + GUID_PLATFORM_DEFINE=GUID_CFUUID +endif + +LIBDYLIB=$(PLATFORM)/lib$(LIBNAME).a + +all: .installed-$(PLATFORM) + +$(TARBALLS_LOCATION)/$(ARCHIVE): + cd $(TARBALLS_LOCATION); $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) + +$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS) +ifeq ($(PREFIX),) + @echo + @echo "ERROR: please set PREFIX to the kodi install path e.g. make PREFIX=/usr/local" + @exit 1 +endif + rm -rf $(PLATFORM); mkdir -p $(PLATFORM) + cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) + +$(LIBDYLIB): $(PLATFORM) + cd $(PLATFORM); $(CXX) -c guid.cpp -o guid.o $(CXXFLAGS) -D$(GUID_PLATFORM_DEFINE) + cd $(PLATFORM); $(AR) rvs lib$(LIBNAME).a guid.o + +.installed-$(PLATFORM): $(LIBDYLIB) + @[ -d $(PREFIX)/include ] || mkdir -p $(PREFIX)/include + @[ -d $(PREFIX)/lib ] || mkdir $(PREFIX)/lib + cp $(PLATFORM)/guid.h $(PREFIX)/include/ + cp $(LIBDYLIB) $(PREFIX)/lib/ + touch $@ + +clean: + rm -rf $(PLATFORM) .installed-$(PLATFORM) + +distclean:: + rm -rf $(PLATFORM) .installed-$(PLATFORM) + |