Accepting request 264997 from home:pluskalm:branches:devel:libraries:c_c++
New release (1.0.0), enable cmake building OBS-URL: https://build.opensuse.org/request/show/264997 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/jsoncpp?expand=0&rev=2
This commit is contained in:
parent
62ac1ebd28
commit
ca913d72ec
3
1.0.0.tar.gz
Normal file
3
1.0.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:e7eeb9b96d10cfd2f6205a09899f9800931648f652e09731821854c9ce0c7a1a
|
||||||
|
size 165343
|
16
_service
16
_service
@ -1,16 +0,0 @@
|
|||||||
<services>
|
|
||||||
<service name="tar_scm" mode="disabled">
|
|
||||||
<param name="url">https://github.com/open-source-parsers/jsoncpp.git</param>
|
|
||||||
<param name="scm">git</param>
|
|
||||||
<param name="exclude">.git</param>
|
|
||||||
<param name="versionformat">0.6~rc2+git.%ct.%h</param>
|
|
||||||
<param name="revision">master</param>
|
|
||||||
</service>
|
|
||||||
<service name="recompress" mode="disabled">
|
|
||||||
<param name="file">crowbar-barclamp-swift-*git*.tar</param>
|
|
||||||
<param name="compression">xz</param>
|
|
||||||
</service>
|
|
||||||
<service name="set_version" mode="disabled">
|
|
||||||
<param name="basename">jsoncpp</param>
|
|
||||||
</service>
|
|
||||||
</services>
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:dfb8c1194d48a9a1115f872d942527bfdadf9e17f57d772b0f21469f076f9b5f
|
|
||||||
size 109872
|
|
59
jsoncpp-1.0.0-lib_suffix.patch
Normal file
59
jsoncpp-1.0.0-lib_suffix.patch
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
From f8a3a599ac2afaeaf408847b189404f65691251d Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= <remi@verschelde.fr>
|
||||||
|
Date: Mon, 1 Dec 2014 23:44:08 +0100
|
||||||
|
Subject: [PATCH] Adapt libdir for 64bit RPM-based distros RPM-based distros
|
||||||
|
such as Fedora or Mageia put 64bit libraries in /usr/lib64 while 32bit
|
||||||
|
libraries go to /usr/lib. This is usually taken into account in CMake
|
||||||
|
projects using a LIB_SUFFIX parameter that can be set to "" or "64".
|
||||||
|
|
||||||
|
---
|
||||||
|
CMakeLists.txt | 10 ++++++----
|
||||||
|
pkg-config/jsoncpp.pc.in | 2 +-
|
||||||
|
2 files changed, 7 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index 2def6ca..3e8f96e 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -17,15 +17,17 @@ IF(NOT WIN32)
|
||||||
|
ENDIF(NOT CMAKE_BUILD_TYPE)
|
||||||
|
ENDIF(NOT WIN32)
|
||||||
|
|
||||||
|
+SET(LIB_SUFFIX "" CACHE STRING "Optional arch-dependent suffix for the library installation directory")
|
||||||
|
+
|
||||||
|
SET(RUNTIME_INSTALL_DIR bin
|
||||||
|
CACHE PATH "Install dir for executables and dlls")
|
||||||
|
-SET(ARCHIVE_INSTALL_DIR lib
|
||||||
|
+SET(ARCHIVE_INSTALL_DIR lib${LIB_SUFFIX}
|
||||||
|
CACHE PATH "Install dir for static libraries")
|
||||||
|
-SET(LIBRARY_INSTALL_DIR lib
|
||||||
|
+SET(LIBRARY_INSTALL_DIR lib${LIB_SUFFIX}
|
||||||
|
CACHE PATH "Install dir for shared libraries")
|
||||||
|
SET(INCLUDE_INSTALL_DIR include
|
||||||
|
CACHE PATH "Install dir for headers")
|
||||||
|
-SET(PACKAGE_INSTALL_DIR lib/cmake
|
||||||
|
+SET(PACKAGE_INSTALL_DIR lib${LIB_SUFFIX}/cmake
|
||||||
|
CACHE PATH "Install dir for cmake package config files")
|
||||||
|
MARK_AS_ADVANCED( RUNTIME_INSTALL_DIR ARCHIVE_INSTALL_DIR INCLUDE_INSTALL_DIR PACKAGE_INSTALL_DIR )
|
||||||
|
|
||||||
|
@@ -101,7 +103,7 @@ IF(JSONCPP_WITH_PKGCONFIG_SUPPORT)
|
||||||
|
"pkg-config/jsoncpp.pc"
|
||||||
|
@ONLY)
|
||||||
|
INSTALL(FILES "${CMAKE_BINARY_DIR}/pkg-config/jsoncpp.pc"
|
||||||
|
- DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig")
|
||||||
|
+ DESTINATION "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/pkgconfig")
|
||||||
|
ENDIF(JSONCPP_WITH_PKGCONFIG_SUPPORT)
|
||||||
|
|
||||||
|
IF(JSONCPP_WITH_CMAKE_PACKAGE)
|
||||||
|
diff --git a/pkg-config/jsoncpp.pc.in b/pkg-config/jsoncpp.pc.in
|
||||||
|
index 5de8105..9613181 100644
|
||||||
|
--- a/pkg-config/jsoncpp.pc.in
|
||||||
|
+++ b/pkg-config/jsoncpp.pc.in
|
||||||
|
@@ -1,6 +1,6 @@
|
||||||
|
prefix=@CMAKE_INSTALL_PREFIX@
|
||||||
|
exec_prefix=${prefix}
|
||||||
|
-libdir=${exec_prefix}/lib
|
||||||
|
+libdir=${exec_prefix}/@LIBRARY_INSTALL_DIR@
|
||||||
|
includedir=${prefix}/@INCLUDE_INSTALL_DIR@
|
||||||
|
|
||||||
|
Name: jsoncpp
|
@ -1,3 +1,72 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Dec 12 13:16:18 UTC 2014 - mpluskal@suse.com
|
||||||
|
|
||||||
|
- Enable cmake build
|
||||||
|
+ add fix for wrong lib_suffix - jsoncpp-1.0.0-lib_suffix.patch
|
||||||
|
- Disable building for i586 - jsonccp fails its unit tests
|
||||||
|
- Update to new release - 1.0.0:
|
||||||
|
+ Updated the type system's behavior, in order to better support backwards
|
||||||
|
compatibility with code that was written before 64-bit integer support was
|
||||||
|
introduced. Here's how it works now:
|
||||||
|
|
||||||
|
* isInt, isInt64, isUInt, and isUInt64 return true if and only if the
|
||||||
|
value can be exactly represented as that type. In particular, a value
|
||||||
|
constructed with a double like 17.0 will now return true for all of
|
||||||
|
these methods.
|
||||||
|
|
||||||
|
* isDouble and isFloat now return true for all numeric values, since all
|
||||||
|
numeric values can be converted to a double or float without
|
||||||
|
truncation. Note however that the conversion may not be exact -- for
|
||||||
|
example, doubles cannot exactly represent all integers above 2^53 + 1.
|
||||||
|
|
||||||
|
* isBool, isNull, isString, isArray, and isObject now return true if and
|
||||||
|
only if the value is of that type.
|
||||||
|
|
||||||
|
* isConvertibleTo(fooValue) indicates that it is safe to call asFoo.
|
||||||
|
(For each type foo, isFoo always implies isConvertibleTo(fooValue).)
|
||||||
|
asFoo returns an approximate or exact representation as appropriate.
|
||||||
|
For example, a double value may be truncated when asInt is called.
|
||||||
|
|
||||||
|
* For backwards compatibility with old code, isConvertibleTo(intValue)
|
||||||
|
may return false even if type() == intValue. This is because the value
|
||||||
|
may have been constructed with a 64-bit integer larger than maxInt,
|
||||||
|
and calling asInt() would cause an exception. If you're writing new
|
||||||
|
code, use isInt64 to find out whether the value is exactly
|
||||||
|
representable using an Int64, or asDouble() combined with minInt64 and
|
||||||
|
maxInt64 to figure out whether it is approximately representable.
|
||||||
|
|
||||||
|
+ Value
|
||||||
|
- Patch #10: BOOST_FOREACH compatibility. Made Json::iterator more
|
||||||
|
standard compliant, added missing iterator_category and value_type
|
||||||
|
typedefs (contribued by Robert A. Iannucci).
|
||||||
|
|
||||||
|
+ Compilation
|
||||||
|
|
||||||
|
- New CMake based build system. Based in part on contribution from
|
||||||
|
Igor Okulist and Damien Buhl (Patch #14).
|
||||||
|
|
||||||
|
- New header json/version.h now contains version number macros
|
||||||
|
(JSONCPP_VERSION_MAJOR, JSONCPP_VERSION_MINOR, JSONCPP_VERSION_PATCH
|
||||||
|
and JSONCPP_VERSION_HEXA).
|
||||||
|
|
||||||
|
- Patch #11: added missing JSON_API on some classes causing link issues
|
||||||
|
when building as a dynamic library on Windows
|
||||||
|
(contributed by Francis Bolduc).
|
||||||
|
|
||||||
|
- Visual Studio DLL: suppressed warning "C4251: <data member>: <type>
|
||||||
|
needs to have dll-interface to be used by..." via pragma push/pop
|
||||||
|
in json-cpp headers.
|
||||||
|
|
||||||
|
- Added Travis CI intregration: https://travis-ci.org/blep/jsoncpp-mirror
|
||||||
|
|
||||||
|
+ Bug fixes
|
||||||
|
- Patch #15: Copy constructor does not initialize allocated_ for stringValue
|
||||||
|
(contributed by rmongia).
|
||||||
|
|
||||||
|
- Patch #16: Missing field copy in Json::Value::iterator causing infinite
|
||||||
|
loop when using experimental internal map (#define JSON_VALUE_USE_INTERNAL_MAP)
|
||||||
|
(contributed by Ming-Lin Kao).
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Jul 25 07:43:07 UTC 2014 - mvyskocil@opensuse.org
|
Fri Jul 25 07:43:07 UTC 2014 - mvyskocil@opensuse.org
|
||||||
|
|
||||||
|
79
jsoncpp.spec
79
jsoncpp.spec
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file for package
|
# spec file for package jsoncpp
|
||||||
#
|
#
|
||||||
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
@ -15,21 +15,24 @@
|
|||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
|
|
||||||
Name: jsoncpp
|
|
||||||
Version: 0.6~rc2+git.1405320734.3b9b740
|
|
||||||
Release: 0
|
|
||||||
License: MIT
|
|
||||||
Summary: C++ library that allows manipulating with JSON
|
|
||||||
Url: https://github.com/open-source-parsers/jsoncpp
|
|
||||||
Group: Devel/Libraries/C and C++
|
|
||||||
Source0: jsoncpp-0.6~rc2+git.1405320734.3b9b740.tar.xz
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
||||||
|
|
||||||
#strip unused dependencies from there
|
Name: jsoncpp
|
||||||
#BuildRequires: cmake
|
Version: 1.0.0
|
||||||
|
Release: 0
|
||||||
|
Summary: C++ library that allows manipulating with JSON
|
||||||
|
License: MIT
|
||||||
|
Group: Devel/Libraries/C and C++
|
||||||
|
Url: https://github.com/open-source-parsers/jsoncpp
|
||||||
|
Source0: https://github.com/open-source-parsers/%{name}/archive/%{version}.tar.gz
|
||||||
|
Patch0: jsoncpp-1.0.0-lib_suffix.patch
|
||||||
|
BuildRequires: cmake
|
||||||
BuildRequires: doxygen
|
BuildRequires: doxygen
|
||||||
BuildRequires: python
|
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
|
BuildRequires: pkg-config
|
||||||
|
BuildRequires: python
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
# On i386, jsoncpp fails it's own unittests
|
||||||
|
ExcludeArch: i586
|
||||||
|
|
||||||
%description
|
%description
|
||||||
JSON is a lightweight data-interchange format. It can represent numbers,
|
JSON is a lightweight data-interchange format. It can represent numbers,
|
||||||
@ -43,7 +46,7 @@ format to store user input files.
|
|||||||
%package devel
|
%package devel
|
||||||
Summary: Development files for %{name}
|
Summary: Development files for %{name}
|
||||||
Group: Development/Languages/C and C++
|
Group: Development/Languages/C and C++
|
||||||
Requires: lib%{name}0 = %{version}
|
Requires: lib%{name}1 = %{version}
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
JSON is a lightweight data-interchange format. It can represent numbers,
|
JSON is a lightweight data-interchange format. It can represent numbers,
|
||||||
@ -67,11 +70,11 @@ serialization and deserialization to and from strings. It can also preserve
|
|||||||
existing comment in unserialization/serialization steps, making it a convenient
|
existing comment in unserialization/serialization steps, making it a convenient
|
||||||
format to store user input files.
|
format to store user input files.
|
||||||
|
|
||||||
%package -n lib%{name}0
|
%package -n lib%{name}1
|
||||||
Summary: Shared library for %{name}
|
Summary: Shared library for %{name}
|
||||||
Group: Development/Languages/C and C++
|
Group: Development/Languages/C and C++
|
||||||
|
|
||||||
%description -n lib%{name}0
|
%description -n lib%{name}1
|
||||||
JSON is a lightweight data-interchange format. It can represent numbers,
|
JSON is a lightweight data-interchange format. It can represent numbers,
|
||||||
strings, ordered sequences of values, and collections of name/value pairs.
|
strings, ordered sequences of values, and collections of name/value pairs.
|
||||||
|
|
||||||
@ -82,55 +85,39 @@ format to store user input files.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# ignore default cmake and use Gentoo's approach
|
python doxybuild.py --doxygen=%{_bindir}/doxygen
|
||||||
# % {cmake} \
|
|
||||||
# -DJSONCPP_LIB_BUILD_SHARED=ON
|
|
||||||
|
|
||||||
CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ;
|
# path needs to be exported otherwise unit tests will fail
|
||||||
CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ;
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{_builddir}/%{name}-%{version}/build/lib
|
||||||
FFLAGS="${FFLAGS:-%optflags%{?_fmoddir: -I%_fmoddir}}" ; export FFLAGS ;
|
%cmake -DJSONCPP_LIB_BUILD_SHARED=ON
|
||||||
|
|
||||||
# This is the soname that other distros use.
|
make %{?_smp_mflags}
|
||||||
soname="libjsoncpp.so.0"
|
|
||||||
|
|
||||||
echo ${PWD}/
|
|
||||||
|
|
||||||
c++ src/lib_json/*.cpp -Iinclude -shared -fPIC \
|
|
||||||
-Wl,-soname,${soname} -o ${soname}
|
|
||||||
|
|
||||||
ln -sf ${soname} libjsoncpp.so
|
|
||||||
|
|
||||||
%{__python} doxybuild.py --doxygen=%{_bindir}/doxygen
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
%cmake_install
|
||||||
|
|
||||||
# to have the same location as Gentoo, Debian, Ubuntu and Arch see gentoo bug #452234
|
%post -n lib%{name}1 -p /sbin/ldconfig
|
||||||
mkdir -p %{buildroot}/%{_includedir}/jsoncpp
|
|
||||||
cp -ra include/json/ %{buildroot}/%{_includedir}/jsoncpp
|
|
||||||
|
|
||||||
mkdir -p %{buildroot}/%{_libdir}/
|
%postun -n lib%{name}1 -p /sbin/ldconfig
|
||||||
cp -a libjsoncpp.so* %{buildroot}/%{_libdir}/
|
|
||||||
|
|
||||||
|
%files -n lib%{name}1
|
||||||
%post -n lib%{name}0 -p /sbin/ldconfig
|
|
||||||
%postun -n lib%{name}0 -p /sbin/ldconfig
|
|
||||||
|
|
||||||
%files -n lib%{name}0
|
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%doc LICENSE
|
%doc LICENSE
|
||||||
%{_libdir}/lib%{name}.so.0
|
%{_libdir}/lib%{name}.so.*
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%doc AUTHORS LICENSE NEWS.txt README.md
|
%doc AUTHORS LICENSE NEWS.txt README.md
|
||||||
|
%{_libdir}/pkgconfig/%{name}.pc
|
||||||
%{_libdir}/lib%{name}.so
|
%{_libdir}/lib%{name}.so
|
||||||
%{_includedir}/%{name}/
|
|
||||||
|
%{_includedir}/json/
|
||||||
|
|
||||||
%files doc
|
%files doc
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%doc dist/doxygen/jsoncpp*
|
%doc dist/doxygen/jsoncpp*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user