summaryrefslogtreecommitdiffstats
path: root/package/libplatform
diff options
context:
space:
mode:
authorBernd Kuhls <bernd.kuhls@t-online.de>2015-07-22 22:30:24 +0200
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-07-30 09:29:23 +0200
commitf2f242c4ba6d6647c4135ef000da033d33c96983 (patch)
treed98a58a41d1097f3a1c38b57d0064d3db6049137 /package/libplatform
parenta99d7b67d458cbc30cb773de046087ff5ec737ca (diff)
downloadbuildroot-f2f242c4ba6d6647c4135ef000da033d33c96983.tar.gz
buildroot-f2f242c4ba6d6647c4135ef000da033d33c96983.zip
package/libplatform: new package
Needed by libcec 3.x [Thomas: - adjust licensing information: license is not GPLv3+, but GPLv2+ plus one source file in PHP license v3.01. - add proper license files. - remove the -DCMAKE_MODULE_PATH=$(STAGING_DIR)/usr/lib/kodi since it doesn't seem to be necessary - add patch to fix invalid header and library paths in platform-config.cmake.] Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/libplatform')
-rw-r--r--package/libplatform/0001-platform-config.cmake-fix-paths-for-cross-compilatio.patch40
-rw-r--r--package/libplatform/Config.in6
-rw-r--r--package/libplatform/libplatform.mk13
3 files changed, 59 insertions, 0 deletions
diff --git a/package/libplatform/0001-platform-config.cmake-fix-paths-for-cross-compilatio.patch b/package/libplatform/0001-platform-config.cmake-fix-paths-for-cross-compilatio.patch
new file mode 100644
index 0000000000..89f35bdb3d
--- /dev/null
+++ b/package/libplatform/0001-platform-config.cmake-fix-paths-for-cross-compilatio.patch
@@ -0,0 +1,40 @@
+From 65ba437ed5514dd5762a796d349ed5db49e40fe7 Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Date: Wed, 29 Jul 2015 21:26:16 +0200
+Subject: [PATCH] platform-config.cmake: fix paths for cross-compilation
+
+Headers and library paths in platform-config.cmake must take into
+account ${CMAKE_FIND_ROOT_PATH} to work in cross-compilation.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ platform-config.cmake.in | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/platform-config.cmake.in b/platform-config.cmake.in
+index 7fe35fe..78b5085 100644
+--- a/platform-config.cmake.in
++++ b/platform-config.cmake.in
+@@ -10,16 +10,16 @@
+ #
+ # propagate these properties from one build system to the other
+ set (platform_VERSION "@platform_VERSION_MAJOR@.@platform_VERSION_MINOR@")
+-set (platform_INCLUDE_DIRS @platform_INCLUDE_DIRS@ @CMAKE_INSTALL_PREFIX@/include)
++set (platform_INCLUDE_DIRS ${CMAKE_FIND_ROOT_PATH}/@platform_INCLUDE_DIRS@ ${CMAKE_FIND_ROOT_PATH}/@CMAKE_INSTALL_PREFIX@/include)
+ set (platform_LIBRARY_DIRS "@CMAKE_LIBRARY_OUTPUT_DIRECTORY@")
+ set (platform_LINKER_FLAGS "@platform_LINKER_FLAGS@")
+ set (platform_CONFIG_VARS "@platform_CONFIG_VARS@")
+
+ # libraries come from the build tree where this file was generated
+ if(WIN32)
+- set (platform_LIBRARY "@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@/platform.lib")
++ set (platform_LIBRARY "${CMAKE_FIND_ROOT_PATH}/@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@/platform.lib")
+ else(WIN32)
+- set (platform_LIBRARY "-L@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ -lplatform")
++ set (platform_LIBRARY "-L${CMAKE_FIND_ROOT_PATH}/@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ -lplatform")
+ endif(WIN32)
+ set (platform_LIBRARIES ${platform_LIBRARY} "@platform_LIBRARIES@")
+ mark_as_advanced (platform_LIBRARY)
+--
+2.5.0
+
diff --git a/package/libplatform/Config.in b/package/libplatform/Config.in
new file mode 100644
index 0000000000..7d275b1fc9
--- /dev/null
+++ b/package/libplatform/Config.in
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_LIBPLATFORM
+ bool
+ help
+ Platform support library used by libCEC and binary add-ons for Kodi
+
+ https://github.com/Pulse-Eight/platform
diff --git a/package/libplatform/libplatform.mk b/package/libplatform/libplatform.mk
new file mode 100644
index 0000000000..4eb934f8bf
--- /dev/null
+++ b/package/libplatform/libplatform.mk
@@ -0,0 +1,13 @@
+################################################################################
+#
+# libplatform
+#
+################################################################################
+
+LIBPLATFORM_VERSION = 1.0.10
+LIBPLATFORM_SITE = $(call github,Pulse-Eight,platform,$(LIBPLATFORM_VERSION))
+LIBPLATFORM_LICENSE = GPLv2+, PHP license v3.01
+LIBPLATFORM_LICENSE_FILES = src/os.h src/util/fstrcmp.c
+LIBPLATFORM_INSTALL_STAGING = YES
+
+$(eval $(cmake-package))
OpenPOWER on IntegriCloud