mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 03:30:05 +02:00
grantlee: add recipe for version 5.1.0
This commit is contained in:
82
dev-libs/grantlee/grantlee-5.1.0.recipe
Normal file
82
dev-libs/grantlee/grantlee-5.1.0.recipe
Normal file
@@ -0,0 +1,82 @@
|
||||
SUMMARY="Libraries for text templating with Qt"
|
||||
DESCRIPTION="Grantlee is a set of Free Software libraries written using the \
|
||||
Qt framework. Currently two libraries are shipped with Grantlee: Grantlee \
|
||||
Templates and Grantlee TextDocument.
|
||||
|
||||
The goal of Grantlee Templates is to make it easier for application \
|
||||
developers to separate the structure of documents from the data they \
|
||||
contain, opening the door for theming and advanced generation of other \
|
||||
text such as code."
|
||||
HOMEPAGE="https://github.com/steveire/grantlee/"
|
||||
COPYRIGHT="2010-2017 Stephen Kelly"
|
||||
LICENSE="GNU LGPL v2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/steveire/grantlee/archive/v$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="3836572fe5e49d28a1d99186c6d96f88ff839644b4bc77b73b6d8208f6ccc9d1"
|
||||
PATCHES="grantlee-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
grantlee$secondaryArchSuffix = $portVersion
|
||||
lib:libgrantlee_templates$secondaryArchSuffix = $portVersion compat >= 5
|
||||
lib:libgrantlee_textdocument$secondaryArchSuffix = $portVersion compat >= 5
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libQt5Core$secondaryArchSuffix
|
||||
lib:libQt5Gui$secondaryArchSuffix
|
||||
lib:libQt5Xml$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
grantlee${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libgrantlee_templates$secondaryArchSuffix = $portVersion compat >= 5
|
||||
devel:libgrantlee_textdocument$secondaryArchSuffix = $portVersion compat >= 5
|
||||
"
|
||||
REQUIRES_devel="
|
||||
grantlee$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
extra_cmake_modules >= 5.39
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libQt5Core$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:g++$secondaryArchSuffix
|
||||
cmd:make
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
mkdir -p build
|
||||
cd build
|
||||
|
||||
cmake .. \
|
||||
-DLIB_SUFFIX="/${secondaryArchSuffix/_/}" \
|
||||
-DINCLUDE_INSTALL_DIR=$includeDir
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd build
|
||||
make install
|
||||
|
||||
prepareInstalledDevelLibs \
|
||||
libGrantlee_TextDocument \
|
||||
libGrantlee_Templates
|
||||
|
||||
packageEntries devel \
|
||||
$libDir/cmake \
|
||||
$developDir
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
cd build
|
||||
make test
|
||||
}
|
||||
51
dev-libs/grantlee/patches/grantlee-5.1.0.patchset
Normal file
51
dev-libs/grantlee/patches/grantlee-5.1.0.patchset
Normal file
@@ -0,0 +1,51 @@
|
||||
From 40ec0143d423e9a8884553e71717f2fbed0973b6 Mon Sep 17 00:00:00 2001
|
||||
From: Sergei Reznikov <diver@gelios.net>
|
||||
Date: Mon, 18 Dec 2017 19:51:10 +0300
|
||||
Subject: Fix INCLUDE_INSTALL_DIR
|
||||
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 1324566..0b11884 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -100,8 +100,12 @@ set (LIB_SUFFIX "" CACHE STRING "Define suffix of library directory name (eg. '6
|
||||
set( LIB_INSTALL_DIR lib${LIB_SUFFIX} )
|
||||
set( PLUGIN_INSTALL_DIR ${LIB_INSTALL_DIR}/grantlee/${Grantlee5_MAJOR_MINOR_VERSION_STRING} )
|
||||
set( BIN_INSTALL_DIR bin )
|
||||
-set( INCLUDE_INSTALL_DIR include )
|
||||
+if (HAIKU)
|
||||
+set (INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/develop/headers CACHE PATH "Installation prefix for C header files" FORCE)
|
||||
+else (HAIKU)
|
||||
+set( INCLUDE_INSTALL_DIR include/grantlee5 )
|
||||
set( DATA_INSTALL_DIR share/apps )
|
||||
+endif (HAIKU)
|
||||
|
||||
# set up RPATH/install_name_dir
|
||||
set( CMAKE_INSTALL_NAME_DIR ${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR})
|
||||
diff --git a/templates/lib/CMakeLists.txt b/templates/lib/CMakeLists.txt
|
||||
index dad2ef8..434d163 100644
|
||||
--- a/templates/lib/CMakeLists.txt
|
||||
+++ b/templates/lib/CMakeLists.txt
|
||||
@@ -107,6 +107,7 @@ if (Qt5Script_FOUND)
|
||||
|
||||
target_sources(Grantlee_Templates PRIVATE ${scriptabletags_SRCS})
|
||||
target_include_directories(Grantlee_Templates PRIVATE ../scriptabletags)
|
||||
+ target_include_directories(Grantlee_Templates INTERFACE "$<INSTALL_INTERFACE:${INCLUDE_INSTALL_DIR}>")
|
||||
target_link_libraries(Grantlee_Templates
|
||||
LINK_PRIVATE Qt5::Script
|
||||
)
|
||||
diff --git a/textdocument/lib/CMakeLists.txt b/textdocument/lib/CMakeLists.txt
|
||||
index 557d262..d2dbaa1 100644
|
||||
--- a/textdocument/lib/CMakeLists.txt
|
||||
+++ b/textdocument/lib/CMakeLists.txt
|
||||
@@ -42,6 +42,7 @@ if (CMAKE_GENERATOR MATCHES "Visual Studio")
|
||||
)
|
||||
endforeach()
|
||||
endif()
|
||||
+target_include_directories(Grantlee_TextDocument INTERFACE "$<INSTALL_INTERFACE:${INCLUDE_INSTALL_DIR}>")
|
||||
|
||||
target_link_libraries(Grantlee_TextDocument
|
||||
LINK_PUBLIC Qt5::Gui
|
||||
--
|
||||
2.15.0
|
||||
|
||||
Reference in New Issue
Block a user