[arch-commits] Commit in pdfmod/trunk (Drop-gconf-dependency.patch PKGBUILD)

Balló György bgyorgy at archlinux.org
Sun Sep 2 18:26:08 UTC 2018


    Date: Sunday, September 2, 2018 @ 18:26:07
  Author: bgyorgy
Revision: 376075

upgpkg: pdfmod 0.9.1-9

Remove deprecated GConf dependency

Added:
  pdfmod/trunk/Drop-gconf-dependency.patch
Modified:
  pdfmod/trunk/PKGBUILD

-----------------------------+
 Drop-gconf-dependency.patch |  227 ++++++++++++++++++++++++++++++++++++++++++
 PKGBUILD                    |   16 ++
 2 files changed, 239 insertions(+), 4 deletions(-)

Added: Drop-gconf-dependency.patch
===================================================================
--- Drop-gconf-dependency.patch	                        (rev 0)
+++ Drop-gconf-dependency.patch	2018-09-02 18:26:07 UTC (rev 376075)
@@ -0,0 +1,227 @@
+From: Jeremy Bicha <jbicha at ubuntu.com>
+Date: Sat, 23 Dec 2017 02:22:44 -0500
+Subject: Drop gconf dependency
+
+Revert 3647e8bd20533f317c8fa0deac29e89fec0512f2
+"Remember show_toolbar and last_open folder in gconf"
+
+Similarly, undo gconf support for Bookmarks feature
+---
+ configure.ac                     |  1 -
+ src/Makefile.am                  |  2 --
+ src/PdfMod/Core/Client.cs        |  2 --
+ src/PdfMod/Core/Configuration.cs | 65 ----------------------------------------
+ src/PdfMod/Gui/Actions.cs        | 17 +++--------
+ src/PdfMod/Gui/BookmarkView.cs   |  2 --
+ src/PdfMod/Gui/Client.cs         |  3 --
+ 7 files changed, 4 insertions(+), 88 deletions(-)
+ delete mode 100644 src/PdfMod/Core/Configuration.cs
+
+diff --git a/configure.ac b/configure.ac
+index e3b4570..6438aa0 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -108,7 +108,6 @@ AM_GLIB_GNU_GETTEXT
+ dnl package checks, common for all configs
+ PKG_CHECK_MODULES([GTK_SHARP_20], [gtk-sharp-2.0])
+ PKG_CHECK_MODULES([GLIB_SHARP_20], [glib-sharp-2.0])
+-PKG_CHECK_MODULES([GCONF_SHARP_20], [gconf-sharp-2.0])
+ 
+ dnl package checks, per config
+ PKG_CHECK_MODULES(HYENA, hyena >= 0.5)
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 9eb4c74..a3ead39 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -29,7 +29,6 @@ all: $(ASSEMBLY) $(PROGRAMFILES) $(BINARIES)
+ FILES =  \
+ 	PdfMod/Core/AssemblyInfo.cs \
+ 	PdfMod/Core/Client.cs \
+-	PdfMod/Core/Configuration.cs \
+ 	PdfMod/Core/Defines.cs \
+ 	PdfMod/Gui/Actions.cs \
+ 	PdfMod/Gui/BookmarkView.cs \
+@@ -63,7 +62,6 @@ EXTRAS = \
+ REFERENCES =  \
+ 	Mono.Cairo \
+ 	Mono.Posix \
+-	-pkg:gconf-sharp-2.0 \
+ 	-pkg:glib-sharp-2.0 \
+ 	-pkg:gtk-sharp-2.0 \
+ 	-pkg:hyena \
+diff --git a/src/PdfMod/Core/Client.cs b/src/PdfMod/Core/Client.cs
+index e8d4d11..fac4c75 100644
+--- a/src/PdfMod/Core/Client.cs
++++ b/src/PdfMod/Core/Client.cs
+@@ -32,13 +32,11 @@ namespace PdfMod.Core
+         static readonly string CacheDir = Path.Combine (XdgBaseDirectorySpec.GetUserDirectory ("XDG_CACHE_HOME", ".cache"), "pdfmod");
+ 
+         public Document Document { get; protected set; }
+-        public static Configuration Configuration { get; private set; }
+ 
+         public event EventHandler DocumentLoaded;
+ 
+         static Client ()
+         {
+-            Configuration = new Configuration ();
+             InitCache ();
+         }
+ 
+diff --git a/src/PdfMod/Core/Configuration.cs b/src/PdfMod/Core/Configuration.cs
+deleted file mode 100644
+index 817b9f4..0000000
+--- a/src/PdfMod/Core/Configuration.cs
++++ /dev/null
+@@ -1,65 +0,0 @@
+-// Copyright (C) 2009-2010 Novell, Inc.
+-//
+-// This program is free software; you can redistribute it and/or
+-// modify it under the terms of the GNU General Public License
+-// as published by the Free Software Foundation; either version 2
+-// of the License, or (at your option) any later version.
+-//
+-// This program is distributed in the hope that it will be useful,
+-// but WITHOUT ANY WARRANTY; without even the implied warranty of
+-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+-// GNU General Public License for more details.
+-//
+-// You should have received a copy of the GNU General Public License
+-// along with this program; if not, write to the Free Software
+-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+-
+-using System;
+-
+-namespace PdfMod.Core
+-{    
+-    public class Configuration
+-    {
+-        GConf.Client client = new GConf.Client ();
+-        string ns = "/apps/pdfmod/";
+-
+-        public Configuration()
+-        {
+-        }
+-
+-        T Get<T> (string key, T fallback)
+-        {
+-            try {
+-                return (T) client.Get (ns + key);
+-            } catch {
+-                return fallback;
+-            }
+-        }
+-
+-        void Set<T> (string key, T val)
+-        {
+-            client.Set (ns + key, val);
+-        }
+-
+-        public bool ShowToolbar {
+-            get { return Get<bool> ("show_toolbar", true); }
+-            set { Set<bool> ("show_toolbar", value); }
+-        }
+-
+-        public bool ShowBookmarks {
+-            get { return Get<bool> ("show_bookmarks", false); }
+-            set { Set<bool> ("show_bookmarks", value); }
+-        }
+-
+-        public string LastOpenFolder {
+-            get { return Get<string> ("last_folder", System.Environment.GetFolderPath (System.Environment.SpecialFolder.Desktop)); }
+-            set {
+-                if (value != null && value.StartsWith ("file:/") && !value.StartsWith ("file://")) {
+-                    value = "file://" + value.Substring (6);
+-                }
+-
+-                Set<string> ("last_folder", value);
+-            }
+-        }
+-    }
+-}
+diff --git a/src/PdfMod/Gui/Actions.cs b/src/PdfMod/Gui/Actions.cs
+index 3fc452b..9651a36 100644
+--- a/src/PdfMod/Gui/Actions.cs
++++ b/src/PdfMod/Gui/Actions.cs
+@@ -110,8 +110,8 @@ namespace PdfMod.Gui
+             AddImportant (
+                 new ToggleActionEntry ("Properties", Stock.Properties, null, "<alt>Return", Catalog.GetString ("View and edit the title, keywords, and more for this document"), OnProperties, false),
+                 new ToggleActionEntry ("ZoomFit", Stock.ZoomFit, null, "<control>0", null, OnZoomFit, true),
+-                new ToggleActionEntry ("ViewToolbar", null, Catalog.GetString ("Toolbar"), null, null, OnViewToolbar, Client.Configuration.ShowToolbar),
+-                new ToggleActionEntry ("ViewBookmarks", null, Catalog.GetString ("Bookmarks"), "F9", null, OnViewBookmarks, Client.Configuration.ShowBookmarks),
++                new ToggleActionEntry ("ViewToolbar", null, Catalog.GetString ("Toolbar"), null, null, OnViewToolbar, true),
++                new ToggleActionEntry ("ViewBookmarks", null, Catalog.GetString ("Bookmarks"), "F9", null, OnViewBookmarks, false),
+                 new ToggleActionEntry ("FullScreenView", null, Catalog.GetString ("Fullscreen"), "F11", null, OnFullScreenView, false)
+             );
+ 
+@@ -230,12 +230,6 @@ namespace PdfMod.Gui
+             chooser.SelectMultiple = true;
+             chooser.AddButton (Stock.Open, ResponseType.Ok);
+ 
+-            if (app.Document != null) {
+-                chooser.SetCurrentFolder (System.IO.Path.GetDirectoryName (app.Document.SuggestedSavePath));
+-            } else {
+-                chooser.SetCurrentFolder (Client.Configuration.LastOpenFolder);
+-            }
+-
+             var response = chooser.Run ();
+             var filenames = chooser.Filenames;
+             chooser.Destroy ();
+@@ -266,7 +260,6 @@ namespace PdfMod.Gui
+             chooser.DoOverwriteConfirmation = true;
+             chooser.CurrentName = System.IO.Path.GetFileName (app.Document.SuggestedSavePath);
+             chooser.AddButton (Stock.SaveAs, ResponseType.Ok);
+-            chooser.SetCurrentFolder (System.IO.Path.GetDirectoryName (app.Document.SuggestedSavePath));
+ 
+             var response = chooser.Run ();
+             string filename = chooser.Filename;
+@@ -462,14 +455,12 @@ namespace PdfMod.Gui
+ 
+         void OnViewToolbar (object o, EventArgs args)
+         {
+-            bool show = (this["ViewToolbar"] as ToggleAction).Active;
+-            Client.Configuration.ShowToolbar = app.HeaderToolbar.Visible = show;
++            app.HeaderToolbar.Visible = (this["ViewToolbar"] as ToggleAction).Active;
+         }
+ 
+         void OnViewBookmarks (object o, EventArgs args)
+         {
+-            bool show = (this["ViewBookmarks"] as ToggleAction).Active;
+-            Client.Configuration.ShowBookmarks = app.BookmarkView.Visible = show;
++            app.BookmarkView.Visible = (this["ViewBookmarks"] as ToggleAction).Active;
+             if (app.BookmarkView.Visible) {
+                 app.BookmarkView.GrabFocus ();
+             }
+diff --git a/src/PdfMod/Gui/BookmarkView.cs b/src/PdfMod/Gui/BookmarkView.cs
+index 00303cd..29f9d16 100644
+--- a/src/PdfMod/Gui/BookmarkView.cs
++++ b/src/PdfMod/Gui/BookmarkView.cs
+@@ -69,8 +69,6 @@ namespace PdfMod.Gui
+             model.Clear ();
+             AddOutlineCollection (document, document.Pdf.Outlines, TreeIter.Zero);
+             UpdateActions ();
+-
+-            Visible = Client.Configuration.ShowBookmarks;
+         }
+ 
+         // Bookmark action handlers
+diff --git a/src/PdfMod/Gui/Client.cs b/src/PdfMod/Gui/Client.cs
+index d7a408b..a614dcb 100644
+--- a/src/PdfMod/Gui/Client.cs
++++ b/src/PdfMod/Gui/Client.cs
+@@ -125,8 +125,6 @@ namespace PdfMod.Gui
+             HeaderToolbar.ShowArrow = false;
+             HeaderToolbar.ToolbarStyle = ToolbarStyle.Icons;
+             HeaderToolbar.Tooltips = true;
+-            HeaderToolbar.NoShowAll = true;
+-            HeaderToolbar.Visible = Configuration.ShowToolbar;
+ 
+             // BookmarksView
+             BookmarkView = new BookmarkView (this);
+@@ -272,7 +270,6 @@ namespace PdfMod.Gui
+                 path = System.IO.Path.GetFullPath (path);
+             }
+ 
+-            Configuration.LastOpenFolder = System.IO.Path.GetDirectoryName (suggestedFilename ?? path);
+             status_label.Text = Catalog.GetString ("Loading document...");
+ 
+             ThreadAssist.SpawnFromMain (delegate {

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-09-02 17:54:01 UTC (rev 376074)
+++ PKGBUILD	2018-09-02 18:26:07 UTC (rev 376075)
@@ -4,20 +4,22 @@
 
 pkgname=pdfmod
 pkgver=0.9.1
-pkgrel=8
+pkgrel=9
 pkgdesc="Simple application for modifying PDF written in C Sharp"
 arch=('any')
 url="https://wiki.gnome.org/Apps/PdfMod"
 license=('GPL' 'MIT')
-depends=('gconf-sharp' 'poppler-glib' 'desktop-file-utils')
+depends=('gtk-sharp-2' 'poppler-glib')
 makedepends=('hyena' 'poppler-sharp' 'intltool' 'gnome-doc-utils' 'dos2unix')
 source=(https://download.gnome.org/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.bz2
         pdfmod-mono-2.10.patch
         fix-build.patch
+        Drop-gconf-dependency.patch
         LICENSE-PDFsharp)
 sha256sums=('eb7c987514a053106ddf03f26544766c751c801d87762909b36415d46bc425c9'
             'f606f29f881f7171b43fed97aab58c1e1f5b78aa96e33d1c43e2526736651acd'
             'd2ef10804b87ad843d0897cc784c95b6700583896fab95dd0646f5c79fdd0413'
+            '6a235f93ce7321cbe2e7f20094ece0659fb4648602e84a4824a0fb527be90914'
             '5d2b6e1a9e5582f9c5d129f222ff01ca6ce3dfa4a5c1f5c41ba827fe0fbeb4bd')
 
 prepare() {
@@ -27,13 +29,19 @@
   find . -type f -exec dos2unix -q '{}' \;
 
   # https://bugzilla.gnome.org/show_bug.cgi?id=644516
-  patch -Np1 -i "$srcdir/pdfmod-mono-2.10.patch"
+  patch -Np1 -i ../pdfmod-mono-2.10.patch
 
   # Workaround for build error (FS#39501)
-  patch -Np1 -i "$srcdir/fix-build.patch"
+  patch -Np1 -i ../fix-build.patch
 
+  # Remove deprecated GConf dependency
+  patch -Np1 -i ../Drop-gconf-dependency.patch
+
   # Fix build
   sed -i 's/gmcs/mcs/' configure{,.ac}
+  sed -i 's|pkglib_SCRIPTS|monolibdir = $(pkglibdir)/\nmonolib_DATA|' Makefile.include
+
+  autoreconf -fi
 }
 
 build() {



More information about the arch-commits mailing list