Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[droid] fix crashing on addon installation #8278

Merged
merged 2 commits into from
Oct 25, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1125,7 +1125,7 @@ int main() {
)])
AC_LANG_POP([C++])

if test "${target_platform}" = "target_linux" || test "${target_platform}" = "target_raspberry_pi"; then
if test "${target_platform}" = "target_linux" || test "${target_platform}" = "target_raspberry_pi" || test "${target_platform}" = "target_android"; then
PKG_CHECK_MODULES([UUID], [uuid],, AC_MSG_ERROR(libuuid not found))
fi

Expand All @@ -1141,9 +1141,6 @@ AC_LINK_IFELSE(
[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"],
Expand Down
8 changes: 4 additions & 4 deletions tools/depends/target/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ ifeq ($(OS),osx)
endif

ifeq ($(OS),android)
DEPENDS += mdnsresponder android-sources-ics google-breakpad
DEPENDS += mdnsresponder android-sources-ics google-breakpad libuuid
CROSSGUID_DEPS = libuuid
endif

DEPENDS := $(filter-out $(EXCLUDED_DEPENDS),$(DEPENDS))
Expand Down Expand Up @@ -63,6 +64,7 @@ ifeq ($(OS),linux)
endif
DEPENDS += alsa-lib
ALSA_LIB = alsa-lib
CROSSGUID_DEPS = libuuid
endif

.PHONY: $(DEPENDS)
Expand Down Expand Up @@ -97,9 +99,7 @@ libsdl2: $(LINUX_SYSTEM_LIBS)
libxslt: libgcrypt
ffmpeg: $(ICONV) $(ZLIB) bzip2 libvorbis $(FFMPEG_DEPENDS)
libcec: platform
ifeq ($(OS),linux)
crossguid: libuuid
endif
crossguid: $(CROSSGUID_DEPS)

.installed-$(PLATFORM): $(DEPENDS)
touch $@
Expand Down
3 changes: 0 additions & 3 deletions tools/depends/target/crossguid/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ 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
Expand Down
24 changes: 9 additions & 15 deletions tools/depends/target/libuuid/Makefile
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
include ../../Makefile.include
DEPS= ../../Makefile.include Makefile

# We use uuid from e2fsprogs since this easily cross-compiles on android, while util-linux does not.
# lib name, version
LIBNAME=libuuid
VERSION=2.20.0
SOURCE=util-linux-2.20.1
ARCHIVE=$(SOURCE).tar.gz
VERSION=1.42.13
SOURCE=e2fsprogs-1.42.13
ARCHIVE=$(SOURCE).tar.xz

# configuration settings
CONFIGURE=echo "scanf_cv_type_modifier=as" > config.cache; \
./configure --prefix=$(PREFIX) --cache-file=config.cache \
--disable-shared --disable-mount --disable-fsck --disable-partx --disable-libblkid \
--disable-libmount --disable-mountpoint --disable-nls --disable-rpath --disable-agetty \
--disable-cramfs --disable-switch_root --disable-pivot_root --disable-fallocate \
--disable-unshare --disable-rename --disable-schedutils --disable-wall --without-ncurses

LIBDYLIB=$(PLATFORM)/libuuid/src/.libs/$(LIBNAME).a
LIBDYLIB=$(PLATFORM)/lib/$(LIBNAME).a

all: .installed-$(PLATFORM)

Expand All @@ -25,17 +19,17 @@ $(TARBALLS_LOCATION)/$(ARCHIVE):
$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
cd $(PLATFORM); $(CONFIGURE)
cd $(PLATFORM); ./configure --prefix=$(PREFIX) --disable-fsck

$(LIBDYLIB): $(PLATFORM)
$(MAKE) -C $(PLATFORM)/libuuid
cd $(PLATFORM)/lib/uuid ; $(MAKE) -j1

.installed-$(PLATFORM): $(LIBDYLIB)
$(MAKE) -C $(PLATFORM)/libuuid install
cd $(PLATFORM)/lib/uuid ; $(MAKE) -j1 install
touch $@

clean:
$(MAKE) -C $(PLATFORM)/libuuid clean
$(MAKE) -C $(PLATFORM) clean
rm -f .installed-$(PLATFORM)

distclean::
Expand Down
4 changes: 0 additions & 4 deletions xbmc/utils/StringUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1081,11 +1081,7 @@ void StringUtils::WordToDigits(std::string &word)

std::string StringUtils::CreateUUID()
{
#if !defined(TARGET_ANDROID)
static GuidGenerator guidGenerator;
#else
static GuidGenerator guidGenerator(xbmc_jnienv());
#endif
auto guid = guidGenerator.newGuid();

std::stringstream strGuid; strGuid << guid;
Expand Down