summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2022-09-14 11:16:41 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2022-09-14 11:18:59 +0200
commit120ab70ab993741629984f219f4b2ff7ac04b2f5 (patch)
tree0353b3c25669c69c0c9c062c363f905adc10017c /dev-libs
parentmedia-libs/opencv: Fix IUSE=examples (diff)
downloadgentoo-120ab70ab993741629984f219f4b2ff7ac04b2f5.tar.gz
gentoo-120ab70ab993741629984f219f4b2ff7ac04b2f5.tar.bz2
gentoo-120ab70ab993741629984f219f4b2ff7ac04b2f5.zip
dev-libs/grantlee: add 5.3.0, EAPI-8 bump
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'dev-libs')
-rw-r--r--dev-libs/grantlee/Manifest1
-rw-r--r--dev-libs/grantlee/files/grantlee-5.3.0-slot.patch65
-rw-r--r--dev-libs/grantlee/grantlee-5.3.0.ebuild61
3 files changed, 127 insertions, 0 deletions
diff --git a/dev-libs/grantlee/Manifest b/dev-libs/grantlee/Manifest
index d56c4763280d..92adc47c2bf0 100644
--- a/dev-libs/grantlee/Manifest
+++ b/dev-libs/grantlee/Manifest
@@ -1 +1,2 @@
DIST grantlee-5.2.0.tar.gz 1166467 BLAKE2B 89f66fefe3c5bbd087cdaed0f83a6b9ca2456629465dfd68d32c6f316d6d4533ece09e5a1444833897c70abbeb8258e0ca9faba09388dcbf40245c04f72f5040 SHA512 94b53d103aa775e6d45357d44d5634a5214d12ea7178d251fda30c5a88ddc2682ae44501ee8b7dc475793b84fa0998eb0bc13eea3f2e10ab29b1489db6ea60bd
+DIST grantlee-5.3.0.tar.gz 1176075 BLAKE2B a3418250845b39c4766dd19a1f423f18ca7393f675d0045477b345e589d5649f1cc332f9c228e9e9317bdf356992e533cfabe62bcfb50c40ffa38be9b5009013 SHA512 8018c92e1001e039243b4a22a790907b53bff21e062c7e3ee63d1e2de4ce7bccc4a7580fc4ec2e61dc2f7131ac336d46f76e2f03a7314c1547b8744842c0a02a
diff --git a/dev-libs/grantlee/files/grantlee-5.3.0-slot.patch b/dev-libs/grantlee/files/grantlee-5.3.0-slot.patch
new file mode 100644
index 000000000000..896290499dcf
--- /dev/null
+++ b/dev-libs/grantlee/files/grantlee-5.3.0-slot.patch
@@ -0,0 +1,65 @@
+From f9dda5f8a81c18c59eabcea515084253c284803a Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Sat, 30 Nov 2019 11:55:33 +0100
+Subject: [PATCH] Install headers to a custom location to permit slotting
+
+That was previously necessary with Qt4 version, let's keep it while
+Qt6 is around the corner.
+---
+ templates/lib/CMakeLists.txt | 5 +++--
+ textdocument/lib/CMakeLists.txt | 5 +++--
+ 2 files changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/templates/lib/CMakeLists.txt b/templates/lib/CMakeLists.txt
+index 07a192c..9049bdc 100644
+--- a/templates/lib/CMakeLists.txt
++++ b/templates/lib/CMakeLists.txt
+@@ -101,6 +101,7 @@ if (Qt5Qml_FOUND OR Qt6Qml_FOUND)
+
+ target_sources(Grantlee_Templates PRIVATE ${scriptabletags_SRCS})
+ target_include_directories(Grantlee_Templates PRIVATE ../scriptabletags)
++ target_include_directories(Grantlee_Templates INTERFACE "$<INSTALL_INTERFACE:include/grantlee5>")
+ if (GRANTLEE_BUILD_WITH_QT6)
+ target_link_libraries(Grantlee_Templates
+ PRIVATE Qt6::Qml
+@@ -164,10 +165,10 @@ install(FILES
+ token.h
+ util.h
+ variable.h
+- DESTINATION include/grantlee COMPONENT Templates
++ DESTINATION include/grantlee5/grantlee COMPONENT Templates
+ )
+
+ install(FILES
+ grantlee_templates.h
+- DESTINATION include COMPONENT Templates
++ DESTINATION include/grantlee5 COMPONENT Templates
+ )
+diff --git a/textdocument/lib/CMakeLists.txt b/textdocument/lib/CMakeLists.txt
+index a472267..8134d83 100644
+--- a/textdocument/lib/CMakeLists.txt
++++ b/textdocument/lib/CMakeLists.txt
+@@ -34,6 +34,7 @@ if (CMAKE_GENERATOR MATCHES "Visual Studio")
+ )
+ endforeach()
+ endif()
++target_include_directories(Grantlee_TextDocument INTERFACE "$<INSTALL_INTERFACE:${INCLUDE_INSTALL_DIR}>")
+
+ if (GRANTLEE_BUILD_WITH_QT6)
+ target_link_libraries(Grantlee_TextDocument
+@@ -65,10 +66,10 @@ install(FILES
+ texthtmlbuilder.h
+ mediawikimarkupbuilder.h
+ ${CMAKE_CURRENT_BINARY_DIR}/grantlee_textdocument_export.h
+- DESTINATION include/grantlee COMPONENT TextDocument
++ DESTINATION include/grantlee5/grantlee COMPONENT TextDocument
+ )
+
+ install(FILES
+ grantlee_textdocument.h
+- DESTINATION include COMPONENT TextDocument
++ DESTINATION include/grantlee5 COMPONENT TextDocument
+ )
+--
+2.37.3
+
diff --git a/dev-libs/grantlee/grantlee-5.3.0.ebuild b/dev-libs/grantlee/grantlee-5.3.0.ebuild
new file mode 100644
index 000000000000..d28d8a77daee
--- /dev/null
+++ b/dev-libs/grantlee/grantlee-5.3.0.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+VIRTUALX_REQUIRED="test"
+inherit cmake virtualx
+
+DESCRIPTION="C++ string template engine based on the Django template system"
+HOMEPAGE="https://github.com/steveire/grantlee"
+SRC_URI="http://downloads.grantlee.org/${P}.tar.gz"
+
+LICENSE="LGPL-2.1+"
+SLOT="5"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86"
+IUSE="debug doc test"
+
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ dev-qt/qtcore:5
+ dev-qt/qtdeclarative:5
+ dev-qt/qtgui:5
+"
+DEPEND="${RDEPEND}
+ test? ( dev-qt/qttest:5 )
+"
+BDEPEND="
+ doc? ( app-doc/doxygen[dot] )
+ test? ( dev-qt/linguist-tools:5 )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.3.0-nonfatal-warnings.patch"
+ "${FILESDIR}/${P}-slot.patch" # TODO: Qt5 specific
+)
+
+src_configure() {
+ local mycmakeargs=(
+ -DGRANTLEE_BUILD_WITH_QT6=OFF
+ -DBUILD_TESTS=$(usex test)
+ )
+
+ cmake_src_configure
+}
+
+src_compile() {
+ cmake_src_compile
+
+ use doc && cmake_src_compile docs
+}
+
+src_test() {
+ virtx cmake_src_test
+}
+
+src_install() {
+ use doc && local HTML_DOCS=("${BUILD_DIR}/apidox/")
+
+ cmake_src_install
+}