Github messages for voidlinux
 help / color / mirror / Atom feed
From: classabbyamp <classabbyamp@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] bookworm: patch for python3 compat
Date: Fri, 13 Oct 2023 08:37:20 +0200	[thread overview]
Message-ID: <20231013063720.7Zs4p8MqrKQUaIGAMGgLrZGHg_sUTHUw6ayrXjTG7o0@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-46627@inbox.vuxu.org>

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

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

https://github.com/classabbyamp/void-packages bookworm
https://github.com/void-linux/void-packages/pull/46627

bookworm: patch for python3 compat
adapted from https://github.com/babluboy/bookworm/commit/c7c3643760caea4bd26b1d56ed033a52f6e34124 with pyc files removed and rebased on 1.1.2

the size of the patch kinda sucks but the edits made were a bit non-trivial

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



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

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

From a8ecf9fae196f414ef77bd37b083719e1ddd35dc Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Wed, 11 Oct 2023 21:14:14 -0400
Subject: [PATCH] bookworm: patch for python3 compat

---
 srcpkgs/bookworm/patches/py3-scriptname.patch | 15 +++++++++++++++
 srcpkgs/bookworm/template                     | 18 ++++++++++++++----
 2 files changed, 29 insertions(+), 4 deletions(-)
 create mode 100644 srcpkgs/bookworm/patches/py3-scriptname.patch

diff --git a/srcpkgs/bookworm/patches/py3-scriptname.patch b/srcpkgs/bookworm/patches/py3-scriptname.patch
new file mode 100644
index 0000000000000..0b90c8836e1b2
--- /dev/null
+++ b/srcpkgs/bookworm/patches/py3-scriptname.patch
@@ -0,0 +1,15 @@
+fix script name for larger patch in distfiles, as there were some changes between
+then and now that prevent the patch from applying
+
+--- a/src/constants.vala.in
++++ b/src/constants.vala.in
+@@ -167,8 +167,7 @@
+ 	public const string HTML_SCRIPT_RESOURCE_LOCATION = "resource:///" + 
+ 							RESOURCE_PREFIX + BOOKWORM_HTML_SCRIPT;
+ 
+-	public const string MOBIUNPACK_SCRIPT_LOCATION = INSTALL_MOBILIB_DIR +
+-							"/mobi_unpack.py";
++	public const string MOBIUNPACK_SCRIPT_LOCATION = INSTALL_MOBILIB_DIR + "/kindleunpack.py";
+ 
+ 	//Set resource paths for images and icons
+ 	public const string PREV_PAGE_ICON_IMAGE_LOCATION = RESOURCE_PREFIX+"16-bookworm-go-previous.svg";
diff --git a/srcpkgs/bookworm/template b/srcpkgs/bookworm/template
index 0205a6e624275..22eb3ab8c9ede 100644
--- a/srcpkgs/bookworm/template
+++ b/srcpkgs/bookworm/template
@@ -1,7 +1,7 @@
 # Template file for 'bookworm'
 pkgname=bookworm
 version=1.1.2
-revision=5
+revision=6
 build_style=meson
 hostmakedepends="pkg-config glib-devel gettext vala"
 makedepends="gtk+3-devel libgee08-devel granite-devel
@@ -12,9 +12,19 @@ short_desc="Simple, focused eBook reader"
 maintainer="Giuseppe Fierro <gspe@ae-design.ws>"
 license="GPL-3.0-or-later"
 homepage="https://babluboy.github.io/bookworm"
-distfiles="https://github.com/babluboy/${pkgname}/archive/${version}.tar.gz"
-checksum=6d27e55697debfa08f7cc15805413b74c94c55111cdf2d333b306228eccad824
-python_version=2 # Should be set to python3 when updated to version > 1.1.2
+distfiles="https://github.com/babluboy/bookworm/archive/${version}.tar.gz
+ https://github.com/babluboy/bookworm/commit/c7c3643760caea4bd26b1d56ed033a52f6e34124.patch>python3.patch"
+checksum="6d27e55697debfa08f7cc15805413b74c94c55111cdf2d333b306228eccad824
+ ac3981fc515380a8a6d34707ca404a9b8ce16174a51520f1e9f41ee54b044e4b"
+skip_extraction="python3.patch"
+python_version=3
+
+post_patch() {
+	# remove the binary pyc files and file that needs to be patched separately
+	# also apply https://github.com/babluboy/bookworm/commit/5719d4367c2bded1c3660238465857d5d6f7f8fc
+	patch -Np1 < <(sed 's,#! /usr/bin/python,#!usr/bin/env python,; /^diff --git .*\.pyc$/,/^diff --git/d; /^--- .*constants.vala.in$/q' \
+		"${XBPS_SRCDISTDIR}/${pkgname}-${version}/python3.patch")
+}
 
 post_install() {
 	ln -s com.github.babluboy.bookworm ${DESTDIR}/usr/bin/bookworm

  parent reply	other threads:[~2023-10-13  6:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-12  1:34 [PR PATCH] " classabbyamp
2023-10-13  6:32 ` [PR PATCH] [Updated] " classabbyamp
2023-10-13  6:35 ` classabbyamp
2023-10-13  6:37 ` classabbyamp [this message]
2023-10-13  6:44 ` [PR PATCH] [Merged]: " classabbyamp

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=20231013063720.7Zs4p8MqrKQUaIGAMGgLrZGHg_sUTHUw6ayrXjTG7o0@z \
    --to=classabbyamp@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).