From f59973a616788b73af5669807116799a7d5347bd Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Mon, 28 Apr 2014 11:34:40 +0100 Subject: [PATCH] Update to 2.1.0 release Signed-off-by: Daniel P. Berrange --- sources | 2 +- yajl-2.1.0-dynlink-binaries.patch | 28 +++++++++++++++++++++ yajl-2.1.0-pkgconfig-includedir.patch | 11 +++++++++ yajl-2.1.0-pkgconfig-location.patch | 27 +++++++++++++++++++++ yajl-2.1.0-test-location.patch | 30 +++++++++++++++++++++++ yajl.spec | 35 ++++++++++++--------------- 6 files changed, 113 insertions(+), 20 deletions(-) create mode 100644 yajl-2.1.0-dynlink-binaries.patch create mode 100644 yajl-2.1.0-pkgconfig-includedir.patch create mode 100644 yajl-2.1.0-pkgconfig-location.patch create mode 100644 yajl-2.1.0-test-location.patch diff --git a/sources b/sources index 57884a5..e4841b5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ee6208e697c43dcccf798ce80d370379 lloyd-yajl-2.0.4-0-gfee1ebe.tar.gz +6887e0ed7479d2549761a4d284d3ecb0 yajl-2.1.0.tar.gz diff --git a/yajl-2.1.0-dynlink-binaries.patch b/yajl-2.1.0-dynlink-binaries.patch new file mode 100644 index 0000000..fa53913 --- /dev/null +++ b/yajl-2.1.0-dynlink-binaries.patch @@ -0,0 +1,28 @@ +diff -rup yajl-2.1.0.orig/reformatter/CMakeLists.txt yajl-2.1.0.new/reformatter/CMakeLists.txt +--- yajl-2.1.0.orig/reformatter/CMakeLists.txt 2014-03-19 04:58:29.000000000 +0000 ++++ yajl-2.1.0.new/reformatter/CMakeLists.txt 2014-04-28 11:36:11.909478329 +0100 +@@ -26,7 +26,7 @@ LINK_DIRECTORIES(${CMAKE_CURRENT_BINARY_ + + ADD_EXECUTABLE(json_reformat ${SRCS}) + +-TARGET_LINK_LIBRARIES(json_reformat yajl_s) ++TARGET_LINK_LIBRARIES(json_reformat yajl) + + # In some environments, we must explicitly link libm (like qnx, + # thanks @shahbag) +Only in yajl-2.1.0.new/reformatter: CMakeLists.txt.orig +Only in yajl-2.1.0.new/src: CMakeLists.txt~ +Only in yajl-2.1.0.new/test/api: run_tests.sh~ +Only in yajl-2.1.0.new/test/parsing: run_tests.sh~ +diff -rup yajl-2.1.0.orig/verify/CMakeLists.txt yajl-2.1.0.new/verify/CMakeLists.txt +--- yajl-2.1.0.orig/verify/CMakeLists.txt 2014-03-19 04:58:29.000000000 +0000 ++++ yajl-2.1.0.new/verify/CMakeLists.txt 2014-04-28 11:36:11.909478329 +0100 +@@ -26,7 +26,7 @@ LINK_DIRECTORIES(${CMAKE_CURRENT_BINARY_ + + ADD_EXECUTABLE(json_verify ${SRCS}) + +-TARGET_LINK_LIBRARIES(json_verify yajl_s) ++TARGET_LINK_LIBRARIES(json_verify yajl) + + # copy in the binary + GET_TARGET_PROPERTY(binPath json_verify LOCATION) diff --git a/yajl-2.1.0-pkgconfig-includedir.patch b/yajl-2.1.0-pkgconfig-includedir.patch new file mode 100644 index 0000000..ba134f0 --- /dev/null +++ b/yajl-2.1.0-pkgconfig-includedir.patch @@ -0,0 +1,11 @@ +diff -rup yajl-2.1.0.orig/src/yajl.pc.cmake yajl-2.1.0.new/src/yajl.pc.cmake +--- yajl-2.1.0.orig/src/yajl.pc.cmake 2014-03-19 04:58:29.000000000 +0000 ++++ yajl-2.1.0.new/src/yajl.pc.cmake 2014-04-28 11:12:23.505791003 +0100 +@@ -1,6 +1,6 @@ + prefix=${CMAKE_INSTALL_PREFIX} + libdir=${dollar}{prefix}/lib${LIB_SUFFIX} +-includedir=${dollar}{prefix}/include/yajl ++includedir=${dollar}{prefix}/include + + Name: Yet Another JSON Library + Description: A Portable JSON parsing and serialization library in ANSI C diff --git a/yajl-2.1.0-pkgconfig-location.patch b/yajl-2.1.0-pkgconfig-location.patch new file mode 100644 index 0000000..757a9cc --- /dev/null +++ b/yajl-2.1.0-pkgconfig-location.patch @@ -0,0 +1,27 @@ +diff -rup yajl-2.1.0.orig/src/CMakeLists.txt yajl-2.1.0.new/src/CMakeLists.txt +--- yajl-2.1.0.orig/src/CMakeLists.txt 2014-03-19 04:58:29.000000000 +0000 ++++ yajl-2.1.0.new/src/CMakeLists.txt 2014-04-28 11:19:28.431492533 +0100 +@@ -30,7 +30,7 @@ ADD_DEFINITIONS(-DYAJL_BUILD) + # set up some paths + SET (libDir ${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/lib) + SET (incDir ${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/include/yajl) +-SET (shareDir ${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/share/pkgconfig) ++SET (pkgconfigDir ${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/lib/pkgconfig) + + # set the output path for libraries + SET(LIBRARY_OUTPUT_PATH ${libDir}) +@@ -61,7 +61,7 @@ FILE(MAKE_DIRECTORY ${incDir}) + # generate build-time source + SET(dollar $) + CONFIGURE_FILE(api/yajl_version.h.cmake ${incDir}/yajl_version.h) +-CONFIGURE_FILE(yajl.pc.cmake ${shareDir}/yajl.pc) ++CONFIGURE_FILE(yajl.pc.cmake ${pkgconfigDir}/yajl.pc) + + # copy public headers to output directory + FOREACH (header ${PUB_HDRS}) +@@ -84,4 +84,4 @@ INSTALL(TARGETS yajl + INSTALL(TARGETS yajl_s ARCHIVE DESTINATION lib${LIB_SUFFIX}) + INSTALL(FILES ${PUB_HDRS} DESTINATION include/yajl) + INSTALL(FILES ${incDir}/yajl_version.h DESTINATION include/yajl) +-INSTALL(FILES ${shareDir}/yajl.pc DESTINATION share/pkgconfig) ++INSTALL(FILES ${pkgconfigDir}/yajl.pc DESTINATION lib${LIB_SUFFIX}/pkgconfig) diff --git a/yajl-2.1.0-test-location.patch b/yajl-2.1.0-test-location.patch new file mode 100644 index 0000000..04f5aee --- /dev/null +++ b/yajl-2.1.0-test-location.patch @@ -0,0 +1,30 @@ +diff -rup yajl-2.1.0.orig/test/api/run_tests.sh yajl-2.1.0.new/test/api/run_tests.sh +--- yajl-2.1.0.orig/test/api/run_tests.sh 2014-03-19 04:58:29.000000000 +0000 ++++ yajl-2.1.0.new/test/api/run_tests.sh 2014-04-28 11:27:26.006405320 +0100 +@@ -5,7 +5,7 @@ echo Running api tests: + tests=0 + passed=0 + +-for file in `ls`; do ++for file in `ls ../../build/test/api`; do + [ ! -x $file -o -d $file ] && continue + tests=`expr 1 + $tests` + printf " test(%s): " $file +diff -rup yajl-2.1.0.orig/test/parsing/run_tests.sh yajl-2.1.0.new/test/parsing/run_tests.sh +--- yajl-2.1.0.orig/test/parsing/run_tests.sh 2014-03-19 04:58:29.000000000 +0000 ++++ yajl-2.1.0.new/test/parsing/run_tests.sh 2014-04-28 11:25:51.239025722 +0100 +@@ -16,11 +16,11 @@ fi + # find test binary on both platforms. allow the caller to force a + # particular test binary (useful for non-cmake build systems). + if [ -z "$testBin" ]; then +- testBin="../build/test/parsing/Release/yajl_test.exe" ++ testBin="../../build/test/parsing/Release/yajl_test.exe" + if [ ! -x $testBin ] ; then +- testBin="../build/test/parsing/Debug/yajl_test.exe" ++ testBin="../../build/test/parsing/Debug/yajl_test.exe" + if [ ! -x $testBin ] ; then +- testBin="../build/test/parsing/yajl_test" ++ testBin="../../build/test/parsing/yajl_test" + if [ ! -x $testBin ] ; then + ${ECHO} "cannot execute test binary: '$testBin'" + exit 1; diff --git a/yajl.spec b/yajl.spec index 77167a1..e2ac060 100644 --- a/yajl.spec +++ b/yajl.spec @@ -1,6 +1,6 @@ Name: yajl -Version: 2.0.4 -Release: 3%{?dist} +Version: 2.1.0 +Release: 1%{?dist} Summary: Yet Another JSON Library (YAJL) Group: Development/Libraries @@ -14,22 +14,13 @@ URL: http://lloyd.github.com/yajl/ # # The Source0 for any version is obtained by a URL # -# http://github.com/lloyd/yajl/tarball/1.0.7 +# https://github.com/lloyd/yajl/releases/tag/2.1.0 # -# Which causes a download of a archive named after -# the GIT hash corresponding to the version tag -# -# eg lloyd-yajl-45a1bdb.tar.gz -# -# NB even though the tar.gz is generated on the fly by GITHub it -# will always have identical md5sum -# -# So for new versions, update 'githash' to match the hash of the -# GIT tag associated with updated 'Version:' field just above -%global githash fee1ebe -Source0: lloyd-%{name}-%{version}-0-g%{githash}.tar.gz -Patch1: lloyd-%{name}-%{version}-pkgconfig-location.patch -Patch2: lloyd-%{name}-%{version}-pkgconfig-includedir.patch +Source0: %{name}-%{version}.tar.gz +Patch1: %{name}-%{version}-pkgconfig-location.patch +Patch2: %{name}-%{version}-pkgconfig-includedir.patch +Patch3: %{name}-%{version}-test-location.patch +Patch4: %{name}-%{version}-dynlink-binaries.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: cmake @@ -52,9 +43,11 @@ This sub-package provides the libraries and includes necessary for developing against the YAJL library %prep -%setup -q -n lloyd-%{name}-%{githash} +%setup -q %patch1 -p1 %patch2 -p1 +%patch3 -p1 +%patch4 -p1 %build # NB, we are not using upstream's 'configure'/'make' @@ -78,7 +71,8 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libyajl_s.a %check cd test -./run_tests.sh +(cd parsing && ./run_tests.sh) +(cd api && ./run_tests.sh) %clean rm -rf $RPM_BUILD_ROOT @@ -109,6 +103,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Apr 28 2014 Daniel P. Berrange - 2.1.0-1 +- Update to 2.1.0 release (rhbz #1080935) + * Sun Aug 04 2013 Fedora Release Engineering - 2.0.4-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild