Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gajim: update to 1.9.3, update its python dependencies #25501

Merged
merged 7 commits into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 30 additions & 15 deletions net/gajim/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ PortGroup gitlab 1.0
PortGroup python 1.0

gitlab.instance https://dev.gajim.org
gitlab.setup gajim gajim 1.8.4
gitlab.setup gajim gajim 1.9.3
revision 0

categories net chat x11
Expand All @@ -24,40 +24,55 @@ supported_archs noarch
master_sites https://dev.gajim.org/gajim/gajim/-/archive/${version}/
use_bzip2 yes

checksums rmd160 050c844f9f2dc4682f2b6597b3ef4ad642e9c416 \
sha256 50d1f5f5376e52c2fb1d481b790877f19ed987d68ea9f39c915dd16286b6837d \
size 3076987
checksums rmd160 44756e3aea4e6a918c8b9ed63a38b69f330e80f1 \
sha256 c6064bece82aeb603e7e93102bebbf28a779f08a68ba7067ad56f821f0faea13 \
size 3112338

variant python310 conflicts python311 description {Use Python 3.10} {}
variant python311 conflicts python310 description {Use Python 3.11} {}
variant python310 conflicts python311 python312 description {Use Python 3.10} {}
variant python311 conflicts python310 python312 description {Use Python 3.11} {}
variant python312 conflicts python310 python311 description {Use Python 3.12} {}

if {![variant_isset python310]} {
default_variants +python311
if {![variant_isset python310] && ![variant_isset python311]} {
default_variants +python312
}

foreach pv {311 310} {
foreach pv {312 311 310} {
if {[variant_isset python${pv}]} {
python.default_version ${pv}
break
}
}

depends_build port:gettext \
depends_build-append \
port:gettext \
port:intltool \
path:bin/pkg-config:pkgconfig \
port:libtool
port:libtool \
path:bin/pkg-config:pkgconfig

depends_lib port:adwaita-icon-theme \
depends_lib-append port:adwaita-icon-theme \
path:lib/pkgconfig/gtk+-3.0.pc:gtk3 \
port:gtksourceview4 \
path:lib/pkgconfig/librsvg-2.0.pc:librsvg \
path:lib/pkgconfig/libsoup-2.4.pc:libsoup \
port:py${python.version}-certifi \
port:py${python.version}-css-parser \
port:py${python.version}-emoji \
port:py${python.version}-idna \
port:py${python.version}-keyring \
port:py${python.version}-nbxmpp \
port:py${python.version}-omemo-dr \
port:py${python.version}-pillow \
port:py${python.version}-Pillow \
port:py${python.version}-pypng \
port:py${python.version}-qrcode
port:py${python.version}-qrcode \
port:py${python.version}-sqlalchemy

# https://dev.gajim.org/gajim/gajim/-/issues/11966
if {${os.platform} eq "darwin" && ${os.major} > 12} {
depends_run-append \
port:py${python.version}-pyobjc
} else {
patchfiles-append \
0001-Avoid-non-existing-unsupported-AppKit-module.patch
}

depends_run-append port:libayatana-appindicator
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
From 0927997834d8e0e715afa685b287e47ee39709ba Mon Sep 17 00:00:00 2001
From: Sergey Fedorov <[email protected]>
Date: Thu, 29 Aug 2024 00:34:41 +0800
Subject: [PATCH] Avoid non-existing / unsupported AppKit module

---
gajim/common/i18n.py | 13 +++++++------
gajim/common/sound.py | 35 ++++++++++++++++++-----------------
2 files changed, 25 insertions(+), 23 deletions(-)

diff --git gajim/common/i18n.py gajim/common/i18n.py
index 0c46f7e10..1d57c6cda 100644
--- gajim/common/i18n.py
+++ gajim/common/i18n.py
@@ -96,20 +96,21 @@ def _get_win32_default_lang() -> str:
windll = ctypes.windll.kernel32
return locale.windows_locale[windll.GetUserDefaultUILanguage()]

- @staticmethod
- def _get_darwin_default_lang() -> str:
- from AppKit import NSLocale
+# This invoked a non-existing module. Disable it.
+# @staticmethod
+# def _get_darwin_default_lang() -> str:
+# from AppKit import NSLocale

# FIXME: This returns a two letter language code (en, de, fr)
# We need a way to get en_US, de_DE etc.
- return NSLocale.currentLocale().languageCode()
+# return NSLocale.currentLocale().languageCode()

def _get_default_lang(self) -> str:
if sys.platform == 'win32':
return self._get_win32_default_lang()

- if sys.platform == 'darwin':
- return self._get_darwin_default_lang()
+# if sys.platform == 'darwin':
+# return self._get_darwin_default_lang()

return locale.getdefaultlocale()[0] or 'en'

diff --git gajim/common/sound.py gajim/common/sound.py
index e1cbce1a4..fe332ee8e 100644
--- gajim/common/sound.py
+++ gajim/common/sound.py
@@ -19,8 +19,9 @@
if sys.platform == 'win32' or typing.TYPE_CHECKING:
import winsound

-if sys.platform == 'darwin' or typing.TYPE_CHECKING:
- from AppKit import NSSound
+# This invoked a non-existing module. Disable it.
+# if sys.platform == 'darwin' or typing.TYPE_CHECKING:
+# from AppKit import NSSound

log = logging.getLogger('gajim.c.sound')

@@ -71,19 +72,19 @@ def loop_in_progress(self) -> bool:
return self._loop_in_progress


-class PlatformMacOS(PlaySound):
-
- def play(self, path: Path, loop: bool = False) -> None:
- assert NSSound is not None
- sound = NSSound.alloc()
- sound.initWithContentsOfFile_byReference_(str(path), True)
- sound.play()
-
- def stop(self) -> None:
- pass
-
- def loop_in_progress(self) -> bool:
- return False
+# class PlatformMacOS(PlaySound):
+#
+# def play(self, path: Path, loop: bool = False) -> None:
+# assert NSSound is not None
+# sound = NSSound.alloc()
+# sound.initWithContentsOfFile_byReference_(str(path), True)
+# sound.play()
+#
+# def stop(self) -> None:
+# pass
+#
+# def loop_in_progress(self) -> bool:
+# return False


class PlatformUnix(PlaySound):
@@ -149,8 +150,8 @@ def _init_platform() -> PlaySound:
if sys.platform == 'win32':
return PlatformWindows()

- if sys.platform == 'darwin':
- return PlatformMacOS()
+# if sys.platform == 'darwin':
+# return PlatformMacOS()

return PlatformUnix()

10 changes: 5 additions & 5 deletions python/py-css-parser/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ PortSystem 1.0
PortGroup python 1.0

name py-css-parser
version 1.0.9
version 1.0.10
revision 0
license LGPL-3
maintainers nomaintainer
Expand All @@ -15,11 +15,11 @@ supported_archs noarch
platforms {darwin any}
homepage https://github.com/ebook-utils/css-parser

checksums rmd160 90f3c64559e6b0833d67fe47527cdef849a902d7 \
sha256 196db822cef22745af6a58d180cf8206949ced58b48f5f3ee98f1de1627495bb \
size 349482
checksums rmd160 c6b40cd648765601cf60c5e970f3da6ed81b4a80 \
sha256 bf1e972ad33344e93206964fb4cd908d9ddef9fcd0c01fa93e0d734675394363 \
size 349673

python.versions 38 39 310 311
python.versions 39 310 311 312

if {${name} ne ${subport}} {
depends_build-append \
Expand Down
10 changes: 5 additions & 5 deletions python/py-emoji/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ PortSystem 1.0
PortGroup python 1.0

name py-emoji
version 2.7.0
version 2.12.1
categories-append textproc
license BSD
maintainers nomaintainer
Expand All @@ -21,11 +21,11 @@ long_description {*}${description} The entire set of Emoji codes as \

homepage https://github.com/carpedm20/emoji/

checksums rmd160 371064f50e014e6ccc73bb1d233ecc62a2927a12 \
sha256 375cc08589704266099846c553b6572ec5be591374b4d2cd1623b8343d5c9abb \
size 361797
checksums rmd160 b79f2204bce93b0f7f15e26cdfcd035c3dc701cb \
sha256 4aa0488817691aa58d83764b6c209f8a27c0b3ab3f89d1b8dceca1a62e4973eb \
size 442019

python.versions 38 39 310 311
python.versions 39 310 311 312

if {${name} ne ${subport}} {
depends_build-append \
Expand Down
12 changes: 6 additions & 6 deletions python/py-nbxmpp/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ PortGroup python 1.0
PortGroup gitlab 1.0

gitlab.instance https://dev.gajim.org
gitlab.setup gajim python-nbxmpp 4.3.1
gitlab.setup gajim python-nbxmpp 5.0.3
name py-nbxmpp
revision 0

Expand All @@ -20,17 +20,17 @@ long_description The goal of this python library is to provide a way \
for python applications to use Jabber/XMPP networks in a non-blocking \
way. Originally, a fork of the xmpppy jabber python library.

checksums rmd160 3b6439e04bb32ca7a5790cac81b763549fecb8e1 \
sha256 7c44173b2a2ea7fc6e26f4d62b420b01da7d1791c07d131e1cbc081742c2afe6 \
size 135981
checksums rmd160 01cf4eade3cbe172cbcd3fe60de1b49768946f8a \
sha256 37fbb37bd98dd8bf2280f641686c8bc428dca1c92897b42ad7437e0e09968cc8 \
size 142891

python.versions 39 310 311
python.versions 39 310 311 312
python.pep517 yes

if {${name} ne ${subport}} {
depends_lib-append \
path:lib/pkgconfig/glib-2.0.pc:glib2 \
port:libsoup \
path:lib/pkgconfig/libsoup-2.4.pc:libsoup \
port:py${python.version}-gobject3

depends_run-append \
Expand Down
10 changes: 5 additions & 5 deletions python/py-omemo-dr/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ PortSystem 1.0
PortGroup python 1.0

name py-omemo-dr
version 1.0.0
version 1.0.1
revision 0
license GPL-3
maintainers nomaintainer
Expand All @@ -13,11 +13,11 @@ description Initial codebase was forked from python axolotl but has sinc
long_description {*}${description}
homepage https://pypi.org/project/omemo-dr/

checksums rmd160 fc9f648f91773eb9eb1a359b4c7038deb4935206 \
sha256 b0fe5023e947a17b740fb7ed4aa246120d6f21d819b5812e94dfc9570520be61 \
size 152784
checksums rmd160 154ba044776585730fefc01d6c811f158ae937dc \
sha256 2a8a8c77231d73949bdd375278d4d5a261252bdaee52cb6241acb251c202d361 \
size 152526

python.versions 310 311
python.versions 310 311 312

if {${name} ne ${subport}} {
depends_build-append \
Expand Down
13 changes: 7 additions & 6 deletions python/py-precis-i18n/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ PortSystem 1.0
PortGroup python 1.0

name py-precis-i18n
version 1.0.5
version 1.1.0
revision 0

license MIT
Expand All @@ -13,17 +13,18 @@ platforms {darwin any}
maintainers nomaintainer

description PRECIS framework for Unicode
long_description Implementation of PRECIS framework for Unicode to be used with usernames & passwords
long_description Implementation of PRECIS framework for Unicode \
to be used with usernames & passwords.

homepage https://github.com/byllyfish/precis_i18n

distname precis_i18n-${version}

checksums rmd160 61588b2bfe64f4f72d01317dfe6ae4ae75a1488c \
sha256 b35e51ebfc2ccb7454232e7f63d59a4d03b3a5d2a6e3f628d797a58a3c33c24a \
size 67710
checksums rmd160 9ecac023f391c0d419393e66ce1713cdc90e4c28 \
sha256 7ad0d9e08b806f3a9aba042f0b5b28f081fe6decf1dd95ec8e4dc8c6b302aec2 \
size 69488

python.versions 39 310 311
python.versions 39 310 311 312

if {${name} ne ${subport}} {
depends_build-append \
Expand Down