diff options
author | Memphiz <memphis@machzwo.de> | 2014-11-28 11:22:38 +0100 |
---|---|---|
committer | Memphiz <memphis@machzwo.de> | 2014-11-28 11:22:38 +0100 |
commit | abc79a16c2afdc9c9fd3a2151db573ca8af10523 (patch) | |
tree | 5c0ee427f8ca6332944eb7236091b9c045e62781 /tools | |
parent | 6cf57612373f30de4bf016ed64e2ca81a7de5fa2 (diff) | |
parent | b4fcbf32d35354794a6b95b784b48b5f26c74d19 (diff) |
Merge pull request #5835 from Memphiz/boblight
[depends] - add boblight to depends but don't install it (used for compi...
Diffstat (limited to 'tools')
-rw-r--r-- | tools/depends/target/boblight/01-fix_fpermissive.patch | 11 | ||||
-rw-r--r-- | tools/depends/target/boblight/02-fixandroid.patch | 35 | ||||
-rw-r--r-- | tools/depends/target/boblight/Makefile | 53 |
3 files changed, 99 insertions, 0 deletions
diff --git a/tools/depends/target/boblight/01-fix_fpermissive.patch b/tools/depends/target/boblight/01-fix_fpermissive.patch new file mode 100644 index 0000000000..29727a67bb --- /dev/null +++ b/tools/depends/target/boblight/01-fix_fpermissive.patch @@ -0,0 +1,11 @@ +--- src/util/miscorig.cpp 2014-11-27 18:31:54.778680630 +0000 ++++ src/util/misc.cpp 2014-11-27 18:32:21.986680437 +0000 +@@ -64,7 +64,7 @@ + //convert . or , to the current locale for correct conversion of ascii float + void ConvertFloatLocale(std::string& strfloat) + { +- static struct lconv* locale = localeconv(); ++ static const struct lconv* locale = localeconv(); + + size_t pos = strfloat.find_first_of(",."); + diff --git a/tools/depends/target/boblight/02-fixandroid.patch b/tools/depends/target/boblight/02-fixandroid.patch new file mode 100644 index 0000000000..8ce63e5b12 --- /dev/null +++ b/tools/depends/target/boblight/02-fixandroid.patch @@ -0,0 +1,35 @@ +--- src/util/daemonizeorig.cpp 2014-11-27 18:36:30.474678137 +0000 ++++ src/util/daemonize.cpp 2014-11-27 18:36:44.226678082 +0000 +@@ -35,10 +35,12 @@ + if (setsid() < 0) + fprintf(stderr, "setsid(): %s", GetErrno().c_str()); + ++#if !defined(__ANDROID__) + //route stdout and stderr to /dev/null + fclose(stdout); + stdout = fopen("/dev/null", "w"); + fclose(stderr); + stderr = fopen("/dev/null", "w"); ++#endif + } + +--- src/lib/boblightorig.h 2014-11-27 18:38:37.174677063 +0000 ++++ src/lib/boblight.h 2014-11-27 18:40:14.810676123 +0000 +@@ -61,7 +61,7 @@ + //gets a functionpointer from dlsym, and returns char* from dlerror if it didn't work + #define BOBLIGHT_FUNCTION(returnvalue, name, arguments) \ + name = BOBLIGHT_CAST(returnvalue (*) arguments)(dlsym(p_boblight, #name)); \ +- { char* error = dlerror(); if (error) return error; } ++ { char* error = (char *)dlerror(); if (error) return error; } + + void* p_boblight = NULL; //where we put the lib + +@@ -79,7 +79,7 @@ + + p_boblight = dlopen(filename, RTLD_NOW); + if (p_boblight == NULL) +- return dlerror(); ++ return (char *)dlerror(); + + //generate dlsym lines + #include "boblight-functions.h" diff --git a/tools/depends/target/boblight/Makefile b/tools/depends/target/boblight/Makefile new file mode 100644 index 0000000000..bd961ec622 --- /dev/null +++ b/tools/depends/target/boblight/Makefile @@ -0,0 +1,53 @@ +include ../../Makefile.include +DEPS= ../../Makefile.include Makefile + +#hint for building a fat lib - "lipo -arch i386 libboblight-i386.dylib -arch x86_64 libboblight-x86_64.dylib -output libboblight-fat.dylib" + +# lib name, version +LIBNAME=libboblight +VERSION=r478 +SOURCE=$(LIBNAME)-$(VERSION) +ARCHIVE=$(SOURCE).tar.gz + +# configuration settings +CONFIGURE=./configure --prefix=$(PREFIX) \ + --without-opengl \ + --without-portaudio \ + --without-x11 \ + --without-libusb + +LIBDYLIB=$(PLATFORM)/src/.libs/$(LIBNAME).a + +CLEAN_FILES=$(ARCHIVE) $(PLATFORM) + +all: $(LIBDYLIB) .installed-$(PLATFORM) + +$(TARBALLS_LOCATION)/$(ARCHIVE): + cd $(TARBALLS_LOCATION); $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) + +$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS) + rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM) + cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) + cd $(PLATFORM); patch -p0 < ../01-fix_fpermissive.patch + cd $(PLATFORM); patch -p0 < ../02-fixandroid.patch + cd $(PLATFORM); autoreconf -vif + cd $(PLATFORM); $(CONFIGURE) + +$(LIBDYLIB): $(PLATFORM) + $(MAKE) -C $(PLATFORM) + +.installed-$(PLATFORM): $(LIBDYLIB) +ifeq ($(OS),android) + rm -f $(PLATFORM)/src/.libs/libboblight.la $(PLATFORM)/src/.libs/libboblight.so $(PLATFORM)/src/.libs/libboblight.so.0 + mv -f $(PLATFORM)/src/.libs/libboblight.so.0.0.0 $(PLATFORM)/src/.libs/libboblight.so + $(RPL) -e "libboblight.so.0" "libboblight.so\x00\x00" $(PLATFORM)/src/.libs/libboblight.so + -$(READELF) --dynamic $(PLATFORM)/src/.libs/libboblight.so | grep ibrary +endif + echo "libboblight isn't a dependency of XBMC and won't be installed" + touch $@ +clean: + $(MAKE) -C $(PLATFORM) clean + rm -r .installed-$(PLATFORM) + +distclean:: + rm -rf $(PLATFORM) .installed-$(PLATFORM) |