[arch-commits] Commit in kupfer/repos/community-any (3 files)

Balló György bgyorgy at archlinux.org
Tue Mar 10 15:07:45 UTC 2020


    Date: Tuesday, March 10, 2020 @ 15:07:44
  Author: bgyorgy
Revision: 593648

archrelease: copy trunk to community-any

Added:
  kupfer/repos/community-any/0001-Use-itstool-instead-of-xml2po.patch
    (from rev 593647, kupfer/trunk/0001-Use-itstool-instead-of-xml2po.patch)
  kupfer/repos/community-any/PKGBUILD
    (from rev 593647, kupfer/trunk/PKGBUILD)
Deleted:
  kupfer/repos/community-any/PKGBUILD

------------------------------------------+
 0001-Use-itstool-instead-of-xml2po.patch |  189 +++++++++++++++++++++++++++++
 PKGBUILD                                 |   80 ++++++------
 2 files changed, 233 insertions(+), 36 deletions(-)

Copied: kupfer/repos/community-any/0001-Use-itstool-instead-of-xml2po.patch (from rev 593647, kupfer/trunk/0001-Use-itstool-instead-of-xml2po.patch)
===================================================================
--- 0001-Use-itstool-instead-of-xml2po.patch	                        (rev 0)
+++ 0001-Use-itstool-instead-of-xml2po.patch	2020-03-10 15:07:44 UTC (rev 593648)
@@ -0,0 +1,189 @@
+From 5d4228ca5dde7b6eef3ea161bb679d7dbb69617f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ball=C3=B3=20Gy=C3=B6rgy?= <ballogyor at gmail.com>
+Date: Tue, 10 Mar 2020 15:58:39 +0100
+Subject: [PATCH] Use itstool instead of xml2po
+
+xml2po is deprecated.
+---
+ README.rst       |  2 +-
+ help/Makefile    |  7 ++++---
+ help/Makefile.am | 12 +++++-------
+ help/wscript     | 41 ++++++++++++++++++++++++-----------------
+ 4 files changed, 34 insertions(+), 28 deletions(-)
+
+diff --git a/README.rst b/README.rst
+index ff8be7f7..bb597a18 100644
+--- a/README.rst
++++ b/README.rst
+@@ -65,7 +65,7 @@ Build Requirements
+ * Python 3
+ * intltool
+ * optionally: rst2man (python-docutils)  to install the manpage
+-* optionally: xml2po (gnome-doc-utils)  to install mallard help pages
++* optionally: itstool  to install mallard help pages
+ 
+ Runtime Requirements
+ --------------------
+diff --git a/help/Makefile b/help/Makefile
+index 7121d1ba..ce1c2546 100644
+--- a/help/Makefile
++++ b/help/Makefile
+@@ -11,12 +11,13 @@ C:
+ 	make -C C
+ 
+ 
+-$(DOC_LINGUAS): C/*.page
+-	xml2po -mmallard -u "$@/$@.po" C/*.page
++$(HELP_LINGUAS): C/*.page
++	msgfmt "$@/$@.po" -o "$@/$@.mo"
++	itstool -m "$@/$@.mo" -o $@/ C/*.page
+ 
+ 
+ html:
+-	for lang in C $(DOC_LINGUAS) ; do \
++	for lang in C $(HELP_LINGUAS) ; do \
+ 		rm -r $$lang ; \
+ 		mkdir $$lang ; \
+ 		yelp-build html -o $$lang /usr/share/help/$$lang/kupfer ; \
+diff --git a/help/Makefile.am b/help/Makefile.am
+index 8976e24f..4016a71e 100644
+--- a/help/Makefile.am
++++ b/help/Makefile.am
+@@ -5,17 +5,15 @@
+ # This file is needed for GNOME's translation infrastructure,
+ # but it is never used as a real Makefile.
+ #
+-# Define all languages for translation in the variable DOC_LINGUAS
++# Define all languages for translation in the variable HELP_LINGUAS
+ #
+ 
+ 
+-# include $(top_srcdir)/gnome-doc-utils.make
++# @YELP_HELP_RULES@
+ 
+-DOC_ID = kupfer
+-DOC_INCLUDES =
+-DOC_FIGURES =
++HELP_ID = kupfer
+ 
+-DOC_PAGES = \
++HELP_FILES = \
+ 	generalusage.page \
+ 	index.page \
+ 	introduction.page \
+@@ -34,7 +32,7 @@ DOC_PAGES = \
+ 	plugin-websearch.page
+ 
+ 
+-DOC_LINGUAS = cs de el es fr it pl ro sl
++HELP_LINGUAS = cs de el es fr it pl ro sl
+ 
+ 
+ # dist-hook: doc-dist-hook
+diff --git a/help/wscript b/help/wscript
+index eebcf6d2..20ac7b6f 100644
+--- a/help/wscript
++++ b/help/wscript
+@@ -10,29 +10,29 @@ from waflib import Task, TaskGen, Utils
+ # FIXME: Support for figures
+ 
+ def _read_makefile_am(filename):
+-    "read a Makefile.am file for DOC_* variable definitions, return a dict"
++    "read a Makefile.am file for HELP_* variable definitions, return a dict"
+     varstring = open(filename).read()
+     varstring = varstring.replace("\\\n", " ")
+-    varlines = [L for L in varstring.splitlines() if L.startswith("DOC")]
++    varlines = [L for L in varstring.splitlines() if L.startswith("HELP")]
+     return dict(tuple(map(str.strip, var.split("=", 1))) for var in varlines)
+ 
+ def init_mallard(self):
+     mf_am = self.path.find_resource(self.variable_definitions)
+-    DOC_VAR = _read_makefile_am(mf_am.abspath())
++    HELP_VAR = _read_makefile_am(mf_am.abspath())
+ 
+-    require_vars = "DOC_ID DOC_LINGUAS DOC_PAGES".split()
+-    have_vars = set(var for var in DOC_VAR if DOC_VAR[var])
++    require_vars = "HELP_ID HELP_LINGUAS HELP_FILES".split()
++    have_vars = set(var for var in HELP_VAR if HELP_VAR[var])
+     missing_vars = set(require_vars).difference(have_vars)
+     if missing_vars:
+-        print("Missing DOC variable declarations in %s:" % (mf_am.abspath()))
++        print("Missing HELP variable declarations in %s:" % (mf_am.abspath()))
+         print("\n".join(missing_vars))
+ 
+-    self.bld.env.update(DOC_VAR)
++    self.bld.env.update(HELP_VAR)
+     self.help_install_prefix='${PREFIX}/share/help/'
+ 
+ def apply_mallard(self):
+     bld = self.bld
+-    lst = self.to_list(bld.env["DOC_LINGUAS"])
++    lst = self.to_list(bld.env["HELP_LINGUAS"])
+     cnode = self.path.find_dir("C")
+ 
+     pages = cnode.ant_glob("*.page")
+@@ -40,30 +40,36 @@ def apply_mallard(self):
+     self.install_path = Utils.subst_vars(self.help_install_prefix, self.env)
+ 
+     # Check if the declared page list is consistent
+-    declared_pages = self.to_list(bld.env["DOC_PAGES"])
++    declared_pages = self.to_list(bld.env["HELP_FILES"])
+     missing_pages = set([str(p) for p in pages]).difference(declared_pages)
+     if missing_pages:
+         print("Warning: Some pages not declared:")
+         print("\n".join([str(p) for p in missing_pages]))
+ 
+     for lang in lst:
+-        lang_install_path = os.path.join(self.install_path, lang, bld.env["DOC_ID"])
++        lang_install_path = os.path.join(self.install_path, lang, bld.env["HELP_ID"])
+         node = self.path.find_resource("%s/%s.po" % (lang, lang))
++        mo = self.path.find_or_declare("%s/%s.mo" % (lang, lang))
++        bld(name='msgfmt', color='BLUE',
++            rule='${MSGFMT} ${SRC} -o ${TGT}',
++	    source=node,
++	    target=mo,
++	    )
+         for page in pages:
+-            tsk = self.create_task('xml2po')
++            tsk = self.create_task('itstool')
+             out = self.path.find_or_declare('%s/%s' % (lang, page))
+             src = self.path.find_resource('C/%s' % page)
+-            tsk.set_inputs([node,src])
++            tsk.set_inputs([mo,src])
+             tsk.set_outputs(out)
+             bld.install_files(lang_install_path, tsk.outputs)
+         bld.install_files(lang_install_path, legal_xml)
+ 
+-    c_install_path = os.path.join(self.install_path, "C", bld.env["DOC_ID"])
++    c_install_path = os.path.join(self.install_path, "C", bld.env["HELP_ID"])
+     for page in pages:
+         bld.install_files(c_install_path, page)
+     bld.install_files(c_install_path, legal_xml)
+ 
+-Task.task_factory('xml2po', '${XML2PO} ${XML2POFLAGS} ${SRC} > ${TGT}',
++Task.task_factory('itstool', '${ITSTOOL} ${ITSTOOLFLAGS} ${SRC} -o ${TGT}',
+         color='BLUE')
+ 
+ TaskGen.feature("mallard")(init_mallard)
+@@ -79,14 +85,15 @@ def options(opt):
+     pass
+ 
+ def configure(ctx):
++    ctx.find_program('msgfmt', var='MSGFMT')
+     try:
+-        ctx.find_program('xml2po', var='XML2PO')
+-        ctx.env['XML2POFLAGS'] = '-mmallard -p'
++        ctx.find_program('itstool', var='ITSTOOL')
++        ctx.env['ITSTOOLFLAGS'] = '-m'
+     except ctx.errors.ConfigurationError:
+         pass
+ 
+ def build(bld):
+-    if bld.env["XML2PO"]:
++    if bld.env["ITSTOOL"]:
+         task = bld(features="mallard",
+             variable_definitions="Makefile.am",
+         )
+-- 
+2.25.1
+

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2020-03-10 15:07:40 UTC (rev 593647)
+++ PKGBUILD	2020-03-10 15:07:44 UTC (rev 593648)
@@ -1,36 +0,0 @@
-# Maintainer: Balló György <ballogyor+arch at gmail dot com>
-# Contributor: D. Can Celasun <dcelasun[at]gmail[dot]com>
-# Contributor: Alessio Sergi <asergi at archlinux dot us>
-# Contributor: Asa Marco <marcoasa90[at]gmail[.]com>
-
-pkgname=kupfer
-pkgver=319
-pkgrel=3
-pkgdesc="Launcher application written in python. Similar to Gnome-Do / Launchy"
-arch=('any')
-url="https://kupferlauncher.github.io/"
-license=('GPL3')
-depends=('libkeybinder3' 'libwnck3' 'python-cairo' 'python-dbus' 'python-gobject' 'python-xdg')
-makedepends=('gnome-doc-utils' 'intltool' 'python-docutils')
-source=(https://github.com/kupferlauncher/$pkgname/releases/download/v$pkgver/$pkgname-v$pkgver.tar.xz{,.sig})
-validpgpkeys=('2578ABA1F9023159DFF211B7368712C4D7A44445') # Ulrik Sverdrup
-sha256sums=('22357233984a6588a9f9743002363af38ea63b5c2684af487693a13c42973d31'
-            'SKIP')
-
-prepare() {
-  cd $pkgname-v$pkgver
-  sed -e 's|raise StopIteration|return|g' -i waflib/Node.py # Fix build with Python 3.7
-}
-
-build() {
-  cd $pkgname-v$pkgver
-  ./waf configure --prefix=/usr \
-                  --no-update-mime \
-                  --no-update-icon-cache
-  ./waf
-}
-
-package() {
-  cd $pkgname-v$pkgver
-  ./waf install --destdir="$pkgdir"
-}

Copied: kupfer/repos/community-any/PKGBUILD (from rev 593647, kupfer/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2020-03-10 15:07:44 UTC (rev 593648)
@@ -0,0 +1,44 @@
+# Maintainer: Balló György <ballogyor+arch at gmail dot com>
+# Contributor: D. Can Celasun <dcelasun[at]gmail[dot]com>
+# Contributor: Alessio Sergi <asergi at archlinux dot us>
+# Contributor: Asa Marco <marcoasa90[at]gmail[.]com>
+
+pkgname=kupfer
+pkgver=319
+pkgrel=4
+pkgdesc="Launcher application written in python. Similar to Gnome-Do / Launchy"
+arch=('any')
+url="https://kupferlauncher.github.io/"
+license=('GPL3')
+depends=('libkeybinder3' 'libwnck3' 'python-cairo' 'python-dbus' 'python-gobject' 'python-xdg')
+makedepends=('intltool' 'itstool' 'python-docutils')
+optdepends=('gvfs: Trash plugin'
+            'xautomation: Send Keys plugin')
+source=(https://github.com/kupferlauncher/$pkgname/releases/download/v$pkgver/$pkgname-v$pkgver.tar.xz{,.sig}
+        0001-Use-itstool-instead-of-xml2po.patch)
+validpgpkeys=('2578ABA1F9023159DFF211B7368712C4D7A44445') # Ulrik Sverdrup
+sha256sums=('22357233984a6588a9f9743002363af38ea63b5c2684af487693a13c42973d31'
+            'SKIP'
+            'aae540ed3bd9330ac0a1675395be3a0ee2252315da9f2f2934d27a18a58404b3')
+
+prepare() {
+  cd $pkgname-v$pkgver
+  # Don't use deprecated xml2po
+  # https://github.com/kupferlauncher/kupfer/issues/128
+  patch -Np1 -i ../0001-Use-itstool-instead-of-xml2po.patch
+
+  sed -e 's|raise StopIteration|return|g' -i waflib/Node.py # Fix build with Python 3.7
+}
+
+build() {
+  cd $pkgname-v$pkgver
+  ./waf configure --prefix=/usr \
+                  --no-update-mime \
+                  --no-update-icon-cache
+  ./waf
+}
+
+package() {
+  cd $pkgname-v$pkgver
+  ./waf install --destdir="$pkgdir"
+}



More information about the arch-commits mailing list