diff options
author | Luca Weiss | 2019-11-14 23:51:11 +0100 |
---|---|---|
committer | Luca Weiss | 2019-11-14 23:51:11 +0100 |
commit | b3edd3cfefc7e63f871f08151b45f49709af46cf (patch) | |
tree | bc2246635f0ea12cc7f75765f03caa167eba2494 | |
parent | b75bbc69091592a6232266b7106732fcb15c9c42 (diff) | |
download | aur-b3edd3cfefc7e63f871f08151b45f49709af46cf.tar.gz |
upgpkg: polychromatic 0.3.12-2
add patch for python 3.8
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | 0001-Migrate-platform-module-to-distro-v0.3.12.patch | 61 | ||||
-rw-r--r-- | PKGBUILD | 19 |
3 files changed, 78 insertions, 8 deletions
@@ -1,10 +1,10 @@ pkgbase = polychromatic pkgdesc = A graphical front end for managing Razer peripherals under GNU/Linux. pkgver = 0.3.12 - pkgrel = 1 + pkgrel = 2 url = https://github.com/polychromatic/polychromatic arch = any - license = GPL2 + license = GPL3 makedepends = nodejs-less depends = python depends = hicolor-icon-theme @@ -13,7 +13,9 @@ pkgbase = polychromatic depends = libappindicator-gtk3 depends = imagemagick source = polychromatic-v0.3.12.tar.gz::https://github.com/polychromatic/polychromatic/archive/v0.3.12.tar.gz + source = 0001-Migrate-platform-module-to-distro-v0.3.12.patch sha512sums = e4099408f1543436ac8d1145f34631af59086542ba16c1f7b729f422d6555f5ce0ecfa0b49917cf73c88a0bf2467684001242b230833e994fa8c164c43fdad52 + sha512sums = a73552e795ad3c418b478f6ee203cb301f059319f07f630371f7f218a64e4efd9ca2173f1b4aa4f5cbfd41f7a37b996ec7ae91644d2fa2c484802138cb577766 pkgname = polychromatic diff --git a/0001-Migrate-platform-module-to-distro-v0.3.12.patch b/0001-Migrate-platform-module-to-distro-v0.3.12.patch new file mode 100644 index 000000000000..222902ff73c9 --- /dev/null +++ b/0001-Migrate-platform-module-to-distro-v0.3.12.patch @@ -0,0 +1,61 @@ +From 493d5cb821b2b5f41f0cfba8e23d7f16cf170e9a Mon Sep 17 00:00:00 2001 +From: Luke Horwell <code@horwell.me> +Date: Thu, 14 Nov 2019 21:04:40 +0000 +Subject: [PATCH] Migrate 'platform' module to 'distro' (v0.3.12) + +'platform' was dropped in Python 3.8. + +Addresses #183 +--- + polychromatic-controller | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/polychromatic-controller b/polychromatic-controller +index 26ff445..c8694c9 100755 +--- a/polychromatic-controller ++++ b/polychromatic-controller +@@ -23,6 +23,7 @@ Main application for Polychromatic, a GUI for interfacing with Razer devices. + Requires openrazer-daemon to be installed and running on the system. + """ + ++import distro + import os + import sys + import glob +@@ -34,7 +35,6 @@ import argparse + from setproctitle import setproctitle + from subprocess import Popen as background_process + from subprocess import check_output +-from platform import linux_distribution + + try: + import openrazer.client as rclient +@@ -2184,9 +2184,9 @@ class PageLoaded(): + appobj.update_device_active_options() + + # Show message about the old PPA being deprecated. +- distro = linux_distribution()[0] +- if distro == "Ubuntu" or distro == "Debian": +- codename = linux_distribution()[2] ++ distro_name = distro.linux_distribution()[0] ++ if distro_name == "Ubuntu" or distro_name == "Debian": ++ codename = distro.codename + for source_file in [ + "/etc/apt/sources.list.d/lah7-ubuntu-polychromatic-" + codename + ".list", + "/etc/apt/sources.list.d/lah7-ubuntu-polychromatic-daily-" + codename + ".list" +@@ -2228,9 +2228,9 @@ class PageLoaded(): + html += UIControls.print_about_label(_("Profile:"), "v" + str(prof.version)) + + # For Apt, check for the source file to determine builds. +- distro = linux_distribution()[0] +- if distro == "Ubuntu" or distro == "Debian": +- codename = linux_distribution()[2] ++ distro_name = distro.linux_distribution()[0] ++ if distro_name == "Ubuntu" or distro_name == "Debian": ++ codename = distro.codename() + source_html = "" + + source_file = "/etc/apt/sources.list.d/lah7-ubuntu-polychromatic-" + codename + ".list" +-- +2.24.0 + @@ -2,18 +2,25 @@ pkgname=polychromatic pkgver=0.3.12 -pkgrel=1 +pkgrel=2 pkgdesc='A graphical front end for managing Razer peripherals under GNU/Linux.' arch=('any') -license=('GPL2') -source=("$pkgname-v$pkgver.tar.gz::https://github.com/polychromatic/polychromatic/archive/v$pkgver.tar.gz") url='https://github.com/polychromatic/polychromatic' -makedepends=('nodejs-less') +license=('GPL3') depends=('python' 'hicolor-icon-theme' 'python-openrazer' 'webkit2gtk' 'libappindicator-gtk3' 'imagemagick') -sha512sums=('e4099408f1543436ac8d1145f34631af59086542ba16c1f7b729f422d6555f5ce0ecfa0b49917cf73c88a0bf2467684001242b230833e994fa8c164c43fdad52') +makedepends=('nodejs-less') +source=("$pkgname-v$pkgver.tar.gz::https://github.com/polychromatic/polychromatic/archive/v$pkgver.tar.gz" + "0001-Migrate-platform-module-to-distro-v0.3.12.patch") +sha512sums=('e4099408f1543436ac8d1145f34631af59086542ba16c1f7b729f422d6555f5ce0ecfa0b49917cf73c88a0bf2467684001242b230833e994fa8c164c43fdad52' + 'a73552e795ad3c418b478f6ee203cb301f059319f07f630371f7f218a64e4efd9ca2173f1b4aa4f5cbfd41f7a37b996ec7ae91644d2fa2c484802138cb577766') + +prepare() { + cd "$pkgname-$pkgver" + patch -Np1 < ../0001-Migrate-platform-module-to-distro-v0.3.12.patch +} package() { - cd $pkgname-$pkgver + cd "$pkgname-$pkgver" make PREFIX=/usr DESTDIR="$pkgdir" install } |