1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-18 00:10:04 +00:00

x11/py-caffeine-ng: update to 4.2.0

While here:
- delete test target since it is not offered by upstream anymore
- make portclippy happy

Changelog: https://codeberg.org/WhyNotHugo/caffeine-ng/src/tag/v4.2.0/CHANGELOG.rst
This commit is contained in:
Hiroki Tagato 2024-01-17 08:52:44 +09:00
parent 71dbd85b88
commit f99755cf7c
5 changed files with 117 additions and 67 deletions

View File

@ -1,8 +1,9 @@
PORTNAME= caffeine-ng
DISTVERSION= 4.0.2
PORTREVISION= 3
DISTVERSIONPREFIX= v
DISTVERSION= 4.2.0
DISTVERSIONSUFFIX= -0-g5027f55
CATEGORIES= x11 python
MASTER_SITES= PYPI
MASTER_SITES= https://codeberg.org/WhyNotHugo/${PORTNAME}/releases/download/${DISTVERSIONPREFIX}${DISTVERSION}/
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= tagattie@FreeBSD.org
@ -14,54 +15,34 @@ LICENSE_COMB= multi
LICENSE_FILE_GPLv3+ = ${WRKSRC}/LICENCE
LICENSE_FILE_LGPL3+ = ${WRKSRC}/LGPL
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools_scm>0:devel/py-setuptools_scm@${PY_FLAVOR}
LIB_DEPENDS= libappindicator3.so:devel/libappindicator \
libnotify.so:devel/libnotify
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}click7>=7.1:devel/py-click7@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}ewmh>=0.1.4:devel/py-ewmh@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}xdg>=0.25:devel/py-xdg@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}setproctitle>=1.1.10:devel/py-setproctitle@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}wheel>=0.29.0:devel/py-wheel@${PY_FLAVOR} \
PY_DEPENDS= ${PYTHON_PKGNAMEPREFIX}click>0:devel/py-click@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}dbus>0:devel/py-dbus@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}ewmh>0:devel/py-ewmh@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pulsectl>0:audio/py-pulsectl@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}dbus>0:devel/py-dbus@${PY_FLAVOR}
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}tox>0:devel/py-tox@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}flake8>0:devel/py-flake8@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}flake8-bugbear>0:devel/py-flake8-bugbear@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}flake8-import-order>0:devel/py-flake8-import-order@${PY_FLAVOR}
${PYTHON_PKGNAMEPREFIX}setproctitle>0:devel/py-setproctitle@${PY_FLAVOR}
BUILD_DEPENDS= ${PY_DEPENDS} \
scdoc:textproc/scdoc
LIB_DEPENDS= libayatana-appindicator3.so:devel/libayatana-appindicator \
libnotify.so:devel/libnotify
RUN_DEPENDS= ${PY_DEPENDS}
USES= desktop-file-utils gettext-tools gnome python
USES= gettext-tools gnome meson pkgconfig python
USE_GNOME= gdkpixbuf2 gtk30 pygobject3
USE_PYTHON= autoplist distutils
GLIB_SCHEMAS= net.launchpad.caffeine.gschema.xml
BINARY_ALIAS= python3=${PYTHON_CMD}
NO_ARCH= yes
GLIB_SCHEMAS= net.launchpad.caffeine.gschema.xml
PORTDOCS= CHANGELOG.rst README.md
OPTIONS_DEFINE= DOCS
PORTDOCS= README.rst
REINPLACE_ARGS= -i ""
SCHEMASDIR= share/glib-2.0/schemas
post-patch:
${REINPLACE_CMD} -e 's|/usr|${LOCALBASE}|g; s|/etc|${LOCALBASE}/etc|g' \
${WRKSRC}/setup.py
${REINPLACE_CMD} -e "s|/etc|${LOCALBASE}/etc|g; \
s|python.full_path()|'${PYTHON_CMD}'|g" ${WRKSRC}/meson.build
post-install:
${MKDIR} ${STAGEDIR}${PREFIX}/${SCHEMASDIR}
.for schema in ${GLIB_SCHEMAS}
${INSTALL_DATA} ${WRKSRC}/${SCHEMASDIR}/${schema} ${STAGEDIR}${PREFIX}/${SCHEMASDIR}
.endfor
post-install-DOCS-on:
${MKDIR} ${STAGEDIR}${DOCSDIR}
.for doc in ${PORTDOCS}
${INSTALL_MAN} ${WRKSRC}/${doc} ${STAGEDIR}${DOCSDIR}
.endfor
do-test:
cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m tox
do-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_MAN} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1658886222
SHA256 (caffeine-ng-4.0.2.tar.gz) = ba62235c9d1eb7a3e2e448e3f7a43e66188a4beca3edbb206f8b905ba626eab5
SIZE (caffeine-ng-4.0.2.tar.gz) = 163529
TIMESTAMP = 1705404140
SHA256 (caffeine-ng-v4.2.0-0-g5027f55.tar.gz) = 32727416837fa0a705e8aa76c966194f9bae8b1a897ffa62bf1fb7db7f374e2b
SIZE (caffeine-ng-v4.2.0-0-g5027f55.tar.gz) = 131741

View File

@ -1,4 +1,4 @@
--- caffeine/cli.py.orig 2022-07-27 02:03:53 UTC
--- caffeine/cli.py.orig 2023-03-09 15:23:08 UTC
+++ caffeine/cli.py
@@ -1,4 +1,4 @@
-import ctypes
@ -6,7 +6,7 @@
import logging
import signal
@@ -20,8 +20,8 @@ def cli(ctx, verbose):
@@ -21,8 +21,8 @@ def cli(ctx, verbose):
signal.signal(signal.SIGINT, signal.SIG_DFL)
# register the process id as 'caffeine'

View File

@ -1,21 +0,0 @@
--- setup.py.orig 2021-01-01 14:03:23 UTC
+++ setup.py
@@ -7,13 +7,16 @@ from setuptools import setup
def get_data_files():
+ # Let FreeBSD port handle glib schema file to avoid plist error
+ black_list = ['net.launchpad.caffeine.gschema.xml']
data_files = []
for path, _dirs, files in walk("share"):
target_path = os.path.join("/usr", path)
- if files:
- data_files.append((target_path, [os.path.join(path, f) for f in files]))
+ tl = [os.path.join(path, f) for f in files if f not in black_list]
+ if tl:
+ data_files.append((target_path, tl))
# Install all icons for the package into /usr/share as well.
# This is because the .desktop file actually uses them too.

View File

@ -0,0 +1,90 @@
bin/caffeine
etc/xdg/autostart/caffeine.desktop
%%PYTHON_SITELIBDIR%%/caffeine/__init__.py
%%PYTHON_SITELIBDIR%%/caffeine/__main__.py
%%PYTHON_SITELIBDIR%%/caffeine/applicationinstance.py
%%PYTHON_SITELIBDIR%%/caffeine/cli.py
%%PYTHON_SITELIBDIR%%/caffeine/core.py
%%PYTHON_SITELIBDIR%%/caffeine/icons.py
%%PYTHON_SITELIBDIR%%/caffeine/inhibitors.py
%%PYTHON_SITELIBDIR%%/caffeine/main.py
%%PYTHON_SITELIBDIR%%/caffeine/paths.py
%%PYTHON_SITELIBDIR%%/caffeine/procmanager.py
%%PYTHON_SITELIBDIR%%/caffeine/triggers.py
%%PYTHON_SITELIBDIR%%/caffeine/utils.py
%%PYTHON_SITELIBDIR%%/caffeine/version.py
share/applications/caffeine.desktop
share/caffeine/glade/GUI.glade
share/caffeine/glade/proc.glade
share/caffeine/images/Empty_Cup.svg
share/caffeine/images/Full_Cup.svg
share/caffeine/images/application-x-executable.png
share/icons/hicolor/16x16/apps/caffeine.png
share/icons/hicolor/16x16/status/caffeine-cup-empty.png
share/icons/hicolor/16x16/status/caffeine-cup-full.png
share/icons/hicolor/22x22/apps/caffeine.png
share/icons/hicolor/22x22/status/caffeine-cup-empty.png
share/icons/hicolor/22x22/status/caffeine-cup-full.png
share/icons/hicolor/24x24/apps/caffeine.png
share/icons/hicolor/24x24/status/caffeine-cup-empty.png
share/icons/hicolor/24x24/status/caffeine-cup-full.png
share/icons/hicolor/32x32/apps/caffeine.png
share/icons/hicolor/32x32/status/caffeine-cup-empty.png
share/icons/hicolor/32x32/status/caffeine-cup-full.png
share/icons/hicolor/48x48/apps/caffeine.png
share/icons/hicolor/48x48/status/caffeine-cup-empty.png
share/icons/hicolor/48x48/status/caffeine-cup-full.png
share/icons/hicolor/scalable/apps/caffeine.svg
share/icons/hicolor/scalable/status/caffeine-cup-empty.svg
share/icons/hicolor/scalable/status/caffeine-cup-full.svg
share/icons/ubuntu-mono-dark/status/16/caffeine-cup-empty.png
share/icons/ubuntu-mono-dark/status/16/caffeine-cup-full.png
share/icons/ubuntu-mono-dark/status/22/caffeine-cup-empty.png
share/icons/ubuntu-mono-dark/status/22/caffeine-cup-full.png
share/icons/ubuntu-mono-dark/status/24/caffeine-cup-empty.png
share/icons/ubuntu-mono-dark/status/24/caffeine-cup-full.png
share/icons/ubuntu-mono-dark/status/32/caffeine-cup-empty.png
share/icons/ubuntu-mono-dark/status/32/caffeine-cup-full.png
share/icons/ubuntu-mono-dark/status/48/caffeine-cup-empty.png
share/icons/ubuntu-mono-dark/status/48/caffeine-cup-full.png
share/icons/ubuntu-mono-dark/status/scalable/caffeine-cup-empty.svg
share/icons/ubuntu-mono-dark/status/scalable/caffeine-cup-full.svg
share/locale/ar/LC_MESSAGES/caffeine-ng.mo
share/locale/be/LC_MESSAGES/caffeine-ng.mo
share/locale/bg/LC_MESSAGES/caffeine-ng.mo
share/locale/bs/LC_MESSAGES/caffeine-ng.mo
share/locale/ca/LC_MESSAGES/caffeine-ng.mo
share/locale/cs/LC_MESSAGES/caffeine-ng.mo
share/locale/da/LC_MESSAGES/caffeine-ng.mo
share/locale/de/LC_MESSAGES/caffeine-ng.mo
share/locale/el/LC_MESSAGES/caffeine-ng.mo
share/locale/en_GB/LC_MESSAGES/caffeine-ng.mo
share/locale/eo/LC_MESSAGES/caffeine-ng.mo
share/locale/es/LC_MESSAGES/caffeine-ng.mo
share/locale/eu/LC_MESSAGES/caffeine-ng.mo
share/locale/fi/LC_MESSAGES/caffeine-ng.mo
share/locale/fr/LC_MESSAGES/caffeine-ng.mo
share/locale/gl/LC_MESSAGES/caffeine-ng.mo
share/locale/he/LC_MESSAGES/caffeine-ng.mo
share/locale/hu/LC_MESSAGES/caffeine-ng.mo
share/locale/it/LC_MESSAGES/caffeine-ng.mo
share/locale/ja/LC_MESSAGES/caffeine-ng.mo
share/locale/lt/LC_MESSAGES/caffeine-ng.mo
share/locale/ms/LC_MESSAGES/caffeine-ng.mo
share/locale/nl/LC_MESSAGES/caffeine-ng.mo
share/locale/no/LC_MESSAGES/caffeine-ng.mo
share/locale/pl/LC_MESSAGES/caffeine-ng.mo
share/locale/pt/LC_MESSAGES/caffeine-ng.mo
share/locale/pt_BR/LC_MESSAGES/caffeine-ng.mo
share/locale/ro/LC_MESSAGES/caffeine-ng.mo
share/locale/ru/LC_MESSAGES/caffeine-ng.mo
share/locale/sk/LC_MESSAGES/caffeine-ng.mo
share/locale/sv/LC_MESSAGES/caffeine-ng.mo
share/locale/th/LC_MESSAGES/caffeine-ng.mo
share/locale/tr/LC_MESSAGES/caffeine-ng.mo
share/locale/uk/LC_MESSAGES/caffeine-ng.mo
share/locale/vi/LC_MESSAGES/caffeine-ng.mo
share/locale/xh/LC_MESSAGES/caffeine-ng.mo
share/locale/zh_TW/LC_MESSAGES/caffeine-ng.mo
share/man/man1/caffeine/caffeine.1.gz
share/pixmaps/caffeine.png