commit:     a346f86521d1c3b901b8e016f7e829e082536db5
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 12 08:34:31 2020 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Jan 12 09:11:53 2020 +0000
URL:        https://gitweb.gentoo.org/proj/kde.git/commit/?id=a346f865

dev-libs/grantlee: Revert "Use ecm.eclass", "Moved to kde.org"

This reverts commit 09e7eb596ec6441fc7a523809e3dad3f09b5be50.
This reverts commit ab4c576a77fad0ac660a114d24d226509a8440a9.

Dropped out of kde.org again, next try with KF6.

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../files/grantlee-0.3.0-nonfatal-warnings.patch   | 17 ++++++++
 dev-libs/grantlee/files/grantlee-9999-slot.patch   | 18 ++++-----
 dev-libs/grantlee/grantlee-9999.ebuild             | 45 +++++++++++++++-------
 3 files changed, 58 insertions(+), 22 deletions(-)

diff --git a/dev-libs/grantlee/files/grantlee-0.3.0-nonfatal-warnings.patch 
b/dev-libs/grantlee/files/grantlee-0.3.0-nonfatal-warnings.patch
new file mode 100644
index 0000000000..b35dc46586
--- /dev/null
+++ b/dev-libs/grantlee/files/grantlee-0.3.0-nonfatal-warnings.patch
@@ -0,0 +1,17 @@
+Do not make linker warnings fatal.
+
+Gentoo-bug: 430968
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -62,8 +62,8 @@
+   endif()
+ 
+   if (NOT APPLE)
+-    set ( CMAKE_SHARED_LINKER_FLAGS "-Wl,--fatal-warnings -Wl,--no-undefined 
${CMAKE_SHARED_LINKER_FLAGS}")
+-    set ( CMAKE_MODULE_LINKER_FLAGS "-Wl,--fatal-warnings -Wl,--no-undefined 
${CMAKE_MODULE_LINKER_FLAGS}")
++    set ( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined 
${CMAKE_SHARED_LINKER_FLAGS}")
++    set ( CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined 
${CMAKE_MODULE_LINKER_FLAGS}")
+   endif ()
+ 
+   if (NOT MINGW)

diff --git a/dev-libs/grantlee/files/grantlee-9999-slot.patch 
b/dev-libs/grantlee/files/grantlee-9999-slot.patch
index b761a66320..9490df2327 100644
--- a/dev-libs/grantlee/files/grantlee-9999-slot.patch
+++ b/dev-libs/grantlee/files/grantlee-9999-slot.patch
@@ -21,7 +21,7 @@ index 5058481..3ef29a4 100644
  
    target_sources(Grantlee_Templates PRIVATE ${scriptabletags_SRCS})
    target_include_directories(Grantlee_Templates PRIVATE ../scriptabletags)
-+  target_include_directories(Grantlee_Templates INTERFACE 
"$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR}/grantlee5>")
++  target_include_directories(Grantlee_Templates INTERFACE 
"$<INSTALL_INTERFACE:include/grantlee5>")
    target_link_libraries(Grantlee_Templates
      PRIVATE Qt5::Qml
    )
@@ -29,14 +29,14 @@ index 5058481..3ef29a4 100644
    token.h
    util.h
    variable.h
--  DESTINATION ${KDE_INSTALL_INCLUDEDIR}/grantlee COMPONENT Templates
-+  DESTINATION ${KDE_INSTALL_INCLUDEDIR}/grantlee5/grantlee COMPONENT Templates
+-  DESTINATION include/grantlee COMPONENT Templates
++  DESTINATION include/grantlee5/grantlee COMPONENT Templates
  )
  
  install(FILES
    grantlee_templates.h
--  DESTINATION ${KDE_INSTALL_INCLUDEDIR} COMPONENT Templates
-+  DESTINATION ${KDE_INSTALL_INCLUDEDIR}/grantlee5 COMPONENT Templates
+-  DESTINATION include COMPONENT Templates
++  DESTINATION include/grantlee5 COMPONENT Templates
  )
 diff --git a/textdocument/lib/CMakeLists.txt b/textdocument/lib/CMakeLists.txt
 index 2c5a96f..c42d32a 100644
@@ -54,14 +54,14 @@ index 2c5a96f..c42d32a 100644
    texthtmlbuilder.h
    mediawikimarkupbuilder.h
    ${CMAKE_CURRENT_BINARY_DIR}/grantlee_textdocument_export.h
--  DESTINATION ${KDE_INSTALL_INCLUDEDIR}/grantlee COMPONENT TextDocument
-+  DESTINATION ${KDE_INSTALL_INCLUDEDIR}/grantlee5/grantlee COMPONENT 
TextDocument
+-  DESTINATION include/grantlee COMPONENT TextDocument
++  DESTINATION include/grantlee5/grantlee COMPONENT TextDocument
  )
  
  install(FILES
    grantlee_textdocument.h
--  DESTINATION ${KDE_INSTALL_INCLUDEDIR} COMPONENT TextDocument
-+  DESTINATION ${KDE_INSTALL_INCLUDEDIR}/grantlee5 COMPONENT TextDocument
+-  DESTINATION include COMPONENT TextDocument
++  DESTINATION include/grantlee5 COMPONENT TextDocument
  )
 -- 
 2.24.0

diff --git a/dev-libs/grantlee/grantlee-9999.ebuild 
b/dev-libs/grantlee/grantlee-9999.ebuild
index cf22c7b7cd..50bf81645a 100644
--- a/dev-libs/grantlee/grantlee-9999.ebuild
+++ b/dev-libs/grantlee/grantlee-9999.ebuild
@@ -3,39 +3,58 @@
 
 EAPI=7
 
-ECM_TEST="true"
-KFMIN=5.65.0
-QTMIN=5.12.3
 VIRTUALX_REQUIRED="test"
-inherit kde.org ecm
+inherit cmake virtualx git-r3
 
 DESCRIPTION="C++ string template engine based on the Django template system"
 HOMEPAGE="https://github.com/steveire/grantlee";
+EGIT_REPO_URI=( "https://github.com/steveire/${PN}"; )
 
 LICENSE="LGPL-2.1+"
 SLOT="5"
 KEYWORDS=""
-IUSE="doc"
+IUSE="debug doc test"
 
 BDEPEND="
        doc? ( app-doc/doxygen[dot] )
-       test? ( >=dev-qt/linguist-tools-${QTMIN}:5 )
+       test? ( dev-qt/linguist-tools:5 )
 "
 RDEPEND="
-       >=dev-qt/qtcore-${QTMIN}:5
-       >=dev-qt/qtdeclarative-${QTMIN}:5
-       >=dev-qt/qtgui-${QTMIN}:5
+       dev-qt/qtcore:5
+       dev-qt/qtdeclarative:5
+       dev-qt/qtgui:5
 "
-DEPEND="${RDEPEND}"
+DEPEND="${RDEPEND}
+       test? ( dev-qt/qttest:5 )
+"
+
+RESTRICT+=" !test? ( test )"
+
+PATCHES=(
+       "${FILESDIR}/${PN}-0.3.0-nonfatal-warnings.patch"
+       "${FILESDIR}/${P}-slot.patch"
+)
 
-PATCHES=( "${FILESDIR}/${P}-slot.patch" )
+src_configure() {
+       local mycmakeargs=(
+               -DBUILD_TESTS=$(usex test)
+       )
+
+       cmake_src_configure
+}
 
 src_compile() {
-       ecm_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/")
-       ecm_src_install
+
+       cmake_src_install
 }

Reply via email to