Accepting request 259759 from home:bekun:devel

update to 2.1.0 and simplify cmake calls by using according macros

OBS-URL: https://build.opensuse.org/request/show/259759
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libyajl?expand=0&rev=25
This commit is contained in:
Ismail Dönmez 2014-11-05 11:10:59 +00:00 committed by Git OBS Bridge
parent 06d82a0c09
commit 363f9b66cc
6 changed files with 59 additions and 43 deletions

View File

@ -1,13 +1,12 @@
Index: src/CMakeLists.txt diff -aur lloyd-yajl-66cb08c_orig/src/CMakeLists.txt lloyd-yajl-66cb08c/src/CMakeLists.txt
=================================================================== --- lloyd-yajl-66cb08c_orig/src/CMakeLists.txt 2014-03-19 05:58:29.000000000 +0100
--- src/CMakeLists.txt.orig +++ lloyd-yajl-66cb08c/src/CMakeLists.txt 2014-11-01 11:04:26.327902124 +0100
+++ src/CMakeLists.txt @@ -28,7 +28,7 @@
@@ -44,7 +44,7 @@ SET (PUB_HDRS api/yajl_parse.h api/yajl_
ADD_DEFINITIONS(-DYAJL_BUILD) ADD_DEFINITIONS(-DYAJL_BUILD)
# set up some paths # set up some paths
-SET (libDir ${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/lib) -SET (libDir ${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/lib)
+SET (libDir ${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/${LIB_SUFFIX}) +SET (libDir ${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/${LIB_SUFFIX})
SET (incDir ${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/include/yajl) SET (incDir ${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/include/yajl)
SET (shareDir ${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/share/pkgconfig)
# set the output path for libraries

View File

@ -1,13 +1,12 @@
Index: CMakeLists.txt diff -aur lloyd-yajl-66cb08c_orig/CMakeLists.txt lloyd-yajl-66cb08c/CMakeLists.txt
=================================================================== --- lloyd-yajl-66cb08c_orig/CMakeLists.txt 2014-03-19 05:58:29.000000000 +0100
--- CMakeLists.txt.orig +++ lloyd-yajl-66cb08c/CMakeLists.txt 2014-11-01 11:03:10.921290296 +0100
+++ CMakeLists.txt @@ -59,7 +59,7 @@
@@ -59,7 +59,7 @@ ELSE (WIN32)
"${CMAKE_C_FLAGS} -std=c99 -pedantic -Wpointer-arith -Wno-format-y2k -Wstrict-prototypes -Wmissing-declarations -Wnested-externs -Wextra -Wundef -Wwrite-strings -Wold-style-definition -Wredundant-decls -Wno-unused-parameter -Wno-sign-compare -Wmissing-prototypes") "${CMAKE_C_FLAGS} -std=c99 -pedantic -Wpointer-arith -Wno-format-y2k -Wstrict-prototypes -Wmissing-declarations -Wnested-externs -Wextra -Wundef -Wwrite-strings -Wold-style-definition -Wredundant-decls -Wno-unused-parameter -Wno-sign-compare -Wmissing-prototypes")
SET(CMAKE_C_FLAGS_DEBUG "-DDEBUG -g") SET(CMAKE_C_FLAGS_DEBUG "-DDEBUG -g")
- SET(CMAKE_C_FLAGS_RELEASE "-DNDEBUG -O2 -Wuninitialized") - SET(CMAKE_C_FLAGS_RELEASE "-DNDEBUG -O2 -Wuninitialized")
+ SET(CMAKE_C_FLAGS_RELEASE "$ENV{OPTFLAGS} -Wuninitialized") + SET(CMAKE_C_FLAGS_RELEASE "$ENV{OPTFLAGS} -Wuninitialized")
ENDIF (WIN32) ENDIF (WIN32)

View File

@ -1,3 +1,37 @@
-------------------------------------------------------------------
Wed Nov 05 12:00:00 UTC 2014 - ku.b@gmx.de
- update to 2.1.0
- 2.1.0
- @nonodename, @patperry - fixed some compiler warnings
- @yep, @emaste - documentation improvements
- @sgravrock - build fix for NetBSD (and whenever sh != bash)
- @rotty, @brimstone3, @lloyd - allow client to reset generator
- @sgravrock - remove bash dependencies
- @lloyd - add api tests
- @rflynn - remove ruby dependency
- @cloderic - nmake install works on windows
- @shahbag - build fix for qnx
- @breese - debugging improvements
- @lloyd - json_verify supports -s flag for stream processing
- @lloyd - json_reformat supports -s flag for stream processing
- 2.0.4
- @jcekstrom - additional checking in integer parsing
- @jcekstrom - fix a bug in yajl_tree that would cause valid json integersto fail to parse
- @plaguemorin - fix a memory leak in yajl_tree (error strings were being leaked)
- @7AC - reset errno
- @ConradIrwin - include flags to reformatter to allow toggling of escape solidus option
- 2.0.3
- John Stamp generation of a pkgconfig file at build time.
- @robzuber bugfix in yajl_tree_get()
- @lloyd - fix for compilation on 64 bit windows
- 2.0.2
- lth fix typos in yajl_tree.h macros YAJL_IS_INTEGER and YAJL_IS_DOUBLE,
contributed by Artem S Vybornov.
- lth add #ifdef __cplusplus wrappers to yajl_tree to allow proper
usage from many populer C++ compilers.
- fix array access
------------------------------------------------------------------- -------------------------------------------------------------------
Sun Jan 29 21:47:14 UTC 2012 - jengelh@medozas.de Sun Jan 29 21:47:14 UTC 2012 - jengelh@medozas.de

View File

@ -1,7 +1,7 @@
# #
# spec file for package libyajl # spec file for package libyajl
# #
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2014 SUSE LINUX Products 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
@ -15,8 +15,9 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via http://bugs.opensuse.org/
# #
Name: libyajl Name: libyajl
Version: 2.0.1 Version: 2.1.0
Release: 0 Release: 0
# #
# NB, upstream does not provide pre-built tar.gz downloads. Instead # NB, upstream does not provide pre-built tar.gz downloads. Instead
@ -37,7 +38,7 @@ Release: 0
# #
# So for new versions, update 'githash' to match the hash of the # So for new versions, update 'githash' to match the hash of the
# GIT tag associated with updated 'Version:' field just above # GIT tag associated with updated 'Version:' field just above
%global githash f4b2b1a %global githash 66cb08c
%define soname 2 %define soname 2
Summary: Yet Another JSON Library Summary: Yet Another JSON Library
@ -60,6 +61,7 @@ BuildRequires: gcc-c++
BuildRequires: glibc-devel BuildRequires: glibc-devel
BuildRequires: libstdc++-devel BuildRequires: libstdc++-devel
BuildRequires: make BuildRequires: make
BuildRequires: pkg-config
%description %description
YAJL is a small event-driven (SAX-style) JSON parser written in ANSI C, and a YAJL is a small event-driven (SAX-style) JSON parser written in ANSI C, and a
@ -114,39 +116,20 @@ This package provides a few command-line utilities for processing JSON files.
%prep %prep
%setup -q -n "lloyd-yajl-%{githash}" %setup -q -n "lloyd-yajl-%{githash}"
%patch1 %patch1 -p1 -b .optflags
%patch2 %patch2 -p1 -b .lib_suffix
%build %build
LIBSUFFIX=$(echo "%{_lib}" | %__sed 's|^lib||') %cmake
%__mkdir build %{__make} %{_smp_mflags}
pushd build
OPTFLAGS="%{optflags}" \
cmake \
-DCMAKE_VERBOSE_MAKEFILE=TRUE \
-DCMAKE_INSTALL_PREFIX:PATH="%{_prefix}" \
-DLIB_INSTALL_DIR="%{_libdir}" \
-DCMAKE_SKIP_RPATH=TRUE \
-DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE \
-DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags}" \
-DCMAKE_BUILD_TYPE=release \
-DCMAKE_STRIP="/usr/bin/touch" \
-DLIB_SUFFIX="$LIBSUFFIX" \
..
%__make %{?_smp_flags}
popd build
%install %install
pushd build %cmake_install
%makeinstall
popd build
install -d -m 0755 $RPM_BUILD_ROOT%{_mandir}/man1 install -d -m 0755 $RPM_BUILD_ROOT%{_mandir}/man1
install -m644 %SOURCE2 %SOURCE3 $RPM_BUILD_ROOT/%{_mandir}/man1 install -m644 %SOURCE2 %SOURCE3 $RPM_BUILD_ROOT/%{_mandir}/man1
%check %check
cd test make test
./run_tests.sh
%post -n %{name}%{soname} -p /sbin/ldconfig %post -n %{name}%{soname} -p /sbin/ldconfig
@ -162,6 +145,7 @@ cd test
%defattr(-,root,root) %defattr(-,root,root)
%{_includedir}/yajl %{_includedir}/yajl
%{_libdir}/libyajl.so %{_libdir}/libyajl.so
%{_datadir}/pkgconfig/yajl.pc
%files -n %{name}-devel-static %files -n %{name}-devel-static
%defattr(-,root,root) %defattr(-,root,root)

View File

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

View File

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