[PATCH] gnu: Add libgrapheme.

  • Done
  • quality assurance status badge
Details
2 participants
  • cage
  • Maxim Cournoyer
Owner
unassigned
Submitted by
cage
Severity
normal

Debbugs page

C
(address . guix-patches@gnu.org)
505f3bdf672b32d2d9413ed2e4d83a769518d9ea.1708780937.git.cage-dev@twistfold.it
Change-Id: If19bc5534b8bc3d0aeda4f1e70baa8d42e4948e0
---
gnu/packages/suckless.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)

Toggle diff (43 lines)
diff --git a/gnu/packages/suckless.scm b/gnu/packages/suckless.scm
index 81e2151854..e71b0e9252 100644
--- a/gnu/packages/suckless.scm
+++ b/gnu/packages/suckless.scm
@@ -1393,3 +1393,33 @@ (define-public 9base
(description
"This package provides ported versions of various Plan 9 userland tools
for Unix.")))
+
+(define-public libgrapheme
+ (package
+ (name "libgrapheme")
+ (version "2.0.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://dl.suckless.org/libgrapheme/libgrapheme-"
+ version
+ ".tar.gz"))
+ (sha256
+ (base32 "099i2jm9c25nkbg5420wr12z0gd189gcw5j1ssjmpmbbwzfvv2x6"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:tests? #f
+ #:phases #~(modify-phases %standard-phases
+ (add-after 'configure 'post-configure
+ (lambda _
+ (substitute* "config.mk"
+ (("ldconfig") "")))))
+ #:make-flags
+ #~(list (string-append "CC=" #$(cc-for-target))
+ (string-append "PREFIX=" #$output))))
+ (home-page "https://libs.suckless.org/libgrapheme/")
+ (synopsis "Library to handle string according to Unicode standard")
+ (description "Libgrapheme is an extremely simple freestanding C99 library
+providing utilities for properly handling strings
+according to the latest Unicode standard 15.0.0.")
+ (license license:isc)))

base-commit: de24aaf13b17d6c019f3f240fd0eb0e1b8654970
prerequisite-patch-id: aa0b913d42bee51002e7243019d5529984321e91
--
2.41.0
M
M
Maxim Cournoyer wrote on 26 Feb 08:24 -0800
(name . cage)(address . cage-dev@twistfold.it)(address . 69355@debbugs.gnu.org)
87msrnjir9.fsf@gmail.com
Hi,

cage <cage-dev@twistfold.it> writes:

Toggle quote (30 lines)
> Change-Id: If19bc5534b8bc3d0aeda4f1e70baa8d42e4948e0
> ---
> gnu/packages/suckless.scm | 30 ++++++++++++++++++++++++++++++
> 1 file changed, 30 insertions(+)
>
> diff --git a/gnu/packages/suckless.scm b/gnu/packages/suckless.scm
> index 81e2151854..e71b0e9252 100644
> --- a/gnu/packages/suckless.scm
> +++ b/gnu/packages/suckless.scm
> @@ -1393,3 +1393,33 @@ (define-public 9base
> (description
> "This package provides ported versions of various Plan 9 userland tools
> for Unix.")))
> +
> +(define-public libgrapheme
> + (package
> + (name "libgrapheme")
> + (version "2.0.2")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (string-append "https://dl.suckless.org/libgrapheme/libgrapheme-"
> + version
> + ".tar.gz"))
> + (sha256
> + (base32 "099i2jm9c25nkbg5420wr12z0gd189gcw5j1ssjmpmbbwzfvv2x6"))))
> + (build-system gnu-build-system)
> + (arguments
> + (list #:tests? #f

We strive to enable test suites of packages in Guix, as this gives us a
chance to detect breakage across updates. Its page mentions a 'test'
target to run the conformance and unit tests of libgrapheme. Did you
try it, via #:test-target "test" ? (the default is "check", which is
most common).

Toggle quote (5 lines)
> + #:phases #~(modify-phases %standard-phases
> + (add-after 'configure 'post-configure
> + (lambda _
> + (substitute* "config.mk"

Please leave an explanatory comment mentioning that running ldconfig is
not needed on Guix.

Toggle quote (10 lines)
> + (("ldconfig") "")))))
> + #:make-flags
> + #~(list (string-append "CC=" #$(cc-for-target))
> + (string-append "PREFIX=" #$output))))
> + (home-page "https://libs.suckless.org/libgrapheme/")
> + (synopsis "Library to handle string according to Unicode standard")
> + (description "Libgrapheme is an extremely simple freestanding C99 library
> +providing utilities for properly handling strings
> +according to the latest Unicode standard 15.0.0.")

nitpick: The paragraph flow seems broken after 'handling strings' --
"M-;" in Emacs would help.

I'd also drop the exact Unicode standard currently targeted, as this
would probably become outdated information soon.

Could you send a v2 with the above changes?

--
Thanks,
Maxim
C
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 69355@debbugs.gnu.org)
Zd4vLpPI_d7H8kt5@obayashi
On Mon, Feb 26, 2024 at 11:24:42AM -0500, Maxim Cournoyer wrote:
Toggle quote (2 lines)
> Hi,

Hi!

[...]

Toggle quote (6 lines)
> We strive to enable test suites of packages in Guix, as this gives us a
> chance to detect breakage across updates. Its page mentions a 'test'
> target to run the conformance and unit tests of libgrapheme. Did you
> try it, via #:test-target "test" ? (the default is "check", which is
> most common).

I did not payed the right attention while reading the README file of
the package and I missed the mentions of the tests target in the
makefile. ^^;

Toggle quote (9 lines)
>
> > + #:phases #~(modify-phases %standard-phases
> > + (add-after 'configure 'post-configure
> > + (lambda _
> > + (substitute* "config.mk"
>
> Please leave an explanatory comment mentioning that running ldconfig is
> not needed on Guix.

sure!

Toggle quote (14 lines)
>
> > + (("ldconfig") "")))))
> > + #:make-flags
> > + #~(list (string-append "CC=" #$(cc-for-target))
> > + (string-append "PREFIX=" #$output))))
> > + (home-page "https://libs.suckless.org/libgrapheme/")
> > + (synopsis "Library to handle string according to Unicode standard")
> > + (description "Libgrapheme is an extremely simple freestanding C99 library
> > +providing utilities for properly handling strings
> > +according to the latest Unicode standard 15.0.0.")
>
> nitpick: The paragraph flow seems broken after 'handling strings' --
> "M-;" in Emacs would help.

For some reasons this command does not work for me, i used to use M-q,
i hope the results is acceptable. ^^;

Toggle quote (3 lines)
> I'd also drop the exact Unicode standard currently targeted, as this
> would probably become outdated information soon.

Good idea!

Toggle quote (2 lines)
> Could you send a v2 with the above changes?

Sure! The new patch is attached below.

Thanks for your comments, let me know if I have addressed, or not, all the issues.
Bye!
C.

---
gnu/packages/suckless.scm | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)

Toggle diff (44 lines)
diff --git a/gnu/packages/suckless.scm b/gnu/packages/suckless.scm
index 81e2151854..b89b3be961 100644
--- a/gnu/packages/suckless.scm
+++ b/gnu/packages/suckless.scm
@@ -1393,3 +1393,36 @@ (define-public 9base
(description
"This package provides ported versions of various Plan 9 userland tools
for Unix.")))
+
+(define-public libgrapheme
+ (package
+ (name "libgrapheme")
+ (version "2.0.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://dl.suckless.org/libgrapheme/libgrapheme-"
+ version
+ ".tar.gz"))
+ (sha256
+ (base32 "099i2jm9c25nkbg5420wr12z0gd189gcw5j1ssjmpmbbwzfvv2x6"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:tests? #true
+ #:test-target "test"
+ #:phases #~(modify-phases %standard-phases
+ (add-after 'configure 'post-configure
+ (lambda _
+ ;; removing call of ldconfing in makefile as it is
+ ;; not actually needed in guix
+ (substitute* "config.mk"
+ (("ldconfig") "")))))
+ #:make-flags
+ #~(list (string-append "CC=" #$(cc-for-target))
+ (string-append "PREFIX=" #$output))))
+ (home-page "https://libs.suckless.org/libgrapheme/")
+ (synopsis "Library to handle string according to Unicode standard.")
+ (description "Libgrapheme is an extremely simple freestanding C99 library
+providing utilities for properly handling strings according to the latest
+Unicode standard.")
+ (license license:isc)))

base-commit: de24aaf13b17d6c019f3f240fd0eb0e1b8654970
prerequisite-patch-id: aa0b913d42bee51002e7243019d5529984321e91
--
2.41.0
M
M
Maxim Cournoyer wrote on 31 Mar 18:26 -0700
(name . cage)(address . cage-dev@twistfold.it)(address . 69355-done@debbugs.gnu.org)
87frw5x48u.fsf@gmail.com
Hi cage,

cage <cage-dev@twistfold.it> writes:

[...]

Toggle quote (8 lines)
> ---
> gnu/packages/suckless.scm | 33 +++++++++++++++++++++++++++++++++
> 1 file changed, 33 insertions(+)
>
> diff --git a/gnu/packages/suckless.scm b/gnu/packages/suckless.scm
> index 81e2151854..b89b3be961 100644


I've added a simple commit message, as autogenerated with 'add...TAB' in
the commit message buffer in Emacs using yasnippet (you could have also
used 'etc/committer.scm').

Toggle quote (29 lines)
> --- a/gnu/packages/suckless.scm
> +++ b/gnu/packages/suckless.scm
> @@ -1393,3 +1393,36 @@ (define-public 9base
> (description
> "This package provides ported versions of various Plan 9 userland tools
> for Unix.")))
> +
> +(define-public libgrapheme
> + (package
> + (name "libgrapheme")
> + (version "2.0.2")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (string-append "https://dl.suckless.org/libgrapheme/libgrapheme-"
> + version
> + ".tar.gz"))
> + (sha256
> + (base32 "099i2jm9c25nkbg5420wr12z0gd189gcw5j1ssjmpmbbwzfvv2x6"))))
> + (build-system gnu-build-system)
> + (arguments
> + (list #:tests? #true
> + #:test-target "test"
> + #:phases #~(modify-phases %standard-phases
> + (add-after 'configure 'post-configure
> + (lambda _
> + ;; removing call of ldconfing in makefile as it is
> + ;; not actually needed in guix

I punctuated the comment (as a full sentence, starting with a capital
letter and ending with a period).

Toggle quote (8 lines)
> + (substitute* "config.mk"
> + (("ldconfig") "")))))
> + #:make-flags
> + #~(list (string-append "CC=" #$(cc-for-target))
> + (string-append "PREFIX=" #$output))))
> + (home-page "https://libs.suckless.org/libgrapheme/")
> + (synopsis "Library to handle string according to Unicode standard.")

I've changed the synopsis to say what it *is*: "C99 library for Unicode
strings". Note the lack of a period for the synopsis (it is not a
complete sentence -- I think 'guix lint' would have spotted that).

Toggle quote (5 lines)
> + (description "Libgrapheme is an extremely simple freestanding C99 library
> +providing utilities for properly handling strings according to the latest
> +Unicode standard.")
> + (license license:isc)))

I've dropped 'extremely' which sounded like marketing, and pushed.

Thanks for your contribution!

--
Thanks,
Maxim
Closed
C
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 69355-done@debbugs.gnu.org)
Zgw0GBmA3c26XTET@obayashi
On Sun, Mar 31, 2024 at 09:26:25PM -0400, Maxim Cournoyer wrote:
Toggle quote (2 lines)
> Hi cage,

Hi!

Toggle quote (16 lines)
> cage <cage-dev@twistfold.it> writes:
>
> [...]
>
> > ---
> > gnu/packages/suckless.scm | 33 +++++++++++++++++++++++++++++++++
> > 1 file changed, 33 insertions(+)
> >
> > diff --git a/gnu/packages/suckless.scm b/gnu/packages/suckless.scm
> > index 81e2151854..b89b3be961 100644
>
>
> I've added a simple commit message, as autogenerated with 'add...TAB' in
> the commit message buffer in Emacs using yasnippet (you could have also
> used 'etc/committer.scm').

Thanks for your suggestion, i tried using yasnippet but with no
luck. :( But i will try again at the next patch, i swear! :D

[...]

Toggle quote (3 lines)
> Note the lack of a period for the synopsis (it is not a
> complete sentence -- I think 'guix lint' would have spotted that).

Yes, likely i did not run guix line, this time, sorry! ^^;

[...]
Toggle quote (2 lines)
> I've dropped 'extremely' which sounded like marketing, and pushed.

I agree it is inappropriate here.

Toggle quote (2 lines)
> Thanks for your contribution!

Thanks to you for fixing the patch!
C.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 69355@patchwise.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 69355
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch