granite: add recipe

This commit is contained in:
Gerasim Troeglazov
2022-11-29 14:25:52 +10:00
parent 2a89e08d55
commit c91bad5d27

View File

@@ -0,0 +1,95 @@
SUMMARY="Elementary OS library that extends GTK+"
DESCRIPTION="Granite is a companion library for GTK and GLib. Among other things, it provides \
complex widgets and convenience functions designed for use in apps built for elementary OS."
HOMEPAGE="https://github.com/elementary/granite"
COPYRIGHT="2012-2021 Elementary, Inc."
LICENSE="GNU LGPL v3"
REVISION="1"
SOURCE_URI="https://github.com/elementary/granite/archive/refs/tags/$portVersion.tar.gz"
SOURCE_DIR="granite-$portVersion"
CHECKSUM_SHA256="067d31445da9808a802fca523630c3e4b84d2d7c78ae547ced017cb7f3b9c6b5"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
granite$secondaryArchSuffix = $portVersion compat >= 6
lib:libgranite$secondaryArchSuffix = $portVersion compat >= 6
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libcairo$secondaryArchSuffix
lib:libcairo_gobject$secondaryArchSuffix
lib:libgee_0.8$secondaryArchSuffix
lib:libgdk_pixbuf_2.0$secondaryArchSuffix
lib:libgirepository_1.0$secondaryArchSuffix
lib:libglib_2.0$secondaryArchSuffix
lib:libgtk_3$secondaryArchSuffix
lib:libpango_1.0$secondaryArchSuffix
lib:libintl$secondaryArchSuffix
"
PROVIDES_devel="
granite${secondaryArchSuffix}_devel = $portVersion compat >= 6
devel:libgranite$secondaryArchSuffix = $portVersion compat >= 6
"
REQUIRES_devel="
granite$secondaryArchSuffix == $portVersion base
devel:libgtk_3$secondaryArchSuffix
devel:libgirepository_1.0$secondaryArchSuffix
devel:libglib_2.0$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libgee_0.8$secondaryArchSuffix
devel:libgirepository_1.0$secondaryArchSuffix
devel:libglib_2.0$secondaryArchSuffix
devel:libgtk_3$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:gperf
cmd:make
cmd:meson
cmd:ninja
cmd:perl
cmd:pkg_config$secondaryArchSuffix
cmd:valac
"
BUILD()
{
meson \
--buildtype=release \
--prefix=$prefix \
--libdir=$libDir \
--libexecdir=$binDir \
--datadir=$dataDir \
--localedir=$dataDir/locale \
--includedir=$includeDir \
--sysconfdir=$settingsDir \
-Ddocumentation=false \
-Dintrospection=true \
_build
cd _build
ninja
}
INSTALL()
{
cd _build
ninja install
rm -rf $binDir
prepareInstalledDevelLibs libgranite
fixPkgconfig
# devel package
packageEntries devel \
$developDir
}