mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-19 20:13:01 -04:00
app-misc/brightness-control: new pack: Qt Brightness Controller
Package-Manager: Portage-3.0.14, Repoman-3.0.2 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@riseup.net>
This commit is contained in:
1
app-misc/brightness-control/Manifest
Normal file
1
app-misc/brightness-control/Manifest
Normal file
@@ -0,0 +1 @@
|
||||
DIST brightness-control-2.0_p20200629.tar.gz 285708 BLAKE2B 2b886e14c42b40d2e6bb66e2cb5ab08fe18403430b69dc0b42be9c4126ed6caa4edf85451a30d5b1160c1da0c0205b2d2cf232ec3d805062b2d332a880bcf17b SHA512 064423512a1492fce20ad5efe4751fd68b2c3dc06a71f0afd5c2d598843daea3e4d1eaebeb9142a93c37f998c3b1ff5d20a5b5b087bd16bc85de5169f219de49
|
||||
@@ -0,0 +1,40 @@
|
||||
# Copyright 2019-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{7,8} )
|
||||
DISTUTILS_SINGLE_IMPL=1
|
||||
|
||||
inherit distutils-r1 desktop
|
||||
|
||||
COMMIT="39c297e98621e4604e8fbeb4a155a224418460ed"
|
||||
|
||||
DESCRIPTION="Qt Brightness Controller in Python"
|
||||
HOMEPAGE="https://github.com/lordamit/Brightness"
|
||||
SRC_URI="https://github.com/lordamit/Brightness/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
LICENSE="GPL-1"
|
||||
SLOT="0"
|
||||
|
||||
BDEPEND="$(python_gen_cond_dep \
|
||||
'dev-python/cx_Freeze[${PYTHON_USEDEP}]'
|
||||
)"
|
||||
|
||||
RDEPEND="$(python_gen_cond_dep \
|
||||
'dev-python/QtPy[${PYTHON_USEDEP}]'
|
||||
)"
|
||||
|
||||
S="${WORKDIR}/Brightness-${COMMIT}/src"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-use-qtpy.patch"
|
||||
)
|
||||
|
||||
python_install_all () {
|
||||
distutils-r1_python_install_all
|
||||
|
||||
doicon -s scalable icons/brightness-controller.svg
|
||||
make_desktop_entry brightness "Brightness Controller" brightness-controller Settings
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
diff --git a//init.py b//init.py
|
||||
index 495c15d..1670972 100755
|
||||
--- a//init.py
|
||||
+++ b//init.py
|
||||
@@ -19,9 +19,9 @@
|
||||
import sys
|
||||
import getpass
|
||||
from os import path, remove, makedirs
|
||||
-from PySide2 import QtGui, QtCore, QtWidgets
|
||||
-from PySide2.QtCore import QSize
|
||||
-from PySide2.QtGui import QIcon
|
||||
+from qtpy import QtGui, QtCore, QtWidgets
|
||||
+from qtpy.QtCore import QSize
|
||||
+from qtpy.QtGui import QIcon
|
||||
from util.QtSingleApplication import QtSingleApplication
|
||||
from ui.mainwindow import Ui_MainWindow
|
||||
from ui.license import Ui_Form as License_Ui_Form
|
||||
diff --git a//ui/about.py b//ui/about.py
|
||||
index 248eae8..30d6f72 100644
|
||||
--- a//ui/about.py
|
||||
+++ b//ui/about.py
|
||||
@@ -8,12 +8,12 @@
|
||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
################################################################################
|
||||
|
||||
-from PySide2.QtCore import (QCoreApplication, QDate, QDateTime, QMetaObject,
|
||||
+from qtpy.QtCore import (QCoreApplication, QDate, QDateTime, QMetaObject,
|
||||
QObject, QPoint, QRect, QSize, QTime, QUrl, Qt)
|
||||
-from PySide2.QtGui import (QBrush, QColor, QConicalGradient, QCursor, QFont,
|
||||
+from qtpy.QtGui import (QBrush, QColor, QConicalGradient, QCursor, QFont,
|
||||
QFontDatabase, QIcon, QKeySequence, QLinearGradient, QPalette, QPainter,
|
||||
QPixmap, QRadialGradient)
|
||||
-from PySide2.QtWidgets import *
|
||||
+from qtpy.QtWidgets import *
|
||||
|
||||
|
||||
class Ui_Form(object):
|
||||
diff --git a//ui/help.py b//ui/help.py
|
||||
index 1eba729..a458f0e 100644
|
||||
--- a//ui/help.py
|
||||
+++ b//ui/help.py
|
||||
@@ -8,12 +8,12 @@
|
||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
################################################################################
|
||||
|
||||
-from PySide2.QtCore import (QCoreApplication, QMetaObject, QObject, QPoint,
|
||||
+from qtpy.QtCore import (QCoreApplication, QMetaObject, QObject, QPoint,
|
||||
QRect, QSize, QUrl, Qt)
|
||||
-from PySide2.QtGui import (QBrush, QColor, QConicalGradient, QCursor, QFont,
|
||||
+from qtpy.QtGui import (QBrush, QColor, QConicalGradient, QCursor, QFont,
|
||||
QFontDatabase, QIcon, QLinearGradient, QPalette, QPainter, QPixmap,
|
||||
QRadialGradient)
|
||||
-from PySide2.QtWidgets import *
|
||||
+from qtpy.QtWidgets import *
|
||||
|
||||
|
||||
class Ui_Form(object):
|
||||
diff --git a//ui/license.py b//ui/license.py
|
||||
index 7cfa021..370992b 100644
|
||||
--- a//ui/license.py
|
||||
+++ b//ui/license.py
|
||||
@@ -8,12 +8,12 @@
|
||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
################################################################################
|
||||
|
||||
-from PySide2.QtCore import (QCoreApplication, QMetaObject, QObject, QPoint,
|
||||
+from qtpy.QtCore import (QCoreApplication, QMetaObject, QObject, QPoint,
|
||||
QRect, QSize, QUrl, Qt)
|
||||
-from PySide2.QtGui import (QBrush, QColor, QConicalGradient, QCursor, QFont,
|
||||
+from qtpy.QtGui import (QBrush, QColor, QConicalGradient, QCursor, QFont,
|
||||
QFontDatabase, QIcon, QLinearGradient, QPalette, QPainter, QPixmap,
|
||||
QRadialGradient)
|
||||
-from PySide2.QtWidgets import *
|
||||
+from qtpy.QtWidgets import *
|
||||
|
||||
|
||||
class Ui_Form(object):
|
||||
diff --git a//ui/mainwindow.py b//ui/mainwindow.py
|
||||
index f8ccf11..4d50ff6 100644
|
||||
--- a//ui/mainwindow.py
|
||||
+++ b//ui/mainwindow.py
|
||||
@@ -8,12 +8,12 @@
|
||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
################################################################################
|
||||
|
||||
-from PySide2.QtCore import (QCoreApplication, QMetaObject, QObject, QPoint,
|
||||
+from qtpy.QtCore import (QCoreApplication, QMetaObject, QObject, QPoint,
|
||||
QRect, QSize, QUrl, Qt)
|
||||
-from PySide2.QtGui import (QBrush, QColor, QConicalGradient, QCursor, QFont,
|
||||
+from qtpy.QtGui import (QBrush, QColor, QConicalGradient, QCursor, QFont,
|
||||
QFontDatabase, QIcon, QLinearGradient, QPalette, QPainter, QPixmap,
|
||||
QRadialGradient)
|
||||
-from PySide2.QtWidgets import *
|
||||
+from qtpy.QtWidgets import *
|
||||
|
||||
|
||||
class Ui_MainWindow(object):
|
||||
diff --git a//util/QtSingleApplication.py b//util/QtSingleApplication.py
|
||||
index 4dec38f..13a01a6 100644
|
||||
--- a//util/QtSingleApplication.py
|
||||
+++ b//util/QtSingleApplication.py
|
||||
@@ -1,11 +1,11 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
-from PySide2.QtCore import Signal, QTextStream, Qt
|
||||
-# from PySide2.QtGui import *
|
||||
-from PySide2.QtNetwork import QLocalSocket, QLocalServer
|
||||
-from PySide2.QtWidgets import QApplication
|
||||
+from qtpy.QtCore import Signal, QTextStream, Qt
|
||||
+# from qtpy.QtGui import *
|
||||
+from qtpy.QtNetwork import QLocalSocket, QLocalServer
|
||||
+from qtpy.QtWidgets import QApplication
|
||||
|
||||
""" Python 2.7 implementation of the C++ QtSingleApplication interface
|
||||
- Note: This is Python 3 implementation of the above, using Pyside2 - Archisman Panigrahi <apandada1@gmail.com>
|
||||
+ Note: This is Python 3 implementation of the above, using qtpy - Archisman Panigrahi <apandada1@gmail.com>
|
||||
Copyright 2013, Johan Råde
|
||||
All rights reserved.
|
||||
|
||||
8
app-misc/brightness-control/metadata.xml
Normal file
8
app-misc/brightness-control/metadata.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>andrewammerlaan@riseup.net</email>
|
||||
<name>Andrew Ammerlaan</name>
|
||||
</maintainer>
|
||||
</pkgmetadata>
|
||||
Reference in New Issue
Block a user