public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/rttr/, dev-libs/rttr/files/
@ 2019-04-12 12:43 Michael Palimaka
  0 siblings, 0 replies; only message in thread
From: Michael Palimaka @ 2019-04-12 12:43 UTC (permalink / raw
  To: gentoo-commits

commit:     b2133a7953adc75091a716288b4ee827bce678b3
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 12 12:41:32 2019 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Fri Apr 12 12:42:53 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b2133a79

dev-libs/rttr: new package

Closes: https://bugs.gentoo.org/681324
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Michael Palimaka <kensington <AT> gentoo.org>

 dev-libs/rttr/Manifest                          |  1 +
 dev-libs/rttr/files/rttr-0.9.6-cmake.patch      | 25 ++++++++++++++++++
 dev-libs/rttr/files/rttr-0.9.6-permission.patch | 13 ++++++++++
 dev-libs/rttr/files/rttr-0.9.6-tests.patch      | 30 ++++++++++++++++++++++
 dev-libs/rttr/files/rttr-0.9.6-werror.patch     | 18 +++++++++++++
 dev-libs/rttr/metadata.xml                      | 10 ++++++++
 dev-libs/rttr/rttr-0.9.6.ebuild                 | 34 +++++++++++++++++++++++++
 7 files changed, 131 insertions(+)

diff --git a/dev-libs/rttr/Manifest b/dev-libs/rttr/Manifest
new file mode 100644
index 00000000000..88fa670091c
--- /dev/null
+++ b/dev-libs/rttr/Manifest
@@ -0,0 +1 @@
+DIST rttr-0.9.6-src.tar.gz 1137269 BLAKE2B 53bb4ed75e20a82d2bd2e6c5667efe1ba6b6f2d8a83a3bd486870daeae57a36cdcb9f2acb6d47a6d1b2f36f00a262170efa4e321f6e7faf8d2c35c431bf47133 SHA512 7e0d4fa87f83feda0b926d4d0e52aaf0f369f25fe7e23e5ffe86c0bba159e8353cef44eed37611a81e8ccc8d6facb36942f940d0d0b965f873177d7078f91cf4

diff --git a/dev-libs/rttr/files/rttr-0.9.6-cmake.patch b/dev-libs/rttr/files/rttr-0.9.6-cmake.patch
new file mode 100644
index 00000000000..e313014d70a
--- /dev/null
+++ b/dev-libs/rttr/files/rttr-0.9.6-cmake.patch
@@ -0,0 +1,25 @@
+Install cmake files to the correct directory.
+
+Avoid installing docs to the wrong directory (will be installed by the ebuild instead).
+
+--- a/CMake/config.cmake
++++ b/CMake/config.cmake
+@@ -69,7 +69,7 @@
+ 
+   set(RTTR_INSTALL_FULL_LIBDIR "${CMAKE_INSTALL_FULL_LIBDIR}")
+ 
+-  set(RTTR_CMAKE_CONFIG_INSTALL_DIR "${CMAKE_INSTALL_DATADIR}/rttr/cmake")
++  set(RTTR_CMAKE_CONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/rttr")
+   set(RTTR_ADDITIONAL_FILES_INSTALL_DIR "${CMAKE_INSTALL_DATADIR}/rttr")
+ 
+ elseif(WIN32)
+@@ -169,8 +169,4 @@
+     install(FILES "${CMAKE_CURRENT_BINARY_DIR}/CMake/rttr-config-version.cmake"
+             DESTINATION ${RTTR_CMAKE_CONFIG_INSTALL_DIR}
+             COMPONENT Devel)
+-
+-    install(FILES "${LICENSE_FILE}" "${README_FILE}"
+-            DESTINATION ${RTTR_ADDITIONAL_FILES_INSTALL_DIR}
+-            PERMISSIONS OWNER_READ)
+ endif()
+

diff --git a/dev-libs/rttr/files/rttr-0.9.6-permission.patch b/dev-libs/rttr/files/rttr-0.9.6-permission.patch
new file mode 100644
index 00000000000..bec7ac36bfc
--- /dev/null
+++ b/dev-libs/rttr/files/rttr-0.9.6-permission.patch
@@ -0,0 +1,13 @@
+Avoid installing headers with mode 700.
+
+--- a/CMake/utility.cmake
++++ b/CMake/utility.cmake
+@@ -165,7 +165,7 @@
+     getNameOfDir(CMAKE_CURRENT_SOURCE_DIR DIRNAME)
+     if (${shouldInstall})
+       if (NOT ${FULL_HEADER_PATH} MATCHES ".*_p.h$") # we don't want to install header files which are marked as private
+-        install(FILES ${FULL_HEADER_PATH} DESTINATION "include/${DIRNAME}/${REL_PATH}" PERMISSIONS OWNER_READ)
++        install(FILES ${FULL_HEADER_PATH} DESTINATION "include/${DIRNAME}/${REL_PATH}")
+       endif()
+     endif()
+   endforeach()

diff --git a/dev-libs/rttr/files/rttr-0.9.6-tests.patch b/dev-libs/rttr/files/rttr-0.9.6-tests.patch
new file mode 100644
index 00000000000..bd966c3d327
--- /dev/null
+++ b/dev-libs/rttr/files/rttr-0.9.6-tests.patch
@@ -0,0 +1,30 @@
+Avoid running a custom testsuite unconditionally.
+
+--- a/src/unit_tests/CMakeLists.txt
++++ b/src/unit_tests/CMakeLists.txt
+@@ -54,17 +54,17 @@
+ endif()
+                                             
+ # run tests
+-add_custom_target(run_tests ALL
+-                  COMMAND "$<TARGET_FILE:unit_tests>"
+-                  DEPENDS unit_tests
+-                  COMMENT "Running unit_tests")
++#add_custom_target(run_tests ALL
++#                  COMMAND "$<TARGET_FILE:unit_tests>"
++#                  DEPENDS unit_tests
++#                  COMMENT "Running unit_tests")
+                   
+-set_target_properties(run_tests PROPERTIES 
+-                                FOLDER "Testing")
++#set_target_properties(run_tests PROPERTIES 
++#                                FOLDER "Testing")
+ 
+ add_subdirectory(plugin)
+ 
+ add_dependencies(unit_tests unit_test_plugin)
+ 
+ message(STATUS "Scanning " ${PROJECT_NAME} " module finished!")
+-message(STATUS "")
+\ No newline at end of file
++message(STATUS "")

diff --git a/dev-libs/rttr/files/rttr-0.9.6-werror.patch b/dev-libs/rttr/files/rttr-0.9.6-werror.patch
new file mode 100644
index 00000000000..04c65203ac9
--- /dev/null
+++ b/dev-libs/rttr/files/rttr-0.9.6-werror.patch
@@ -0,0 +1,18 @@
+This causes build failures with modern GCC, and is against Gentoo policy in any case.
+
+--- a/CMake/utility.cmake
++++ b/CMake/utility.cmake
+@@ -392,11 +392,9 @@
+ ####################################################################################
+ function( set_compiler_warnings target)
+   if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+-    set(WARNINGS "-Werror"
+-                 "-Wall")
++    set(WARNINGS "-Wall")
+   elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+-    set(WARNINGS "-Werror"
+-                 "-Wall")
++    set(WARNINGS "-Wall")
+   elseif(MSVC)
+     set(WARNINGS "/WX"
+                  "/W4")

diff --git a/dev-libs/rttr/metadata.xml b/dev-libs/rttr/metadata.xml
new file mode 100644
index 00000000000..2fb187146ee
--- /dev/null
+++ b/dev-libs/rttr/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="project">
+		<email>kde@gentoo.org</email>
+	</maintainer>
+	<upstream>
+		<remote-id type="github">rttrorg/rttr</remote-id>
+	</upstream>
+</pkgmetadata>

diff --git a/dev-libs/rttr/rttr-0.9.6.ebuild b/dev-libs/rttr/rttr-0.9.6.ebuild
new file mode 100644
index 00000000000..f8a4cddbf34
--- /dev/null
+++ b/dev-libs/rttr/rttr-0.9.6.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake-utils
+
+DESCRIPTION="Run Time Type Reflection - library adding reflection to C++"
+HOMEPAGE="https://www.rttr.org/"
+SRC_URI="https://github.com/rttrorg/${PN}/releases/download/v${PV}/${P}-src.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+PATCHES=(
+	"${FILESDIR}/${P}-cmake.patch"
+	"${FILESDIR}/${P}-permission.patch"
+	"${FILESDIR}/${P}-tests.patch"
+	"${FILESDIR}/${P}-werror.patch"
+)
+
+src_configure() {
+	local mycmakeargs=(
+		-DBUILD_DOCUMENTATION=off #broken
+	)
+
+	cmake-utils_src_configure
+}
+
+src_test() {
+	"${S}"/bin/unit_tests || die
+}


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-04-12 12:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-12 12:43 [gentoo-commits] repo/gentoo:master commit in: dev-libs/rttr/, dev-libs/rttr/files/ Michael Palimaka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox