From 8ab344eb6830d5eaec3818cdf0cfbab5cab3bee2 Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Fri, 24 Mar 2017 22:24:59 +0000 Subject: [PATCH] rapidjson: add package, switch kodi from yajl to rapidjson --- packages/devel/rapidjson/package.mk | 37 +++++++++++++++++++ ...pidjson-0001-remove_custom_cxx_flags.patch | 18 +++++++++ packages/mediacenter/kodi/package.mk | 2 +- 3 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 packages/devel/rapidjson/package.mk create mode 100644 packages/devel/rapidjson/patches/rapidjson-0001-remove_custom_cxx_flags.patch diff --git a/packages/devel/rapidjson/package.mk b/packages/devel/rapidjson/package.mk new file mode 100644 index 0000000000..0edcf120c1 --- /dev/null +++ b/packages/devel/rapidjson/package.mk @@ -0,0 +1,37 @@ +################################################################################ +# This file is part of LibreELEC - https://www.libreelec.tv +# Copyright (C) 2017 Team LibreELEC +# +# LibreELEC is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# LibreELEC is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with LibreELEC. If not, see . +################################################################################ + +PKG_NAME="rapidjson" +PKG_VERSION="1.0.2" +PKG_ARCH="any" +PKG_LICENSE="MIT" +PKG_SITE="https://github.com/miloyip/rapidjson" +PKG_URL="https://github.com/miloyip/rapidjson/archive/v$PKG_VERSION.tar.gz" +PKG_DEPENDS_TARGET="toolchain" +PKG_SECTION="devel" +PKG_SHORTDESC="rapidjson: JSON parser/generator" +PKG_LONGDESC="A fast JSON parser/generator for C++ with both SAX/DOM style API" + +PKG_IS_ADDON="no" +PKG_AUTORECONF="no" + +PKG_CMAKE_OPTS_TARGET="-DRAPIDJSON_HAS_STDSTRING=ON \ + -DRAPIDJSON_BUILD_DOC=OFF \ + -DRAPIDJSON_BUILD_EXAMPLES=OFF + -DRAPIDJSON_BUILD_TESTS=OFF \ + -DRAPIDJSON_BUILD_THIRDPARTY_GTEST=OFF" diff --git a/packages/devel/rapidjson/patches/rapidjson-0001-remove_custom_cxx_flags.patch b/packages/devel/rapidjson/patches/rapidjson-0001-remove_custom_cxx_flags.patch new file mode 100644 index 0000000000..d15e861917 --- /dev/null +++ b/packages/devel/rapidjson/patches/rapidjson-0001-remove_custom_cxx_flags.patch @@ -0,0 +1,18 @@ +diff -rupN a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt 2015-09-10 18:33:21.048580591 +0200 ++++ b/CMakeLists.txt 2015-09-10 18:34:19.136579486 +0200 +@@ -25,14 +25,6 @@ if(RAPIDJSON_HAS_STDSTRING) + add_definitions(-DRAPIDJSON_HAS_STDSTRING) + endif() + +-if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -Wall -Wextra") +-elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang") +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -Wall -Wextra") +-elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") +- add_definitions(-D_CRT_SECURE_NO_WARNINGS=1) +-endif() +- + #add extra search paths for libraries and includes + SET(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "The directory the headers are installed in") + SET(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE STRING "Directory where lib will install") diff --git a/packages/mediacenter/kodi/package.mk b/packages/mediacenter/kodi/package.mk index c0da041356..2913f9698f 100644 --- a/packages/mediacenter/kodi/package.mk +++ b/packages/mediacenter/kodi/package.mk @@ -23,7 +23,7 @@ PKG_LICENSE="GPL" PKG_SITE="http://www.kodi.tv" PKG_URL="https://github.com/xbmc/xbmc/archive/$PKG_VERSION.tar.gz" PKG_SOURCE_DIR="xbmc-$PKG_VERSION*" -PKG_DEPENDS_TARGET="toolchain JsonSchemaBuilder:host TexturePacker:host xmlstarlet:host Python zlib systemd pciutils lzo pcre swig:host libass curl fontconfig fribidi tinyxml libjpeg-turbo freetype libcdio taglib libxml2 libxslt yajl sqlite ffmpeg crossguid giflib libdvdnav libhdhomerun libfmt" +PKG_DEPENDS_TARGET="toolchain JsonSchemaBuilder:host TexturePacker:host xmlstarlet:host Python zlib systemd pciutils lzo pcre swig:host libass curl fontconfig fribidi tinyxml libjpeg-turbo freetype libcdio taglib libxml2 libxslt rapidjson sqlite ffmpeg crossguid giflib libdvdnav libhdhomerun libfmt" PKG_SECTION="mediacenter" PKG_SHORTDESC="kodi: Kodi Mediacenter" PKG_LONGDESC="Kodi Media Center (which was formerly named Xbox Media Center or XBMC) is a free and open source cross-platform media player and home entertainment system software with a 10-foot user interface designed for the living-room TV. Its graphical user interface allows the user to easily manage video, photos, podcasts, and music from a computer, optical disk, local network, and the internet using a remote control."