Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] New package: emote-3.0.3
@ 2022-03-18 11:26 Animeshz
  2022-03-18 12:55 ` [PR PATCH] [Updated] " Animeshz
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Animeshz @ 2022-03-18 11:26 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 718 bytes --]

There is a new pull request by Animeshz against master on the void-packages repository

https://github.com/Animeshz/void-packages emote
https://github.com/void-linux/void-packages/pull/36199

New package: emote-3.0.3
Upstream: https://github.com/tom-james-watson/Emote

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**


#### Local build testing
- I built this PR locally for my native architecture: x86_64-glibc x86_64-musl

A patch file from https://github.com/void-linux/void-packages/pull/36199.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-emote-36199.patch --]
[-- Type: text/x-diff, Size: 6818 bytes --]

From 195fa44adf19ddfa635edc9f1db8f781a87247a5 Mon Sep 17 00:00:00 2001
From: Animesh Sahu <animeshsahu19@yahoo.com>
Date: Fri, 18 Mar 2022 16:32:32 +0530
Subject: [PATCH] New package: emote-3.0.3

---
 .../patches/fix-single-skintone-emojis.patch  | 14 ++++
 srcpkgs/emote/patches/setup-py.patch          | 16 ++++
 srcpkgs/emote/patches/static-root.patch       | 80 +++++++++++++++++++
 srcpkgs/emote/template                        | 24 ++++++
 srcpkgs/manimpango/template                   | 16 ++++
 5 files changed, 150 insertions(+)
 create mode 100644 srcpkgs/emote/patches/fix-single-skintone-emojis.patch
 create mode 100644 srcpkgs/emote/patches/setup-py.patch
 create mode 100644 srcpkgs/emote/patches/static-root.patch
 create mode 100644 srcpkgs/emote/template
 create mode 100644 srcpkgs/manimpango/template

diff --git a/srcpkgs/emote/patches/fix-single-skintone-emojis.patch b/srcpkgs/emote/patches/fix-single-skintone-emojis.patch
new file mode 100644
index 000000000000..ef7ee24442a8
--- /dev/null
+++ b/srcpkgs/emote/patches/fix-single-skintone-emojis.patch
@@ -0,0 +1,14 @@
+--- a/emote/user_data.py
++++ b/emote/user_data.py
+@@ -125,7 +125,10 @@ def update_theme(theme):
+
+ def load_skintone():
+     with shelve.open(SHELVE_PATH) as db:
+-        return db.get(SKINTONE, DEFAULT_SKINTONE)
++        skintone = db.get(SKINTONE, DEFAULT_SKINTONE)
++        if skintone not in SKINTONES:
++            skintone = DEFAULT_SKINTONE
++        return skintone
+
+
+ def update_skintone(skintone):
diff --git a/srcpkgs/emote/patches/setup-py.patch b/srcpkgs/emote/patches/setup-py.patch
new file mode 100644
index 000000000000..b2b8b798559c
--- /dev/null
+++ b/srcpkgs/emote/patches/setup-py.patch
@@ -0,0 +1,16 @@
+--- a/setup.py
++++ b/setup.py
+@@ -13,5 +13,12 @@
+     install_requires=[
+         "pygobject==3.36.0",
+         "manimpango==0.3.0"
+-    ]
++    ],
++    package_data={
++        "emote": [
++            "static/*"
++        ]
++    },
++    data_files=[("share/applications", ["snap/gui/emote.desktop"]),
++                ("share/icons", ["snap/gui/emote.svg"])]
+ )
diff --git a/srcpkgs/emote/patches/static-root.patch b/srcpkgs/emote/patches/static-root.patch
new file mode 100644
index 000000000000..0b80f7e4fb27
--- /dev/null
+++ b/srcpkgs/emote/patches/static-root.patch
@@ -0,0 +1,80 @@
+--- a/emote/__init__.py
++++ b/emote/__init__.py
+@@ -9,10 +9,7 @@ from gi.repository import Gtk, Keybinder
+ from emote import picker, css, emojis, user_data, config
+
+ # Register updated emoji font
+-if config.is_snap:
+-    manimpango.register_font(f"{config.snap_root}/static/NotoColorEmoji.ttf")
+-else:
+-    manimpango.register_font("static/NotoColorEmoji.ttf")
++manimpango.register_font(f"{config.static_root}/NotoColorEmoji.ttf")
+
+ settings = Gtk.Settings.get_default()
+
+--- a/emote/config.py
++++ b/emote/config.py
+@@ -6,3 +6,13 @@ is_dev = os.environ.get("ENV") == "dev"
+ is_snap = os.environ.get("SNAP") is not None
+ snap_root = os.environ.get("SNAP")
+ is_wayland = os.environ.get("XDG_SESSION_TYPE", "").lower() == "wayland"
++
++if is_snap:
++    static_root = f"{snap_root}/static"
++elif is_dev:
++    static_root = os.path.dirname(os.path.dirname(__file__)) + "/static"
++else:
++    static_root = os.path.dirname(__file__) + "/static"
++
++if not os.path.exists(static_root):
++    raise Exception(f"Directory not found: {static_root}")
+--- a/emote/css.py
++++ b/emote/css.py
+@@ -11,11 +11,7 @@ def load_css():
+     Load associated CSS for the window.
+     """
+     css_provider = Gtk.CssProvider()
+-
+-    if config.is_snap:
+-        css_provider.load_from_path(f"{config.snap_root}/static/style.css")
+-    else:
+-        css_provider.load_from_path("static/style.css")
++    css_provider.load_from_path(f"{config.static_root}/style.css")
+
+     screen = Gdk.Screen.get_default()
+     styleContext = Gtk.StyleContext()
+--- a/emote/emojis.py
++++ b/emote/emojis.py
+@@ -236,14 +236,9 @@ def init():
+     global all_emojis
+     global emojis_by_category
+
+-    filename = (
+-        f"{config.snap_root}/static/emojis.csv"
+-        if config.is_snap
+-        else "static/emojis.csv"
+-    )
+-
+-    with open(filename, newline="") as csvfile:
++    with open(f"{config.static_root}/emojis.csv", newline="") as csvfile:
+         reader = csv.DictReader(csvfile)
++        skintone_templates = {}
+
+         for row in reader:
+             category = row["group"]
+--- a/emote/picker.py
++++ b/emote/picker.py
+@@ -318,12 +318,7 @@ class EmojiPicker(Gtk.Window):
+         guide_window.connect("destroy", self.on_close_dialog)
+
+     def open_about(self):
+-        logo_path = (
+-            f"{config.snap_root}/static/logo.svg"
+-            if config.is_snap
+-            else "static/logo.svg"
+-        )
+-        logo = Pixbuf.new_from_file(logo_path)
++        logo = Pixbuf.new_from_file(f"{config.static_root}/logo.svg")
+
+         about_dialog = Gtk.AboutDialog(
+             transient_for=self,
diff --git a/srcpkgs/emote/template b/srcpkgs/emote/template
new file mode 100644
index 000000000000..88a82f37a519
--- /dev/null
+++ b/srcpkgs/emote/template
@@ -0,0 +1,24 @@
+# Template file for 'emote'
+pkgname=emote
+version=3.0.3
+revision=1
+wrksrc="Emote-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools"
+makedepends="gtk+3-devel libgirepository-devel libkeybinder3-devel"
+depends="xdotool python3-virtualenv libkeybinder3 manimpango"
+short_desc="Emoji Picker for Linux written in GTK3"
+maintainer="Animesh Sahu <animeshsahu19@yahoo.com>"
+license="GPL-3.0-or-later"
+homepage="https://github.com/tom-james-watson/Emote"
+distfiles="${homepage}/archive/refs/tags/v${version}.tar.gz"
+checksum=1a361d656705445bc78cee90d0b77f0cb74f85222a5b0f7e1db04ed9d03936ef
+
+pre_build() {
+	mv static emote
+}
+
+post_install() {
+	vmkdir etc/xdg/autostart
+	vinstall ${DESTDIR}/usr/share/applications/emote.desktop 644 etc/xdg/autostart/
+}
diff --git a/srcpkgs/manimpango/template b/srcpkgs/manimpango/template
new file mode 100644
index 000000000000..9b1b20835194
--- /dev/null
+++ b/srcpkgs/manimpango/template
@@ -0,0 +1,16 @@
+# Template file for 'manimpango'
+pkgname=manimpango
+version=0.4.0.post2
+revision=1
+wrksrc="ManimPango-${version}"
+build_style=python3-module
+hostmakedepends="pkg-config python3-setuptools python3-Cython"
+makedepends="gtk+3-devel libgirepository-devel libkeybinder3-devel
+ pango-devel python3-devel"
+depends="xdotool pango python3-virtualenv"
+short_desc="Emoji Picker for Linux written in GTK3"
+maintainer="Animesh Sahu <animeshsahu19@yahoo.com>"
+license="MIT"
+homepage="https://github.com/ManimCommunity/ManimPango"
+distfiles="${homepage}/archive/refs/tags/v${version}.tar.gz"
+checksum=dbcf77e20bdb3e707cdb8b6a6c6e2de5b57c0a71ddaa3051ce0fa3933f74865b

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PR PATCH] [Updated] New package: emote-3.0.3
  2022-03-18 11:26 [PR PATCH] New package: emote-3.0.3 Animeshz
@ 2022-03-18 12:55 ` Animeshz
  2022-03-18 13:02 ` Animeshz
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Animeshz @ 2022-03-18 12:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 723 bytes --]

There is an updated pull request by Animeshz against master on the void-packages repository

https://github.com/Animeshz/void-packages emote
https://github.com/void-linux/void-packages/pull/36199

New package: emote-3.0.3
Upstream: https://github.com/tom-james-watson/Emote

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**


#### Local build testing
- I built this PR locally for my native architecture: x86_64-glibc x86_64-musl

A patch file from https://github.com/void-linux/void-packages/pull/36199.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-emote-36199.patch --]
[-- Type: text/x-diff, Size: 8798 bytes --]

From cbdad7598854e48d3e7c83504a2b122f6998de47 Mon Sep 17 00:00:00 2001
From: Animesh Sahu <animeshsahu19@yahoo.com>
Date: Fri, 18 Mar 2022 16:32:32 +0530
Subject: [PATCH] New package: emote-3.0.3

---
 .../patches/fix-single-skintone-emojis.patch  | 14 ++++
 srcpkgs/emote/patches/setup-py.patch          | 16 ++++
 srcpkgs/emote/patches/static-root.patch       | 80 +++++++++++++++++++
 srcpkgs/emote/template                        | 26 ++++++
 .../patches/ignore-tests-upstream-issue.patch | 38 +++++++++
 srcpkgs/manimpango/template                   | 25 ++++++
 6 files changed, 199 insertions(+)
 create mode 100644 srcpkgs/emote/patches/fix-single-skintone-emojis.patch
 create mode 100644 srcpkgs/emote/patches/setup-py.patch
 create mode 100644 srcpkgs/emote/patches/static-root.patch
 create mode 100644 srcpkgs/emote/template
 create mode 100644 srcpkgs/manimpango/patches/ignore-tests-upstream-issue.patch
 create mode 100644 srcpkgs/manimpango/template

diff --git a/srcpkgs/emote/patches/fix-single-skintone-emojis.patch b/srcpkgs/emote/patches/fix-single-skintone-emojis.patch
new file mode 100644
index 000000000000..ef7ee24442a8
--- /dev/null
+++ b/srcpkgs/emote/patches/fix-single-skintone-emojis.patch
@@ -0,0 +1,14 @@
+--- a/emote/user_data.py
++++ b/emote/user_data.py
+@@ -125,7 +125,10 @@ def update_theme(theme):
+
+ def load_skintone():
+     with shelve.open(SHELVE_PATH) as db:
+-        return db.get(SKINTONE, DEFAULT_SKINTONE)
++        skintone = db.get(SKINTONE, DEFAULT_SKINTONE)
++        if skintone not in SKINTONES:
++            skintone = DEFAULT_SKINTONE
++        return skintone
+
+
+ def update_skintone(skintone):
diff --git a/srcpkgs/emote/patches/setup-py.patch b/srcpkgs/emote/patches/setup-py.patch
new file mode 100644
index 000000000000..b2b8b798559c
--- /dev/null
+++ b/srcpkgs/emote/patches/setup-py.patch
@@ -0,0 +1,16 @@
+--- a/setup.py
++++ b/setup.py
+@@ -13,5 +13,12 @@
+     install_requires=[
+         "pygobject==3.36.0",
+         "manimpango==0.3.0"
+-    ]
++    ],
++    package_data={
++        "emote": [
++            "static/*"
++        ]
++    },
++    data_files=[("share/applications", ["snap/gui/emote.desktop"]),
++                ("share/icons", ["snap/gui/emote.svg"])]
+ )
diff --git a/srcpkgs/emote/patches/static-root.patch b/srcpkgs/emote/patches/static-root.patch
new file mode 100644
index 000000000000..0b80f7e4fb27
--- /dev/null
+++ b/srcpkgs/emote/patches/static-root.patch
@@ -0,0 +1,80 @@
+--- a/emote/__init__.py
++++ b/emote/__init__.py
+@@ -9,10 +9,7 @@ from gi.repository import Gtk, Keybinder
+ from emote import picker, css, emojis, user_data, config
+
+ # Register updated emoji font
+-if config.is_snap:
+-    manimpango.register_font(f"{config.snap_root}/static/NotoColorEmoji.ttf")
+-else:
+-    manimpango.register_font("static/NotoColorEmoji.ttf")
++manimpango.register_font(f"{config.static_root}/NotoColorEmoji.ttf")
+
+ settings = Gtk.Settings.get_default()
+
+--- a/emote/config.py
++++ b/emote/config.py
+@@ -6,3 +6,13 @@ is_dev = os.environ.get("ENV") == "dev"
+ is_snap = os.environ.get("SNAP") is not None
+ snap_root = os.environ.get("SNAP")
+ is_wayland = os.environ.get("XDG_SESSION_TYPE", "").lower() == "wayland"
++
++if is_snap:
++    static_root = f"{snap_root}/static"
++elif is_dev:
++    static_root = os.path.dirname(os.path.dirname(__file__)) + "/static"
++else:
++    static_root = os.path.dirname(__file__) + "/static"
++
++if not os.path.exists(static_root):
++    raise Exception(f"Directory not found: {static_root}")
+--- a/emote/css.py
++++ b/emote/css.py
+@@ -11,11 +11,7 @@ def load_css():
+     Load associated CSS for the window.
+     """
+     css_provider = Gtk.CssProvider()
+-
+-    if config.is_snap:
+-        css_provider.load_from_path(f"{config.snap_root}/static/style.css")
+-    else:
+-        css_provider.load_from_path("static/style.css")
++    css_provider.load_from_path(f"{config.static_root}/style.css")
+
+     screen = Gdk.Screen.get_default()
+     styleContext = Gtk.StyleContext()
+--- a/emote/emojis.py
++++ b/emote/emojis.py
+@@ -236,14 +236,9 @@ def init():
+     global all_emojis
+     global emojis_by_category
+
+-    filename = (
+-        f"{config.snap_root}/static/emojis.csv"
+-        if config.is_snap
+-        else "static/emojis.csv"
+-    )
+-
+-    with open(filename, newline="") as csvfile:
++    with open(f"{config.static_root}/emojis.csv", newline="") as csvfile:
+         reader = csv.DictReader(csvfile)
++        skintone_templates = {}
+
+         for row in reader:
+             category = row["group"]
+--- a/emote/picker.py
++++ b/emote/picker.py
+@@ -318,12 +318,7 @@ class EmojiPicker(Gtk.Window):
+         guide_window.connect("destroy", self.on_close_dialog)
+
+     def open_about(self):
+-        logo_path = (
+-            f"{config.snap_root}/static/logo.svg"
+-            if config.is_snap
+-            else "static/logo.svg"
+-        )
+-        logo = Pixbuf.new_from_file(logo_path)
++        logo = Pixbuf.new_from_file(f"{config.static_root}/logo.svg")
+
+         about_dialog = Gtk.AboutDialog(
+             transient_for=self,
diff --git a/srcpkgs/emote/template b/srcpkgs/emote/template
new file mode 100644
index 000000000000..50eddb75b31c
--- /dev/null
+++ b/srcpkgs/emote/template
@@ -0,0 +1,26 @@
+# Template file for 'emote'
+pkgname=emote
+version=3.0.3
+revision=1
+wrksrc="Emote-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools"
+makedepends="gtk+3-devel libgirepository-devel libkeybinder3-devel"
+depends="xdotool python3-virtualenv libkeybinder3 manimpango"
+make_check=no  # no tests in the package
+short_desc="Emoji Picker for Linux written in GTK3"
+maintainer="Animesh Sahu <animeshsahu19@yahoo.com>"
+license="GPL-3.0-or-later"
+homepage="https://github.com/tom-james-watson/Emote"
+distfiles="${homepage}/archive/refs/tags/v${version}.tar.gz"
+checksum=1a361d656705445bc78cee90d0b77f0cb74f85222a5b0f7e1db04ed9d03936ef
+
+pre_build() {
+	mv static emote
+}
+
+post_install() {
+	vmkdir etc/xdg/autostart
+	vinstall ${DESTDIR}/usr/share/applications/emote.desktop 644 etc/xdg/autostart/
+	vlicense LICENSE.md
+}
diff --git a/srcpkgs/manimpango/patches/ignore-tests-upstream-issue.patch b/srcpkgs/manimpango/patches/ignore-tests-upstream-issue.patch
new file mode 100644
index 000000000000..80aeada5cda9
--- /dev/null
+++ b/srcpkgs/manimpango/patches/ignore-tests-upstream-issue.patch
@@ -0,0 +1,38 @@
+--- a/tests/test_colors.py
++++ b/tests/test_colors.py
+@@ -14,13 +14,3 @@ def test_invalid_color_fail(tmpdir):
+     with pytest.raises(ValueError):
+         Text("color", color="invalid", filename=str(loc))
+
+-
+-def test_colors(tmpdir):
+-    expected = Path(CASES_DIR, "color_red.svg")
+-    loc = Path(tmpdir, "test.svg")
+-    assert not loc.exists()
+-    Text("color", color="red", filename=str(loc))
+-    assert loc.exists()
+-    s = SVGStyleTester(gotSVG=loc, expectedSVG=expected)
+-    assert len(s.got_svg_style) == len(s.expected_svg_style)
+-    assert s.got_svg_style == s.expected_svg_style
+--- a/tests/test_markup.py
++++ b/tests/test_markup.py
+@@ -98,19 +98,6 @@ def test_markup_alignment(tmpdir):
+     assert loc.exists()
+
+
+-def test_markup_style(tmpdir):
+-    test_case = CASES_DIR / "hello_blue_world_green.svg"
+-    expected = tmpdir / "expected.svg"
+-    text = "<span foreground='BLUE'>Hello</span>\n<span foreground='GREEN'>World</span>"
+-    MarkupText(
+-        text,
+-        filename=str(expected),
+-    )
+-    s = SVGStyleTester(gotSVG=expected, expectedSVG=test_case)
+-    assert len(s.got_svg_style) == len(s.expected_svg_style)
+-    assert s.got_svg_style == s.expected_svg_style
+-
+-
+ def test_wrap_text(tmpdir):
+     tmpdir = Path(tmpdir)
+     wrapped = tmpdir / "wrap.svg"
diff --git a/srcpkgs/manimpango/template b/srcpkgs/manimpango/template
new file mode 100644
index 000000000000..d710db82d3ab
--- /dev/null
+++ b/srcpkgs/manimpango/template
@@ -0,0 +1,25 @@
+# Template file for 'manimpango'
+pkgname=manimpango
+version=0.4.0.post2
+revision=1
+wrksrc="ManimPango-${version}"
+build_style=python3-module
+hostmakedepends="pkg-config python3-setuptools python3-Cython"
+makedepends="gtk+3-devel libgirepository-devel libkeybinder3-devel
+ pango-devel python3-devel"
+depends="xdotool pango python3-virtualenv"
+checkdepends="python3-pytest python3-pytest-cov"
+short_desc="Emoji Picker for Linux written in GTK3"
+maintainer="Animesh Sahu <animeshsahu19@yahoo.com>"
+license="MIT"
+homepage="https://github.com/ManimCommunity/ManimPango"
+distfiles="${homepage}/archive/refs/tags/v${version}.tar.gz"
+checksum=dbcf77e20bdb3e707cdb8b6a6c6e2de5b57c0a71ddaa3051ce0fa3933f74865b
+
+pre_check() {
+    python3 setup.py build_ext -i
+}
+
+post_install() {
+	vlicense LICENSE
+}

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PR PATCH] [Updated] New package: emote-3.0.3
  2022-03-18 11:26 [PR PATCH] New package: emote-3.0.3 Animeshz
  2022-03-18 12:55 ` [PR PATCH] [Updated] " Animeshz
@ 2022-03-18 13:02 ` Animeshz
  2022-03-18 13:03 ` Animeshz
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Animeshz @ 2022-03-18 13:02 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 723 bytes --]

There is an updated pull request by Animeshz against master on the void-packages repository

https://github.com/Animeshz/void-packages emote
https://github.com/void-linux/void-packages/pull/36199

New package: emote-3.0.3
Upstream: https://github.com/tom-james-watson/Emote

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**


#### Local build testing
- I built this PR locally for my native architecture: x86_64-glibc x86_64-musl

A patch file from https://github.com/void-linux/void-packages/pull/36199.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-emote-36199.patch --]
[-- Type: text/x-diff, Size: 8773 bytes --]

From 2b84af290b26062f295063086f9be858601e0438 Mon Sep 17 00:00:00 2001
From: Animesh Sahu <animeshsahu19@yahoo.com>
Date: Fri, 18 Mar 2022 16:32:32 +0530
Subject: [PATCH] New package: emote-3.0.3

---
 .../patches/fix-single-skintone-emojis.patch  | 14 ++++
 srcpkgs/emote/patches/setup-py.patch          | 16 ++++
 srcpkgs/emote/patches/static-root.patch       | 80 +++++++++++++++++++
 srcpkgs/emote/template                        | 25 ++++++
 .../patches/ignore-tests-upstream-issue.patch | 38 +++++++++
 srcpkgs/manimpango/template                   | 25 ++++++
 6 files changed, 198 insertions(+)
 create mode 100644 srcpkgs/emote/patches/fix-single-skintone-emojis.patch
 create mode 100644 srcpkgs/emote/patches/setup-py.patch
 create mode 100644 srcpkgs/emote/patches/static-root.patch
 create mode 100644 srcpkgs/emote/template
 create mode 100644 srcpkgs/manimpango/patches/ignore-tests-upstream-issue.patch
 create mode 100644 srcpkgs/manimpango/template

diff --git a/srcpkgs/emote/patches/fix-single-skintone-emojis.patch b/srcpkgs/emote/patches/fix-single-skintone-emojis.patch
new file mode 100644
index 000000000000..ef7ee24442a8
--- /dev/null
+++ b/srcpkgs/emote/patches/fix-single-skintone-emojis.patch
@@ -0,0 +1,14 @@
+--- a/emote/user_data.py
++++ b/emote/user_data.py
+@@ -125,7 +125,10 @@ def update_theme(theme):
+
+ def load_skintone():
+     with shelve.open(SHELVE_PATH) as db:
+-        return db.get(SKINTONE, DEFAULT_SKINTONE)
++        skintone = db.get(SKINTONE, DEFAULT_SKINTONE)
++        if skintone not in SKINTONES:
++            skintone = DEFAULT_SKINTONE
++        return skintone
+
+
+ def update_skintone(skintone):
diff --git a/srcpkgs/emote/patches/setup-py.patch b/srcpkgs/emote/patches/setup-py.patch
new file mode 100644
index 000000000000..b2b8b798559c
--- /dev/null
+++ b/srcpkgs/emote/patches/setup-py.patch
@@ -0,0 +1,16 @@
+--- a/setup.py
++++ b/setup.py
+@@ -13,5 +13,12 @@
+     install_requires=[
+         "pygobject==3.36.0",
+         "manimpango==0.3.0"
+-    ]
++    ],
++    package_data={
++        "emote": [
++            "static/*"
++        ]
++    },
++    data_files=[("share/applications", ["snap/gui/emote.desktop"]),
++                ("share/icons", ["snap/gui/emote.svg"])]
+ )
diff --git a/srcpkgs/emote/patches/static-root.patch b/srcpkgs/emote/patches/static-root.patch
new file mode 100644
index 000000000000..0b80f7e4fb27
--- /dev/null
+++ b/srcpkgs/emote/patches/static-root.patch
@@ -0,0 +1,80 @@
+--- a/emote/__init__.py
++++ b/emote/__init__.py
+@@ -9,10 +9,7 @@ from gi.repository import Gtk, Keybinder
+ from emote import picker, css, emojis, user_data, config
+
+ # Register updated emoji font
+-if config.is_snap:
+-    manimpango.register_font(f"{config.snap_root}/static/NotoColorEmoji.ttf")
+-else:
+-    manimpango.register_font("static/NotoColorEmoji.ttf")
++manimpango.register_font(f"{config.static_root}/NotoColorEmoji.ttf")
+
+ settings = Gtk.Settings.get_default()
+
+--- a/emote/config.py
++++ b/emote/config.py
+@@ -6,3 +6,13 @@ is_dev = os.environ.get("ENV") == "dev"
+ is_snap = os.environ.get("SNAP") is not None
+ snap_root = os.environ.get("SNAP")
+ is_wayland = os.environ.get("XDG_SESSION_TYPE", "").lower() == "wayland"
++
++if is_snap:
++    static_root = f"{snap_root}/static"
++elif is_dev:
++    static_root = os.path.dirname(os.path.dirname(__file__)) + "/static"
++else:
++    static_root = os.path.dirname(__file__) + "/static"
++
++if not os.path.exists(static_root):
++    raise Exception(f"Directory not found: {static_root}")
+--- a/emote/css.py
++++ b/emote/css.py
+@@ -11,11 +11,7 @@ def load_css():
+     Load associated CSS for the window.
+     """
+     css_provider = Gtk.CssProvider()
+-
+-    if config.is_snap:
+-        css_provider.load_from_path(f"{config.snap_root}/static/style.css")
+-    else:
+-        css_provider.load_from_path("static/style.css")
++    css_provider.load_from_path(f"{config.static_root}/style.css")
+
+     screen = Gdk.Screen.get_default()
+     styleContext = Gtk.StyleContext()
+--- a/emote/emojis.py
++++ b/emote/emojis.py
+@@ -236,14 +236,9 @@ def init():
+     global all_emojis
+     global emojis_by_category
+
+-    filename = (
+-        f"{config.snap_root}/static/emojis.csv"
+-        if config.is_snap
+-        else "static/emojis.csv"
+-    )
+-
+-    with open(filename, newline="") as csvfile:
++    with open(f"{config.static_root}/emojis.csv", newline="") as csvfile:
+         reader = csv.DictReader(csvfile)
++        skintone_templates = {}
+
+         for row in reader:
+             category = row["group"]
+--- a/emote/picker.py
++++ b/emote/picker.py
+@@ -318,12 +318,7 @@ class EmojiPicker(Gtk.Window):
+         guide_window.connect("destroy", self.on_close_dialog)
+
+     def open_about(self):
+-        logo_path = (
+-            f"{config.snap_root}/static/logo.svg"
+-            if config.is_snap
+-            else "static/logo.svg"
+-        )
+-        logo = Pixbuf.new_from_file(logo_path)
++        logo = Pixbuf.new_from_file(f"{config.static_root}/logo.svg")
+
+         about_dialog = Gtk.AboutDialog(
+             transient_for=self,
diff --git a/srcpkgs/emote/template b/srcpkgs/emote/template
new file mode 100644
index 000000000000..b50f3ff79687
--- /dev/null
+++ b/srcpkgs/emote/template
@@ -0,0 +1,25 @@
+# Template file for 'emote'
+pkgname=emote
+version=3.0.3
+revision=1
+wrksrc="Emote-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools"
+makedepends="gtk+3-devel libgirepository-devel libkeybinder3-devel"
+depends="xdotool python3-virtualenv libkeybinder3 manimpango"
+make_check=no  # no tests in the package
+short_desc="Emoji Picker for Linux written in GTK3"
+maintainer="Animesh Sahu <animeshsahu19@yahoo.com>"
+license="GPL-3.0-or-later"
+homepage="https://github.com/tom-james-watson/Emote"
+distfiles="${homepage}/archive/refs/tags/v${version}.tar.gz"
+checksum=1a361d656705445bc78cee90d0b77f0cb74f85222a5b0f7e1db04ed9d03936ef
+
+pre_build() {
+	mv static emote
+}
+
+post_install() {
+	vmkdir etc/xdg/autostart
+	vinstall ${DESTDIR}/usr/share/applications/emote.desktop 644 etc/xdg/autostart/
+}
diff --git a/srcpkgs/manimpango/patches/ignore-tests-upstream-issue.patch b/srcpkgs/manimpango/patches/ignore-tests-upstream-issue.patch
new file mode 100644
index 000000000000..80aeada5cda9
--- /dev/null
+++ b/srcpkgs/manimpango/patches/ignore-tests-upstream-issue.patch
@@ -0,0 +1,38 @@
+--- a/tests/test_colors.py
++++ b/tests/test_colors.py
+@@ -14,13 +14,3 @@ def test_invalid_color_fail(tmpdir):
+     with pytest.raises(ValueError):
+         Text("color", color="invalid", filename=str(loc))
+
+-
+-def test_colors(tmpdir):
+-    expected = Path(CASES_DIR, "color_red.svg")
+-    loc = Path(tmpdir, "test.svg")
+-    assert not loc.exists()
+-    Text("color", color="red", filename=str(loc))
+-    assert loc.exists()
+-    s = SVGStyleTester(gotSVG=loc, expectedSVG=expected)
+-    assert len(s.got_svg_style) == len(s.expected_svg_style)
+-    assert s.got_svg_style == s.expected_svg_style
+--- a/tests/test_markup.py
++++ b/tests/test_markup.py
+@@ -98,19 +98,6 @@ def test_markup_alignment(tmpdir):
+     assert loc.exists()
+
+
+-def test_markup_style(tmpdir):
+-    test_case = CASES_DIR / "hello_blue_world_green.svg"
+-    expected = tmpdir / "expected.svg"
+-    text = "<span foreground='BLUE'>Hello</span>\n<span foreground='GREEN'>World</span>"
+-    MarkupText(
+-        text,
+-        filename=str(expected),
+-    )
+-    s = SVGStyleTester(gotSVG=expected, expectedSVG=test_case)
+-    assert len(s.got_svg_style) == len(s.expected_svg_style)
+-    assert s.got_svg_style == s.expected_svg_style
+-
+-
+ def test_wrap_text(tmpdir):
+     tmpdir = Path(tmpdir)
+     wrapped = tmpdir / "wrap.svg"
diff --git a/srcpkgs/manimpango/template b/srcpkgs/manimpango/template
new file mode 100644
index 000000000000..9a3c9caf07b3
--- /dev/null
+++ b/srcpkgs/manimpango/template
@@ -0,0 +1,25 @@
+# Template file for 'manimpango'
+pkgname=manimpango
+version=0.4.0.post2
+revision=1
+wrksrc="ManimPango-${version}"
+build_style=python3-module
+hostmakedepends="pkg-config python3-setuptools python3-Cython"
+makedepends="gtk+3-devel libgirepository-devel libkeybinder3-devel
+ pango-devel python3-devel"
+depends="xdotool pango python3-virtualenv"
+checkdepends="python3-pytest python3-pytest-cov"
+short_desc="Emoji Picker for Linux written in GTK3"
+maintainer="Animesh Sahu <animeshsahu19@yahoo.com>"
+license="MIT"
+homepage="https://github.com/ManimCommunity/ManimPango"
+distfiles="${homepage}/archive/refs/tags/v${version}.tar.gz"
+checksum=dbcf77e20bdb3e707cdb8b6a6c6e2de5b57c0a71ddaa3051ce0fa3933f74865b
+
+pre_check() {
+	python3 setup.py build_ext -i
+}
+
+post_install() {
+	vlicense LICENSE
+}

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PR PATCH] [Updated] New package: emote-3.0.3
  2022-03-18 11:26 [PR PATCH] New package: emote-3.0.3 Animeshz
  2022-03-18 12:55 ` [PR PATCH] [Updated] " Animeshz
  2022-03-18 13:02 ` Animeshz
@ 2022-03-18 13:03 ` Animeshz
  2022-03-18 16:33 ` Animeshz
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Animeshz @ 2022-03-18 13:03 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 723 bytes --]

There is an updated pull request by Animeshz against master on the void-packages repository

https://github.com/Animeshz/void-packages emote
https://github.com/void-linux/void-packages/pull/36199

New package: emote-3.0.3
Upstream: https://github.com/tom-james-watson/Emote

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**


#### Local build testing
- I built this PR locally for my native architecture: x86_64-glibc x86_64-musl

A patch file from https://github.com/void-linux/void-packages/pull/36199.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-emote-36199.patch --]
[-- Type: text/x-diff, Size: 8773 bytes --]

From 0187dab34efa7831838dc5c658e4d21136cee366 Mon Sep 17 00:00:00 2001
From: Animesh Sahu <animeshsahu19@yahoo.com>
Date: Fri, 18 Mar 2022 16:32:32 +0530
Subject: [PATCH] New package: emote-3.0.3

---
 .../patches/fix-single-skintone-emojis.patch  | 14 ++++
 srcpkgs/emote/patches/setup-py.patch          | 16 ++++
 srcpkgs/emote/patches/static-root.patch       | 80 +++++++++++++++++++
 srcpkgs/emote/template                        | 25 ++++++
 .../patches/ignore-tests-upstream-issue.patch | 38 +++++++++
 srcpkgs/manimpango/template                   | 25 ++++++
 6 files changed, 198 insertions(+)
 create mode 100644 srcpkgs/emote/patches/fix-single-skintone-emojis.patch
 create mode 100644 srcpkgs/emote/patches/setup-py.patch
 create mode 100644 srcpkgs/emote/patches/static-root.patch
 create mode 100644 srcpkgs/emote/template
 create mode 100644 srcpkgs/manimpango/patches/ignore-tests-upstream-issue.patch
 create mode 100644 srcpkgs/manimpango/template

diff --git a/srcpkgs/emote/patches/fix-single-skintone-emojis.patch b/srcpkgs/emote/patches/fix-single-skintone-emojis.patch
new file mode 100644
index 000000000000..ef7ee24442a8
--- /dev/null
+++ b/srcpkgs/emote/patches/fix-single-skintone-emojis.patch
@@ -0,0 +1,14 @@
+--- a/emote/user_data.py
++++ b/emote/user_data.py
+@@ -125,7 +125,10 @@ def update_theme(theme):
+
+ def load_skintone():
+     with shelve.open(SHELVE_PATH) as db:
+-        return db.get(SKINTONE, DEFAULT_SKINTONE)
++        skintone = db.get(SKINTONE, DEFAULT_SKINTONE)
++        if skintone not in SKINTONES:
++            skintone = DEFAULT_SKINTONE
++        return skintone
+
+
+ def update_skintone(skintone):
diff --git a/srcpkgs/emote/patches/setup-py.patch b/srcpkgs/emote/patches/setup-py.patch
new file mode 100644
index 000000000000..b2b8b798559c
--- /dev/null
+++ b/srcpkgs/emote/patches/setup-py.patch
@@ -0,0 +1,16 @@
+--- a/setup.py
++++ b/setup.py
+@@ -13,5 +13,12 @@
+     install_requires=[
+         "pygobject==3.36.0",
+         "manimpango==0.3.0"
+-    ]
++    ],
++    package_data={
++        "emote": [
++            "static/*"
++        ]
++    },
++    data_files=[("share/applications", ["snap/gui/emote.desktop"]),
++                ("share/icons", ["snap/gui/emote.svg"])]
+ )
diff --git a/srcpkgs/emote/patches/static-root.patch b/srcpkgs/emote/patches/static-root.patch
new file mode 100644
index 000000000000..0b80f7e4fb27
--- /dev/null
+++ b/srcpkgs/emote/patches/static-root.patch
@@ -0,0 +1,80 @@
+--- a/emote/__init__.py
++++ b/emote/__init__.py
+@@ -9,10 +9,7 @@ from gi.repository import Gtk, Keybinder
+ from emote import picker, css, emojis, user_data, config
+
+ # Register updated emoji font
+-if config.is_snap:
+-    manimpango.register_font(f"{config.snap_root}/static/NotoColorEmoji.ttf")
+-else:
+-    manimpango.register_font("static/NotoColorEmoji.ttf")
++manimpango.register_font(f"{config.static_root}/NotoColorEmoji.ttf")
+
+ settings = Gtk.Settings.get_default()
+
+--- a/emote/config.py
++++ b/emote/config.py
+@@ -6,3 +6,13 @@ is_dev = os.environ.get("ENV") == "dev"
+ is_snap = os.environ.get("SNAP") is not None
+ snap_root = os.environ.get("SNAP")
+ is_wayland = os.environ.get("XDG_SESSION_TYPE", "").lower() == "wayland"
++
++if is_snap:
++    static_root = f"{snap_root}/static"
++elif is_dev:
++    static_root = os.path.dirname(os.path.dirname(__file__)) + "/static"
++else:
++    static_root = os.path.dirname(__file__) + "/static"
++
++if not os.path.exists(static_root):
++    raise Exception(f"Directory not found: {static_root}")
+--- a/emote/css.py
++++ b/emote/css.py
+@@ -11,11 +11,7 @@ def load_css():
+     Load associated CSS for the window.
+     """
+     css_provider = Gtk.CssProvider()
+-
+-    if config.is_snap:
+-        css_provider.load_from_path(f"{config.snap_root}/static/style.css")
+-    else:
+-        css_provider.load_from_path("static/style.css")
++    css_provider.load_from_path(f"{config.static_root}/style.css")
+
+     screen = Gdk.Screen.get_default()
+     styleContext = Gtk.StyleContext()
+--- a/emote/emojis.py
++++ b/emote/emojis.py
+@@ -236,14 +236,9 @@ def init():
+     global all_emojis
+     global emojis_by_category
+
+-    filename = (
+-        f"{config.snap_root}/static/emojis.csv"
+-        if config.is_snap
+-        else "static/emojis.csv"
+-    )
+-
+-    with open(filename, newline="") as csvfile:
++    with open(f"{config.static_root}/emojis.csv", newline="") as csvfile:
+         reader = csv.DictReader(csvfile)
++        skintone_templates = {}
+
+         for row in reader:
+             category = row["group"]
+--- a/emote/picker.py
++++ b/emote/picker.py
+@@ -318,12 +318,7 @@ class EmojiPicker(Gtk.Window):
+         guide_window.connect("destroy", self.on_close_dialog)
+
+     def open_about(self):
+-        logo_path = (
+-            f"{config.snap_root}/static/logo.svg"
+-            if config.is_snap
+-            else "static/logo.svg"
+-        )
+-        logo = Pixbuf.new_from_file(logo_path)
++        logo = Pixbuf.new_from_file(f"{config.static_root}/logo.svg")
+
+         about_dialog = Gtk.AboutDialog(
+             transient_for=self,
diff --git a/srcpkgs/emote/template b/srcpkgs/emote/template
new file mode 100644
index 000000000000..55a37fbdc118
--- /dev/null
+++ b/srcpkgs/emote/template
@@ -0,0 +1,25 @@
+# Template file for 'emote'
+pkgname=emote
+version=3.0.3
+revision=1
+wrksrc="Emote-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools"
+makedepends="gtk+3-devel libgirepository-devel libkeybinder3-devel"
+depends="xdotool python3-virtualenv libkeybinder3 manimpango"
+short_desc="Emoji Picker for Linux written in GTK3"
+maintainer="Animesh Sahu <animeshsahu19@yahoo.com>"
+license="GPL-3.0-or-later"
+homepage="https://github.com/tom-james-watson/Emote"
+distfiles="${homepage}/archive/refs/tags/v${version}.tar.gz"
+checksum=1a361d656705445bc78cee90d0b77f0cb74f85222a5b0f7e1db04ed9d03936ef
+make_check=no  # no tests in the package
+
+pre_build() {
+	mv static emote
+}
+
+post_install() {
+	vmkdir etc/xdg/autostart
+	vinstall ${DESTDIR}/usr/share/applications/emote.desktop 644 etc/xdg/autostart/
+}
diff --git a/srcpkgs/manimpango/patches/ignore-tests-upstream-issue.patch b/srcpkgs/manimpango/patches/ignore-tests-upstream-issue.patch
new file mode 100644
index 000000000000..80aeada5cda9
--- /dev/null
+++ b/srcpkgs/manimpango/patches/ignore-tests-upstream-issue.patch
@@ -0,0 +1,38 @@
+--- a/tests/test_colors.py
++++ b/tests/test_colors.py
+@@ -14,13 +14,3 @@ def test_invalid_color_fail(tmpdir):
+     with pytest.raises(ValueError):
+         Text("color", color="invalid", filename=str(loc))
+
+-
+-def test_colors(tmpdir):
+-    expected = Path(CASES_DIR, "color_red.svg")
+-    loc = Path(tmpdir, "test.svg")
+-    assert not loc.exists()
+-    Text("color", color="red", filename=str(loc))
+-    assert loc.exists()
+-    s = SVGStyleTester(gotSVG=loc, expectedSVG=expected)
+-    assert len(s.got_svg_style) == len(s.expected_svg_style)
+-    assert s.got_svg_style == s.expected_svg_style
+--- a/tests/test_markup.py
++++ b/tests/test_markup.py
+@@ -98,19 +98,6 @@ def test_markup_alignment(tmpdir):
+     assert loc.exists()
+
+
+-def test_markup_style(tmpdir):
+-    test_case = CASES_DIR / "hello_blue_world_green.svg"
+-    expected = tmpdir / "expected.svg"
+-    text = "<span foreground='BLUE'>Hello</span>\n<span foreground='GREEN'>World</span>"
+-    MarkupText(
+-        text,
+-        filename=str(expected),
+-    )
+-    s = SVGStyleTester(gotSVG=expected, expectedSVG=test_case)
+-    assert len(s.got_svg_style) == len(s.expected_svg_style)
+-    assert s.got_svg_style == s.expected_svg_style
+-
+-
+ def test_wrap_text(tmpdir):
+     tmpdir = Path(tmpdir)
+     wrapped = tmpdir / "wrap.svg"
diff --git a/srcpkgs/manimpango/template b/srcpkgs/manimpango/template
new file mode 100644
index 000000000000..9a3c9caf07b3
--- /dev/null
+++ b/srcpkgs/manimpango/template
@@ -0,0 +1,25 @@
+# Template file for 'manimpango'
+pkgname=manimpango
+version=0.4.0.post2
+revision=1
+wrksrc="ManimPango-${version}"
+build_style=python3-module
+hostmakedepends="pkg-config python3-setuptools python3-Cython"
+makedepends="gtk+3-devel libgirepository-devel libkeybinder3-devel
+ pango-devel python3-devel"
+depends="xdotool pango python3-virtualenv"
+checkdepends="python3-pytest python3-pytest-cov"
+short_desc="Emoji Picker for Linux written in GTK3"
+maintainer="Animesh Sahu <animeshsahu19@yahoo.com>"
+license="MIT"
+homepage="https://github.com/ManimCommunity/ManimPango"
+distfiles="${homepage}/archive/refs/tags/v${version}.tar.gz"
+checksum=dbcf77e20bdb3e707cdb8b6a6c6e2de5b57c0a71ddaa3051ce0fa3933f74865b
+
+pre_check() {
+	python3 setup.py build_ext -i
+}
+
+post_install() {
+	vlicense LICENSE
+}

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PR PATCH] [Updated] New package: emote-3.0.3
  2022-03-18 11:26 [PR PATCH] New package: emote-3.0.3 Animeshz
                   ` (2 preceding siblings ...)
  2022-03-18 13:03 ` Animeshz
@ 2022-03-18 16:33 ` Animeshz
  2022-09-02  2:16 ` github-actions
  2022-09-17  2:14 ` [PR PATCH] [Closed]: " github-actions
  5 siblings, 0 replies; 7+ messages in thread
From: Animeshz @ 2022-03-18 16:33 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 723 bytes --]

There is an updated pull request by Animeshz against master on the void-packages repository

https://github.com/Animeshz/void-packages emote
https://github.com/void-linux/void-packages/pull/36199

New package: emote-3.0.3
Upstream: https://github.com/tom-james-watson/Emote

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**


#### Local build testing
- I built this PR locally for my native architecture: x86_64-glibc x86_64-musl

A patch file from https://github.com/void-linux/void-packages/pull/36199.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-emote-36199.patch --]
[-- Type: text/x-diff, Size: 8780 bytes --]

From 1133344f57c8e307c0533ec0b9148321dbfda50f Mon Sep 17 00:00:00 2001
From: Animesh Sahu <animeshsahu19@yahoo.com>
Date: Fri, 18 Mar 2022 16:32:32 +0530
Subject: [PATCH] New package: emote-3.0.3

---
 .../patches/fix-single-skintone-emojis.patch  | 14 ++++
 srcpkgs/emote/patches/setup-py.patch          | 16 ++++
 srcpkgs/emote/patches/static-root.patch       | 80 +++++++++++++++++++
 srcpkgs/emote/template                        | 25 ++++++
 .../patches/ignore-tests-upstream-issue.patch | 38 +++++++++
 srcpkgs/manimpango/template                   | 25 ++++++
 6 files changed, 198 insertions(+)
 create mode 100644 srcpkgs/emote/patches/fix-single-skintone-emojis.patch
 create mode 100644 srcpkgs/emote/patches/setup-py.patch
 create mode 100644 srcpkgs/emote/patches/static-root.patch
 create mode 100644 srcpkgs/emote/template
 create mode 100644 srcpkgs/manimpango/patches/ignore-tests-upstream-issue.patch
 create mode 100644 srcpkgs/manimpango/template

diff --git a/srcpkgs/emote/patches/fix-single-skintone-emojis.patch b/srcpkgs/emote/patches/fix-single-skintone-emojis.patch
new file mode 100644
index 000000000000..ef7ee24442a8
--- /dev/null
+++ b/srcpkgs/emote/patches/fix-single-skintone-emojis.patch
@@ -0,0 +1,14 @@
+--- a/emote/user_data.py
++++ b/emote/user_data.py
+@@ -125,7 +125,10 @@ def update_theme(theme):
+
+ def load_skintone():
+     with shelve.open(SHELVE_PATH) as db:
+-        return db.get(SKINTONE, DEFAULT_SKINTONE)
++        skintone = db.get(SKINTONE, DEFAULT_SKINTONE)
++        if skintone not in SKINTONES:
++            skintone = DEFAULT_SKINTONE
++        return skintone
+
+
+ def update_skintone(skintone):
diff --git a/srcpkgs/emote/patches/setup-py.patch b/srcpkgs/emote/patches/setup-py.patch
new file mode 100644
index 000000000000..b2b8b798559c
--- /dev/null
+++ b/srcpkgs/emote/patches/setup-py.patch
@@ -0,0 +1,16 @@
+--- a/setup.py
++++ b/setup.py
+@@ -13,5 +13,12 @@
+     install_requires=[
+         "pygobject==3.36.0",
+         "manimpango==0.3.0"
+-    ]
++    ],
++    package_data={
++        "emote": [
++            "static/*"
++        ]
++    },
++    data_files=[("share/applications", ["snap/gui/emote.desktop"]),
++                ("share/icons", ["snap/gui/emote.svg"])]
+ )
diff --git a/srcpkgs/emote/patches/static-root.patch b/srcpkgs/emote/patches/static-root.patch
new file mode 100644
index 000000000000..0b80f7e4fb27
--- /dev/null
+++ b/srcpkgs/emote/patches/static-root.patch
@@ -0,0 +1,80 @@
+--- a/emote/__init__.py
++++ b/emote/__init__.py
+@@ -9,10 +9,7 @@ from gi.repository import Gtk, Keybinder
+ from emote import picker, css, emojis, user_data, config
+
+ # Register updated emoji font
+-if config.is_snap:
+-    manimpango.register_font(f"{config.snap_root}/static/NotoColorEmoji.ttf")
+-else:
+-    manimpango.register_font("static/NotoColorEmoji.ttf")
++manimpango.register_font(f"{config.static_root}/NotoColorEmoji.ttf")
+
+ settings = Gtk.Settings.get_default()
+
+--- a/emote/config.py
++++ b/emote/config.py
+@@ -6,3 +6,13 @@ is_dev = os.environ.get("ENV") == "dev"
+ is_snap = os.environ.get("SNAP") is not None
+ snap_root = os.environ.get("SNAP")
+ is_wayland = os.environ.get("XDG_SESSION_TYPE", "").lower() == "wayland"
++
++if is_snap:
++    static_root = f"{snap_root}/static"
++elif is_dev:
++    static_root = os.path.dirname(os.path.dirname(__file__)) + "/static"
++else:
++    static_root = os.path.dirname(__file__) + "/static"
++
++if not os.path.exists(static_root):
++    raise Exception(f"Directory not found: {static_root}")
+--- a/emote/css.py
++++ b/emote/css.py
+@@ -11,11 +11,7 @@ def load_css():
+     Load associated CSS for the window.
+     """
+     css_provider = Gtk.CssProvider()
+-
+-    if config.is_snap:
+-        css_provider.load_from_path(f"{config.snap_root}/static/style.css")
+-    else:
+-        css_provider.load_from_path("static/style.css")
++    css_provider.load_from_path(f"{config.static_root}/style.css")
+
+     screen = Gdk.Screen.get_default()
+     styleContext = Gtk.StyleContext()
+--- a/emote/emojis.py
++++ b/emote/emojis.py
+@@ -236,14 +236,9 @@ def init():
+     global all_emojis
+     global emojis_by_category
+
+-    filename = (
+-        f"{config.snap_root}/static/emojis.csv"
+-        if config.is_snap
+-        else "static/emojis.csv"
+-    )
+-
+-    with open(filename, newline="") as csvfile:
++    with open(f"{config.static_root}/emojis.csv", newline="") as csvfile:
+         reader = csv.DictReader(csvfile)
++        skintone_templates = {}
+
+         for row in reader:
+             category = row["group"]
+--- a/emote/picker.py
++++ b/emote/picker.py
+@@ -318,12 +318,7 @@ class EmojiPicker(Gtk.Window):
+         guide_window.connect("destroy", self.on_close_dialog)
+
+     def open_about(self):
+-        logo_path = (
+-            f"{config.snap_root}/static/logo.svg"
+-            if config.is_snap
+-            else "static/logo.svg"
+-        )
+-        logo = Pixbuf.new_from_file(logo_path)
++        logo = Pixbuf.new_from_file(f"{config.static_root}/logo.svg")
+
+         about_dialog = Gtk.AboutDialog(
+             transient_for=self,
diff --git a/srcpkgs/emote/template b/srcpkgs/emote/template
new file mode 100644
index 000000000000..55a37fbdc118
--- /dev/null
+++ b/srcpkgs/emote/template
@@ -0,0 +1,25 @@
+# Template file for 'emote'
+pkgname=emote
+version=3.0.3
+revision=1
+wrksrc="Emote-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools"
+makedepends="gtk+3-devel libgirepository-devel libkeybinder3-devel"
+depends="xdotool python3-virtualenv libkeybinder3 manimpango"
+short_desc="Emoji Picker for Linux written in GTK3"
+maintainer="Animesh Sahu <animeshsahu19@yahoo.com>"
+license="GPL-3.0-or-later"
+homepage="https://github.com/tom-james-watson/Emote"
+distfiles="${homepage}/archive/refs/tags/v${version}.tar.gz"
+checksum=1a361d656705445bc78cee90d0b77f0cb74f85222a5b0f7e1db04ed9d03936ef
+make_check=no  # no tests in the package
+
+pre_build() {
+	mv static emote
+}
+
+post_install() {
+	vmkdir etc/xdg/autostart
+	vinstall ${DESTDIR}/usr/share/applications/emote.desktop 644 etc/xdg/autostart/
+}
diff --git a/srcpkgs/manimpango/patches/ignore-tests-upstream-issue.patch b/srcpkgs/manimpango/patches/ignore-tests-upstream-issue.patch
new file mode 100644
index 000000000000..80aeada5cda9
--- /dev/null
+++ b/srcpkgs/manimpango/patches/ignore-tests-upstream-issue.patch
@@ -0,0 +1,38 @@
+--- a/tests/test_colors.py
++++ b/tests/test_colors.py
+@@ -14,13 +14,3 @@ def test_invalid_color_fail(tmpdir):
+     with pytest.raises(ValueError):
+         Text("color", color="invalid", filename=str(loc))
+
+-
+-def test_colors(tmpdir):
+-    expected = Path(CASES_DIR, "color_red.svg")
+-    loc = Path(tmpdir, "test.svg")
+-    assert not loc.exists()
+-    Text("color", color="red", filename=str(loc))
+-    assert loc.exists()
+-    s = SVGStyleTester(gotSVG=loc, expectedSVG=expected)
+-    assert len(s.got_svg_style) == len(s.expected_svg_style)
+-    assert s.got_svg_style == s.expected_svg_style
+--- a/tests/test_markup.py
++++ b/tests/test_markup.py
+@@ -98,19 +98,6 @@ def test_markup_alignment(tmpdir):
+     assert loc.exists()
+
+
+-def test_markup_style(tmpdir):
+-    test_case = CASES_DIR / "hello_blue_world_green.svg"
+-    expected = tmpdir / "expected.svg"
+-    text = "<span foreground='BLUE'>Hello</span>\n<span foreground='GREEN'>World</span>"
+-    MarkupText(
+-        text,
+-        filename=str(expected),
+-    )
+-    s = SVGStyleTester(gotSVG=expected, expectedSVG=test_case)
+-    assert len(s.got_svg_style) == len(s.expected_svg_style)
+-    assert s.got_svg_style == s.expected_svg_style
+-
+-
+ def test_wrap_text(tmpdir):
+     tmpdir = Path(tmpdir)
+     wrapped = tmpdir / "wrap.svg"
diff --git a/srcpkgs/manimpango/template b/srcpkgs/manimpango/template
new file mode 100644
index 000000000000..1a192c36dd19
--- /dev/null
+++ b/srcpkgs/manimpango/template
@@ -0,0 +1,25 @@
+# Template file for 'manimpango'
+pkgname=manimpango
+version=0.4.0.post2
+revision=1
+wrksrc="ManimPango-${version}"
+build_style=python3-module
+hostmakedepends="pkg-config python3-setuptools python3-Cython"
+makedepends="gtk+3-devel libgirepository-devel libkeybinder3-devel
+ pango-devel python3-devel"
+depends="xdotool pango python3-virtualenv"
+checkdepends="python3-pytest python3-pytest-cov"
+short_desc="Binding for Pango, to use with Manim (python)"
+maintainer="Animesh Sahu <animeshsahu19@yahoo.com>"
+license="MIT"
+homepage="https://github.com/ManimCommunity/ManimPango"
+distfiles="${homepage}/archive/refs/tags/v${version}.tar.gz"
+checksum=dbcf77e20bdb3e707cdb8b6a6c6e2de5b57c0a71ddaa3051ce0fa3933f74865b
+
+pre_check() {
+	python3 setup.py build_ext -i
+}
+
+post_install() {
+	vlicense LICENSE
+}

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: New package: emote-3.0.3
  2022-03-18 11:26 [PR PATCH] New package: emote-3.0.3 Animeshz
                   ` (3 preceding siblings ...)
  2022-03-18 16:33 ` Animeshz
@ 2022-09-02  2:16 ` github-actions
  2022-09-17  2:14 ` [PR PATCH] [Closed]: " github-actions
  5 siblings, 0 replies; 7+ messages in thread
From: github-actions @ 2022-09-02  2:16 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

New comment by github-actions[bot] on void-packages repository

https://github.com/void-linux/void-packages/pull/36199#issuecomment-1234990921

Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that.  If this pull request is still relevant bump it or assign it.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PR PATCH] [Closed]: New package: emote-3.0.3
  2022-03-18 11:26 [PR PATCH] New package: emote-3.0.3 Animeshz
                   ` (4 preceding siblings ...)
  2022-09-02  2:16 ` github-actions
@ 2022-09-17  2:14 ` github-actions
  5 siblings, 0 replies; 7+ messages in thread
From: github-actions @ 2022-09-17  2:14 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 567 bytes --]

There's a closed pull request on the void-packages repository

New package: emote-3.0.3
https://github.com/void-linux/void-packages/pull/36199

Description:
Upstream: https://github.com/tom-james-watson/Emote

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**


#### Local build testing
- I built this PR locally for my native architecture: x86_64-glibc x86_64-musl

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-09-17  2:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-18 11:26 [PR PATCH] New package: emote-3.0.3 Animeshz
2022-03-18 12:55 ` [PR PATCH] [Updated] " Animeshz
2022-03-18 13:02 ` Animeshz
2022-03-18 13:03 ` Animeshz
2022-03-18 16:33 ` Animeshz
2022-09-02  2:16 ` github-actions
2022-09-17  2:14 ` [PR PATCH] [Closed]: " github-actions

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).