From: Animeshz <Animeshz@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] New package: emote-3.0.3
Date: Fri, 18 Mar 2022 12:26:43 +0100 [thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-36199@inbox.vuxu.org> (raw)
[-- 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
next reply other threads:[~2022-03-18 11:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-18 11:26 Animeshz [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-36199@inbox.vuxu.org \
--to=animeshz@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).