From 96d7dccba736bd44e1bf146a15c63e75a75d8995 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Mon, 6 May 2024 10:26:48 +0200 Subject: [PATCH] rebuild with -DCMAKE_POSITION_INDEPENDENT_CODE=ON (-fPIC) [release 1.9.5-2mamba;Mon May 06 2024] --- jsoncpp-0.5.0-soname.patch | 24 ------------------- jsoncpp-0.6.0_rc2-buildfix-fPIC.patch | 11 --------- jsoncpp-1.4.4-pkg-config-fix-includedir.patch | 11 --------- jsoncpp.spec | 17 +++++-------- 4 files changed, 6 insertions(+), 57 deletions(-) delete mode 100644 jsoncpp-0.5.0-soname.patch delete mode 100644 jsoncpp-0.6.0_rc2-buildfix-fPIC.patch delete mode 100644 jsoncpp-1.4.4-pkg-config-fix-includedir.patch diff --git a/jsoncpp-0.5.0-soname.patch b/jsoncpp-0.5.0-soname.patch deleted file mode 100644 index f966b12..0000000 --- a/jsoncpp-0.5.0-soname.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -Nru jsoncpp-src-0.5.0.orig/SConstruct jsoncpp-src-0.5.0/SConstruct ---- jsoncpp-src-0.5.0.orig/SConstruct 2010-03-12 08:31:04.000000000 +0100 -+++ jsoncpp-src-0.5.0/SConstruct 2014-06-20 12:45:42.510887023 +0200 -@@ -179,8 +179,10 @@ - global lib_dir - env.Install( lib_dir, static_lib ) - if env['SHARED_LIB_ENABLED']: -+ shlink_flags = '-shared -Wl,-soname -Wl,lib' + target_name + 'cpp.so.0' - shared_lib = env.SharedLibrary( target=target_name + '_${LIB_NAME_SUFFIX}', -- source=target_sources ) -+ source=target_sources, -+ SHLINKFLAGS=shlink_flags ) - env.Install( lib_dir, shared_lib ) - env['SRCDIST_ADD']( source=[target_sources] ) - -@@ -190,7 +192,7 @@ - global build_dir - target_build_dir = os.path.join( build_dir, target_directory ) - target = os.path.join( target_directory, 'sconscript' ) -- SConscript( target, build_dir=target_build_dir, duplicate=0 ) -+ SConscript( target, variant_dir=target_build_dir, duplicate=0 ) - env['SRCDIST_ADD']( source=[target] ) - - diff --git a/jsoncpp-0.6.0_rc2-buildfix-fPIC.patch b/jsoncpp-0.6.0_rc2-buildfix-fPIC.patch deleted file mode 100644 index 455ea3a..0000000 --- a/jsoncpp-0.6.0_rc2-buildfix-fPIC.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- jsoncpp-src-0.6.0-rc2/SConstruct.orig 2014-09-17 14:13:14.742927982 +0200 -+++ jsoncpp-src-0.6.0-rc2/SConstruct 2014-09-17 14:11:04.782932297 +0200 -@@ -119,7 +119,7 @@ - env.Append( CPPDEFINES=[ "WIN32", "NDEBUG", "_MT" ] ) - elif platform.startswith('linux-gcc'): - env.Tool( 'default' ) -- env.Append( LIBS = ['pthread'], CCFLAGS = "-Wall" ) -+ env.Append( LIBS = ['pthread'], CCFLAGS = "-Wall -fPIC" ) - env['SHARED_LIB_ENABLED'] = True - else: - print "UNSUPPORTED PLATFORM." diff --git a/jsoncpp-1.4.4-pkg-config-fix-includedir.patch b/jsoncpp-1.4.4-pkg-config-fix-includedir.patch deleted file mode 100644 index a08756b..0000000 --- a/jsoncpp-1.4.4-pkg-config-fix-includedir.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- jsoncpp-1.4.4/pkg-config/jsoncpp.pc.in.orig 2015-04-08 11:06:42.084000000 +0200 -+++ jsoncpp-1.4.4/pkg-config/jsoncpp.pc.in 2015-04-08 11:06:51.536000000 +0200 -@@ -1,7 +1,7 @@ - prefix=@CMAKE_INSTALL_PREFIX@ - exec_prefix=${prefix} - libdir=${exec_prefix}/@LIBRARY_INSTALL_DIR@ --includedir=${prefix}/@INCLUDE_INSTALL_DIR@ -+includedir=@INCLUDE_INSTALL_DIR@ - - Name: jsoncpp - Description: A C++ library for interacting with JSON diff --git a/jsoncpp.spec b/jsoncpp.spec index 383c67d..65af550 100644 --- a/jsoncpp.spec +++ b/jsoncpp.spec @@ -1,17 +1,14 @@ %define pkgver %(echo %version | tr _ -) Name: jsoncpp Version: 1.9.5 -Release: 1mamba +Release: 2mamba Summary: An implementation of a JSON reader and writer in C++ Group: System/Libraries Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco -URL: http://jsoncpp.sourceforge.net/ +URL: https://jsoncpp.sourceforge.net/ Source: https://github.com/open-source-parsers/jsoncpp.git/%{version}/jsoncpp-%{version}.tar.bz2 -Patch0: jsoncpp-0.5.0-soname.patch -Patch1: jsoncpp-0.6.0_rc2-buildfix-fPIC.patch -Patch2: jsoncpp-1.4.4-pkg-config-fix-includedir.patch License: MIT ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel @@ -42,16 +39,11 @@ This package contains libraries and header files for developing applications tha %prep %setup -q -#%patch0 -p1 -#%patch1 -p1 -#%patch2 -p1 %build %cmake -d build \ -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir}/jsoncpp \ -%ifarch arm - -DJSONCPP_WITH_TESTS=OFF -%endif + -DCMAKE_POSITION_INDEPENDENT_CODE=ON %make @@ -84,6 +76,9 @@ This package contains libraries and header files for developing applications tha %{_libdir}/cmake/jsoncpp/jsoncpp*.cmake %changelog +* Mon May 06 2024 Silvan Calarco 1.9.5-2mamba +- rebuild with -DCMAKE_POSITION_INDEPENDENT_CODE=ON (-fPIC) + * Sat Nov 06 2021 Automatic Build System 1.9.5-1mamba - automatic version update by autodist