[arch-commits] Commit in labyrinth/repos/community-any (6 files)

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


    Date: Wednesday, September 5, 2018 @ 15:38:44
  Author: bgyorgy
Revision: 376951

archrelease: copy trunk to community-any

Added:
  labyrinth/repos/community-any/PKGBUILD
    (from rev 376950, labyrinth/trunk/PKGBUILD)
  labyrinth/repos/community-any/appdata.patch
    (from rev 376950, labyrinth/trunk/appdata.patch)
  labyrinth/repos/community-any/no-numpy.patch
    (from rev 376950, labyrinth/trunk/no-numpy.patch)
  labyrinth/repos/community-any/optional-gconf.patch
    (from rev 376950, labyrinth/trunk/optional-gconf.patch)
Deleted:
  labyrinth/repos/community-any/PKGBUILD
  labyrinth/repos/community-any/no-numpy.patch

----------------------+
 PKGBUILD             |   95 +++++++++++++++++++----------------
 appdata.patch        |   79 +++++++++++++++++++++++++++++
 no-numpy.patch       |  130 ++++++++++++++++++++++++-------------------------
 optional-gconf.patch |   84 +++++++++++++++++++++++++++++++
 4 files changed, 281 insertions(+), 107 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2018-09-05 15:38:39 UTC (rev 376950)
+++ PKGBUILD	2018-09-05 15:38:44 UTC (rev 376951)
@@ -1,42 +0,0 @@
-# $Id$
-# Maintainer: Balló György <ballogyor+arch at gmail dot com>
-# Contributor: M Rawash <mrawash at gmail.com>
-# Contributor: zhuqin <zhuqin83 at gmail.com>
-
-pkgname=labyrinth
-pkgver=0.6
-pkgrel=3
-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')
-source=($pkgname-$pkgver.tar.gz::https://github.com/labyrinth-team/$pkgname/archive/$pkgver.tar.gz
-        no-numpy.patch)
-md5sums=('e008ebfc1eaeab7f40cff05cb1865c45'
-         'c993d413288a1c68bee8e4b0ea187972')
-
-prepare() {
-  cd $pkgname-$pkgver
-  sed -i 's@^#.*python$@#!/usr/bin/python2@' labyrinth_lib/*.py
-
-  # Eliminate numpy dependency
-  patch -Np1 -i ../no-numpy.patch
-}
-
-build() {
-  cd $pkgname-$pkgver
-  python2 setup.py build
-  make -C po
-}
-
-package() {
-  cd $pkgname-$pkgver
-  python2 setup.py install --root "$pkgdir" --optimize=1
-  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"
-}

Copied: labyrinth/repos/community-any/PKGBUILD (from rev 376950, labyrinth/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2018-09-05 15:38:44 UTC (rev 376951)
@@ -0,0 +1,53 @@
+# $Id$
+# Maintainer: Balló György <ballogyor+arch at gmail dot com>
+# Contributor: M Rawash <mrawash at gmail.com>
+# Contributor: zhuqin <zhuqin83 at gmail.com>
+
+pkgname=labyrinth
+pkgver=0.6
+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=('pygtk' 'python2-xdg')
+source=($pkgname-$pkgver.tar.gz::https://github.com/labyrinth-team/$pkgname/archive/$pkgver.tar.gz
+        no-numpy.patch
+        optional-gconf.patch
+        appdata.patch)
+sha256sums=('c651ad0c6741e91251961107558d915dc7efbb57d84d64173ce0beed2a4aa34a'
+            '67f5486d770253e8d9778795c2fe0b928a1a428e296f19b2760bf73114c340ce'
+            'aeb07b467634dd199918209f6f575f1c33a3d2ca09620443c29442f6e02545f8'
+            '44c9a9aaac2f62a3006fc5051924ad5a67aa9be76a6a30dff8dc8c2d78c2903a')
+
+prepare() {
+  cd $pkgname-$pkgver
+  sed -i 's@^#.*python$@#!/usr/bin/python2@' labyrinth_lib/*.py
+
+  # 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() {
+  cd $pkgname-$pkgver
+  python2 setup.py build
+  make -C po
+}
+
+package() {
+  cd $pkgname-$pkgver
+  python2 setup.py install --root="$pkgdir" --optimize=1
+  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"
+}

Copied: labyrinth/repos/community-any/appdata.patch (from rev 376950, labyrinth/trunk/appdata.patch)
===================================================================
--- appdata.patch	                        (rev 0)
+++ appdata.patch	2018-09-05 15:38:44 UTC (rev 376951)
@@ -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

Deleted: no-numpy.patch
===================================================================
--- no-numpy.patch	2018-09-05 15:38:39 UTC (rev 376950)
+++ no-numpy.patch	2018-09-05 15:38:44 UTC (rev 376951)
@@ -1,65 +0,0 @@
-From 1612f7df877ff58e621cab7c195bf19796b5fa9b Mon Sep 17 00:00:00 2001
-From: Thomas Kluyver <takowl at gmail.com>
-Date: Wed, 4 Jun 2014 10:32:08 -0700
-Subject: [PATCH] Eliminate numpy dependency
-
-We only used numpy for one little thing, and it seems we don't actually
-need it.
----
- grab_files.sh                 | 10 ++++++++--
- installer.cfg                 |  1 -
- labyrinth_lib/ImageThought.py |  7 +++----
- labyrinth_lib/utils.py        | 15 ---------------
- 4 files changed, 11 insertions(+), 22 deletions(-)
-
-diff --git a/labyrinth_lib/ImageThought.py b/labyrinth_lib/ImageThought.py
-index ac68eb7..55c2849 100644
---- a/labyrinth_lib/ImageThought.py
-+++ b/labyrinth_lib/ImageThought.py
-@@ -117,10 +117,9 @@ def export (self, context, move_x, move_y):
-         if self.pic:
-             if hasattr(context, "set_source_pixbuf"):
-                 context.set_source_pixbuf (self.pic, self.pic_location[0]+move_x, self.pic_location[1]+move_y)
--            elif hasattr(context, "set_source_surface"):
--                pixel_array = utils.pixbuf_to_cairo (self.pic.get_pixels_array())
--                image_surface = cairo.ImageSurface.create_for_data(pixel_array, cairo.FORMAT_ARGB32, self.width, self.height, -1)
--                context.set_source_surface (image_surface, self.pic_location[0]+move_x, self.pic_location[1]+move_y)
-+            else:
-+                gcontext = gtk.gdk.CairoContext(context)
-+                gcontext.set_source_pixbuf(self.pic, self.pic_location[0]+move_x, self.pic_location[1]+move_y)
-             context.rectangle (self.pic_location[0]+move_x, self.pic_location[1]+move_y, self.width, self.height)
-             context.fill ()
-         context.set_source_rgb (0,0,0)
-diff --git a/labyrinth_lib/utils.py b/labyrinth_lib/utils.py
-index 73e2401..00f40aa 100644
---- a/labyrinth_lib/utils.py
-+++ b/labyrinth_lib/utils.py
-@@ -27,7 +27,6 @@
- from os.path import join, dirname, exists, isdir, isfile
- import os
- import warnings
--from numpy import array
- from xdg import BaseDirectory
- 
- __BE_VERBOSE=os.environ.get('DEBUG_LABYRINTH',0)
-@@ -196,17 +195,3 @@ def export_thought_outline (context, ul, lr, background_color, am_root = False,
-     real_ul = (ul[0]+move[0], ul[1]+move[1])
-     real_lr = (lr[0]+move[0], lr[1]+move[1])
-     draw_thought_extended (context, real_ul, real_lr, False, am_primary, background_color, style == STYLE_EXTENDED_CONTENT)
--
--def pixbuf_to_cairo (pixel_array):
--    result = []
--    for y in pixel_array:
--        row = []
--        for x in y:
--            color = [int(x[2][0]), int(x[1][0]), int(x[0][0])]
--            if len(x) == 3:
--                color.append(255)
--            elif len(x) == 4:
--                color.append(int(x[3][0]))
--            row.append(color)
--        result.append(row)
--    return array(result, 'b')
--- 
-2.0.3
-

Copied: labyrinth/repos/community-any/no-numpy.patch (from rev 376950, labyrinth/trunk/no-numpy.patch)
===================================================================
--- no-numpy.patch	                        (rev 0)
+++ no-numpy.patch	2018-09-05 15:38:44 UTC (rev 376951)
@@ -0,0 +1,65 @@
+From 1612f7df877ff58e621cab7c195bf19796b5fa9b Mon Sep 17 00:00:00 2001
+From: Thomas Kluyver <takowl at gmail.com>
+Date: Wed, 4 Jun 2014 10:32:08 -0700
+Subject: [PATCH] Eliminate numpy dependency
+
+We only used numpy for one little thing, and it seems we don't actually
+need it.
+---
+ grab_files.sh                 | 10 ++++++++--
+ installer.cfg                 |  1 -
+ labyrinth_lib/ImageThought.py |  7 +++----
+ labyrinth_lib/utils.py        | 15 ---------------
+ 4 files changed, 11 insertions(+), 22 deletions(-)
+
+diff --git a/labyrinth_lib/ImageThought.py b/labyrinth_lib/ImageThought.py
+index ac68eb7..55c2849 100644
+--- a/labyrinth_lib/ImageThought.py
++++ b/labyrinth_lib/ImageThought.py
+@@ -117,10 +117,9 @@ def export (self, context, move_x, move_y):
+         if self.pic:
+             if hasattr(context, "set_source_pixbuf"):
+                 context.set_source_pixbuf (self.pic, self.pic_location[0]+move_x, self.pic_location[1]+move_y)
+-            elif hasattr(context, "set_source_surface"):
+-                pixel_array = utils.pixbuf_to_cairo (self.pic.get_pixels_array())
+-                image_surface = cairo.ImageSurface.create_for_data(pixel_array, cairo.FORMAT_ARGB32, self.width, self.height, -1)
+-                context.set_source_surface (image_surface, self.pic_location[0]+move_x, self.pic_location[1]+move_y)
++            else:
++                gcontext = gtk.gdk.CairoContext(context)
++                gcontext.set_source_pixbuf(self.pic, self.pic_location[0]+move_x, self.pic_location[1]+move_y)
+             context.rectangle (self.pic_location[0]+move_x, self.pic_location[1]+move_y, self.width, self.height)
+             context.fill ()
+         context.set_source_rgb (0,0,0)
+diff --git a/labyrinth_lib/utils.py b/labyrinth_lib/utils.py
+index 73e2401..00f40aa 100644
+--- a/labyrinth_lib/utils.py
++++ b/labyrinth_lib/utils.py
+@@ -27,7 +27,6 @@
+ from os.path import join, dirname, exists, isdir, isfile
+ import os
+ import warnings
+-from numpy import array
+ from xdg import BaseDirectory
+ 
+ __BE_VERBOSE=os.environ.get('DEBUG_LABYRINTH',0)
+@@ -196,17 +195,3 @@ def export_thought_outline (context, ul, lr, background_color, am_root = False,
+     real_ul = (ul[0]+move[0], ul[1]+move[1])
+     real_lr = (lr[0]+move[0], lr[1]+move[1])
+     draw_thought_extended (context, real_ul, real_lr, False, am_primary, background_color, style == STYLE_EXTENDED_CONTENT)
+-
+-def pixbuf_to_cairo (pixel_array):
+-    result = []
+-    for y in pixel_array:
+-        row = []
+-        for x in y:
+-            color = [int(x[2][0]), int(x[1][0]), int(x[0][0])]
+-            if len(x) == 3:
+-                color.append(255)
+-            elif len(x) == 4:
+-                color.append(int(x[3][0]))
+-            row.append(color)
+-        result.append(row)
+-    return array(result, 'b')
+-- 
+2.0.3
+

Copied: labyrinth/repos/community-any/optional-gconf.patch (from rev 376950, labyrinth/trunk/optional-gconf.patch)
===================================================================
--- optional-gconf.patch	                        (rev 0)
+++ optional-gconf.patch	2018-09-05 15:38:44 UTC (rev 376951)
@@ -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