Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37478152
en ru br
Репозитории ALT

Группа :: Система/Настройка/Пакеты
Пакет: appstream

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: appstream-0.15.5-meson-build.patch
Скачать


--- a/meson.build
+++ b/meson.build
@@ -1,5 +1,5 @@
 project('AppStream', 'c',
-  meson_version: '>=0.62',
+  meson_version: '>=0.59',
   default_options: ['c_std=c11', 'cpp_std=gnu++14'],
 
   license: 'LGPL-2.1+',
--- a/po/meson.build
+++ b/po/meson.build
@@ -1,8 +1,22 @@
 
 as_gettext_domain = 'appstream'
-i18n_result = i18n.gettext(as_gettext_domain,
+if meson.version().version_compare('>=0.60')
+    i18n_result = i18n.gettext(as_gettext_domain,
+        preset : 'glib',
+        data_dirs: [join_paths(meson.source_root(), 'data', 'its')],
+        args: [
+            '--default-domain=' + as_gettext_domain,
+            '--from-code=UTF-8',
+            '-i', '-F', '-c', '--no-wrap',
+            '--package-name=' + as_gettext_domain,
+            '--copyright-holder=Matthias Klumpp',
+            '--msgid-bugs-address=appstream@lists.freedesktop.org'
+        ]
+    )
+else
+i18n.gettext(as_gettext_domain,
     preset : 'glib',
-    data_dirs: [join_paths(source_root, 'data')],
+    data_dirs: [join_paths(meson.source_root(), 'data', 'its')],
     args: [
         '--default-domain=' + as_gettext_domain,
         '--from-code=UTF-8',
@@ -12,6 +26,7 @@ i18n_result = i18n.gettext(as_gettext_do
         '--msgid-bugs-address=appstream@lists.freedesktop.org'
     ]
 )
+endif
 
 run_target ('make-linguas',
     command: ['sh',
--- a/data/meson.build
+++ b/data/meson.build
@@ -17,14 +17,27 @@ metainfo_with_relinfo = custom_target('g
     command : [ascli_exe, 'news-to-metainfo', '--limit=6', '@INPUT0@', '@INPUT1@', '@OUTPUT@']
 )
 
-metainfo_i18n = i18n.itstool_join(
-    input:  metainfo_with_relinfo,
-    output: 'org.freedesktop.appstream.cli.metainfo.xml',
-    mo_targets: i18n_result[0],
-    its_files: [join_paths(meson.current_source_dir(), 'its', 'metainfo.its')],
-    install: true,
-    install_dir: metainfo_dir,
-)
+if meson.version().version_compare('>=0.60')
+    metainfo_i18n = i18n.itstool_join(
+	input:  metainfo_with_relinfo,
+	output: 'org.freedesktop.appstream.cli.metainfo.xml',
+	mo_targets: i18n_result[0],
+	its_files: [join_paths(meson.current_source_dir(), 'its', 'metainfo.its')],
+	install: true,
+	install_dir: metainfo_dir,
+    )
+else
+    # generates XML with mangled description markup tags, but better than nothing...
+    metainfo_i18n = i18n.merge_file (
+        input:  metainfo_with_relinfo,
+        output: 'org.freedesktop.appstream.cli.metainfo.xml',
+        type: 'xml',
+        data_dirs: [meson.current_source_dir()],
+        po_dir: join_paths (source_root, 'po'),
+        install: true,
+        install_dir: metainfo_dir
+    )
+endif
 
 test('as-validate_metainfo.cli',
     ascli_exe,
--- a/docs/api/meson.build
+++ b/docs/api/meson.build
@@ -21,12 +21,22 @@ glib.gtkdoc (
 gtk_doc_root = join_paths(get_option('prefix'), get_option('datadir'), 'gtk-doc', 'html')
 # we need to install the empty dir, as the gtkdoc generation happens last
 # and a symlink target must exist first.
-install_emptydir(join_paths(get_option('prefix'), as_api_doc_target_dir))
-install_symlink(
-    'appstream',
-    pointing_to: '..' / '..' / '..' / as_api_doc_target_dir,
-    install_dir: gtk_doc_root
-)
+if meson.version().version_compare('>=0.60')
+    install_emptydir(join_paths(get_option('prefix'), as_api_doc_target_dir))
+    install_symlink(
+	'appstream',
+	pointing_to: '..' / '..' / '..' / as_api_doc_target_dir,
+	install_dir: gtk_doc_root
+    )
+else
+    meson.add_install_script ('sh', '-c',
+                          'mkdir -p $DESTDIR@0@ && ln -sf ../../../@1@ $DESTDIR/@2@'
+                          .format(gtk_doc_root,
+                                  as_api_doc_target_dir,
+                                  join_paths(gtk_doc_root, 'appstream'))
+    )
+endif
+
 
 #
 # Build API documentation for libappstream-compose,
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin