1SUMMARY="Provides GObjects and helper methods to read and write AppStream metadata"
2DESCRIPTION="This library provides GObjects and helper methods to make it easy to \
3read and write AppStream metadata. It also provides a simple DOM implementation \
4that makes it easy to edit nodes and convert to and from the standardized XML \
5representation.
6
7What this library allows you to do:
8* Read and write compressed AppStream XML files
9* Add and search for applications in an application store
10* Get screenshot image data and release announcements
11* Easily retrieve the best application data for the current locale
12* Efficiently interface with more heavy-weight parsers like expat."
13HOMEPAGE="https://people.freedesktop.org/~hughsient/appstream-glib/"
14COPYRIGHT="2007-2022 Richard Hughes"
15LICENSE="GNU LGPL v2"
16REVISION="3"
17SOURCE_URI="https://people.freedesktop.org/~hughsient/appstream-glib/releases/appstream-glib-$portVersion.tar.xz"
18SOURCE_DIR="appstream-glib-$portVersion"
19CHECKSUM_SHA256="68a3d007f5b3aa84592dbef07950d9acf327da97ec8a6e88a90575d9055ddf6d"
20
21ARCHITECTURES="all !x86_gcc2"
22SECONDARY_ARCHITECTURES="x86"
23
24PROVIDES="
25	appstream_glib$secondaryArchSuffix = $portVersion compat >= 0
26	lib:libappstream_glib$secondaryArchSuffix = 8.0.10 compat >= 8
27	cmd:appstream_builder = $portVersion
28	cmd:appstream_compose = $portVersion
29	cmd:appstream_util = $portVersion
30	"
31REQUIRES="
32	haiku$secondaryArchSuffix
33	xcairo$secondaryArchSuffix
34	lib:libarchive$secondaryArchSuffix
35	lib:libcurl$secondaryArchSuffix
36	lib:libfontconfig$secondaryArchSuffix
37	lib:libfreetype$secondaryArchSuffix
38	lib:libfribidi$secondaryArchSuffix
39	lib:libgdk_3$secondaryArchSuffix
40	lib:libgtk_3$secondaryArchSuffix
41	lib:libgdk_pixbuf_2.0$secondaryArchSuffix
42	lib:libglib_2.0$secondaryArchSuffix
43	lib:libjson_glib_1.0$secondaryArchSuffix
44	lib:libintl$secondaryArchSuffix
45	lib:libpango_1.0$secondaryArchSuffix
46	lib:libpangocairo_1.0$secondaryArchSuffix
47	lib:libpangoft2_1.0$secondaryArchSuffix
48	lib:libsoup_2.4$secondaryArchSuffix
49	lib:libuuid$secondaryArchSuffix
50	lib:libxml2$secondaryArchSuffix
51	lib:libxslt$secondaryArchSuffix
52	lib:libyaml_0$secondaryArchSuffix
53	"
54
55PROVIDES_devel="
56	appstream_glib${secondaryArchSuffix}_devel = $portVersion compat >= 0
57	devel:libappstream_glib$secondaryArchSuffix = 8.0.10 compat >= 8
58	"
59REQUIRES_devel="
60	appstream_glib$secondaryArchSuffix == $portVersion base
61	"
62
63BUILD_REQUIRES="
64	haiku${secondaryArchSuffix}_devel
65	xcairo${secondaryArchSuffix}_devel
66	lib:libgdk_3$secondaryArchSuffix
67	devel:libarchive$secondaryArchSuffix
68	devel:libcurl$secondaryArchSuffix
69	devel:libfontconfig$secondaryArchSuffix
70	devel:libfreetype$secondaryArchSuffix
71	devel:libfribidi$secondaryArchSuffix
72	devel:libgtk_3$secondaryArchSuffix
73	devel:libgdk_3$secondaryArchSuffix
74	devel:libgdk_pixbuf_2.0$secondaryArchSuffix
75	devel:libglib_2.0$secondaryArchSuffix
76	devel:libjson_glib_1.0$secondaryArchSuffix
77	devel:libpango_1.0$secondaryArchSuffix
78	devel:libpangocairo_1.0$secondaryArchSuffix
79	devel:libpangoft2_1.0$secondaryArchSuffix
80	devel:libsoup_2.4$secondaryArchSuffix
81	devel:libuuid$secondaryArchSuffix >= 1.3.1
82	devel:libX11$secondaryArchSuffix
83	devel:libXext$secondaryArchSuffix
84	devel:libxml2$secondaryArchSuffix
85	devel:libxslt$secondaryArchSuffix
86	devel:libyaml_0$secondaryArchSuffix
87	"
88BUILD_PREREQUIRES="
89	cmd:cmake
90	cmd:find
91	cmd:gcc$secondaryArchSuffix
92	cmd:gperf
93	cmd:make
94	cmd:meson
95	cmd:ninja
96	cmd:perl
97	cmd:pkg_config$secondaryArchSuffix
98	"
99
100BUILD()
101{
102	meson \
103		--buildtype=release \
104		--prefix=$prefix \
105		--libdir=$libDir \
106		--libexecdir=$binDir \
107		--datadir=$dataDir \
108		--localedir=$dataDir/locale \
109		--includedir=$includeDir \
110		--sysconfdir=$settingsDir \
111		-Dintrospection=false \
112		-Drpm=false \
113		-Dstemmer=false \
114		-Dgtk-doc=false \
115		-Dman=false \
116		_build
117
118	cd _build
119	ninja
120}
121
122INSTALL()
123{
124	cd _build
125	ninja install
126
127	rm -rf $prefix/share
128
129	prepareInstalledDevelLibs libappstream-glib
130	fixPkgconfig
131
132	# devel package
133	packageEntries devel \
134		$developDir
135}
136