Skip to content

Commit

Permalink
appstream: new port in gnome
Browse files Browse the repository at this point in the history
  • Loading branch information
barracuda156 committed Jun 10, 2024
1 parent f1b435f commit c7d81d0
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 0 deletions.
67 changes: 67 additions & 0 deletions gnome/appstream/Portfile
Original file line number Diff line number Diff line change
@@ -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
15 changes: 15 additions & 0 deletions gnome/appstream/files/patch-use-correct-include-dir.diff
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit c7d81d0

Please sign in to comment.