diff options
author | Timothy Gu <timothygu99@gmail.com> | 2014-11-09 03:31:30 (GMT) |
---|---|---|
committer | Timothy Gu <timothygu99@gmail.com> | 2014-11-09 03:31:30 (GMT) |
commit | 8657b707b439ba88d47ed242fdaa9e16f3e70832 (patch) | |
tree | b214c740ba769c55a251adca9c8911052351bc6a | |
parent | b2fcc7a4860f277da7ad9880277359f5117e2b8c (diff) | |
parent | 8abea457c9de523300e705ab04e26b1c82de3f4c (diff) | |
download | mxe-8657b707b439ba88d47ed242fdaa9e16f3e70832.zip mxe-8657b707b439ba88d47ed242fdaa9e16f3e70832.tar.gz mxe-8657b707b439ba88d47ed242fdaa9e16f3e70832.tar.bz2 |
Merge pull request #476 from highperformancecoder/master
Add json_spirit package.
-rw-r--r-- | index.html | 4 | ||||
-rw-r--r-- | src/json_spirit-1-libs-crlf.patch | 42 | ||||
-rw-r--r-- | src/json_spirit.mk | 43 |
3 files changed, 89 insertions, 0 deletions
@@ -1534,6 +1534,10 @@ local-pkg-list: $(LOCAL_PKG_LIST)</pre> <td class="website"><a href="https://github.com/json-c/json-c/wiki">json-c</a></td> </tr> <tr> + <td class="package">json_spirit</td> + <td class="website"><a href="https://www.codeproject.com/Articles/20027/JSON-Spirit-A-C-JSON-Parser-Generator-Implemented">json_spirit</a></td> + </tr> + <tr> <td class="package">lame</td> <td class="website"><a href="http://lame.sourceforge.net/">lame</a></td> </tr> diff --git a/src/json_spirit-1-libs-crlf.patch b/src/json_spirit-1-libs-crlf.patch new file mode 100644 index 0000000..e5444fc --- /dev/null +++ b/src/json_spirit-1-libs-crlf.patch @@ -0,0 +1,42 @@ +From 1351ac4833d49f49250c9f1e386b97a92b40c9fa Mon Sep 17 00:00:00 2001 +From: Timothy Gu <timothygu99@gmail.com> +Date: Sat, 8 Nov 2014 20:02:08 -0500 +Subject: [PATCH] Use BUILD_SHARED_LIBS to determine the type of library to be + built + +Signed-off-by: Timothy Gu <timothygu99@gmail.com> + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0b9ef30..2a54cc8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -18,9 +18,4 @@ INSTALL( + ${CMAKE_SOURCE_DIR}/json_spirit/json_spirit_writer_options.h
+ DESTINATION include)
+
+-INSTALL(
+- FILES
+- ${CMAKE_BINARY_DIR}/json_spirit/libjson_spirit.a
+- DESTINATION lib)
+-
+ INCLUDE(CPack)
+diff --git a/json_spirit/CMakeLists.txt b/json_spirit/CMakeLists.txt +index 04330f5..9b54790 100644 +--- a/json_spirit/CMakeLists.txt ++++ b/json_spirit/CMakeLists.txt +@@ -13,5 +13,11 @@ json_spirit_writer_template.h ) + FIND_PACKAGE(Boost 1.34 REQUIRED)
+ INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR})
+
+-ADD_LIBRARY(json_spirit STATIC ${JSON_SPIRIT_SRCS})
++ADD_LIBRARY(json_spirit ${JSON_SPIRIT_SRCS})
++
++INSTALL(
++ TARGETS json_spirit
++ RUNTIME DESTINATION bin
++ LIBRARY DESTINATION lib
++ ARCHIVE DESTINATION lib)
+
+-- +1.9.1 + diff --git a/src/json_spirit.mk b/src/json_spirit.mk new file mode 100644 index 0000000..798a06f --- /dev/null +++ b/src/json_spirit.mk @@ -0,0 +1,43 @@ +# This file is part of MXE. +# See index.html for further information. + +PKG := json_spirit +$(PKG)_IGNORE := +$(PKG)_VERSION := 4.08 +$(PKG)_CHECKSUM := 65e942dc5ed209cf7d653a721aaf907c7196d978 +$(PKG)_SUBDIR := $(PKG)_v$($(PKG)_VERSION) +$(PKG)_FILE := $(PKG)_v$($(PKG)_VERSION).zip + +# The original source of this file at +# http://www.codeproject.com/KB/recipes/JSON_Spirit/json_spirit_v4.08.zip +# is behind a login screen. Use manually downloaded cache on the S3 bucket. +$(PKG)_URL = $(PKG_MIRROR)/$(shell $(call ESCAPE_PKG,json_spirit)) +$(PKG)_DEPS := gcc boost + +define $(PKG)_UPDATE + echo 'TODO: json_spirit automatic update explicitly disabled. Please ' >&2; + echo ' manually check and update.' >&2; + echo 'Latest:' >&2; + $(WGET) -q -O- 'http://www.codeproject.com/Articles/20027/JSON-Spirit-A-C-JSON-Parser-Generator-Implemented' | \ + $(SED) -n 's,.*/JSON_Spirit/json_spirit_v\([0-9.]*\)[.]zip.*".*,\1,p' | \ + head -1 >&2; + echo 'Current:' >&2; + echo $(json_spirit_VERSION) >&2; + echo $(json_spirit_VERSION) +endef + +define $(PKG)_BUILD + mkdir '$(1).build' + cd '$(1).build' && \ + cmake '$(1)' \ + -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_RELEASE_POSTFIX='' \ + -DBoost_THREADAPI=win32 + $(MAKE) -C '$(1).build' -j '$(JOBS)' VERBOSE=1 || $(MAKE) -C '$(1)' -j 1 VERBOSE=1 + $(MAKE) -C '$(1).build' -j 1 install VERBOSE=1 + + $(TARGET)-g++ \ + '$(1)/json_demo/json_demo.cpp' \ + -o '$(PREFIX)/$(TARGET)/bin/test-json_spirit.exe' -ljson_spirit +endef |