[arch-commits] Commit in labyrinth/trunk (PKGBUILD appdata.patch optional-gconf.patch)

Balló György bgyorgy at archlinux.org
Wed Sep 5 15:38:39 UTC 2018


    Date: Wednesday, September 5, 2018 @ 15:38:39
  Author: bgyorgy
Revision: 376950

upgpkg: labyrinth 0.6-4

Remove deprecated GConf dependency, add appdata file

Added:
  labyrinth/trunk/appdata.patch
  labyrinth/trunk/optional-gconf.patch
Modified:
  labyrinth/trunk/PKGBUILD

----------------------+
 PKGBUILD             |   23 +++++++++----
 appdata.patch        |   79 ++++++++++++++++++++++++++++++++++++++++++++++
 optional-gconf.patch |   84 +++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 180 insertions(+), 6 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-09-05 15:17:01 UTC (rev 376949)
+++ PKGBUILD	2018-09-05 15:38:39 UTC (rev 376950)
@@ -5,16 +5,20 @@
 
 pkgname=labyrinth
 pkgver=0.6
-pkgrel=3
+pkgrel=4
 pkgdesc="Lightweight mind-mapping tool with support for image import and drawing"
 arch=('any')
 url="https://github.com/labyrinth-team/labyrinth"
 license=('GPL')
-depends=('python2-gconf' 'python2-xdg')
+depends=('pygtk' 'python2-xdg')
 source=($pkgname-$pkgver.tar.gz::https://github.com/labyrinth-team/$pkgname/archive/$pkgver.tar.gz
-        no-numpy.patch)
-md5sums=('e008ebfc1eaeab7f40cff05cb1865c45'
-         'c993d413288a1c68bee8e4b0ea187972')
+        no-numpy.patch
+        optional-gconf.patch
+        appdata.patch)
+sha256sums=('c651ad0c6741e91251961107558d915dc7efbb57d84d64173ce0beed2a4aa34a'
+            '67f5486d770253e8d9778795c2fe0b928a1a428e296f19b2760bf73114c340ce'
+            'aeb07b467634dd199918209f6f575f1c33a3d2ca09620443c29442f6e02545f8'
+            '44c9a9aaac2f62a3006fc5051924ad5a67aa9be76a6a30dff8dc8c2d78c2903a')
 
 prepare() {
   cd $pkgname-$pkgver
@@ -22,6 +26,12 @@
 
   # Eliminate numpy dependency
   patch -Np1 -i ../no-numpy.patch
+
+  # Make gconf dependency optional
+  patch -Np1 -i ../optional-gconf.patch
+
+  # Add appdata file
+  patch -Np1 -i ../appdata.patch
 }
 
 build() {
@@ -33,10 +43,11 @@
 package() {
   cd $pkgname-$pkgver
   python2 setup.py install --root="$pkgdir" --optimize=1
-  make -C po localedir=$pkgdir/usr/share/locale install
+  make -C po localedir="$pkgdir/usr/share/locale" install
   install -Dm644 data/$pkgname-16.png "$pkgdir/usr/share/icons/hicolor/16x16/apps/$pkgname.png"
   install -Dm644 data/$pkgname-22.png "$pkgdir/usr/share/icons/hicolor/22x22/apps/$pkgname.png"
   install -Dm644 data/$pkgname-24.png "$pkgdir/usr/share/icons/hicolor/24x24/apps/$pkgname.png"
   install -Dm644 data/$pkgname.svg "$pkgdir/usr/share/icons/hicolor/scalable/apps/$pkgname.svg"
   install -Dm644 data/$pkgname.desktop "$pkgdir/usr/share/applications/$pkgname.desktop"
+  install -Dm644 data/labyrinth.appdata.xml "$pkgdir/usr/share/metainfo/labyrinth.appdata.xml"
 }

Added: appdata.patch
===================================================================
--- appdata.patch	                        (rev 0)
+++ appdata.patch	2018-09-05 15:38:39 UTC (rev 376950)
@@ -0,0 +1,79 @@
+From 4852045b1832b2eaefcc890bdbc39c705f4ad6a1 Mon Sep 17 00:00:00 2001
+From: Cosimo Cecchi <cosimo at endlessm.com>
+Date: Fri, 3 Aug 2018 16:35:33 -0700
+Subject: [PATCH] Add an updated .appdata file
+
+---
+ data/labyrinth.appdata.xml | 49 ++++++++++++++++++++++++++++++++++++++
+ install_data_files.sh      |  3 +++
+ 2 files changed, 52 insertions(+)
+ create mode 100644 data/labyrinth.appdata.xml
+
+diff --git a/data/labyrinth.appdata.xml b/data/labyrinth.appdata.xml
+new file mode 100644
+index 0000000..8d24936
+--- /dev/null
++++ b/data/labyrinth.appdata.xml
+@@ -0,0 +1,49 @@
++<?xml version="1.0" encoding="UTF-8"?>
++<application>
++    <id type="desktop">labyrinth.desktop</id>
++    <metadata_license>CC0-1.0</metadata_license>
++    <project_license>GPL-2.0</project_license>
++    <name>Labyrinth</name>
++    <summary>A light weight mind mapping tool</summary>
++    <description>
++        <p>
++            Labyrinth is a lightweight mind-mapping tool, written in Python using Gtk and
++            Cairo to do the drawing. It is intended to be as light and intuitive as
++            possible, but still provide a wide range of powerful features.
++        </p>
++
++        <p>
++            A mind-map is a diagram used to represent words, ideas, tasks or other items
++            linked to and arranged radially around a central key word or idea. It is used
++            to generate, visualize, structure and classify ideas, and as an aid in study,
++            organization, problem solving, and decision making (From Wikipedia).
++        </p>
++
++        <p>
++            Currently, Labyrinth provides 3 different types of thoughts, or nodes - Text,
++            Image and Drawing. Text is the basic standard text node. Images allow you to
++            insert and scale any supported image file (PNG, JPEG, SVG). Drawings are for
++            those times when you want to illustrate something, but don't want to fire up a
++            separate drawing program. It allows you to quickly and easily sketch very
++            simple line diagrams.
++        </p>
++
++    </description>
++
++    <content_rating type="oars-1.1" />
++
++    <releases>
++      <release date="2012-11-02" version="0.6"/>
++    </releases>
++
++    <screenshots>
++      <screenshot>
++        <image type="source">https://screenshots.debian.net/screenshots/000/009/362/large.png</image>
++        <image type="source">https://screenshots.debian.net/screenshots/000/009/194/large.png</image>
++      </screenshot>
++    </screenshots>
++
++    <url type="homepage">https://github.com/labyrinth-team/labyrinth</url>
++    <updatecontact>Don at Scorgie.org</updatecontact>
++</application>
++
+diff --git a/install_data_files.sh b/install_data_files.sh
+index 76ba767..c021211 100755
+--- a/install_data_files.sh
++++ b/install_data_files.sh
+@@ -14,5 +14,8 @@ install -m 644 data/labyrinth.svg $DESTDIR/usr/share/icons/hicolor/scalable/apps
+ echo "Installing .desktop file"
+ install -D -m 755 data/labyrinth.desktop $DESTDIR/usr/share/applications/labyrinth.desktop
+ 
++echo "Installing .appdata.xml file"
++install -D -m 644 data/labyrinth.appdata.xml $DESTDIR/usr/share/appdata/labyrinth.appdata.xml
++
+ echo "Installing translations"
+ make -C po localedir=$DESTDIR/usr/share/locale install

Added: optional-gconf.patch
===================================================================
--- optional-gconf.patch	                        (rev 0)
+++ optional-gconf.patch	2018-09-05 15:38:39 UTC (rev 376950)
@@ -0,0 +1,84 @@
+diff -Naur labyrinth-0.6.orig/labyrinth_lib/Browser.py labyrinth-0.6/labyrinth_lib/Browser.py
+--- labyrinth-0.6.orig/labyrinth_lib/Browser.py	2018-09-05 16:29:11.992110000 +0200
++++ labyrinth-0.6/labyrinth_lib/Browser.py	2018-09-05 16:34:59.848220456 +0200
+@@ -29,7 +29,10 @@
+ # Gtk stuff
+ import gtk
+ if os.name != 'nt':
+-    import gconf
++    try:
++        import gconf
++    except ImportError:
++        gconf = None
+ import gtk.glade
+ import pango
+ import gobject
+@@ -89,7 +92,7 @@
+         self.main_window = self.glade.get_widget ('MapBrowser')
+ 
+         # set remembered size
+-        if os.name != 'nt':
++        if os.name != 'nt' and gconf:
+             self.config_client = gconf.client_get_default()
+             self.config_client.add_dir ("/apps/labyrinth", gconf.CLIENT_PRELOAD_NONE)
+ 
+@@ -105,7 +108,7 @@
+ 
+         view_sortable = self.view.get_model ()
+         view_sortable.connect ('sort-column-changed', self.sort_column_changed_cb)
+-        if os.name != 'nt':
++        if os.name != 'nt' and gconf:
+             sort_order = self.config_client.get_int('/apps/labyrinth/map_sort_order')
+             column_id = self.config_client.get_int('/apps/labyrinth/map_sort_order_column')
+             view_sortable.set_sort_column_id (column_id, sort_order)
+@@ -307,7 +310,7 @@
+ 
+         width, height = self.main_window.get_size()
+ 
+-        if os.name != 'nt':
++        if os.name != 'nt' and gconf:
+             self.config_client.set_int('/apps/labyrinth/width', width)
+             self.config_client.set_int('/apps/labyrinth/height', height)
+ 
+@@ -335,6 +338,6 @@
+ 
+     def sort_column_changed_cb (self, data):
+         column_id, sort_order = data.get_sort_column_id ()
+-        if os.name != 'nt':
++        if os.name != 'nt' and gconf:
+             self.config_client.set_int('/apps/labyrinth/map_sort_order', sort_order)
+             self.config_client.set_int('/apps/labyrinth/map_sort_order_column', column_id)
+diff -Naur labyrinth-0.6.orig/labyrinth_lib/MainWindow.py labyrinth-0.6/labyrinth_lib/MainWindow.py
+--- labyrinth-0.6.orig/labyrinth_lib/MainWindow.py	2018-09-05 16:29:11.998776000 +0200
++++ labyrinth-0.6/labyrinth_lib/MainWindow.py	2018-09-05 16:35:40.649492236 +0200
+@@ -32,7 +32,10 @@
+ import cairo, pangocairo
+ import gobject
+ if os.name != 'nt':
+-    import gconf
++    try:
++        import gconf
++    except ImportError:
++        gconf = None
+ 
+ # Local imports
+ import MMapArea
+@@ -81,7 +84,8 @@
+         self.MainArea.connect ("set_attrs", self.attrs_cb)
+         if os.name != 'nt':
+             self.MainArea.connect ("text_selection_changed", self.selection_changed_cb)
+-            self.config_client = gconf.client_get_default()
++            if gconf:
++                self.config_client = gconf.client_get_default()
+ 
+         glade = gtk.glade.XML(utils.get_data_file_name('labyrinth.glade'))
+         self.main_window = glade.get_widget ('MapWindow')
+@@ -321,7 +325,7 @@
+ 
+     def view_change_cb(self, base, activated):
+         utils.use_bezier_curves = activated.get_current_value() == MMapArea.VIEW_BEZIER
+-        if os.name != 'nt':
++        if os.name != 'nt' and gconf:
+             self.config_client.set_bool('/apps/labyrinth/curves', utils.use_bezier_curves)
+         self.MainArea.update_all_links()
+         self.MainArea.invalidate()



More information about the arch-commits mailing list