summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Burgos2018-11-01 11:33:54 -0600
committerSam Burgos2018-11-01 11:33:54 -0600
commitb0f92b1a26342e3640d0818692c913a109c2edcc (patch)
tree54ccd90c1391d7e7d9a6c2b856ecdcc4bf3e4a36
parent06fe35b15fb346bec5f01b5cc6984baa6096e6ca (diff)
downloadaur-b0f92b1a26342e3640d0818692c913a109c2edcc.tar.gz
updated to version 1.5.0 and added newer patch files based on the changes done upstream for APT checking
-rw-r--r--.SRCINFO12
-rw-r--r--PKGBUILD29
-rw-r--r--add_apt_checking.patch148
-rw-r--r--im_apt_check.patch98
-rw-r--r--install_remove_apt_check.patch51
-rw-r--r--mintlocale_apt_check.patch27
6 files changed, 205 insertions, 160 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 7a5ca98eb528..57ed04ba7c27 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = mintlocale
pkgdesc = Language and locale selection tool
- pkgver = 1.4.9
+ pkgver = 1.5.0
pkgrel = 1
url = http://packages.linuxmint.com/pool/main/m/mintlocale
arch = any
@@ -13,9 +13,13 @@ pkgbase = mintlocale
depends = python
depends = python-gobject
depends = xapps
- source = mintlocale-1.4.9.tar.xz::http://packages.linuxmint.com/pool/main/m/mintlocale/mintlocale_1.4.9.tar.xz
- source = add_apt_checking.patch
- sha256sums = 4c2702af5d0024589f000904f0484b232acbd0811bca47a8f1863f238cf1d1c4
+ source = mintlocale-1.5.0.tar.xz::http://packages.linuxmint.com/pool/main/m/mintlocale/mintlocale_1.5.0.tar.xz
+ source = im_apt_check.patch
+ source = install_remove_apt_check.patch
+ source = mintlocale_apt_check.patch
+ sha256sums = fea9496190553dfb58c92a50659aa927805ef60d093ec32a52a13e1e825fcd42
+ sha256sums = SKIP
+ sha256sums = SKIP
sha256sums = SKIP
pkgname = mintlocale
diff --git a/PKGBUILD b/PKGBUILD
index 7a1b60fc5ddd..8799a9a51d44 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
# Many options will remain here as leftovers in case the packaging in Github resumes once again
pkgname=mintlocale
-pkgver=1.4.9
+pkgver=1.5.0
pkgrel=1
pkgdesc="Language and locale selection tool"
arch=('any')
@@ -19,22 +19,35 @@ depends=('accountsservice'
'python-gobject'
'xapps')
#source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz"
-# "add_apt_checking.patch")
+# "im_apt_check.patch"
+# "install_remove_apt_check.patch"
+# "mintlocale_apt_check.patch")
source=("${pkgname}-${pkgver}.tar.xz::${url}/${pkgname}_${pkgver}.tar.xz"
- "add_apt_checking.patch")
-sha256sums=('4c2702af5d0024589f000904f0484b232acbd0811bca47a8f1863f238cf1d1c4'
+ "im_apt_check.patch"
+ "install_remove_apt_check.patch"
+ "mintlocale_apt_check.patch")
+sha256sums=('fea9496190553dfb58c92a50659aa927805ef60d093ec32a52a13e1e825fcd42'
+ 'SKIP'
+ 'SKIP'
'SKIP')
## Packaging via Linuxmint repository
prepare() {
cd "${pkgname}"
- # Remove the im desktop file since input methods are handled differently on Arch
- # You can still use "mintlocale im" command
+ # Remove the im desktop file and executable from this package,
+ # this is done since input methods are handled differently on Arch
rm -f 'usr/share/applications/mintlocale-im.desktop'
+ rm -f 'usr/bin/mintlocale-im'
+
+ #Added checking of APT in mintlocale so application can show proper configuration
+ #Patching "im.py" file
+ patch -Np1 -i ../im_apt_check.patch
+ #Patching "install_remove.py" file
+ patch -Np1 -i ../install_remove_apt_check.patch
+ #Patching "mintlocale.py" file
+ patch -Np1 -i ../mintlocale_apt_check.patch
- #Added checking of APT so application can show proper configuration
- patch -Np1 -i ../add_apt_checking.patch
}
package() {
diff --git a/add_apt_checking.patch b/add_apt_checking.patch
deleted file mode 100644
index 5e0544d4fcee..000000000000
--- a/add_apt_checking.patch
+++ /dev/null
@@ -1,148 +0,0 @@
-diff --git a/usr/lib/linuxmint/mintlocale/install_remove.py b/usr/lib/linuxmint/mintlocale/install_remove.py
-index 205bd5b..00e2e2d 100755
---- a/usr/lib/linuxmint/mintlocale/install_remove.py
-+++ b/usr/lib/linuxmint/mintlocale/install_remove.py
-@@ -2,12 +2,10 @@
-
- import os
- import gettext
--import apt_pkg
- import subprocess
- import tempfile
- import locale
- import codecs
--import mintcommon
-
- import gi
- gi.require_version('Gtk', '3.0')
-@@ -15,6 +13,13 @@
- from gi.repository import GdkX11
- from gi.repository import Gtk, GdkPixbuf, XApp
-
-+# Used to detect Debian derivatives (we don't want to show APT features in other distros)
-+IS_DEBIAN = os.path.exists("/etc/debian_version")
-+
-+if IS_DEBIAN:
-+ import apt_pkg
-+ import mintcommon
-+
- # i18n
- APP = 'mintlocale'
- LOCALE_DIR = "/usr/share/linuxmint/locale"
-@@ -98,7 +103,9 @@ def __init__(self):
-
- self.build_lang_list()
-
-- self.apt = mintcommon.APT(self.window)
-+
-+ if IS_DEBIAN:
-+ self.apt = mintcommon.APT(self.window)
-
- def split_locale(self, locale_code):
- if "_" in locale_code:
-@@ -244,22 +251,25 @@ def select_language(self, treeview, data=None):
-
- def button_install_clicked(self, button):
- if self.selected_language_packs is not None:
-- if self.cache_updated:
-- self.apt.set_finished_callback(self.on_install_finished)
-- self.apt.set_cancelled_callback(self.on_install_finished)
-- self.apt.install_packages(self.selected_language_packs)
-- else:
-- self.apt.set_finished_callback(self.on_update_finished)
-- self.apt.update_cache()
--
-- def on_update_finished(self, transaction=None, exit_state=None):
-- self.cache_updated = True
-- self.apt.set_finished_callback(self.on_install_finished)
-- self.apt.set_cancelled_callback(self.on_install_finished)
-- self.apt.install_packages(self.selected_language_packs)
--
-- def on_install_finished(self, transaction=None, exit_state=None):
-- self.build_lang_list()
-+ if IS_DEBIAN:
-+ if self.cache_updated:
-+ self.apt.set_finished_callback(self.on_install_finished)
-+ self.apt.set_cancelled_callback(self.on_install_finished)
-+ self.apt.install_packages(self.selected_language_packs)
-+ else:
-+ self.apt.set_finished_callback(self.on_update_finished)
-+ self.apt.update_cache()
-+
-+ if IS_DEBIAN:
-+ def on_update_finished(self, transaction=None, exit_state=None):
-+ self.cache_updated = True
-+ self.apt.set_finished_callback(self.on_install_finished)
-+ self.apt.set_cancelled_callback(self.on_install_finished)
-+ self.apt.install_packages(self.selected_language_packs)
-+
-+ if IS_DEBIAN:
-+ def on_install_finished(self, transaction=None, exit_state=None):
-+ self.build_lang_list()
-
- def button_add_clicked(self, button):
- os.system("/usr/lib/linuxmint/mintlocale/add.py")
-@@ -284,8 +294,9 @@ def button_remove_clicked(self, button):
- print(pkgname)
-
- if len(installed_packs) > 0:
-- self.apt.set_finished_callback(self.on_install_finished)
-- self.apt.remove_packages(installed_packs)
-+ if IS_DEBIAN:
-+ self.apt.set_finished_callback(self.on_install_finished)
-+ self.apt.remove_packages(installed_packs)
-
- self.build_lang_list()
-
-diff --git a/usr/lib/linuxmint/mintlocale/mintlocale.py b/usr/lib/linuxmint/mintlocale/mintlocale.py
-index cd75f75..87e0c47 100755
---- a/usr/lib/linuxmint/mintlocale/mintlocale.py
-+++ b/usr/lib/linuxmint/mintlocale/mintlocale.py
-@@ -8,7 +8,6 @@
- import tempfile
- import subprocess
- import codecs
--import mintcommon
-
- try:
- import _thread as thread
-@@ -33,6 +32,7 @@
-
- if IS_DEBIAN:
- import apt
-+ import mintcommon
-
- # i18n
- APP = 'mintlocale'
-@@ -64,7 +64,8 @@ def __init__(self, codename, name, methods, app):
- self.app = app
- self.packages = []
- self.missing_packages = []
-- self.apt = mintcommon.APT(self.app.window)
-+ if IS_DEBIAN:
-+ self.apt = mintcommon.APT(self.app.window)
-
- self.label = Gtk.Label()
- self.label.set_markup(name)
-@@ -107,13 +108,14 @@ def __init__(self, codename, name, methods, app):
- def install(self, widget):
- if len(self.missing_packages) > 0:
- self.app.lock_input_methods()
-- if self.app.cache_updated:
-- self.apt.set_finished_callback(self.on_install_finished)
-- self.apt.set_cancelled_callback(self.on_install_finished)
-- self.apt.install_packages(self.missing_packages)
-- else:
-- self.apt.set_finished_callback(self.on_update_finished)
-- self.apt.update_cache()
-+ if IS_DEBIAN:
-+ if self.app.cache_updated:
-+ self.apt.set_finished_callback(self.on_install_finished)
-+ self.apt.set_cancelled_callback(self.on_install_finished)
-+ self.apt.install_packages(self.missing_packages)
-+ else:
-+ self.apt.set_finished_callback(self.on_update_finished)
-+ self.apt.update_cache()
-
- def on_update_finished(self, transaction=None, exit_state=None):
- self.app.cache_updated = True
diff --git a/im_apt_check.patch b/im_apt_check.patch
new file mode 100644
index 000000000000..cf46c6210442
--- /dev/null
+++ b/im_apt_check.patch
@@ -0,0 +1,98 @@
+--- a/usr/lib/linuxmint/mintlocale/im.py
++++ b/usr/lib/linuxmint/mintlocale/im.py
+@@ -1,9 +1,7 @@
+ #!/usr/bin/python3
+-import apt
+ import codecs
+ import gettext
+ import locale
+-import mintcommon
+ import os
+
+ try:
+@@ -14,10 +12,18 @@
+ import gi
+ gi.require_version('Gtk', '3.0')
+ gi.require_version('AccountsService', '1.0')
++gi.require_version('XApp', '1.0')
+ from gi.repository import GdkX11
+ from gi.repository import Gtk, GObject, Gio, AccountsService, GLib, Gdk, GdkPixbuf, XApp
+
+ from ImConfig.ImConfig import ImConfig
++
++# Used to detect Debian derivatives (we don't want to show APT features in other distros)
++IS_DEBIAN = os.path.exists("/etc/debian_version")
++
++if IS_DEBIAN:
++ import apt
++ import mintcommon
+
+ # i18n
+ APP = 'mintlocale'
+@@ -37,7 +43,8 @@
+ self.app = app
+ self.packages = []
+ self.missing_packages = []
+- self.apt = mintcommon.APT(self.app.window)
++ if IS_DEBIAN:
++ self.apt = mintcommon.APT(self.app.window)
+ self.button = button
+ self.button.connect('clicked', self.install)
+ self.button.set_sensitive(False)
+@@ -58,24 +65,27 @@
+ self.packages.append(line)
+
+ def install(self, widget):
+- if len(self.missing_packages) > 0:
+- self.app.lock_ui()
+- if self.app.cache_updated:
+- self.apt.set_finished_callback(self.on_install_finished)
+- self.apt.set_cancelled_callback(self.on_install_finished)
+- self.apt.install_packages(self.missing_packages)
+- else:
+- self.apt.set_finished_callback(self.on_update_finished)
+- self.apt.update_cache()
+-
+- def on_update_finished(self, transaction=None, exit_state=None):
+- self.app.cache_updated = True
+- self.apt.set_finished_callback(self.on_install_finished)
+- self.apt.set_cancelled_callback(self.on_install_finished)
+- self.apt.install_packages(self.missing_packages)
+-
+- def on_install_finished(self, transaction=None, exit_state=None):
+- self.app.check_input_methods()
++ if IS_DEBIAN:
++ if len(self.missing_packages) > 0:
++ self.app.lock_ui()
++ if self.app.cache_updated:
++ self.apt.set_finished_callback(self.on_install_finished)
++ self.apt.set_cancelled_callback(self.on_install_finished)
++ self.apt.install_packages(self.missing_packages)
++ else:
++ self.apt.set_finished_callback(self.on_update_finished)
++ self.apt.update_cache()
++
++ if IS_DEBIAN:
++ def on_update_finished(self, transaction=None, exit_state=None):
++ self.app.cache_updated = True
++ self.apt.set_finished_callback(self.on_install_finished)
++ self.apt.set_cancelled_callback(self.on_install_finished)
++ self.apt.install_packages(self.missing_packages)
++
++ if IS_DEBIAN:
++ def on_install_finished(self, transaction=None, exit_state=None):
++ self.app.check_input_methods()
+
+ def update_status(self, cache):
+ self.missing_packages = []
+@@ -105,7 +115,8 @@
+ self.locale_path='/etc/locale.conf'
+
+ # Prepare the APT cache
+- self.cache = apt.Cache()
++ if IS_DEBIAN:
++ self.cache = apt.Cache()
+ self.cache_updated = False
+
+ # load our glade ui file in
+
diff --git a/install_remove_apt_check.patch b/install_remove_apt_check.patch
new file mode 100644
index 000000000000..77fe384e7b45
--- /dev/null
+++ b/install_remove_apt_check.patch
@@ -0,0 +1,51 @@
+--- a/usr/lib/linuxmint/mintlocale/install_remove.py
++++ b/usr/lib/linuxmint/mintlocale/install_remove.py
+@@ -2,18 +2,23 @@
+
+ import os
+ import gettext
+-import apt_pkg
+ import subprocess
+ import tempfile
+ import locale
+ import codecs
+-import mintcommon
+
+ import gi
+ gi.require_version('Gtk', '3.0')
+ gi.require_version('XApp', '1.0')
+ from gi.repository import GdkX11
+ from gi.repository import Gtk, GdkPixbuf, XApp
++
++# Used to detect Debian derivatives (we don't want to show APT features in other distros)
++IS_DEBIAN = os.path.exists("/etc/debian_version")
++
++if IS_DEBIAN:
++ import apt_pkg
++ import mintcommon
+
+ # i18n
+ APP = 'mintlocale'
+@@ -56,8 +61,9 @@
+ else:
+ self.language_packs.append(LanguagePack(category, language, dependency, package))
+
+- apt_pkg.init()
+- self.cache = apt_pkg.Cache(None)
++ if IS_DEBIAN:
++ apt_pkg.init()
++ self.cache = apt_pkg.Cache(None)
+ self.cache_updated = False
+
+
+@@ -130,7 +136,8 @@
+ return (language_code, country_code, language_label)
+
+ def build_lang_list(self):
+- self.cache = apt_pkg.Cache(None)
++ if IS_DEBIAN:
++ self.cache = apt_pkg.Cache(None)
+
+ self.builder.get_object('button_install').set_sensitive(False)
+ self.builder.get_object('button_remove').set_sensitive(False)
+
diff --git a/mintlocale_apt_check.patch b/mintlocale_apt_check.patch
new file mode 100644
index 000000000000..7570f6fd5cf6
--- /dev/null
+++ b/mintlocale_apt_check.patch
@@ -0,0 +1,27 @@
+--- a/usr/lib/linuxmint/mintlocale/mintlocale.py
++++ b/usr/lib/linuxmint/mintlocale/mintlocale.py
+@@ -8,7 +8,6 @@
+ import tempfile
+ import subprocess
+ import codecs
+-import mintcommon
+
+ try:
+ import configparser
+@@ -18,6 +17,7 @@
+ import gi
+ gi.require_version('Gtk', '3.0')
+ gi.require_version('AccountsService', '1.0')
++gi.require_version('XApp', '1.0')
+ from gi.repository import GdkX11
+ from gi.repository import Gtk, Gio, AccountsService, GLib, GdkPixbuf, XApp
+
+@@ -28,6 +28,7 @@
+
+ if IS_DEBIAN:
+ import apt
++ import mintcommon
+
+ # i18n
+ APP = 'mintlocale'
+