From ff84e66ddb5f2dda322c0a4acb9a6d8287394bed Mon Sep 17 00:00:00 2001 From: Paul Novotny Date: Thu, 13 Oct 2016 00:48:11 +0100 Subject: [PATCH] Import yaml-cpp_0.5.2-4.debian.tar.xz [dgit import tarball yaml-cpp 0.5.2-4 yaml-cpp_0.5.2-4.debian.tar.xz] --- changelog | 73 ++++++++++++++ compat | 1 + control | 40 ++++++++ copyright | 44 +++++++++ libyaml-cpp-dev.install | 5 + libyaml-cpp0.5v5.install | 1 + ...-bug-in-googletest-fixing-bug-812284.patch | 32 +++++++ patches/backport-b426fafff.patch | 96 +++++++++++++++++++ patches/install-cmake-dev-files.patch | 69 +++++++++++++ patches/pkgconfig.patch | 19 ++++ patches/reproducible-build.patch | 15 +++ patches/series | 5 + rules | 64 +++++++++++++ source/format | 1 + watch | 3 + 15 files changed, 468 insertions(+) create mode 100644 changelog create mode 100644 compat create mode 100644 control create mode 100644 copyright create mode 100644 libyaml-cpp-dev.install create mode 100644 libyaml-cpp0.5v5.install create mode 100644 patches/0003-Workaround-bug-in-googletest-fixing-bug-812284.patch create mode 100644 patches/backport-b426fafff.patch create mode 100644 patches/install-cmake-dev-files.patch create mode 100644 patches/pkgconfig.patch create mode 100644 patches/reproducible-build.patch create mode 100644 patches/series create mode 100755 rules create mode 100644 source/format create mode 100644 watch diff --git a/changelog b/changelog new file mode 100644 index 0000000..55679f3 --- /dev/null +++ b/changelog @@ -0,0 +1,73 @@ +yaml-cpp (0.5.2-4) unstable; urgency=medium + + * Make the build reproducible (Closes: #808714) + * Add libboost-dev dependency (Closes: #812851) + * Fix yaml-cpp 0.5.2 issue (Closes: #814499) + * Fix lintian warnings: spelling, standards-version, and Vcs-Git + + -- Paul Novotny Wed, 12 Oct 2016 19:48:11 -0400 + +yaml-cpp (0.5.2-3.1) unstable; urgency=medium + + * Non-maintainer upload. + * Work around bug in googletest causing segfault with gcc-6. + (Closes: #812284) + + -- Christian Hofstaedtler Sat, 02 Jul 2016 13:27:16 +0200 + +yaml-cpp (0.5.2-3) unstable; urgency=medium + + * Fix error in yaml-cpp-config.cmake + * Disable gtest's use of pthread on hurd and kfreebsd + + -- Paul Novotny Mon, 30 Nov 2015 16:53:57 -0500 + +yaml-cpp (0.5.2-2) unstable; urgency=medium + + * Rename libyaml-cpp0.5 to libyaml-cpp0.5v5 for gcc5 transition + (Closes: #791317) + + -- Paul Novotny Tue, 04 Aug 2015 18:03:35 -0400 + +yaml-cpp (0.5.2-1) unstable; urgency=medium + + * Update due to yaml-cpp from Google Code to GitHub + * Imported Upstream version 0.5.2 + * Remove patches/fix-unit-test.patch, applied upstream + * Remove patches/remove-conflicting-google-libs.patch, applied upstream + + -- Paul Novotny Thu, 23 Apr 2015 16:40:20 -0400 + +yaml-cpp (0.5.1+hg20150210-1) experimental; urgency=medium + + [ Andreas Tille ] + * Import latest upstream + * Fix failing unit tests + * Inject package into collab-maint to enable more people contributing + * cme fix dpkg-control + * debhelper 9 + + [ Paul Novotny ] + * Add myself as Uploader + * Import latest upstream VCS status + * Fix failing unit tests, update version number + * Install cmake development files + + -- Andreas Tille Mon, 09 Feb 2015 13:36:42 +0100 + +yaml-cpp (0.5.1-1) unstable; urgency=low + + * New upstream release. (Closes: #706708) + * Bump Standards-Version to 3.9.4. + * libyaml-cpp-dev: remove multiarch path in yaml-cpp.pc to make + lintian happy. + * debian/copyright: new Format URI. + * debian/control: remove Vcs-Svn field. + + -- Lifeng Sun Fri, 30 Aug 2013 18:29:05 +0800 + +yaml-cpp (0.3.0-1) unstable; urgency=low + + * Initial release (Closes: #636985) + + -- Lifeng Sun Sun, 03 Jun 2012 23:48:30 +0800 diff --git a/compat b/compat new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/compat @@ -0,0 +1 @@ +9 diff --git a/control b/control new file mode 100644 index 0000000..8360f3e --- /dev/null +++ b/control @@ -0,0 +1,40 @@ +Source: yaml-cpp +Maintainer: Lifeng Sun +Uploaders: Andreas Tille , + Paul Novotny +Section: devel +Priority: optional +Build-Depends: debhelper (>= 9), + cmake, + libboost-dev +Standards-Version: 3.9.8 +Vcs-Browser: https://anonscm.debian.org/cgit/collab-maint/yaml-cpp.git +Vcs-Git: https://anonscm.debian.org/git/collab-maint/yaml-cpp.git +Homepage: https://github.com/jbeder/yaml-cpp + +Package: libyaml-cpp0.5v5 +Architecture: any +Multi-Arch: same +Section: libs +Depends: ${shlibs:Depends}, + ${misc:Depends} +Pre-Depends: ${misc:Pre-Depends} +Conflicts: libyaml-cpp0.5 +Replaces: libyaml-cpp0.5 +Description: YAML parser and emitter for C++ + yaml-cpp is a C++ library for parsing and emitting data in YAML 1.2, a + human-readable data serialization format. + . + This package provides run-time library of yaml-cpp. + +Package: libyaml-cpp-dev +Architecture: any +Section: libdevel +Depends: libyaml-cpp0.5v5 (= ${binary:Version}), + libboost-dev, + ${misc:Depends} +Description: YAML parser and emitter for C++ - development files + yaml-cpp is a C++ library for parsing and emitting data in YAML 1.2, a + human-readable data serialization format. + . + This package provides development files of yaml-cpp. diff --git a/copyright b/copyright new file mode 100644 index 0000000..5268095 --- /dev/null +++ b/copyright @@ -0,0 +1,44 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: yaml-cpp +Source: https://github.com/jbeder/yaml-cpp + +Files: * +Copyright: 2008 Jesse Beder +License: X11 + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + . + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + +Files: debian/* +Copyright: 2011-2013 Lifeng Sun +License: GPL-2.0+ + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + . + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this program. If not, see + . + On Debian systems, the complete text of the GNU General + Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". + diff --git a/libyaml-cpp-dev.install b/libyaml-cpp-dev.install new file mode 100644 index 0000000..13979ef --- /dev/null +++ b/libyaml-cpp-dev.install @@ -0,0 +1,5 @@ +usr/include/ +usr/lib/*/*.a +usr/lib/*/*.so +usr/lib/*/pkgconfig/ +usr/lib/*/cmake/ diff --git a/libyaml-cpp0.5v5.install b/libyaml-cpp0.5v5.install new file mode 100644 index 0000000..7a0ab28 --- /dev/null +++ b/libyaml-cpp0.5v5.install @@ -0,0 +1 @@ +usr/lib/*/libyaml-cpp.so.* diff --git a/patches/0003-Workaround-bug-in-googletest-fixing-bug-812284.patch b/patches/0003-Workaround-bug-in-googletest-fixing-bug-812284.patch new file mode 100644 index 0000000..8eacf0d --- /dev/null +++ b/patches/0003-Workaround-bug-in-googletest-fixing-bug-812284.patch @@ -0,0 +1,32 @@ +From: Christian Hofstaedtler +Date: Thu, 30 Jun 2016 22:05:02 +0000 +Subject: Workaround bug in googletest, fixing bug #812284 + +--- + test/CMakeLists.txt | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt +index 61f1f7f..2083d5e 100644 +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -13,6 +13,19 @@ if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU" OR + set(yaml_test_flags "-Wno-c99-extensions -Wno-variadic-macros -Wno-sign-compare") + endif() + ++# In some cases gTest segfaults with GCC >= 6.0.0. This is a dirty fix. ++# TODO: Update to gTest-release with proper support for GCC >= 6.0.0. ++# See: https://github.com/google/googletest/issues/705 ++IF(CMAKE_COMPILER_IS_GNUCXX) ++ # in order to support cmake 2.8.7 and older ++ IF(NOT CMAKE_CXX_COMPILER_VERSION) ++ include(CheckCompiler) ++ ENDIF(NOT CMAKE_CXX_COMPILER_VERSION) ++ IF(NOT "${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "6.0.0") ++ set(yaml_test_flags "${yaml_test_flags} -fno-delete-null-pointer-checks") ++ ENDIF(NOT "${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "6.0.0") ++ENDIF(CMAKE_COMPILER_IS_GNUCXX) ++ + file(GLOB test_headers [a-z_]*.h) + file(GLOB test_sources [a-z_]*.cpp integration/[a-z_]*.cpp node/[a-z_]*.cpp) + file(GLOB test_new_api_sources new-api/[a-z]*.cpp) diff --git a/patches/backport-b426fafff.patch b/patches/backport-b426fafff.patch new file mode 100644 index 0000000..86846a7 --- /dev/null +++ b/patches/backport-b426fafff.patch @@ -0,0 +1,96 @@ +Description: Fix some Node::operator[] regressions from 0.5.1 +Author: Paul Novotny +Bug-Debian: https://bugs.debian.org/835417 +Origin: upstream, https://github.com/jbeder/yaml-cpp/commit/b426fafff +Last-Update: 2016-10-11 + +--- a/include/yaml-cpp/node/impl.h ++++ b/include/yaml-cpp/node/impl.h +@@ -142,7 +142,7 @@ + template + inline const T Node::as(const S& fallback) const { + if (!m_isValid) +- throw InvalidNode(); ++ return fallback; + return as_if(*this)(fallback); + } + +@@ -275,26 +275,26 @@ + + inline const_iterator Node::begin() const { + if (!m_isValid) +- throw InvalidNode(); ++ return const_iterator(); + return m_pNode ? const_iterator(m_pNode->begin(), m_pMemory) + : const_iterator(); + } + + inline iterator Node::begin() { + if (!m_isValid) +- throw InvalidNode(); ++ return iterator(); + return m_pNode ? iterator(m_pNode->begin(), m_pMemory) : iterator(); + } + + inline const_iterator Node::end() const { + if (!m_isValid) +- throw InvalidNode(); ++ return const_iterator(); + return m_pNode ? const_iterator(m_pNode->end(), m_pMemory) : const_iterator(); + } + + inline iterator Node::end() { + if (!m_isValid) +- throw InvalidNode(); ++ return iterator(); + return m_pNode ? iterator(m_pNode->end(), m_pMemory) : iterator(); + } + +--- a/test/node/node_test.cpp ++++ b/test/node/node_test.cpp +@@ -73,6 +73,12 @@ + EXPECT_EQ(2, node.size()); + } + ++TEST(NodeTest, UndefinedConstNodeWithFallback) { ++ Node node; ++ const Node& cn = node; ++ EXPECT_EQ(cn["undefined"].as(3), 3); ++} ++ + TEST(NodeTest, MapIteratorWithUndefinedValues) { + Node node; + node["key"] = "value"; +@@ -84,6 +90,32 @@ + EXPECT_EQ(1, count); + } + ++TEST(NodeTest, ConstIteratorOnConstUndefinedNode) { ++ Node node; ++ const Node& cn = node; ++ const Node& undefinedCn = cn["undefined"]; ++ ++ std::size_t count = 0; ++ for (const_iterator it = undefinedCn.begin(); it != undefinedCn.end(); ++it) { ++ count++; ++ } ++ EXPECT_EQ(0, count); ++} ++ ++TEST(NodeTest, IteratorOnConstUndefinedNode) { ++ Node node; ++ const Node& cn = node; ++ const Node& undefinedCn = cn["undefined"]; ++ ++ Node& nonConstUndefinedNode = const_cast(undefinedCn); ++ ++ std::size_t count = 0; ++ for (iterator it = nonConstUndefinedNode.begin(); it != nonConstUndefinedNode.end(); ++it) { ++ count++; ++ } ++ EXPECT_EQ(0, count); ++} ++ + TEST(NodeTest, SimpleSubkeys) { + Node node; + node["device"]["udid"] = "12345"; diff --git a/patches/install-cmake-dev-files.patch b/patches/install-cmake-dev-files.patch new file mode 100644 index 0000000..da83fa2 --- /dev/null +++ b/patches/install-cmake-dev-files.patch @@ -0,0 +1,69 @@ +Description: Install libs and cmake files to the Debian location + Instead of moving the libs to the DEB_HOST_MULTIARCH lib directory during + packaging, have cmake install the libs directly. This is needed so the CMake + development files point to the correct location for the libs. Also, install + yaml-cpp-config.cmake, yaml-cpp-config-version.cmake, and + yaml-cpp-targets.cmake. +Author: Paul Novotny +Forwarded: not-needed +Last-Update: 2015-11-29 + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -251,18 +251,21 @@ + if(WIN32) + set(_library_dir bin) # .dll are in PATH, like executables + else() +- set(_library_dir lib) ++ set(_library_dir ${CMAKE_INSTALL_PREFIX}/lib) + endif() + + set(INCLUDE_INSTALL_ROOT_DIR include) + + set(INCLUDE_INSTALL_DIR ${INCLUDE_INSTALL_ROOT_DIR}/yaml-cpp) +-set(LIB_INSTALL_DIR "${_library_dir}${LIB_SUFFIX}") ++SET(LIB_INSTALL_DIR "${_library_dir}${LIB_SUFFIX}" CACHE ++ "Directory relative to CMAKE_INSTALL_PREFIX in which to install libraries" ++ STRING) ++MARK_AS_ADVANCED(LIB_INSTALL_DIR) + + set(_INSTALL_DESTINATIONS + RUNTIME DESTINATION bin + LIBRARY DESTINATION ${LIB_INSTALL_DIR} +- ARCHIVE DESTINATION "lib${LIB_SUFFIX}" ++ ARCHIVE DESTINATION ${LIB_INSTALL_DIR} + ) + + +@@ -298,7 +301,7 @@ + endif() + endif() + +-install(TARGETS yaml-cpp ${_INSTALL_DESTINATIONS}) ++install(TARGETS yaml-cpp EXPORT yaml-cpp-targets ${_INSTALL_DESTINATIONS}) + install( + DIRECTORY ${header_directory} + DESTINATION ${INCLUDE_INSTALL_DIR} +@@ -314,9 +317,22 @@ + set(CONFIG_INCLUDE_DIRS "${YAML_CPP_SOURCE_DIR}/include") + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/yaml-cpp-config.cmake.in + "${PROJECT_BINARY_DIR}/yaml-cpp-config.cmake" @ONLY) ++ ++set(INSTALL_CMAKE_DIR ${LIB_INSTALL_DIR}/cmake/yaml-cpp) ++file(RELATIVE_PATH REL_INCLUDE_DIR "${INSTALL_CMAKE_DIR}" "${CMAKE_INSTALL_PREFIX}/include") ++set(CONFIG_INCLUDE_DIRS "\${YAML_CPP_CMAKE_DIR}/${REL_INCLUDE_DIR}") ++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/yaml-cpp-config.cmake.in ++ "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/yaml-cpp-config.cmake" @ONLY) ++ + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/yaml-cpp-config-version.cmake.in + "${PROJECT_BINARY_DIR}/yaml-cpp-config-version.cmake" @ONLY) + ++install(FILES ++ "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/yaml-cpp-config.cmake" ++ "${PROJECT_BINARY_DIR}/yaml-cpp-config-version.cmake" ++ DESTINATION "${INSTALL_CMAKE_DIR}" COMPONENT dev) ++install(EXPORT yaml-cpp-targets DESTINATION ${INSTALL_CMAKE_DIR}) ++ + if(UNIX) + set(PC_FILE ${CMAKE_BINARY_DIR}/yaml-cpp.pc) + configure_file("yaml-cpp.pc.cmake" ${PC_FILE} @ONLY) diff --git a/patches/pkgconfig.patch b/patches/pkgconfig.patch new file mode 100644 index 0000000..184680d --- /dev/null +++ b/patches/pkgconfig.patch @@ -0,0 +1,19 @@ +Author: Lifeng Sun +Last-Update: Fri, 30 Aug 2013 18:29:05 +0800 +Description: remove multiarch path in yaml-cpp.pc + +--- a/yaml-cpp.pc.cmake ++++ b/yaml-cpp.pc.cmake +@@ -1,11 +1,10 @@ + prefix=@CMAKE_INSTALL_PREFIX@ + exec_prefix=@CMAKE_INSTALL_PREFIX@ +-libdir=${prefix}/@LIB_INSTALL_DIR@ + includedir=${prefix}/@INCLUDE_INSTALL_ROOT_DIR@ + + Name: Yaml-cpp + Description: A YAML parser and emitter for C++ + Version: @YAML_CPP_VERSION@ + Requires: +-Libs: -L${libdir} -lyaml-cpp ++Libs: -lyaml-cpp + Cflags: -I${includedir} diff --git a/patches/reproducible-build.patch b/patches/reproducible-build.patch new file mode 100644 index 0000000..720b0b3 --- /dev/null +++ b/patches/reproducible-build.patch @@ -0,0 +1,15 @@ +Description: Make the build reproducible +Author: Reiner Herrmann +Bug-Debian: https://bugs.debian.org/808714 +Last-Update: 2016-10-11 + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -100,6 +100,7 @@ + ${contrib_private_headers} + ) + add_sources(${library_sources}) ++list(SORT library_sources) + + if(VERBOSE) + message(STATUS "sources: ${sources}") diff --git a/patches/series b/patches/series new file mode 100644 index 0000000..29fbe54 --- /dev/null +++ b/patches/series @@ -0,0 +1,5 @@ +pkgconfig.patch +install-cmake-dev-files.patch +reproducible-build.patch +0003-Workaround-bug-in-googletest-fixing-bug-812284.patch +backport-b426fafff.patch diff --git a/rules b/rules new file mode 100755 index 0000000..415ccef --- /dev/null +++ b/rules @@ -0,0 +1,64 @@ +#!/usr/bin/make -f + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# This has to be exported to make some magic below work. +export DH_OPTIONS + +DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) + +CPPFLAGS :=$(shell dpkg-buildflags --get CPPFLAGS) +CFLAGS :=$(shell dpkg-buildflags --get CFLAGS) +CXXFLAGS :=$(shell dpkg-buildflags --get CXXFLAGS) +LDFLAGS :=$(shell dpkg-buildflags --get LDFLAGS) + +export DEB_HOST_MULTIARCH CPPFLAGS CFLAGS CXXFLAGS LDFLAGS + +ifeq (,$(filter $(DEB_BUILD_ARCH),kfreebsd-amd64 kfreebsd-i386 hurd-i386)) + DISABLE_PTHREADS=OFF +else + DISABLE_PTHREADS=ON +endif + +override_dh_auto_configure: + dh_testdir + mkdir build-static; cd build-static; \ + cmake .. -DCMAKE_INSTALL_PREFIX=/usr \ + -DLIB_INSTALL_DIR=/usr/lib/$(DEB_HOST_MULTIARCH) \ + -DYAML_CPP_BUILD_TOOLS=ON \ + -Dgtest_disable_pthreads=$(DISABLE_PTHREADS) + mkdir build-shared; cd build-shared; \ + cmake .. -DCMAKE_INSTALL_PREFIX=/usr \ + -DLIB_INSTALL_DIR=/usr/lib/$(DEB_HOST_MULTIARCH) \ + -DBUILD_SHARED_LIBS=ON \ + -DYAML_CPP_BUILD_TOOLS=ON \ + -Dgtest_disable_pthreads=$(DISABLE_PTHREADS) + +override_dh_auto_build: + dh_testdir + $(MAKE) -C build-static + $(MAKE) -C build-shared + # It might make sense to also provide the utils in a separate package + # $(MAKE) -C build-shared util + +override_dh_auto_install: + dh_testdir + dh_prep + $(MAKE) -C build-static install DESTDIR=$(CURDIR)/debian/tmp + $(MAKE) -C build-shared install DESTDIR=$(CURDIR)/debian/tmp + +override_dh_auto_test: + $(MAKE) -C build-static test + $(MAKE) -C build-shared test + +clean: + dh_testdir + dh_auto_clean + dh_clean + rm -rf build-static build-shared + +%: + dh $@ + +.PHONY: clean diff --git a/source/format b/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/watch b/watch new file mode 100644 index 0000000..3bdf5e9 --- /dev/null +++ b/watch @@ -0,0 +1,3 @@ +version=3 +opts=filenamemangle=s/.+\/release-?(\d\S*)\.tar\.gz/yaml-cpp-$1\.tar\.gz/ \ + https://github.com/jbeder/yaml-cpp/releases .*/release-?(\d\S*)\.tar\.gz -- 2.30.2