diff options
author | Matthew Thode <prometheanfire@gentoo.org> | 2020-08-10 09:22:09 -0500 |
---|---|---|
committer | Matthew Thode <prometheanfire@gentoo.org> | 2020-08-10 09:22:29 -0500 |
commit | 12e5f1d672606e05f94b4f0be48f468106521c8f (patch) | |
tree | 1ff086039b260c11f45d6c1ba1a6f7b810a706d2 /dev-libs/leatherman | |
parent | app-text/po4a: fix prepare (diff) | |
download | gentoo-12e5f1d672606e05f94b4f0be48f468106521c8f.tar.gz gentoo-12e5f1d672606e05f94b4f0be48f468106521c8f.tar.bz2 gentoo-12e5f1d672606e05f94b4f0be48f468106521c8f.zip |
dev-libs/leatherman: 1.12.1-r1 switch to fedora's nowide patch
Fixes: https://bugs.gentoo.org/726512
Package-Manager: Portage-3.0.0, Repoman-2.3.23
Signed-off-by: Matthew Thode <prometheanfire@gentoo.org>
Diffstat (limited to 'dev-libs/leatherman')
-rw-r--r-- | dev-libs/leatherman/files/shared_nowide.patch | 107 | ||||
-rw-r--r-- | dev-libs/leatherman/leatherman-1.12.1-r1.ebuild | 60 |
2 files changed, 167 insertions, 0 deletions
diff --git a/dev-libs/leatherman/files/shared_nowide.patch b/dev-libs/leatherman/files/shared_nowide.patch new file mode 100644 index 000000000000..e0c4c832fb3e --- /dev/null +++ b/dev-libs/leatherman/files/shared_nowide.patch @@ -0,0 +1,107 @@ +diff --git a/nowide/CMakeLists.txt b/nowide/CMakeLists.txt +index ff9dba6..5d1b9ce 100644 +--- a/nowide/CMakeLists.txt ++++ b/nowide/CMakeLists.txt +@@ -1,7 +1,5 @@ + find_package(Boost 1.54 REQUIRED) + +-add_leatherman_includes(${Boost_INCLUDE_DIRS} "${CMAKE_CURRENT_SOURCE_DIR}/../vendor/nowide/include") +-add_leatherman_headers(../vendor/nowide/include/boost) + if(WIN32) + add_leatherman_library(../vendor/nowide/src/iostream.cpp) + endif() +--- leatherman-1.10.0/execution/CMakeLists.txt~ 2020-06-03 10:30:05.027479897 +0100 ++++ leatherman-1.10.0/execution/CMakeLists.txt 2020-06-03 10:30:18.871483297 +0100 +@@ -1,4 +1,4 @@ +-find_package(Boost 1.54 REQUIRED COMPONENTS regex filesystem system) ++find_package(Boost 1.73 REQUIRED COMPONENTS regex filesystem system nowide) + + add_leatherman_deps("${Boost_LIBRARIES}") + if ("${CMAKE_SYSTEM_NAME}" MATCHES "SunOS") +@@ -10,7 +10,6 @@ + add_leatherman_includes("${Boost_INCLUDE_DIRS}") + + leatherman_dependency(util) +-leatherman_dependency(nowide) + leatherman_dependency(locale) + leatherman_dependency(logging) + leatherman_dependency(file_util) +--- leatherman-1.10.0/file_util/CMakeLists.txt~ 2020-06-03 10:30:05.031479898 +0100 ++++ leatherman-1.10.0/file_util/CMakeLists.txt 2020-06-03 10:31:04.550494516 +0100 +@@ -1,9 +1,8 @@ +-find_package(Boost 1.54 REQUIRED COMPONENTS regex filesystem system) ++find_package(Boost 1.73 REQUIRED COMPONENTS regex filesystem system nowide) + + add_leatherman_deps("${Boost_LIBRARIES}") + add_leatherman_includes("${Boost_INCLUDE_DIRS}") + +-leatherman_dependency(nowide) + leatherman_dependency(locale) + leatherman_dependency(logging) + leatherman_dependency(util) +--- leatherman-1.10.0/logging/CMakeLists.txt~ 2020-06-03 10:30:05.035479898 +0100 ++++ leatherman-1.10.0/logging/CMakeLists.txt 2020-06-03 10:30:19.092483352 +0100 +@@ -4,7 +4,6 @@ + add_leatherman_deps(${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) + add_leatherman_includes("${Boost_INCLUDE_DIRS}") + +-leatherman_dependency(nowide) + leatherman_dependency(locale) + + if (CMAKE_SYSTEM_NAME MATCHES "Linux" OR CMAKE_SYSTEM_NAME MATCHES "SunOS") +--- leatherman-1.10.0/tests/CMakeLists.txt~ 2020-06-02 23:24:17.146002133 +0100 ++++ leatherman-1.10.0/tests/CMakeLists.txt 2020-06-02 23:26:17.780054923 +0100 +@@ -1,8 +1,8 @@ +-set(BOOST_REQUIRED_COMPONENTS system date_time chrono log log_setup thread filesystem regex) ++set(BOOST_REQUIRED_COMPONENTS system date_time chrono log log_setup thread filesystem regex nowide) + if (LEATHERMAN_USE_LOCALES) + set(BOOST_REQUIRED_COMPONENTS ${BOOST_REQUIRED_COMPONENTS} locale) + endif() +-find_package(Boost "1.54" REQUIRED COMPONENTS ${BOOST_REQUIRED_COMPONENTS}) ++find_package(Boost "1.73" REQUIRED COMPONENTS ${BOOST_REQUIRED_COMPONENTS}) + + include_directories(BEFORE ${LEATHERMAN_CATCH_INCLUDE} ${LEATHERMAN_INCLUDE_DIRS}) + add_executable(leatherman_test main.cc ${LEATHERMAN_TEST_SRCS}) +--- leatherman-1.10.0/util/CMakeLists.txt~ 2020-06-03 10:05:44.277172451 +0100 ++++ leatherman-1.10.0/util/CMakeLists.txt 2020-06-03 10:06:52.969185017 +0100 +@@ -1,10 +1,8 @@ +-find_package(Boost 1.54 REQUIRED date_time chrono system) ++find_package(Boost 1.73 REQUIRED date_time chrono system nowide) + + add_leatherman_deps(${Boost_LIBRARIES}) + add_leatherman_includes("${Boost_INCLUDE_DIRS}") + +-leatherman_dependency(nowide) +- + if(WIN32) + set(PLATFORM_SRCS "src/windows/time.cc" "src/windows/environment.cc" "src/windows/scoped_handle.cc") + set(PLATFORM_TESTS "tests/windows/environment.cc") +--- leatherman-1.10.0/file_util/src/file.cc~ 2019-12-14 20:46:29.000000000 +0000 ++++ leatherman-1.10.0/file_util/src/file.cc 2020-06-02 22:42:45.100963441 +0100 +@@ -1,6 +1,6 @@ + #include <leatherman/file_util/file.hpp> + #include <boost/nowide/fstream.hpp> +-#include <boost/nowide/cenv.hpp> ++#include <boost/nowide/cstdlib.hpp> + #include <boost/filesystem.hpp> + #include <sstream> + #include <leatherman/logging/logging.hpp> +--- leatherman-1.10.0/util/src/environment.cc~ 2019-12-14 20:46:29.000000000 +0000 ++++ leatherman-1.10.0/util/src/environment.cc 2020-06-02 22:42:45.101963441 +0100 +@@ -1,5 +1,5 @@ + #include <leatherman/util/environment.hpp> +-#include <boost/nowide/cenv.hpp> ++#include <boost/nowide/cstdlib.hpp> + + using namespace std; + +--- leatherman-1.10.0/util/tests/environment.cc~ 2019-12-14 20:46:29.000000000 +0000 ++++ leatherman-1.10.0/util/tests/environment.cc 2020-06-02 22:42:45.103963442 +0100 +@@ -1,6 +1,6 @@ + #include <catch.hpp> + #include <leatherman/util/environment.hpp> +-#include <boost/nowide/cenv.hpp> ++#include <boost/nowide/cstdlib.hpp> + + using namespace std; + using namespace leatherman::util; diff --git a/dev-libs/leatherman/leatherman-1.12.1-r1.ebuild b/dev-libs/leatherman/leatherman-1.12.1-r1.ebuild new file mode 100644 index 000000000000..340f36608ce1 --- /dev/null +++ b/dev-libs/leatherman/leatherman-1.12.1-r1.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake-utils multilib + +DESCRIPTION="A C++ toolkit" +HOMEPAGE="https://github.com/puppetlabs/leatherman" +SRC_URI="https://github.com/puppetlabs/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0" +IUSE="debug static-libs test" +RESTRICT="!test? ( test )" +KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86" +SLOT="0/${PV}" + +RDEPEND="net-misc/curl" +DEPEND=">=dev-libs/boost-1.73:=[nls] + net-misc/curl + >=sys-devel/gcc-4.8:*" + +PATCHES=( "${FILESDIR}"/portage-sandbox-test-fix.patch ) +PATCHES+=( "${FILESDIR}"/shared_nowide.patch ) + +src_prepare() { + sed -i 's/\-Werror\ //g' "cmake/cflags.cmake" || die + # vendored boost lib conflicts with boost 1.73 and above + cmake-utils_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DCMAKE_VERBOSE_MAKEFILE=ON + -DCMAKE_BUILD_TYPE=None + ) + if ! use static-libs; then + mycmakeargs+=( + -DLEATHERMAN_SHARED=ON + ) + else + mycmakeargs+=( + -DLEATHERMAN_SHARED=OFF + ) + fi + if use debug; then + mycmakeargs+=( + -DCMAKE_BUILD_TYPE=Debug + ) + fi + cmake-utils_src_configure +} + +src_test() { + "${WORKDIR}/${P}"_build/bin/leatherman_test +} + +src_install() { + cmake-utils_src_install +} |