Accepting request 434124 from home:adamm:branches:devel:libraries:c_c++
- Added BuildRoot so we can actually build for SLE11 - New upstream version 1.1.0 * Added JSON Pointer * Added JSON Schema * Added relaxed JSON syntax (comment, trailing comma, NaN/Infinity) * Iterating array/object with C++11 Range-based for loop * Reduce memory overhead of each Value from 24 bytes to 16 bytes in x86-64 architecture. * full changeset at https://github.com/miloyip/rapidjson/releases/tag/v1.1.0 - remove_arch_specific_flags.patch: remove architecture specific compiler flags. - merge doc into devel package, it only adds about 20kB OBS-URL: https://build.opensuse.org/request/show/434124 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/rapidjson?expand=0&rev=2
This commit is contained in:
parent
e9b3b26d82
commit
1027e892c0
20
fix_compilation_sle11sp4.patch
Normal file
20
fix_compilation_sle11sp4.patch
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
Author: Adam Majer <adam.majer@suse.de>
|
||||||
|
Summary: Fix compilation with older GCC compiler
|
||||||
|
PR: https://github.com/miloyip/rapidjson/pull/755
|
||||||
|
|
||||||
|
include/rapidjson/reader.h:578: error: suggest a space before ';' or explicit braces around empty body in 'while' statement
|
||||||
|
: warnings being treated as errors
|
||||||
|
|
||||||
|
Index: rapidjson-1.1.0/include/rapidjson/reader.h
|
||||||
|
===================================================================
|
||||||
|
--- rapidjson-1.1.0.orig/include/rapidjson/reader.h
|
||||||
|
+++ rapidjson-1.1.0/include/rapidjson/reader.h
|
||||||
|
@@ -575,7 +575,7 @@ private:
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (RAPIDJSON_LIKELY(Consume(is, '/')))
|
||||||
|
- while (is.Peek() != '\0' && is.Take() != '\n');
|
||||||
|
+ while (is.Peek() != '\0' && is.Take() != '\n') {}
|
||||||
|
else
|
||||||
|
RAPIDJSON_PARSE_ERROR(kParseErrorUnspecificSyntaxError, is.Tell());
|
||||||
|
|
30
fix_install_paths.patch
Normal file
30
fix_install_paths.patch
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
Author: Adam Majer <adam.majer@suse.de>
|
||||||
|
Summary: Install data under data directory, not library prefix
|
||||||
|
|
||||||
|
Index: rapidjson-1.1.0/CMakeLists.txt
|
||||||
|
===================================================================
|
||||||
|
--- rapidjson-1.1.0.orig/CMakeLists.txt
|
||||||
|
+++ rapidjson-1.1.0/CMakeLists.txt
|
||||||
|
@@ -94,11 +94,11 @@ 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")
|
||||||
|
+SET(SHARE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/share" CACHE STRING "Directory where shared data will install")
|
||||||
|
SET(DOC_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/doc/${PROJECT_NAME}" CACHE PATH "Path to the documentation")
|
||||||
|
|
||||||
|
IF(UNIX OR CYGWIN)
|
||||||
|
- SET(_CMAKE_INSTALL_DIR "${LIB_INSTALL_DIR}/cmake/${PROJECT_NAME}")
|
||||||
|
+ SET(_CMAKE_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/cmake/${PROJECT_NAME}")
|
||||||
|
ELSEIF(WIN32)
|
||||||
|
SET(_CMAKE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/cmake")
|
||||||
|
ENDIF()
|
||||||
|
@@ -133,7 +133,7 @@ IF (UNIX OR CYGWIN)
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc
|
||||||
|
@ONLY)
|
||||||
|
INSTALL (FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc
|
||||||
|
- DESTINATION "${LIB_INSTALL_DIR}/pkgconfig"
|
||||||
|
+ DESTINATION "${SHARE_INSTALL_PREFIX}/pkgconfig"
|
||||||
|
COMPONENT pkgconfig)
|
||||||
|
ENDIF()
|
||||||
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:c3711ed2b3c76a5565ee9f0128bb4ec6753dbcc23450b713842df8f236d08666
|
|
||||||
size 725981
|
|
@ -1,3 +1,25 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Oct 10 14:11:09 UTC 2016 - adam.majer@suse.de
|
||||||
|
|
||||||
|
- Added BuildRoot so we can actually build for SLE11
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Sep 30 12:49:18 UTC 2016 - adam.majer@suse.de
|
||||||
|
|
||||||
|
- New upstream version 1.1.0
|
||||||
|
* Added JSON Pointer
|
||||||
|
* Added JSON Schema
|
||||||
|
* Added relaxed JSON syntax (comment, trailing comma,
|
||||||
|
NaN/Infinity)
|
||||||
|
* Iterating array/object with C++11 Range-based for loop
|
||||||
|
* Reduce memory overhead of each Value from 24 bytes to 16 bytes
|
||||||
|
in x86-64 architecture.
|
||||||
|
* full changeset at
|
||||||
|
https://github.com/miloyip/rapidjson/releases/tag/v1.1.0
|
||||||
|
- remove_arch_specific_flags.patch: remove architecture specific
|
||||||
|
compiler flags.
|
||||||
|
- merge doc into devel package, it only adds about 20kB
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Apr 20 12:56:56 UTC 2016 - tbechtold@suse.com
|
Wed Apr 20 12:56:56 UTC 2016 - tbechtold@suse.com
|
||||||
|
|
||||||
|
@ -16,15 +16,20 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%global debug_package %{nil}
|
|
||||||
Name: rapidjson
|
Name: rapidjson
|
||||||
Version: 1.0.2
|
Version: 1.1.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Fast JSON parser and generator for C++
|
Summary: Fast JSON parser and generator for C++
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
Url: http://miloyip.github.io/%{name}
|
Url: http://rapidjson.org/
|
||||||
Source0: https://github.com/miloyip/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
Source0: https://github.com/miloyip/rapidjson/archive/v%{version}.tar.gz
|
||||||
|
Patch: remove_arch_specific_flags.patch
|
||||||
|
Patch1: fix_compilation_sle11sp4.patch
|
||||||
|
Patch10: fix_install_paths.patch
|
||||||
|
%if 0%{?suse_version} < 1200
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
%endif
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: pkg-config
|
BuildRequires: pkg-config
|
||||||
@ -49,42 +54,35 @@ RapidJSON is a JSON parser and generator for C++. It was inspired by RapidXml.
|
|||||||
Summary: Fast JSON parser and generator for C++
|
Summary: Fast JSON parser and generator for C++
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
Provides: %{name} == %{version}
|
Provides: %{name} == %{version}
|
||||||
|
%if 0%{?suse_version} > 1200
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
%endif
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
RapidJSON is a JSON parser and generator for C++.
|
RapidJSON is a header-only JSON parser and generator for C++.
|
||||||
|
This package contains development headers and examples.
|
||||||
%package doc
|
|
||||||
Summary: Fast JSON parser and generator for C++
|
|
||||||
Group: Documentation/Other
|
|
||||||
BuildArch: noarch
|
|
||||||
|
|
||||||
%description doc
|
|
||||||
RapidJSON is a JSON parser and generator for C++.
|
|
||||||
This package contains the documentation.
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch -p1
|
||||||
|
%patch1 -p1
|
||||||
|
%patch10 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%cmake \
|
%cmake -DDOC_INSTALL_DIR=%{_docdir}/%{name}
|
||||||
-DDOC_INSTALL_DIR=%{_docdir}/%{name}
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%cmake_install
|
%cmake_install
|
||||||
|
|
||||||
# Move pkgconfig und CMake-stuff to generic datadir.
|
|
||||||
mv -f %{buildroot}%{_libdir}/* %{buildroot}%{_datadir}
|
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%doc license.txt
|
%doc license.txt
|
||||||
%{_datadir}/cmake
|
%dir %{_datadir}/cmake/RapidJSON
|
||||||
%{_datadir}/pkgconfig/*
|
%{_datadir}/cmake/RapidJSON/RapidJSONConfig.cmake
|
||||||
|
%{_datadir}/cmake/RapidJSON/RapidJSONConfigVersion.cmake
|
||||||
|
%{_datadir}/pkgconfig/RapidJSON.pc
|
||||||
%{_includedir}/%{name}
|
%{_includedir}/%{name}
|
||||||
|
|
||||||
%files doc
|
|
||||||
%defattr(-,root,root)
|
|
||||||
%dir %{_docdir}/%{name}
|
%dir %{_docdir}/%{name}
|
||||||
%{_docdir}/%{name}/*
|
%{_docdir}/%{name}/*
|
||||||
|
|
||||||
|
26
remove_arch_specific_flags.patch
Normal file
26
remove_arch_specific_flags.patch
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
Author: Adam Majer <adam.majer@suse.de>
|
||||||
|
Summary: Remove architecture specific compiler flags
|
||||||
|
PR: https://github.com/miloyip/rapidjson/pull/756
|
||||||
|
|
||||||
|
Index: rapidjson-1.1.0/CMakeLists.txt
|
||||||
|
===================================================================
|
||||||
|
--- rapidjson-1.1.0.orig/CMakeLists.txt
|
||||||
|
+++ rapidjson-1.1.0/CMakeLists.txt
|
||||||
|
@@ -50,7 +50,7 @@ if(CCACHE_FOUND)
|
||||||
|
endif(CCACHE_FOUND)
|
||||||
|
|
||||||
|
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||||
|
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -Wall -Wextra -Werror")
|
||||||
|
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror")
|
||||||
|
if (RAPIDJSON_BUILD_CXX11)
|
||||||
|
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.7.0")
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
|
||||||
|
@@ -73,7 +73,7 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||||
|
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -Wall -Wextra -Werror -Wno-missing-field-initializers")
|
||||||
|
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror -Wno-missing-field-initializers")
|
||||||
|
if (RAPIDJSON_BUILD_CXX11)
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||||
|
endif()
|
3
v1.1.0.tar.gz
Normal file
3
v1.1.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:bf7ced29704a1e696fbccf2a2b4ea068e7774fa37f6d7dd4039d0787f8bed98e
|
||||||
|
size 1019402
|
Loading…
Reference in New Issue
Block a user