Accepting request 709371 from devel:libraries:c_c++

OBS-URL: https://build.opensuse.org/request/show/709371
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rapidjson?expand=0&rev=2
This commit is contained in:
Dominique Leuenberger 2019-06-19 19:07:10 +00:00 committed by Git OBS Bridge
commit 9539db943a
10 changed files with 59 additions and 188 deletions

15
_service Normal file
View File

@ -0,0 +1,15 @@
<services>
<service mode="disabled" name="tar_scm">
<param name="url">https://github.com/Tencent/rapidjson.git</param>
<param name="scm">git</param>
<param name="changesgenerate">enable</param>
<param name="filename">rapidjson</param>
<param name="versionformat">1.1.0+git%cd.%h</param>
<param name="exclude">thirdparty/*</param>
</service>
<service mode="disabled" name="recompress">
<param name="file">*.tar</param>
<param name="compression">xz</param>
</service>
<service mode="disabled" name="set_version"/>
</services>

View File

@ -1,39 +0,0 @@
commit fe19b7b6016d446722621fb407738209d1a911e8
Author: Harry Wong <harrywong@live.com>
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 <harrywong@live.com>
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

View File

@ -1,20 +0,0 @@
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());

View File

@ -1,30 +0,0 @@
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()

View File

@ -1,36 +0,0 @@
commit 54dab1eebb0dea32d9ea49dad4fa9c98816c21ed
Author: Romain Geissler <romain.geissler@amadeus.com>
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<GenericValue*>(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<Member*>(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);

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:33dbb404ae501b879015ee73b6f7eeef20e163653c0e4d23fb1383ea57a12056
size 827716

View File

@ -1,3 +1,28 @@
-------------------------------------------------------------------
Wed Jun 12 10:15:53 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- 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 <jengelh@inai.de> Wed Dec 12 09:43:25 UTC 2018 - Jan Engelhardt <jengelh@inai.de>

View File

@ -1,7 +1,7 @@
# #
# spec file for package rapidjson # 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 # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # 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) # license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative. # 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 Name: rapidjson
Version: 1.1.0 Version: 1.1.0+git20190517.4b3d7c2f
Release: 0 Release: 0
Summary: JSON parser and generator for C++ Summary: JSON parser and generator for C++
License: MIT License: MIT
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
URL: http://rapidjson.org/ URL: http://rapidjson.org/
Source0: https://github.com/miloyip/rapidjson/archive/v%{version}.tar.gz Source0: %{name}-%{version}.tar.xz
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
BuildRequires: cmake BuildRequires: cmake
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: pkgconfig 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++ Summary: Header files for rapidjson, a 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
%endif
%description devel %description devel
RapidJSON is a header-only JSON parser and generator for C++. RapidJSON is a header-only JSON parser and generator for C++.
@ -65,34 +56,25 @@ This package contains development headers and examples.
%prep %prep
%setup -q %setup -q
%patch0 -p1 sed -i -e 's:-Werror::g' CMakeLists.txt
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch10 -p1
%build %build
%cmake -DDOC_INSTALL_DIR=%{_docdir}/%{name} %cmake \
make %{?_smp_mflags} -DDOC_INSTALL_DIR=%{_docdir}/%{name}-devel \
-DRAPIDJSON_BUILD_TESTS=ON \
-DRAPIDJSON_ENABLE_INSTRUMENTATION_OPT=OFF
%cmake_build
%install %install
%cmake_install %cmake_install
rm -f %{buildroot}%{_includedir}/%{name}/*.orig
%files devel %files devel
%defattr(-,root,root) %doc CHANGELOG.md readme.md
%if 0%{?suse_version} < 1500
%doc license.txt
%else
%license license.txt %license license.txt
%endif %dir %{_docdir}/%{name}-devel
# %license license.txt %{_docdir}/%{name}-devel/*
%dir %{_datadir}/cmake/RapidJSON %{_includedir}/rapidjson/
%{_datadir}/cmake/RapidJSON/RapidJSONConfig.cmake %{_libdir}/cmake/RapidJSON/
%{_datadir}/cmake/RapidJSON/RapidJSONConfigVersion.cmake %{_libdir}/pkgconfig/*.pc
%{_datadir}/pkgconfig/RapidJSON.pc
%{_includedir}/%{name}
%dir %{_docdir}/%{name}
%{_docdir}/%{name}/*
%changelog %changelog

View File

@ -1,26 +0,0 @@
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()

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bf7ced29704a1e696fbccf2a2b4ea068e7774fa37f6d7dd4039d0787f8bed98e
size 1019402