commit:     edf07223a392707c55b3a43c32d1d0c1f7ab94af
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 26 12:13:14 2020 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Thu Mar 26 12:38:33 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=edf07223

dev-libs/rinutils: New package

Required by dev-games/freecell-solver...

Package consists only of headers, so keeping all ~arch KEYWORDS from
dev-games/freecell-solver where it was split out of.

Package-Manager: Portage-2.3.96, Repoman-2.3.22
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 dev-libs/rinutils/Manifest                         |   1 +
 .../files/rinutils-0.2.0-gnuinstalldirs.patch      | 104 +++++++++++++++++++++
 dev-libs/rinutils/metadata.xml                     |  11 +++
 dev-libs/rinutils/rinutils-0.2.0.ebuild            |  25 +++++
 4 files changed, 141 insertions(+)

diff --git a/dev-libs/rinutils/Manifest b/dev-libs/rinutils/Manifest
new file mode 100644
index 00000000000..f9c4ac2cdc7
--- /dev/null
+++ b/dev-libs/rinutils/Manifest
@@ -0,0 +1 @@
+DIST rinutils-0.2.0.tar.xz 17008 BLAKE2B 
d8f40558e50a54a2ab450131c1e3873ff68128d8a6ddfcfd6e8455dff98d3a0b9bbe4baef2a6e8220a3cc9429f1e661b3bf8a6e96a1311352dd0f22d7d331339
 SHA512 
82d09313f014fd118025438575a90dbc5b9a46d3d58ed9ffc774380d285b32ed00e7d9b453097ce0b8efc20a85a783e178b0d6831e925da3cd65f35037306dc3

diff --git a/dev-libs/rinutils/files/rinutils-0.2.0-gnuinstalldirs.patch 
b/dev-libs/rinutils/files/rinutils-0.2.0-gnuinstalldirs.patch
new file mode 100644
index 00000000000..b867e7ca968
--- /dev/null
+++ b/dev-libs/rinutils/files/rinutils-0.2.0-gnuinstalldirs.patch
@@ -0,0 +1,104 @@
+From 02c781a35a844f0ef4434268fb0d7f9ea2d3f130 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <ast...@gentoo.org>
+Date: Thu, 26 Mar 2020 13:07:37 +0100
+Subject: [PATCH] Use GNUInstallDirs
+
+Fix cmake module install path while at it.
+Fix pkgconfig libdir path while at it.
+---
+ CMakeLists.txt          | 15 +++++++--------
+ RinutilsConfig.cmake.in |  2 +-
+ librinutils.pc.in       |  4 ++--
+ 3 files changed, 10 insertions(+), 11 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 9829c49..753a138 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -9,6 +9,7 @@ option (WITH_TEST_SUITE "Also build and run the test suite." 
ON)
+ option (DISABLE_APPLYING_RPATH "Disable applying rpath")
+ 
+ INCLUDE(FindPkgConfig)
++INCLUDE(GNUInstallDirs)
+ 
+ # Introduces VERSION , CPACK_PACKAGE_VERSION_MAJOR,
+ # CPACK_PACKAGE_VERSION_MAJOR, and CPACK_PACKAGE_VERSION_PATCH
+@@ -54,7 +55,7 @@ IF (NOT DISABLE_APPLYING_RPATH)
+     SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
+ 
+     # the RPATH to be used when installing
+-    SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
++    SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_LIBDIR}")
+ 
+     # add the automatically determined parts of the RPATH
+     # which point to directories outside the build tree to the install RPATH
+@@ -99,14 +100,14 @@ INSTALL(
+         "rinutils/include/rinutils/typeof_wrap.h"
+         "rinutils/include/rinutils/unused.h"
+     DESTINATION
+-        "include/rinutils"
++        "${CMAKE_INSTALL_INCLUDEDIR}/rinutils"
+ )
+ 
+ INSTALL(
+     FILES
+         "${CMAKE_CURRENT_BINARY_DIR}/lib${CPACK_PACKAGE_NAME}.pc"
+     DESTINATION
+-        "lib${LIB_SUFFIX}/pkgconfig"
++        "${CMAKE_INSTALL_LIBDIR}/pkgconfig"
+ )
+ 
+ CONFIGURE_FILE(
+@@ -128,20 +129,18 @@ ADD_CUSTOM_COMMAND(
+     ARGS "config.h.in"
+ )
+ 
+-set(INCLUDE_INSTALL_DIR include)
+-set(LIB_INSTALL_DIR "lib${LIB_SUFFIX}")
+ include(CMakePackageConfigHelpers)
+ configure_package_config_file(RinutilsConfig.cmake.in
+   ${CMAKE_CURRENT_BINARY_DIR}/RinutilsConfig.cmake
+-  INSTALL_DESTINATION ${LIB_INSTALL_DIR}/Rinutils/cmake
+-  PATH_VARS INCLUDE_INSTALL_DIR)
++  INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/Rinutils
++  PATH_VARS CMAKE_INSTALL_INCLUDEDIR)
+ write_basic_package_version_file(
+   ${CMAKE_CURRENT_BINARY_DIR}/RinutilsConfigVersion.cmake
+   VERSION 1.2.3
+   COMPATIBILITY SameMajorVersion )
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/RinutilsConfig.cmake
+               ${CMAKE_CURRENT_BINARY_DIR}/RinutilsConfigVersion.cmake
+-        DESTINATION ${LIB_INSTALL_DIR}/Rinutils/cmake )
++        DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/Rinutils )
+ 
+ IF (WITH_TEST_SUITE)
+ 
+diff --git a/RinutilsConfig.cmake.in b/RinutilsConfig.cmake.in
+index 480fda0..f81f685 100644
+--- a/RinutilsConfig.cmake.in
++++ b/RinutilsConfig.cmake.in
+@@ -2,6 +2,6 @@ set(RINUTILS_VERSION x.y.z)
+ 
+ @PACKAGE_INIT@
+ 
+-set_and_check(RINUTILS_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@")
++set_and_check(RINUTILS_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@")
+ 
+ check_required_components(Rinutils)
+diff --git a/librinutils.pc.in b/librinutils.pc.in
+index 6cdb514..1af6238 100644
+--- a/librinutils.pc.in
++++ b/librinutils.pc.in
+@@ -1,7 +1,7 @@
+ prefix="@CMAKE_INSTALL_PREFIX@"
+ exec_prefix=${prefix}
+-libdir=${exec_prefix}/lib
+-includedir=${prefix}/include
++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
++includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
+ 
+ Name:  rinutils
+ Description: Ad hoc headers library for C
+-- 
+2.26.0
+

diff --git a/dev-libs/rinutils/metadata.xml b/dev-libs/rinutils/metadata.xml
new file mode 100644
index 00000000000..bbffdc11233
--- /dev/null
+++ b/dev-libs/rinutils/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="project">
+               <email>k...@gentoo.org</email>
+               <name>Gentoo KDE Project</name>
+       </maintainer>
+       <upstream>
+               <remote-id type="github">shlomif/rinutils</remote-id>
+       </upstream>
+</pkgmetadata>

diff --git a/dev-libs/rinutils/rinutils-0.2.0.ebuild 
b/dev-libs/rinutils/rinutils-0.2.0.ebuild
new file mode 100644
index 00000000000..99ef10061a9
--- /dev/null
+++ b/dev-libs/rinutils/rinutils-0.2.0.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake
+
+DESCRIPTION="Set of C headers containing macros and static functions"
+HOMEPAGE="https://www.shlomifish.org/open-source/projects/ 
https://github.com/shlomif/rinutils";
+SRC_URI="https://github.com/shlomif/${PN}/releases/download/${PV}/${P}.tar.xz";
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+
+PATCHES=( "${FILESDIR}/${P}-gnuinstalldirs.patch" )
+
+src_configure() {
+       local mycmakeargs=(
+               -DDISABLE_APPLYING_RPATH=OFF
+               -DWITH_TEST_SUITE=OFF # tests require perl
+       )
+
+       cmake_src_configure
+}

Reply via email to