summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Zaman <perfinion@gentoo.org>2019-04-14 16:52:34 +0800
committerJason Zaman <perfinion@gentoo.org>2019-04-15 00:27:18 +0800
commit4bcc694c0c386f221bd5ac2c8e1497f4f4c6053a (patch)
tree903674c2ee555ec947d2a0e070a2b6105b176276 /dev-libs
parentmedia-libs/freeimage: Fix building against libjpeg-9 (diff)
downloadgentoo-4bcc694c0c386f221bd5ac2c8e1497f4f4c6053a.tar.gz
gentoo-4bcc694c0c386f221bd5ac2c8e1497f4f4c6053a.tar.bz2
gentoo-4bcc694c0c386f221bd5ac2c8e1497f4f4c6053a.zip
dev-libs/double-conversion: bump to 3.1.4
Signed-off-by: Jason Zaman <perfinion@gentoo.org> Package-Manager: Portage-2.3.62, Repoman-2.3.11
Diffstat (limited to 'dev-libs')
-rw-r--r--dev-libs/double-conversion/Manifest1
-rw-r--r--dev-libs/double-conversion/double-conversion-3.1.4.ebuild57
-rw-r--r--dev-libs/double-conversion/files/0001-CMake-install-to-correct-lib-dir.patch63
3 files changed, 121 insertions, 0 deletions
diff --git a/dev-libs/double-conversion/Manifest b/dev-libs/double-conversion/Manifest
index 73582e8f656..50fee14e1ea 100644
--- a/dev-libs/double-conversion/Manifest
+++ b/dev-libs/double-conversion/Manifest
@@ -1 +1,2 @@
DIST double-conversion-3.0.3.tar.gz 7019705 BLAKE2B 65d7729b55dbb9fd0cf31b258738f3e9f3350b4ecf0204d3d2d23de24cb24651788e844aa1a10d6ec452ca6484c43ed1d218d434fc18be7bb1f15bf8ba97102a SHA512 3a8e956da485195753508c90cd6fa3d9fde42103291a8e65a0d95488faa02e98dddff21935625519c0ce49d8911d66d0773ddf6012264094f3edd851b461f62b
+DIST double-conversion-3.1.4.tar.gz 7022872 BLAKE2B 270f318e6b37205ab3da3ccf5c598ca7a02dc2e728a5d8e3467523bc8f21039651bea3f70aeb9f8579505812d63181de9d1e8106997795a79efeb663e1bc22d7 SHA512 715a34ace2ff74b79d80a8c003c16cfbf958ebc92264e28cc572e1a12a786e1df9678abb46f032c2be387495e1a3d02957b12fa4a245ec6cfe19ca637519ac3c
diff --git a/dev-libs/double-conversion/double-conversion-3.1.4.ebuild b/dev-libs/double-conversion/double-conversion-3.1.4.ebuild
new file mode 100644
index 00000000000..82f78b5b2f8
--- /dev/null
+++ b/dev-libs/double-conversion/double-conversion-3.1.4.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake-utils multibuild
+
+DESCRIPTION="Binary-decimal and decimal-binary conversion routines for IEEE doubles"
+HOMEPAGE="https://github.com/google/double-conversion"
+SRC_URI="https://github.com/google/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/2"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux"
+IUSE="static-libs test"
+
+PATCHES=(
+ "${FILESDIR}/0001-CMake-install-to-correct-lib-dir.patch"
+)
+
+pkg_setup() {
+ MULTIBUILD_VARIANTS=( shared $(usev static-libs) )
+}
+
+src_configure() {
+ myconfigure() {
+ local mycmakeargs=( -DBUILD_TESTING=$(usex test) )
+ if [[ ${MULTIBUILD_VARIANT} = shared ]]; then
+ mycmakeargs+=( -DBUILD_SHARED_LIBS=ON )
+ fi
+ if [[ ${MULTIBUILD_VARIANT} = static-libs ]]; then
+ mycmakeargs+=( -DBUILD_SHARED_LIBS=OFF )
+ fi
+
+ cmake-utils_src_configure
+ }
+
+ multibuild_foreach_variant myconfigure
+}
+
+src_compile() {
+ multibuild_foreach_variant cmake-utils_src_compile
+}
+
+src_test() {
+ [[ ${MULTIBUILD_VARIANT} = shared ]] && cmake-utils_src_test
+}
+
+src_install() {
+ myinstall() {
+ [[ ${MULTIBUILD_VARIANT} = shared ]] && cmake-utils_src_install
+ [[ ${MULTIBUILD_VARIANT} = static-libs ]] && \
+ dolib.a ${BUILD_DIR}/libdouble-conversion.a
+ }
+
+ multibuild_foreach_variant myinstall
+}
diff --git a/dev-libs/double-conversion/files/0001-CMake-install-to-correct-lib-dir.patch b/dev-libs/double-conversion/files/0001-CMake-install-to-correct-lib-dir.patch
new file mode 100644
index 00000000000..3dbbfafec11
--- /dev/null
+++ b/dev-libs/double-conversion/files/0001-CMake-install-to-correct-lib-dir.patch
@@ -0,0 +1,63 @@
+From 0d65c903c600d983eabfa5be793fa60c346d8303 Mon Sep 17 00:00:00 2001
+From: Jason Zaman <jason@perfinion.com>
+Date: Sun, 14 Apr 2019 16:38:10 +0800
+Subject: [PATCH] CMake: install to correct lib dir
+
+64-bit libraries should be installed in /usr/lib64, not in /usr/lib/
+Make the destination lib dir configurable.
+
+Commit e13e72e17692f5dc0036460d734c637b563f3ac7 removed
+include(GNUInstallDirs) and ${CMAKE_INSTALL_LIBDIR} which broke
+installing on 64-bit systems.
+
+Signed-off-by: Jason Zaman <jason@perfinion.com>
+---
+ CMakeLists.txt | 15 ++++++++-------
+ 1 file changed, 8 insertions(+), 7 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index d9f4be8..2a06c71 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -40,12 +40,13 @@ endif()
+ ####
+ # Installation (https://github.com/forexample/package-example)
+
++include(GNUInstallDirs)
++
+ # Layout. This works for all platforms:
+ # * <prefix>/lib/cmake/<PROJECT-NAME>
+ # * <prefix>/lib/
+ # * <prefix>/include/
+-set(config_install_dir "lib/cmake/${PROJECT_NAME}")
+-set(include_install_dir "include")
++set(config_install_dir "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
+
+ set(generated_dir "${CMAKE_CURRENT_BINARY_DIR}/generated")
+
+@@ -81,17 +82,17 @@ configure_package_config_file(
+ install(
+ TARGETS double-conversion
+ EXPORT "${targets_export_name}"
+- LIBRARY DESTINATION "lib"
+- ARCHIVE DESTINATION "lib"
+- RUNTIME DESTINATION "bin"
+- INCLUDES DESTINATION "${include_install_dir}"
++ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
++ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
++ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
++ INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
+ )
+
+ # Headers:
+ # * double-conversion/*.h -> <prefix>/include/double-conversion/*.h
+ install(
+ FILES ${headers}
+- DESTINATION "${include_install_dir}/double-conversion"
++ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/double-conversion"
+ )
+
+ # Config
+--
+2.21.0
+