From 9de68772e242e83f85d1d82a96af19a6a1865b41f147f82008c09544338cbab3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= Date: Sun, 22 Apr 2012 03:47:25 +0000 Subject: [PATCH] Accepting request 114925 from home:elvigia:branches:devel:libraries:c_c++ - Fix LFS support in x86. - Do not build with -Werror - Remove "la" files - tune up autotools scripts as well ensure config.h is included everywhere OBS-URL: https://build.opensuse.org/request/show/114925 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/json-c?expand=0&rev=10 --- json-c.changes | 9 ++++++ json-c.spec | 17 ++++++----- jsonc-lfs.patch | 81 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 100 insertions(+), 7 deletions(-) create mode 100644 jsonc-lfs.patch diff --git a/json-c.changes b/json-c.changes index 9fac487..bafa358 100644 --- a/json-c.changes +++ b/json-c.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Sun Apr 22 00:34:03 UTC 2012 - crrodriguez@opensuse.org + +- Fix LFS support in x86. +- Do not build with -Werror +- Remove "la" files +- tune up autotools scripts as well ensure config.h is included + everywhere + ------------------------------------------------------------------- Sun Nov 13 13:50:27 UTC 2011 - jengelh@medozas.de diff --git a/json-c.spec b/json-c.spec index b96d5fb..3ad33f8 100644 --- a/json-c.spec +++ b/json-c.spec @@ -1,7 +1,7 @@ # # spec file for package json-c # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -21,19 +21,21 @@ Name: json-c Summary: JSON implementation in C -Version: 0.9 -Release: 3 License: MIT Group: System/Libraries -URL: http://oss.metaparadigm.com/%{name} +Version: 0.9 +Release: 0 +Url: http://oss.metaparadigm.com/%{name} Source0: http://oss.metaparadigm.com/json-c/json-c-0.9.tar.gz Source1: baselibs.conf Patch0: %{name}-0.9-base.patch Patch1: %{name}-0.9-json_object_from_file.patch Patch2: %{name}-0.9-json_tokener.patch Patch3: %{name}-0.9-linkhash.patch +Patch4: jsonc-lfs.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: libtool pkg-config +BuildRequires: libtool +BuildRequires: pkg-config %description JSON-C implements a reference counting object model that allows you to @@ -73,14 +75,16 @@ This package includes alls docs %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 %build -autoreconf -fi +autoreconf -fiv %configure --disable-static --with-pic %{__make} %{?_smp_mflags} %check %{__make} %{?_smp_mflags} check +rm -rf %{buildroot}%{_libdir}/*.la %install make DESTDIR=$RPM_BUILD_ROOT install libdir=%{_libdir} mandir=%{_mandir} @@ -96,7 +100,6 @@ make DESTDIR=$RPM_BUILD_ROOT install libdir=%{_libdir} mandir=%{_mandir} %files -n %{libname}-devel %defattr(-,root,root) %{_libdir}/%{libname}.so -%{_libdir}/%{libname}.*a %{_includedir}/json %{_libdir}/pkgconfig/*.pc diff --git a/jsonc-lfs.patch b/jsonc-lfs.patch new file mode 100644 index 0000000..dc710b7 --- /dev/null +++ b/jsonc-lfs.patch @@ -0,0 +1,81 @@ +Index: json-c-0.9/configure.in +=================================================================== +--- json-c-0.9.orig/configure.in ++++ json-c-0.9/configure.in +@@ -6,6 +6,9 @@ AC_INIT([json-c], [0.9], [michael@metapa + AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) + + # Checks for programs. ++AC_PROG_CC_STDC ++AC_USE_SYSTEM_EXTENSIONS ++AC_SYS_LARGEFILE + + # Checks for libraries. + +@@ -25,7 +28,7 @@ AC_FUNC_MALLOC + AC_FUNC_REALLOC + AC_CHECK_FUNCS(strndup strerror vsnprintf vasprintf open vsyslog strncasecmp) + +-AM_PROG_LIBTOOL ++LT_INIT([disable-static pic-only]) + + AC_OUTPUT([ + Makefile +Index: json-c-0.9/Makefile.am +=================================================================== +--- json-c-0.9.orig/Makefile.am ++++ json-c-0.9/Makefile.am +@@ -1,4 +1,4 @@ +-AM_CFLAGS = -Wall -Wwrite-strings -Werror -std=gnu99 -D_GNU_SOURCE -D_REENTRANT ++AM_CFLAGS = -Wall -Wwrite-strings -D_REENTRANT + + EXTRA_DIST = README.html README-WIN32.html config.h.win32 doc + +@@ -20,7 +20,7 @@ libjsoninclude_HEADERS = \ + json_object_private.h \ + json_tokener.h + +-libjson_la_LDFLAGS = -version-info 0:1:0 ++libjson_la_LDFLAGS = -no-undefined -version-info 0:1:0 + + libjson_la_SOURCES = \ + arraylist.c \ +Index: json-c-0.9/linkhash.c +=================================================================== +--- json-c-0.9.orig/linkhash.c ++++ json-c-0.9/linkhash.c +@@ -9,6 +9,7 @@ + * + */ + ++#include "config.h" + #include + #include + #include +Index: json-c-0.9/test1.c +=================================================================== +--- json-c-0.9.orig/test1.c ++++ json-c-0.9/test1.c +@@ -1,3 +1,4 @@ ++#include "config.h" + #include + #include + #include +Index: json-c-0.9/test2.c +=================================================================== +--- json-c-0.9.orig/test2.c ++++ json-c-0.9/test2.c +@@ -1,3 +1,4 @@ ++#include "config.h" + #include + #include + #include +Index: json-c-0.9/test3.c +=================================================================== +--- json-c-0.9.orig/test3.c ++++ json-c-0.9/test3.c +@@ -1,3 +1,4 @@ ++#include "config.h" + #include + #include +