diff --git a/_service b/_service new file mode 100644 index 0000000..e5cb095 --- /dev/null +++ b/_service @@ -0,0 +1,15 @@ + + + https://github.com/Tencent/rapidjson.git + git + enable + rapidjson + 1.1.0+git%cd.%h + thirdparty/* + + + *.tar + xz + + + diff --git a/fix_compilation_gcc7.patch b/fix_compilation_gcc7.patch deleted file mode 100644 index 338abaf..0000000 --- a/fix_compilation_gcc7.patch +++ /dev/null @@ -1,39 +0,0 @@ -commit fe19b7b6016d446722621fb407738209d1a911e8 -Author: Harry Wong -Date: Thu May 4 10:08:48 2017 +0800 - - Supress implicit fallthrough in GCC - -diff --git a/include/rapidjson/internal/regex.h b/include/rapidjson/internal/regex.h -index 1369ea26..6d110bdb 100644 ---- a/include/rapidjson/internal/regex.h -+++ b/include/rapidjson/internal/regex.h -@@ -29,6 +29,7 @@ RAPIDJSON_DIAG_OFF(implicit-fallthrough) - #ifdef __GNUC__ - RAPIDJSON_DIAG_PUSH - RAPIDJSON_DIAG_OFF(effc++) -+RAPIDJSON_DIAG_OFF(implicit-fallthrough) - #endif - - #ifdef _MSC_VER -commit cba45fe9de6923b858edb0780e257b7257aa4f7b -Author: Harry Wong -Date: Thu May 4 10:32:45 2017 +0800 - - Onley apply to GCC 7 - -diff --git a/include/rapidjson/internal/regex.h b/include/rapidjson/internal/regex.h -index 6d110bdb..e1a2faae 100644 ---- a/include/rapidjson/internal/regex.h -+++ b/include/rapidjson/internal/regex.h -@@ -29,8 +29,10 @@ RAPIDJSON_DIAG_OFF(implicit-fallthrough) - #ifdef __GNUC__ - RAPIDJSON_DIAG_PUSH - RAPIDJSON_DIAG_OFF(effc++) -+#if __GNUC__ >= 7 - RAPIDJSON_DIAG_OFF(implicit-fallthrough) - #endif -+#endif - - #ifdef _MSC_VER - RAPIDJSON_DIAG_PUSH diff --git a/fix_compilation_sle11sp4.patch b/fix_compilation_sle11sp4.patch deleted file mode 100644 index 52655f9..0000000 --- a/fix_compilation_sle11sp4.patch +++ /dev/null @@ -1,20 +0,0 @@ -Author: Adam Majer -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()); - diff --git a/fix_install_paths.patch b/fix_install_paths.patch deleted file mode 100644 index 5f20b4e..0000000 --- a/fix_install_paths.patch +++ /dev/null @@ -1,30 +0,0 @@ -Author: Adam Majer -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() - diff --git a/ignore_gcc8_warnings.patch b/ignore_gcc8_warnings.patch deleted file mode 100644 index 7874398..0000000 --- a/ignore_gcc8_warnings.patch +++ /dev/null @@ -1,36 +0,0 @@ -commit 54dab1eebb0dea32d9ea49dad4fa9c98816c21ed -Author: Romain Geissler -Date: Mon Feb 19 12:52:16 2018 +0100 - - Ignore GCC 8 warnings. - -diff --git a/include/rapidjson/document.h b/include/rapidjson/document.h -index eb6d7dcb..69ac924b 100644 ---- a/include/rapidjson/document.h -+++ b/include/rapidjson/document.h -@@ -2014,7 +2014,12 @@ private: - if (count) { - GenericValue* e = static_cast(allocator.Malloc(count * sizeof(GenericValue))); - SetElementsPointer(e); -+RAPIDJSON_DIAG_PUSH -+#if defined(__GNUC__) && __GNUC__ >= 8 -+RAPIDJSON_DIAG_OFF(class-memaccess) // ignore complains from gcc that no trivial copy constructor exists. -+#endif - std::memcpy(e, values, count * sizeof(GenericValue)); -+RAPIDJSON_DIAG_POP - } - else - SetElementsPointer(0); -@@ -2027,7 +2032,12 @@ private: - if (count) { - Member* m = static_cast(allocator.Malloc(count * sizeof(Member))); - SetMembersPointer(m); -+RAPIDJSON_DIAG_PUSH -+#if defined(__GNUC__) && __GNUC__ >= 8 -+RAPIDJSON_DIAG_OFF(class-memaccess) // ignore complains from gcc that no trivial copy constructor exists. -+#endif - std::memcpy(m, members, count * sizeof(Member)); -+RAPIDJSON_DIAG_POP - } - else - SetMembersPointer(0); diff --git a/rapidjson-1.1.0+git20190517.4b3d7c2f.tar.xz b/rapidjson-1.1.0+git20190517.4b3d7c2f.tar.xz new file mode 100644 index 0000000..19a7c29 --- /dev/null +++ b/rapidjson-1.1.0+git20190517.4b3d7c2f.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:33dbb404ae501b879015ee73b6f7eeef20e163653c0e4d23fb1383ea57a12056 +size 827716 diff --git a/rapidjson.changes b/rapidjson.changes index b6d98fb..2c7e3be 100644 --- a/rapidjson.changes +++ b/rapidjson.changes @@ -1,3 +1,28 @@ +------------------------------------------------------------------- +Wed Jun 12 10:15:53 UTC 2019 - Tomáš Chvátal + +- Remove bundled gtest and do not test as the testing only + works with bundled gtest version + +------------------------------------------------------------------- +Thu Jun 06 08:16:06 UTC 2019 - tchvatal@suse.com + +- Switch to _service as upstream didn't release since 2016 and we + would need to backport many more features to make ie python-rapidjson + working +- Update to version 1.1.0+git20190517.4b3d7c2f: + * Add missing curly brackets in STDREGEX's CreatePattern(). + * fix typo + * add missing header "ios" + * doc/tutorial.zh-cn: fixed some typos + * Update allocators.h +- Remove pateches for the old version: + * fix_compilation_gcc7.patch + * fix_compilation_sle11sp4.patch + * fix_install_paths.patch + * ignore_gcc8_warnings.patch + * remove_arch_specific_flags.patch + ------------------------------------------------------------------- Wed Dec 12 09:43:25 UTC 2018 - Jan Engelhardt diff --git a/rapidjson.spec b/rapidjson.spec index 470db8c..85c7756 100644 --- a/rapidjson.spec +++ b/rapidjson.spec @@ -1,7 +1,7 @@ # # spec file for package rapidjson # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,24 +12,18 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # Name: rapidjson -Version: 1.1.0 +Version: 1.1.0+git20190517.4b3d7c2f Release: 0 Summary: JSON parser and generator for C++ License: MIT Group: Development/Libraries/C and C++ URL: http://rapidjson.org/ -Source0: https://github.com/miloyip/rapidjson/archive/v%{version}.tar.gz -Patch0: remove_arch_specific_flags.patch -Patch1: fix_compilation_sle11sp4.patch -Patch2: fix_compilation_gcc7.patch -# PATCH-FIX-UPSTREAM -- ignore_gcc8_warnings.patch -- Ignore GCC 8 warnings. -Patch3: ignore_gcc8_warnings.patch -Patch10: fix_install_paths.patch +Source0: %{name}-%{version}.tar.xz BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: pkgconfig @@ -55,9 +49,6 @@ RapidJSON is a JSON parser and generator for C++. It was inspired by RapidXml. Summary: Header files for rapidjson, a JSON parser and generator for C++ Group: Development/Libraries/C and C++ Provides: %{name} = %{version} -%if 0%{?suse_version} > 1200 -BuildArch: noarch -%endif %description devel RapidJSON is a header-only JSON parser and generator for C++. @@ -65,34 +56,25 @@ This package contains development headers and examples. %prep %setup -q -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch10 -p1 +sed -i -e 's:-Werror::g' CMakeLists.txt %build -%cmake -DDOC_INSTALL_DIR=%{_docdir}/%{name} -make %{?_smp_mflags} +%cmake \ + -DDOC_INSTALL_DIR=%{_docdir}/%{name}-devel \ + -DRAPIDJSON_BUILD_TESTS=ON \ + -DRAPIDJSON_ENABLE_INSTRUMENTATION_OPT=OFF +%cmake_build %install %cmake_install -rm -f %{buildroot}%{_includedir}/%{name}/*.orig %files devel -%defattr(-,root,root) -%if 0%{?suse_version} < 1500 -%doc license.txt -%else +%doc CHANGELOG.md readme.md %license license.txt -%endif -# %license license.txt -%dir %{_datadir}/cmake/RapidJSON -%{_datadir}/cmake/RapidJSON/RapidJSONConfig.cmake -%{_datadir}/cmake/RapidJSON/RapidJSONConfigVersion.cmake -%{_datadir}/pkgconfig/RapidJSON.pc -%{_includedir}/%{name} -%dir %{_docdir}/%{name} -%{_docdir}/%{name}/* +%dir %{_docdir}/%{name}-devel +%{_docdir}/%{name}-devel/* +%{_includedir}/rapidjson/ +%{_libdir}/cmake/RapidJSON/ +%{_libdir}/pkgconfig/*.pc %changelog diff --git a/remove_arch_specific_flags.patch b/remove_arch_specific_flags.patch deleted file mode 100644 index c008cab..0000000 --- a/remove_arch_specific_flags.patch +++ /dev/null @@ -1,26 +0,0 @@ -Author: Adam Majer -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() diff --git a/v1.1.0.tar.gz b/v1.1.0.tar.gz deleted file mode 100644 index ab39102..0000000 --- a/v1.1.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bf7ced29704a1e696fbccf2a2b4ea068e7774fa37f6d7dd4039d0787f8bed98e -size 1019402