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:
commit
9539db943a
15
_service
Normal file
15
_service
Normal 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>
|
@ -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
|
@ -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());
|
||||
|
@ -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()
|
||||
|
@ -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);
|
3
rapidjson-1.1.0+git20190517.4b3d7c2f.tar.xz
Normal file
3
rapidjson-1.1.0+git20190517.4b3d7c2f.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:33dbb404ae501b879015ee73b6f7eeef20e163653c0e4d23fb1383ea57a12056
|
||||
size 827716
|
@ -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>
|
||||
|
||||
|
@ -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
|
||||
|
@ -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()
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:bf7ced29704a1e696fbccf2a2b4ea068e7774fa37f6d7dd4039d0787f8bed98e
|
||||
size 1019402
|
Loading…
Reference in New Issue
Block a user