unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#51920] [PATCH] gnu: Add inkbox.
@ 2021-11-17 11:50 phodina via Guix-patches via
  2021-11-21 20:52 ` Nicolas Goaziou
  0 siblings, 1 reply; 4+ messages in thread
From: phodina via Guix-patches via @ 2021-11-17 11:50 UTC (permalink / raw)
  To: 51920

* gnu/packages/qt.scm (inkbox): New variable.

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 4625d2220d..0f1744d8e8 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -3021,6 +3021,42 @@ (define-public python-pyside-2-tools
      "Contains lupdate, rcc and uic tools for PySide2")
     (license license:gpl2)))

+(define-public inkbox
+  (package
+    (name "inkbox")
+    (version "1.7")
+    (source (origin
+              (method git-fetch)
+              (uri
+               (git-reference
+                (url "https://alpinekobox.ddns.net/InkBox/inkbox/")
+                (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "126cqn0ixcn608lv2hd9f7zmzj4g448bnpxc7wv9cvg83qqajh5n"))))
+    (build-system qt-build-system)
+    (arguments
+     '(#:tests? #f
+       #:make-flags
+       (list (string-append "PREFIX="
+                            (assoc-ref %outputs "out")))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'prefix-opt
+           (lambda* _
+             (substitute* "inkbox.pro"
+               (("/opt/\\$\\$\\{TARGET\\}") (string-append (assoc-ref %outputs "out"))))))
+         (replace 'configure
+           (lambda* (#:key make-flags #:allow-other-keys)
+             (apply invoke (cons "qmake" make-flags)))))))
+    (native-inputs
+     `(("qtbase" ,qtbase-5)))
+    (home-page "https://alpinekobox.ddns.net/InkBox/inkbox/")
+    (synopsis "EBook reader")
+    (description "This package provides InkBox eBook reader.")
+    (license license:gpl1)))
+
 (define-public libqglviewer
   (package
     (name "libqglviewer")
--
2.33.0




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

* [bug#51920] [PATCH] gnu: Add inkbox.
  2021-11-17 11:50 [bug#51920] [PATCH] gnu: Add inkbox phodina via Guix-patches via
@ 2021-11-21 20:52 ` Nicolas Goaziou
  2021-11-28 19:12   ` [bug#51920] [PATCH v2] " phodina via Guix-patches via
  0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Goaziou @ 2021-11-21 20:52 UTC (permalink / raw)
  To: 51920; +Cc: phodina

Hello,

phodina via Guix-patches via <guix-patches@gnu.org> writes:

> * gnu/packages/qt.scm (inkbox): New variable.

Thank you. Some comments follow.

First, this should go to "ebook.scm" instead of "qt.scm".

> +    (source (origin

You should instead a newline before "(origin".

> +              (method git-fetch)
> +              (uri
> +               (git-reference
> +                (url "https://alpinekobox.ddns.net/InkBox/inkbox/")
> +                (commit version)))
> +              (file-name (git-file-name name version))
> +              (sha256
> +               (base32
> +                "126cqn0ixcn608lv2hd9f7zmzj4g448bnpxc7wv9cvg83qqajh5n"))))

Nitpick: hash should go on the same line as base32.

> +    (build-system qt-build-system)
> +    (arguments
> +     '(#:tests? #f

You should add a comment explaining why tests are disabled (i.e.: there
is no tests).

> +       #:phases
> +       (modify-phases %standard-phases
> +         (add-after 'unpack 'prefix-opt
> +           (lambda* _
> +             (substitute* "inkbox.pro"
> +               (("/opt/\\$\\$\\{TARGET\\}") (string-append (assoc-ref %outputs "out"))))))

You should use (lambda* (#:key outputs #:allow-other-keys) ...) and then
(assoc-ref outputs "out") instead.

> +         (replace 'configure
> +           (lambda* (#:key make-flags #:allow-other-keys)
> +             (apply invoke (cons "qmake" make-flags)))))))
> +    (native-inputs
> +     `(("qtbase" ,qtbase-5)))

Does it fail with qtbase 6?

> +    (license license:gpl1)))

License is actually gpl3, according to LICENSE file.

Could you send an updated patch?

Regards,
-- 
Nicolas Goaziou




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

* [bug#51920] [PATCH v2] gnu: Add inkbox.
  2021-11-21 20:52 ` Nicolas Goaziou
@ 2021-11-28 19:12   ` phodina via Guix-patches via
  2021-11-29 21:21     ` bug#51920: " Nicolas Goaziou
  0 siblings, 1 reply; 4+ messages in thread
From: phodina via Guix-patches via @ 2021-11-28 19:12 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: 51920

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

Hi Nicolas,

> Hello,
>
> phodina via Guix-patches via guix-patches@gnu.org writes:
>
> > -   gnu/packages/qt.scm (inkbox): New variable.
>
> Thank you. Some comments follow.
>
> First, this should go to "ebook.scm" instead of "qt.scm".

Thanks, that is a better place to put it.
>
> > -   (source (origin
>
> You should instead a newline before "(origin".

Fixed.
>
> > -                (method git-fetch)
> >
> >
> > -                (uri
> >
> >
> > -                 (git-reference
> >
> >
> > -                  (url "https://alpinekobox.ddns.net/InkBox/inkbox/")
> >
> >
> > -                  (commit version)))
> >
> >
> > -                (file-name (git-file-name name version))
> >
> >
> > -                (sha256
> >
> >
> > -                 (base32
> >
> >
> > -                  "126cqn0ixcn608lv2hd9f7zmzj4g448bnpxc7wv9cvg83qqajh5n"))))
> >
> >
>
> Nitpick: hash should go on the same line as base32.

Fixed.
>
> > -   (build-system qt-build-system)
> > -   (arguments
> > -       '(#:tests? #f
> >
> >
>
> You should add a comment explaining why tests are disabled (i.e.: there
>
> is no tests).

Fixed.
>
> > -         #:phases
> >
> >
> > -         (modify-phases %standard-phases
> >
> >
> > -           (add-after 'unpack 'prefix-opt
> >
> >
> > -             (lambda* _
> >
> >
> > -               (substitute* "inkbox.pro"
> >
> >
> > -                 (("/opt/\\\\$\\\\$\\\\{TARGET\\\\}") (string-append (assoc-ref %outputs "out"))))))
> >
> >
>
> You should use (lambda* (#:key outputs #:allow-other-keys) ...) and then
>
> (assoc-ref outputs "out") instead.
>
> > -           (replace 'configure
> >
> >
> > -             (lambda* (#:key make-flags #:allow-other-keys)
> >

Thanks, that is the correct syntax.
> >
> > -               (apply invoke (cons "qmake" make-flags)))))))
> >
> >
> > -   (native-inputs
> > -       `(("qtbase" ,qtbase-5)))
> >
> >
>
> Does it fail with qtbase 6?
Unfortunately it does not compile though it shouldn't be that hard to port it. But here it is about packaging.
>
> > -   (license license:gpl1)))
>
> License is actually gpl3, according to LICENSE file.

Sorry, my mistake.
>
> Could you send an updated patch?
>
> Regards,
> --------------------------------------------------------------------------------------------------
>
> Nicolas Goaziou

Thanks for the remarks!

----
Petr

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: v2-0001-gnu-Add-inkbox.patch --]
[-- Type: text/x-patch; name=v2-0001-gnu-Add-inkbox.patch, Size: 2553 bytes --]

From 9de0cd711006728bfbaaf6f0bc39bc7cd2c22915 Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Wed, 10 Nov 2021 22:24:33 +0100
Subject: [PATCH v2] gnu: Add inkbox.

* gnu/packages/qt.scm (inkbox): New variable.

diff --git a/gnu/packages/ebook.scm b/gnu/packages/ebook.scm
index abb04b6d93..b2bf4e6dfb 100644
--- a/gnu/packages/ebook.scm
+++ b/gnu/packages/ebook.scm
@@ -9,6 +9,7 @@
 ;;; Copyright © 2020, 2021 Vinicius Monego <monego@posteo.net>
 ;;; Copyright © 2020 Zheng Junjie <873216071@qq.com>
 ;;; Copyright © 2021 la snesne <lasnesne@lagunposprasihopre.org>
+;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -35,6 +36,7 @@ (define-module (gnu packages ebook)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system meson)
   #:use-module (guix build-system python)
+  #:use-module (guix build-system qt)
   #:use-module (gnu packages)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages compression)
@@ -376,6 +378,42 @@ (define-public ebook-tools
 accessing and converting various ebook file formats.")
     (license license:expat)))
 
+(define-public inkbox
+  (package
+    (name "inkbox")
+    (version "1.7")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://alpinekobox.ddns.net/InkBox/inkbox/")
+         (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "126cqn0ixcn608lv2hd9f7zmzj4g448bnpxc7wv9cvg83qqajh5n"))))
+    (build-system qt-build-system)
+    (arguments
+     '(#:tests? #f                      ; no test suite
+       #:make-flags
+       (list (string-append "PREFIX="
+                            (assoc-ref %outputs "out")))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'prefix-opt
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "inkbox.pro"
+               (("/opt/\\$\\$\\{TARGET\\}") (string-append (assoc-ref outputs "out"))))))
+         (replace 'configure
+           (lambda* (#:key make-flags #:allow-other-keys)
+             (apply invoke (cons "qmake" make-flags)))))))
+    (native-inputs
+     `(("qtbase" ,qtbase-5)))
+    (home-page "https://alpinekobox.ddns.net/InkBox/inkbox/")
+    (synopsis "EBook reader")
+    (description "This package provides InkBox eBook reader.")
+    (license license:gpl3)))
+
 (define-public liblinebreak
   (package
     (name "liblinebreak")
-- 
2.33.0


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

* bug#51920: [PATCH v2] gnu: Add inkbox.
  2021-11-28 19:12   ` [bug#51920] [PATCH v2] " phodina via Guix-patches via
@ 2021-11-29 21:21     ` Nicolas Goaziou
  0 siblings, 0 replies; 4+ messages in thread
From: Nicolas Goaziou @ 2021-11-29 21:21 UTC (permalink / raw)
  To: phodina; +Cc: 51920-done, phodina via Guix-patches via

Hello,

phodina <phodina@protonmail.com> writes:

> Subject: [PATCH v2] gnu: Add inkbox.

Applied. Thank you.

Regards,
-- 
Nicolas Goaziou




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

end of thread, other threads:[~2021-11-29 21:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-17 11:50 [bug#51920] [PATCH] gnu: Add inkbox phodina via Guix-patches via
2021-11-21 20:52 ` Nicolas Goaziou
2021-11-28 19:12   ` [bug#51920] [PATCH v2] " phodina via Guix-patches via
2021-11-29 21:21     ` bug#51920: " Nicolas Goaziou

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).