* [bug#65012] [PATCH] gnu: Add picket.
@ 2023-08-02 11:29 Sergio Pastor Pérez
2023-08-02 13:42 ` Jean Pierre De Jesus DIAZ via Guix-patches via
0 siblings, 1 reply; 7+ messages in thread
From: Sergio Pastor Pérez @ 2023-08-02 11:29 UTC (permalink / raw)
To: 65012; +Cc: Sergio Pastor Pérez
* gnu/packages/image.scm (picket): New variable.
---
gnu/packages/image.scm | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 3336e38852..ef63f3c3ff 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -1914,6 +1914,39 @@ (define-public niftilib
(home-page "https://niftilib.sourceforge.net")
(license license:public-domain)))
+(define-public picket
+ (package
+ (name "picket")
+ (version "1.3")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/rajter/picket")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1zhpynyakjx9nc51b1j80b4y3138p3l380kp1cqmmjx2n9430144"))))
+ (native-inputs (list pkg-config))
+ (inputs (list gtkmm-3))
+ (arguments
+ (list #:tests? #f
+ #:phases #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-install-prefix
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("/usr/")
+ #$output))
+ (substitute* "src/main.cpp"
+ (("/usr")
+ #$output)))))))
+ (build-system cmake-build-system)
+ (home-page "https://github.com/rajter/picket")
+ (synopsis "Native linux screen color picker")
+ (description
+ "Screen color picker for linux with magnifier and custom/user defined formats.")
+ (license license:expat)))
+
(define-public gpick
(package
(name "gpick")
base-commit: 5aceacac65784bd2e1fd12304f965ae6026de49d
prerequisite-patch-id: c56db9fa7fc4e07452dea53f2d450bd83abbbc1a
prerequisite-patch-id: 3e6318d61f2efa01f4435152f2139eef8f72572c
prerequisite-patch-id: 1b23c59bab92820a1e102137909922f4d71ed8f9
prerequisite-patch-id: 78a291411f8d86beabbf6d49df0cc78702ad4e65
prerequisite-patch-id: 579224b39cae7869ce11e2e8dba046b5eef606c7
prerequisite-patch-id: f1f62fd5d83d603ca35c17071e615352e90753e3
prerequisite-patch-id: 1843bca37f83e494be67c24e975727fb1fe1248c
prerequisite-patch-id: 5cc0d6cd16ae2ab21c444ed9cabfeea5615e8cda
prerequisite-patch-id: 92a3fab6e4174a4d4877fc5b426752df81e4df39
prerequisite-patch-id: ebf3fd3a8bb02f7dc5cdf504f63d5028b29fe69e
prerequisite-patch-id: 863acbffb59c3b17fb4ea7e11710cbd793c0778d
prerequisite-patch-id: 076564693450d3e4a51cda68c47b856022f84e69
--
2.39.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [bug#65012] [PATCH] gnu: Add picket.
2023-08-02 11:29 [bug#65012] [PATCH] gnu: Add picket Sergio Pastor Pérez
@ 2023-08-02 13:42 ` Jean Pierre De Jesus DIAZ via Guix-patches via
2023-09-10 15:42 ` [bug#65012] Extract mINI library from Picket package Sergio Pastor Pérez
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Jean Pierre De Jesus DIAZ via Guix-patches via @ 2023-08-02 13:42 UTC (permalink / raw)
To: 65012@debbugs.gnu.org; +Cc: sergio.pastorperez@outlook.es
Hello Sergio,
It seems that picket bundles the mINI library [1], this can be easily fixed by adding an snippet to the `origin' to remove the bundled code.
It'd also require to package mINI [2], it should be simple to do since it's a header only library and does not require compilation of any sort, so using copy-build-system to install `src/mini/ini.h` to the package's output `include` folder should be trivial.
Ideally ini.h should be installed to `include/mini/ini.h' in order to use it as the README.md specifies [3] by doing:
#include <mini/ini.h>
It may require patching or substitutions on picket to use the newly packaged library though, but shouldn't be hard to do.
[1]: https://github.com/rajter/picket/blob/master/src/cfg/ini.h
[2]: https://github.com/pulzed/mINI
[3]: https://github.com/pulzed/mINI/blob/a1ff72e8898db8b53282e9eb7c7ec5973519787e/README.md#installation
Cheers,
—
Jean-Pierre De Jesus DIAZ
^ permalink raw reply [flat|nested] 7+ messages in thread
* [bug#65012] Extract mINI library from Picket package
2023-08-02 13:42 ` Jean Pierre De Jesus DIAZ via Guix-patches via
@ 2023-09-10 15:42 ` Sergio Pastor Pérez
2023-09-10 15:42 ` [bug#65012] [PATCH v2 1/2] gnu: Add mini Sergio Pastor Pérez
2023-09-10 15:42 ` [bug#65012] [PATCH v2 2/2] " Sergio Pastor Pérez
2 siblings, 0 replies; 7+ messages in thread
From: Sergio Pastor Pérez @ 2023-09-10 15:42 UTC (permalink / raw)
To: 65012
This 2 patches extract the mINI library from the Picket package.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [bug#65012] [PATCH v2 1/2] gnu: Add mini.
2023-08-02 13:42 ` Jean Pierre De Jesus DIAZ via Guix-patches via
2023-09-10 15:42 ` [bug#65012] Extract mINI library from Picket package Sergio Pastor Pérez
@ 2023-09-10 15:42 ` Sergio Pastor Pérez
2023-09-11 21:50 ` [bug#65012] [PATCH] gnu: Add picket Ludovic Courtès
2023-09-10 15:42 ` [bug#65012] [PATCH v2 2/2] " Sergio Pastor Pérez
2 siblings, 1 reply; 7+ messages in thread
From: Sergio Pastor Pérez @ 2023-09-10 15:42 UTC (permalink / raw)
To: 65012; +Cc: Sergio Pastor Pérez
* gnu/packages/image.scm (mini): New variable.
---
This patch bundles the mINI header library. This library includes a series of
tests which have g++, linux-header, and a few other dependencies that get
satisfied with `gcc-toolchain'. For an unknown reason adding the module `gnu
packages commencement` breaks Guile. This patches have been tested under
`GUIX_PACKAGE_PATH` successfully. Also, adding this package definition under a
module which already includes the commencement module does not present the
issue.
For this reason I submit this 2 patches as a proposal. Any further info
regarding the issue described would be appreciated.
gnu/packages/image.scm | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 3336e38852..f84af81384 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -68,6 +68,7 @@ (define-module (gnu packages image)
#:use-module (gnu packages cpp)
#:use-module (gnu packages curl)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages commencement)
#:use-module (gnu packages documentation)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages freedesktop)
@@ -1914,6 +1915,39 @@ (define-public niftilib
(home-page "https://niftilib.sourceforge.net")
(license license:public-domain)))
+(define-public mini
+ (package
+ (name "mini")
+ (version "0.9.14")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/pulzed/mINI")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "01wn7h9rjz9h6cr11dd62jsb3315d1h6c33pdmwi2l7d8a4n3h8d"))))
+ (build-system copy-build-system)
+ (arguments
+ (list #:install-plan ''(("src/mini/ini.h" "include/mini/ini.h"))
+ #:phases #~(modify-phases %standard-phases
+ (add-before 'install 'check
+ (lambda _
+ (with-directory-excursion "tests"
+ (for-each (lambda (test)
+ (let ((test-name (basename test
+ ".cpp")))
+ (invoke "./build.sh" test-name)
+ (invoke "./run.sh" test-name)))
+ (find-files "." ".cpp"))))))))
+ (native-inputs (list gcc-toolchain))
+ (home-page "https://github.com/pulzed/mINI")
+ (synopsis "INI file reader and writer header library")
+ (description
+ "This is a tiny, header only C++ library for manipulating INI files.")
+ (license license:expat)))
+
(define-public gpick
(package
(name "gpick")
--
2.41.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [bug#65012] [PATCH v2 2/2] gnu: Add picket.
2023-08-02 13:42 ` Jean Pierre De Jesus DIAZ via Guix-patches via
2023-09-10 15:42 ` [bug#65012] Extract mINI library from Picket package Sergio Pastor Pérez
2023-09-10 15:42 ` [bug#65012] [PATCH v2 1/2] gnu: Add mini Sergio Pastor Pérez
@ 2023-09-10 15:42 ` Sergio Pastor Pérez
2023-09-11 21:44 ` [bug#65012] [PATCH] " Ludovic Courtès
2 siblings, 1 reply; 7+ messages in thread
From: Sergio Pastor Pérez @ 2023-09-10 15:42 UTC (permalink / raw)
To: 65012; +Cc: Sergio Pastor Pérez
* gnu/packages/image.scm (picket): New variable.
---
gnu/packages/image.scm | 44 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index f84af81384..ad53c8e5a2 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -1948,6 +1948,50 @@ (define-public mini
"This is a tiny, header only C++ library for manipulating INI files.")
(license license:expat)))
+(define-public picket
+ (package
+ (name "picket")
+ (version "1.3")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/rajter/picket")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1zhpynyakjx9nc51b1j80b4y3138p3l380kp1cqmmjx2n9430144"))
+ (snippet '(begin
+ ;; bundled mINI header library.
+ (delete-file "src/cfg/ini.h")))))
+ (native-inputs (list pkg-config))
+ (inputs (list gtkmm-3 mini))
+ (arguments
+ (list #:tests? #f
+ #:phases #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-mini-includes
+ (lambda _
+ (substitute* '("src/cfg/config.h"
+ "src/cfg/config.cpp")
+ (("#include \"ini.h\"")
+ "#include \"mini/ini.h\""))
+ (substitute* "src/main.cpp"
+ (("/usr")
+ #$output))))
+ (add-after 'unpack 'fix-cmake-paths
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("src/cfg/ini.h")
+ (string-append #$mini "/include/mini/ini.h"))
+ (("/usr/")
+ #$output)))))))
+ (build-system cmake-build-system)
+ (home-page "https://github.com/rajter/picket")
+ (synopsis "Native linux screen color picker with custom format output")
+ (description
+ "Screen color picker for linux with magnifier and custom/user defined formats.")
+ (license license:gpl3+)))
+
(define-public gpick
(package
(name "gpick")
--
2.41.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [bug#65012] [PATCH] gnu: Add picket.
2023-09-10 15:42 ` [bug#65012] [PATCH v2 2/2] " Sergio Pastor Pérez
@ 2023-09-11 21:44 ` Ludovic Courtès
0 siblings, 0 replies; 7+ messages in thread
From: Ludovic Courtès @ 2023-09-11 21:44 UTC (permalink / raw)
To: Sergio Pastor Pérez; +Cc: 65012
[-- Attachment #1: Type: text/plain, Size: 165 bytes --]
Sergio Pastor Pérez <sergio.pastorperez@outlook.es> skribis:
> * gnu/packages/image.scm (picket): New variable.
Applied with the changes below.
Thanks!
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1385 bytes --]
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 480335d704..4332a7ead8 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -1996,17 +1996,19 @@ (define-public picket
(("/usr")
#$output))))
(add-after 'unpack 'fix-cmake-paths
- (lambda _
+ (lambda* (#:key inputs #:allow-other-keys)
(substitute* "CMakeLists.txt"
(("src/cfg/ini.h")
- (string-append #$mini "/include/mini/ini.h"))
+ (search-input-file inputs
+ "/include/mini/ini.h"))
(("/usr/")
#$output)))))))
(build-system cmake-build-system)
(home-page "https://github.com/rajter/picket")
- (synopsis "Native linux screen color picker with custom format output")
+ (synopsis "Screen color picker with custom format output")
(description
- "Screen color picker for linux with magnifier and custom/user defined formats.")
+ "Picket is a screen color picker that includes a magnifier and supports
+custom formats for representing color values..")
(license license:gpl3+)))
(define-public gpick
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [bug#65012] [PATCH] gnu: Add picket.
2023-09-10 15:42 ` [bug#65012] [PATCH v2 1/2] gnu: Add mini Sergio Pastor Pérez
@ 2023-09-11 21:50 ` Ludovic Courtès
0 siblings, 0 replies; 7+ messages in thread
From: Ludovic Courtès @ 2023-09-11 21:50 UTC (permalink / raw)
To: Sergio Pastor Pérez; +Cc: 65012
[-- Attachment #1: Type: text/plain, Size: 1033 bytes --]
Sergio Pastor Pérez <sergio.pastorperez@outlook.es> skribis:
> * gnu/packages/image.scm (mini): New variable.
> ---
> This patch bundles the mINI header library. This library includes a series of
> tests which have g++, linux-header, and a few other dependencies that get
> satisfied with `gcc-toolchain'. For an unknown reason adding the module `gnu
> packages commencement` breaks Guile. This patches have been tested under
> `GUIX_PACKAGE_PATH` successfully. Also, adding this package definition under a
> module which already includes the commencement module does not present the
> issue.
>
> For this reason I submit this 2 patches as a proposal. Any further info
> regarding the issue described would be appreciated.
As you found out, the (gnu packages commencement) module cannot be
imported directly.
The solution here is to use ‘gnu-build-system’, which has GCC & co. as
implicit inputs, and adjust the relevant phases.
I made the change below and applied this patch.
Thanks!
Ludo’.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 2754 bytes --]
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 4332a7ead8..403409975a 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -68,7 +68,6 @@ (define-module (gnu packages image)
#:use-module (gnu packages cpp)
#:use-module (gnu packages curl)
#:use-module (gnu packages compression)
- #:use-module (gnu packages commencement)
#:use-module (gnu packages documentation)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages freedesktop)
@@ -1945,24 +1944,30 @@ (define-public mini
(sha256
(base32
"01wn7h9rjz9h6cr11dd62jsb3315d1h6c33pdmwi2l7d8a4n3h8d"))))
- (build-system copy-build-system)
+ (build-system gnu-build-system)
(arguments
- (list #:install-plan ''(("src/mini/ini.h" "include/mini/ini.h"))
- #:phases #~(modify-phases %standard-phases
- (add-before 'install 'check
- (lambda _
- (with-directory-excursion "tests"
- (for-each (lambda (test)
- (let ((test-name (basename test
- ".cpp")))
- (invoke "./build.sh" test-name)
- (invoke "./run.sh" test-name)))
- (find-files "." ".cpp"))))))))
- (native-inputs (list gcc-toolchain))
+ (list #:phases
+ #~(modify-phases %standard-phases
+ (delete 'build)
+ (delete 'configure)
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (with-directory-excursion "tests"
+ (for-each (lambda (test)
+ (let ((test-name (basename test
+ ".cpp")))
+ (invoke "./build.sh" test-name)
+ (invoke "./run.sh" test-name)))
+ (find-files "." ".cpp"))))))
+ (replace 'install
+ (lambda _
+ (install-file "src/mini/ini.h"
+ (string-append #$output "/include/mini")))))))
(home-page "https://github.com/pulzed/mINI")
(synopsis "INI file reader and writer header library")
(description
- "This is a tiny, header only C++ library for manipulating INI files.")
+ "This is a tiny, header-only C++ library for manipulating INI files.")
(license license:expat)))
(define-public picket
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-09-11 21:51 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-02 11:29 [bug#65012] [PATCH] gnu: Add picket Sergio Pastor Pérez
2023-08-02 13:42 ` Jean Pierre De Jesus DIAZ via Guix-patches via
2023-09-10 15:42 ` [bug#65012] Extract mINI library from Picket package Sergio Pastor Pérez
2023-09-10 15:42 ` [bug#65012] [PATCH v2 1/2] gnu: Add mini Sergio Pastor Pérez
2023-09-11 21:50 ` [bug#65012] [PATCH] gnu: Add picket Ludovic Courtès
2023-09-10 15:42 ` [bug#65012] [PATCH v2 2/2] " Sergio Pastor Pérez
2023-09-11 21:44 ` [bug#65012] [PATCH] " Ludovic Courtès
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.