package/kodi-texturepacker: new host package
authorBernd Kuhls <bernd.kuhls@t-online.de>
Sat, 29 Apr 2017 08:37:27 +0000 (10:37 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 29 Apr 2017 09:36:04 +0000 (11:36 +0200)
Needed for upcoming kodi version bump to 17.1-Krypton which will also
switch the kodi build system to CMake.

"-std=c++0x" is needed to maintain compatability with host-gcc 4.6.

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
[Thomas: move texturepacker patch from Kodi package, use SPDX license
code, minor tweaks.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/kodi-texturepacker/0001-texturepacker.patch [new file with mode: 0644]
package/kodi-texturepacker/kodi-texturepacker.hash [new symlink]
package/kodi-texturepacker/kodi-texturepacker.mk [new file with mode: 0644]
package/kodi/0002-texturepacker.patch [deleted file]

diff --git a/package/kodi-texturepacker/0001-texturepacker.patch b/package/kodi-texturepacker/0001-texturepacker.patch
new file mode 100644 (file)
index 0000000..8830b4c
--- /dev/null
@@ -0,0 +1,16 @@
+Fix host compile
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+
+diff -uNr xbmc-656cba5d5c7c5edb166196b48560825b9b1f03fd.org/tools/depends/native/TexturePacker/Makefile xbmc-656cba5d5c7c5edb166196b48560825b9b1f03fd/tools/depends/native/TexturePacker/Makefile
+--- xbmc-656cba5d5c7c5edb166196b48560825b9b1f03fd.org/tools/depends/native/TexturePacker/Makefile      2015-01-25 09:00:48.000000000 +0100
++++ xbmc-656cba5d5c7c5edb166196b48560825b9b1f03fd/tools/depends/native/TexturePacker/Makefile  2015-01-25 13:03:23.606140953 +0100
+@@ -36,7 +36,7 @@
+       -rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
+       cd $(PLATFORM); cp -a $(SOURCE)/* .
+       cd $(PLATFORM); ./autogen.sh
+-      cd $(PLATFORM); ./configure --prefix=$(PREFIX) $(EXTRA_CONFIGURE) EXTRA_DEFINES="$(NATIVE_ARCH_DEFINES)"
++      cd $(PLATFORM); ./configure --prefix=$(PREFIX) EXTRA_DEFINES="$(NATIVE_ARCH_DEFINES)"
+ $(APP): $(PLATFORM)
diff --git a/package/kodi-texturepacker/kodi-texturepacker.hash b/package/kodi-texturepacker/kodi-texturepacker.hash
new file mode 120000 (symlink)
index 0000000..a575750
--- /dev/null
@@ -0,0 +1 @@
+../kodi/kodi.hash
\ No newline at end of file
diff --git a/package/kodi-texturepacker/kodi-texturepacker.mk b/package/kodi-texturepacker/kodi-texturepacker.mk
new file mode 100644 (file)
index 0000000..c6d3b05
--- /dev/null
@@ -0,0 +1,41 @@
+################################################################################
+#
+# kodi-texturepacker
+#
+################################################################################
+
+# Not possible to directly refer to kodi variables, because of
+# first/second expansion trickery...
+KODI_TEXTUREPACKER_VERSION = 17.1-Krypton
+KODI_TEXTUREPACKER_SITE = $(call github,xbmc,xbmc,$(KODI_TEXTUREPACKER_VERSION))
+KODI_TEXTUREPACKER_SOURCE = kodi-$(KODI_TEXTUREPACKER_VERSION).tar.gz
+KODI_TEXTUREPACKER_LICENSE = GPL-2.0
+KODI_TEXTUREPACKER_LICENSE_FILES = LICENSE.GPL
+HOST_KODI_TEXTUREPACKER_SUBDIR = tools/depends/native/TexturePacker
+HOST_KODI_TEXTUREPACKER_DEPENDENCIES = \
+       host-giflib \
+       host-libjpeg \
+       host-libpng \
+       host-lzo
+
+HOST_KODI_TEXTUREPACKER_CXXFLAGS = \
+       $(HOST_CXXFLAGS) \
+       -std=c++0x \
+       -DTARGET_POSIX \
+       -DTARGET_LINUX \
+       -D_LINUX \
+       -I$(@D)/xbmc/linux
+
+HOST_KODI_TEXTUREPACKER_CONF_OPTS += \
+       -DCMAKE_CXX_FLAGS="$(HOST_KODI_TEXTUREPACKER_CXXFLAGS)" \
+       -DCMAKE_MODULE_PATH=$(@D)/project/cmake/modules \
+       -DCORE_SOURCE_DIR=$(@D) \
+       -Wno-dev
+
+define HOST_KODI_TEXTUREPACKER_INSTALL_CMDS
+       $(INSTALL) -m 755 -D \
+               $(@D)/tools/depends/native/TexturePacker/TexturePacker \
+               $(HOST_DIR)/usr/bin/TexturePacker
+endef
+
+$(eval $(host-cmake-package))
diff --git a/package/kodi/0002-texturepacker.patch b/package/kodi/0002-texturepacker.patch
deleted file mode 100644 (file)
index 8830b4c..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-Fix host compile
-
-Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
-
-diff -uNr xbmc-656cba5d5c7c5edb166196b48560825b9b1f03fd.org/tools/depends/native/TexturePacker/Makefile xbmc-656cba5d5c7c5edb166196b48560825b9b1f03fd/tools/depends/native/TexturePacker/Makefile
---- xbmc-656cba5d5c7c5edb166196b48560825b9b1f03fd.org/tools/depends/native/TexturePacker/Makefile      2015-01-25 09:00:48.000000000 +0100
-+++ xbmc-656cba5d5c7c5edb166196b48560825b9b1f03fd/tools/depends/native/TexturePacker/Makefile  2015-01-25 13:03:23.606140953 +0100
-@@ -36,7 +36,7 @@
-       -rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
-       cd $(PLATFORM); cp -a $(SOURCE)/* .
-       cd $(PLATFORM); ./autogen.sh
--      cd $(PLATFORM); ./configure --prefix=$(PREFIX) $(EXTRA_CONFIGURE) EXTRA_DEFINES="$(NATIVE_ARCH_DEFINES)"
-+      cd $(PLATFORM); ./configure --prefix=$(PREFIX) EXTRA_DEFINES="$(NATIVE_ARCH_DEFINES)"
- $(APP): $(PLATFORM)