From c7d81d095ceee17dead3c6688b31ea7d6aab9c5e Mon Sep 17 00:00:00 2001 From: Sergey Fedorov Date: Mon, 10 Jun 2024 07:46:48 +0800 Subject: [PATCH] appstream: new port in gnome --- gnome/appstream/Portfile | 67 +++++++++++++++++++ .../files/patch-use-correct-include-dir.diff | 15 +++++ 2 files changed, 82 insertions(+) create mode 100644 gnome/appstream/Portfile create mode 100644 gnome/appstream/files/patch-use-correct-include-dir.diff diff --git a/gnome/appstream/Portfile b/gnome/appstream/Portfile new file mode 100644 index 0000000000000..f8dc79102b13f --- /dev/null +++ b/gnome/appstream/Portfile @@ -0,0 +1,67 @@ +# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 + +PortSystem 1.0 +PortGroup meson 1.0 + +name appstream +version 1.0.3 +revision 0 + +categories gnome devel +license GPL-2+ LGPL-2.1+ +maintainers nomaintainer + +description Machine-readable software metadata for desktop environments +long_description {*}${description} +homepage https://www.freedesktop.org/wiki/Distributions/AppStream +master_sites https://www.freedesktop.org/software/${name}/releases/ +distname AppStream-${version} +checksums rmd160 8ca4a10bf6e36e52dbaa25928a2d727d3a0b611e \ + sha256 5ab6f6cf644e7875a9508593962e56bb430f4e59ae0bf03be6be7029deb6baa4 \ + size 2644220 + +use_xz yes + +patchfiles-append patch-use-correct-include-dir.diff + +post-patch { + reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/meson.build +} + +depends_build-append \ + port:docbook-xml \ + port:gettext \ + port:gperf \ + port:itstool \ + port:libxslt \ + port:lmdb \ + path:bin/pkg-config:pkgconfig \ + path:bin/vala:vala + +depends_lib-append port:curl \ + port:docbook-xml \ + port:docbook-xsl-nons \ + port:gettext-runtime \ + path:lib/pkgconfig/glib-2.0.pc:glib2 \ + path:lib/pkgconfig/gobject-introspection-1.0.pc:gobject-introspection \ + path:lib/pkgconfig/librsvg-2.0.pc:librsvg \ + port:libstemmer \ + port:libxml2 \ + port:libxmlb \ + port:libyaml \ + port:zstd + +compiler.c_standard 2011 +compiler.cxx_standard \ + 2017 + +configure.args-append \ + -Dgir=true \ + -Dqt=false \ + -Dstemming=true \ + -Dvapi=true \ + -Dapidocs=false \ + -Dinstall-docs=false \ + -Dsvg-support=true \ + -Dsystemd=false \ + -Dzstd-support=true diff --git a/gnome/appstream/files/patch-use-correct-include-dir.diff b/gnome/appstream/files/patch-use-correct-include-dir.diff new file mode 100644 index 0000000000000..0ee72ef18c8f2 --- /dev/null +++ b/gnome/appstream/files/patch-use-correct-include-dir.diff @@ -0,0 +1,15 @@ +--- meson.build 2024-04-25 02:03:56.000000000 +0800 ++++ meson.build 2024-06-10 08:21:45.000000000 +0800 +@@ -191,10 +191,10 @@ + stemmer_inc_dirs = include_directories() + if get_option('stemming') + stemmer_lib = cc.find_library('stemmer', required: true) +- stemmer_inc_dirs = include_directories(['/usr/include']) ++ stemmer_inc_dirs = include_directories(['@PREFIX@/include']) + if not cc.has_header('libstemmer.h') + if cc.has_header('libstemmer/libstemmer.h') +- stemmer_inc_dirs = include_directories('/usr/include/libstemmer') ++ stemmer_inc_dirs = include_directories('@PREFIX@/include/libstemmer') + else + error('Unable to find Snowball header "libstemmer.h". Please ensure libstemmer/Snowball is installed properly in order to continue.') + endif