diff --git a/dev-libs/libportal/libportal-0.6.recipe b/dev-libs/libportal/libportal-0.6.recipe new file mode 100644 index 000000000..647b342e9 --- /dev/null +++ b/dev-libs/libportal/libportal-0.6.recipe @@ -0,0 +1,90 @@ +SUMMARY="Flatpak portal library" +DESCRIPTION="libportal provides GIO-style async APIs for most Flatpak portals." +HOMEPAGE="https://people.freedesktop.org/~hughsient/appstream-glib/" +COPYRIGHT="Matthias Clasen + Patrick Griffis" +LICENSE="GNU LGPL v3" +REVISION="1" +SOURCE_URI="https://github.com/flatpak/libportal/releases/download/$portVersion/libportal-$portVersion.tar.xz" +SOURCE_DIR="libportal-$portVersion" +CHECKSUM_SHA256="88a12c3ba71bc31acff7238c280de697d609cebc50830c3766776ec35abc6566" +PATCHES="libportal-$portVersion.patchset" + +ARCHITECTURES="all !x86_gcc2" +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + libportal$secondaryArchSuffix = $portVersion compat >= 0 + lib:libportal$secondaryArchSuffix = 1.0 compat >= 1 + lib:libportal_gtk3$secondaryArchSuffix = 1.0 compat >= 1 + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libgtk_3$secondaryArchSuffix + lib:libgirepository_1.0$secondaryArchSuffix + lib:libglib_2.0$secondaryArchSuffix + " + +PROVIDES_devel=" + libportal${secondaryArchSuffix}_devel = $portVersion compat >= 0 + devel:libportal$secondaryArchSuffix = 1.0 compat >= 1 + devel:libportal_gtk3$secondaryArchSuffix = 1.0 compat >= 1 + " +REQUIRES_devel=" + libportal$secondaryArchSuffix == $portVersion base + devel:libgtk_3$secondaryArchSuffix + devel:libgirepository_1.0$secondaryArchSuffix + devel:libglib_2.0$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libgtk_3$secondaryArchSuffix + devel:libgirepository_1.0$secondaryArchSuffix + devel:libglib_2.0$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:cmake + cmd:find + cmd:gcc$secondaryArchSuffix + cmd:gperf + cmd:make + cmd:meson + cmd:ninja + cmd:perl + cmd:pkg_config$secondaryArchSuffix + " + +BUILD() +{ + meson \ + --buildtype=release \ + --prefix=$prefix \ + --libdir=$libDir \ + --libexecdir=$binDir \ + --datadir=$dataDir \ + --localedir=$dataDir/locale \ + --includedir=$includeDir \ + --sysconfdir=$settingsDir \ + -Dbackends=gtk3 \ + -Dintrospection=true \ + -Dportal-tests=false \ + -Dvapi=false \ + -Ddocs=false \ + -Dtests=false \ + _build + + ninja -v -C _build +} + +INSTALL() +{ + ninja install -C _build + + prepareInstalledDevelLibs libportal libportal-gtk3 + fixPkgconfig + + # devel package + packageEntries devel \ + $developDir +} diff --git a/dev-libs/libportal/patches/libportal-0.6.patchset b/dev-libs/libportal/patches/libportal-0.6.patchset new file mode 100644 index 000000000..b0102eb8b --- /dev/null +++ b/dev-libs/libportal/patches/libportal-0.6.patchset @@ -0,0 +1,23 @@ +From 83b3e228a530ebc80fe658cc66951f8e69119dbc Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Sat, 19 Nov 2022 22:34:46 +1000 +Subject: Fix build + + +diff --git a/libportal/portal.c b/libportal/portal.c +index 5e72089..c4ae963 100644 +--- a/libportal/portal.c ++++ b/libportal/portal.c +@@ -27,7 +27,9 @@ + #include + #include + #include ++#ifndef __HAIKU__ + #include ++#endif + #include + + /** +-- +2.37.3 +