* [PATCH 1/3] gnu: Add utfcpp.
@ 2016-05-07 18:36 Alex Griffin
2016-05-07 22:19 ` Leo Famulari
0 siblings, 1 reply; 12+ messages in thread
From: Alex Griffin @ 2016-05-07 18:36 UTC (permalink / raw)
To: guix-devel
[-- Attachment #1: Type: text/plain, Size: 186 bytes --]
This is a dependency of ledger. It's bundled in ledger's source but I
think it's better to unbundle it. It's a bit unusual in that the headers
contain the whole source.
--
Alex Griffin
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-utfcpp.patch --]
[-- Type: text/x-patch; name="0001-gnu-Add-utfcpp.patch", Size: 3180 bytes --]
From a476a987faa4aaae019836441021bb03241dde5d Mon Sep 17 00:00:00 2001
From: Alex Griffin <a@ajgrf.com>
Date: Sat, 7 May 2016 12:16:39 -0500
Subject: [PATCH 1/3] gnu: Add utfcpp.
* gnu/packages/unicode.scm: New file.
---
gnu/packages/unicode.scm | 62 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 62 insertions(+)
create mode 100644 gnu/packages/unicode.scm
diff --git a/gnu/packages/unicode.scm b/gnu/packages/unicode.scm
new file mode 100644
index 0000000..045d5a5
--- /dev/null
+++ b/gnu/packages/unicode.scm
@@ -0,0 +1,62 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages unicode)
+ #:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix packages)
+ #:use-module (guix download)
+ #:use-module (guix build-system trivial)
+ #:use-module (gnu packages zip))
+
+(define-public utfcpp
+ (package
+ (name "utfcpp")
+ (version "2.3.4")
+ (source (origin
+ (method url-fetch)
+ (uri
+ (string-append "mirror://sourceforge/project/utfcpp/utf8cpp_2x/Release%20"
+ version "/utf8_v"
+ (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
+ ".zip"))
+ (file-name (string-append name "-" version ".zip"))
+ (sha256
+ (base32
+ "1vqhs0aipcvvdrwcs7h3jsryg6mgbmc4s34n5cm6d36q4nxwwwrk"))))
+ (build-system trivial-build-system)
+ (arguments
+ `(#:modules ((guix build utils))
+ #:builder
+ (begin
+ (use-modules (guix build utils))
+ (let ((source (assoc-ref %build-inputs "source"))
+ (out (assoc-ref %outputs "out"))
+ (unzip (string-append (assoc-ref %build-inputs "unzip")
+ "/bin/unzip")))
+ (mkdir-p out)
+ (with-directory-excursion out
+ (system* unzip source)
+ (mkdir-p "share/doc")
+ (rename-file "doc" "share/doc/utfcpp")
+ (rename-file "source" "include"))))))
+ (native-inputs `(("unzip" ,unzip)))
+ (home-page "https://github.com/nemtrif/utfcpp")
+ (synopsis "Portable C++ library for handling UTF-8")
+ (description "UTF8-CPP is a C++ library for handling UTF-8 encoded text
+ in a portable way.")
+ (license license:boost1.0)))
--
2.7.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 1/3] gnu: Add utfcpp.
2016-05-07 18:36 [PATCH 1/3] gnu: Add utfcpp Alex Griffin
@ 2016-05-07 22:19 ` Leo Famulari
2016-05-08 2:10 ` Alex Griffin
0 siblings, 1 reply; 12+ messages in thread
From: Leo Famulari @ 2016-05-07 22:19 UTC (permalink / raw)
To: Alex Griffin; +Cc: guix-devel
On Sat, May 07, 2016 at 01:36:21PM -0500, Alex Griffin wrote:
> This is a dependency of ledger. It's bundled in ledger's source but I
> think it's better to unbundle it. It's a bit unusual in that the headers
> contain the whole source.
> * gnu/packages/unicode.scm: New file.
Not a bad idea for a new module, but I wonder if you considered any of
the existing modules? Are none of them appropriate?
> +(define-public utfcpp
I'm curious — are there any significant differences between this and the
bundled library?
> + (uri
> + (string-append "mirror://sourceforge/project/utfcpp/utf8cpp_2x/Release%20"
> + version "/utf8_v"
> + (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
> + ".zip"))
Can you make sure these lines are < 80 characters?
Otherwise, LGTM!
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/3] gnu: Add utfcpp.
2016-05-07 22:19 ` Leo Famulari
@ 2016-05-08 2:10 ` Alex Griffin
2016-05-08 8:13 ` Alex Kost
0 siblings, 1 reply; 12+ messages in thread
From: Alex Griffin @ 2016-05-08 2:10 UTC (permalink / raw)
To: Leo Famulari; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 592 bytes --]
On Sat, May 7, 2016, at 05:19 PM, Leo Famulari wrote:
> Not a bad idea for a new module, but I wonder if you considered any of
> the existing modules? Are none of them appropriate?
Nothing else seemed to fit, but I'm open to suggestions.
> > +(define-public utfcpp
>
> I'm curious — are there any significant differences between this and the
> bundled library?
No, as far as I can tell it's the same code but with different upstream
maintainers.
> Can you make sure these lines are < 80 characters?
>
> Otherwise, LGTM!
Yup, here's a new patch.
--
Alex Griffin
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-utfcpp.patch --]
[-- Type: text/x-patch; name="0001-gnu-Add-utfcpp.patch", Size: 3155 bytes --]
From b91d9f45339b78965af46a951a0922c29cd1de95 Mon Sep 17 00:00:00 2001
From: Alex Griffin <a@ajgrf.com>
Date: Sat, 7 May 2016 12:16:39 -0500
Subject: [PATCH 1/3] gnu: Add utfcpp.
* gnu/packages/unicode.scm: New file.
---
gnu/packages/unicode.scm | 63 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 63 insertions(+)
create mode 100644 gnu/packages/unicode.scm
diff --git a/gnu/packages/unicode.scm b/gnu/packages/unicode.scm
new file mode 100644
index 0000000..e386b0b
--- /dev/null
+++ b/gnu/packages/unicode.scm
@@ -0,0 +1,63 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages unicode)
+ #:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix packages)
+ #:use-module (guix download)
+ #:use-module (guix build-system trivial)
+ #:use-module (gnu packages zip))
+
+(define-public utfcpp
+ (package
+ (name "utfcpp")
+ (version "2.3.4")
+ (source (origin
+ (method url-fetch)
+ (uri
+ (string-append
+ "mirror://sourceforge/project/utfcpp/utf8cpp_2x/Release%20"
+ version "/utf8_v"
+ (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
+ ".zip"))
+ (file-name (string-append name "-" version ".zip"))
+ (sha256
+ (base32
+ "1vqhs0aipcvvdrwcs7h3jsryg6mgbmc4s34n5cm6d36q4nxwwwrk"))))
+ (build-system trivial-build-system)
+ (arguments
+ `(#:modules ((guix build utils))
+ #:builder
+ (begin
+ (use-modules (guix build utils))
+ (let ((source (assoc-ref %build-inputs "source"))
+ (out (assoc-ref %outputs "out"))
+ (unzip (string-append (assoc-ref %build-inputs "unzip")
+ "/bin/unzip")))
+ (mkdir-p out)
+ (with-directory-excursion out
+ (system* unzip source)
+ (mkdir-p "share/doc")
+ (rename-file "doc" "share/doc/utfcpp")
+ (rename-file "source" "include"))))))
+ (native-inputs `(("unzip" ,unzip)))
+ (home-page "https://github.com/nemtrif/utfcpp")
+ (synopsis "Portable C++ library for handling UTF-8")
+ (description "UTF8-CPP is a C++ library for handling UTF-8 encoded text
+ in a portable way.")
+ (license license:boost1.0)))
--
2.7.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 1/3] gnu: Add utfcpp.
2016-05-08 2:10 ` Alex Griffin
@ 2016-05-08 8:13 ` Alex Kost
2016-05-08 14:43 ` Alex Griffin
2016-05-08 16:12 ` Ludovic Courtès
0 siblings, 2 replies; 12+ messages in thread
From: Alex Kost @ 2016-05-08 8:13 UTC (permalink / raw)
To: Alex Griffin; +Cc: guix-devel
Alex Griffin (2016-05-08 05:10 +0300) wrote:
> On Sat, May 7, 2016, at 05:19 PM, Leo Famulari wrote:
>> Not a bad idea for a new module, but I wonder if you considered any of
>> the existing modules? Are none of them appropriate?
>
> Nothing else seemed to fit, but I'm open to suggestions.
I suggest (gnu packages textutils); I see 'utf8proc' is placed there. I
think this is also a suitable module for 'libunistring' (currently it is
placed in its own file), but it's a separate question.
> From b91d9f45339b78965af46a951a0922c29cd1de95 Mon Sep 17 00:00:00 2001
> From: Alex Griffin <a@ajgrf.com>
> Date: Sat, 7 May 2016 12:16:39 -0500
> Subject: [PATCH 1/3] gnu: Add utfcpp.
>
> * gnu/packages/unicode.scm: New file.
> ---
> gnu/packages/unicode.scm | 63 ++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 63 insertions(+)
> create mode 100644 gnu/packages/unicode.scm
>
> diff --git a/gnu/packages/unicode.scm b/gnu/packages/unicode.scm
> new file mode 100644
> index 0000000..e386b0b
> --- /dev/null
> +++ b/gnu/packages/unicode.scm
> @@ -0,0 +1,63 @@
> +;;; GNU Guix --- Functional package management for GNU
> +;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
> +;;;
> +;;; This file is part of GNU Guix.
> +;;;
> +;;; GNU Guix is free software; you can redistribute it and/or modify it
> +;;; under the terms of the GNU General Public License as published by
> +;;; the Free Software Foundation; either version 3 of the License, or (at
> +;;; your option) any later version.
> +;;;
> +;;; GNU Guix is distributed in the hope that it will be useful, but
> +;;; WITHOUT ANY WARRANTY; without even the implied warranty of
> +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> +;;; GNU General Public License for more details.
> +;;;
> +;;; You should have received a copy of the GNU General Public License
> +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
> +
> +(define-module (gnu packages unicode)
> + #:use-module ((guix licenses) #:prefix license:)
> + #:use-module (guix packages)
> + #:use-module (guix download)
> + #:use-module (guix build-system trivial)
> + #:use-module (gnu packages zip))
Not a big thing but we indent '#:use-module' by 2 spaces. Out of
curiosity: what editor do you use?
> +
> +(define-public utfcpp
> + (package
> + (name "utfcpp")
> + (version "2.3.4")
> + (source (origin
> + (method url-fetch)
> + (uri
> + (string-append
> + "mirror://sourceforge/project/utfcpp/utf8cpp_2x/Release%20"
> + version "/utf8_v"
> + (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
> + ".zip"))
> + (file-name (string-append name "-" version ".zip"))
> + (sha256
> + (base32
> + "1vqhs0aipcvvdrwcs7h3jsryg6mgbmc4s34n5cm6d36q4nxwwwrk"))))
I don't know whether we have an idiomatic way to convert "2.3.4" into
"2_3_4", but I would just use a tarball from github:
(source (origin
(method url-fetch)
(uri (string-append
"https://github.com/nemtrif/utfcpp/archive/v"
version ".tar.gz"))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1x36184rsxiskwdkkz7hnpp6qvqckl04bxj5db9dnwyii1zx09hs"))))
But let's wait for other opinions.
> + (build-system trivial-build-system)
> + (arguments
> + `(#:modules ((guix build utils))
> + #:builder
> + (begin
> + (use-modules (guix build utils))
> + (let ((source (assoc-ref %build-inputs "source"))
> + (out (assoc-ref %outputs "out"))
> + (unzip (string-append (assoc-ref %build-inputs "unzip")
> + "/bin/unzip")))
> + (mkdir-p out)
> + (with-directory-excursion out
> + (system* unzip source)
> + (mkdir-p "share/doc")
> + (rename-file "doc" "share/doc/utfcpp")
> + (rename-file "source" "include"))))))
> + (native-inputs `(("unzip" ,unzip)))
> + (home-page "https://github.com/nemtrif/utfcpp")
> + (synopsis "Portable C++ library for handling UTF-8")
> + (description "UTF8-CPP is a C++ library for handling UTF-8 encoded text
> + in a portable way.")
Please don't add leading spaces in descriptions :-)
> + (license license:boost1.0)))
--
Alex
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/3] gnu: Add utfcpp.
2016-05-08 8:13 ` Alex Kost
@ 2016-05-08 14:43 ` Alex Griffin
2016-05-08 19:42 ` Alex Kost
2016-05-09 3:31 ` Leo Famulari
2016-05-08 16:12 ` Ludovic Courtès
1 sibling, 2 replies; 12+ messages in thread
From: Alex Griffin @ 2016-05-08 14:43 UTC (permalink / raw)
To: Alex Kost; +Cc: guix-devel
On Sun, May 8, 2016, at 03:13 AM, Alex Kost wrote:
> I suggest (gnu packages textutils); I see 'utf8proc' is placed there. I
> think this is also a suitable module for 'libunistring' (currently it is
> placed in its own file), but it's a separate question.
Okay. I had assumed textutils was for command line utilities, but if
that's where utf8proc goes then utfcpp seems to fit there too.
> Not a big thing but we indent '#:use-module' by 2 spaces. Out of
> curiosity: what editor do you use?
I use Emacs, the bad indenting is just from moving the package out of
another file with incorrect indentation (finance.scm).
> I don't know whether we have an idiomatic way to convert "2.3.4" into
> "2_3_4", but I would just use a tarball from github:
The project was just migrated to GitHub and hasn't had a new release
since then, so I'm using the sourceforge zip file because that's what
other projects have downloaded and used. Also I try to avoid the
automatically-generated GitHub archives because they're prone to change
hashes (although I see I forgot about that in the ledger package.)
> Please don't add leading spaces in descriptions :-)
Okay. My updated patches should come later today. Thanks!
--
Alex Griffin
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/3] gnu: Add utfcpp.
2016-05-08 14:43 ` Alex Griffin
@ 2016-05-08 19:42 ` Alex Kost
2016-05-09 3:31 ` Leo Famulari
1 sibling, 0 replies; 12+ messages in thread
From: Alex Kost @ 2016-05-08 19:42 UTC (permalink / raw)
To: Alex Griffin; +Cc: guix-devel
Alex Griffin (2016-05-08 17:43 +0300) wrote:
> On Sun, May 8, 2016, at 03:13 AM, Alex Kost wrote:
>> I suggest (gnu packages textutils); I see 'utf8proc' is placed there. I
>> think this is also a suitable module for 'libunistring' (currently it is
>> placed in its own file), but it's a separate question.
>
> Okay. I had assumed textutils was for command line utilities, but if
> that's where utf8proc goes then utfcpp seems to fit there too.
Note that I'm not an expert in finding the most suitable module. I
often have the same problem when I make a package. But in this case, I
think (gnu packages textutils) is OK.
>> Not a big thing but we indent '#:use-module' by 2 spaces. Out of
>> curiosity: what editor do you use?
>
> I use Emacs, the bad indenting is just from moving the package out of
> another file with incorrect indentation (finance.scm).
Ah, OK, it happens, we have many not perfect indentations here and
there, sorry :-)
>> I don't know whether we have an idiomatic way to convert "2.3.4" into
>> "2_3_4", but I would just use a tarball from github:
>
> The project was just migrated to GitHub and hasn't had a new release
> since then, so I'm using the sourceforge zip file because that's what
> other projects have downloaded and used. Also I try to avoid the
> automatically-generated GitHub archives because they're prone to change
> hashes (although I see I forgot about that in the ledger package.)
This is doubtful; do you have any proof? We use a lot of tarballs from
github and AFAIK we have never seen any hash changes. These tarballs
are just tagged snapshots of the git repos, so the only way I see they
can be changed is when the upstream pushes a tag, then deletes it, and
recreates it (probably after some commit history rewriting and force
pushing).
And I don't think that sourceforge is more trustable than github.
To be clear: I don't insist on using the tarball from github; zip-file
from sourceforge is fine for me, I just said what I would do.
--
Alex
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/3] gnu: Add utfcpp.
2016-05-08 14:43 ` Alex Griffin
2016-05-08 19:42 ` Alex Kost
@ 2016-05-09 3:31 ` Leo Famulari
2016-05-09 8:02 ` Alex Kost
1 sibling, 1 reply; 12+ messages in thread
From: Leo Famulari @ 2016-05-09 3:31 UTC (permalink / raw)
To: Alex Griffin; +Cc: guix-devel, Alex Kost
On Sun, May 08, 2016 at 09:43:28AM -0500, Alex Griffin wrote:
> On Sun, May 8, 2016, at 03:13 AM, Alex Kost wrote:
> > I don't know whether we have an idiomatic way to convert "2.3.4" into
> > "2_3_4", but I would just use a tarball from github:
>
> The project was just migrated to GitHub and hasn't had a new release
> since then, so I'm using the sourceforge zip file because that's what
> other projects have downloaded and used. Also I try to avoid the
> automatically-generated GitHub archives because they're prone to change
> hashes (although I see I forgot about that in the ledger package.)
I haven't noticed a GitHub tarball change its content unexpectedly.
However, I have noticed that for projects who distribute tarballs from
both GitHub and another site, the tarballs are often different. The
project distributes the result of something like `make dist` on the
other site, while GitHub automatically generates a snapshot of the
tagged commit.
So, if utfcpp's GitHub and SourceForge tarballs are different, that
could be the reason, and also a reason to use the SourceForge
distribution.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/3] gnu: Add utfcpp.
2016-05-09 3:31 ` Leo Famulari
@ 2016-05-09 8:02 ` Alex Kost
2016-05-10 23:31 ` Alex Griffin
0 siblings, 1 reply; 12+ messages in thread
From: Alex Kost @ 2016-05-09 8:02 UTC (permalink / raw)
To: Leo Famulari; +Cc: guix-devel
Leo Famulari (2016-05-09 06:31 +0300) wrote:
> On Sun, May 08, 2016 at 09:43:28AM -0500, Alex Griffin wrote:
>> On Sun, May 8, 2016, at 03:13 AM, Alex Kost wrote:
>> > I don't know whether we have an idiomatic way to convert "2.3.4" into
>> > "2_3_4", but I would just use a tarball from github:
>>
>> The project was just migrated to GitHub and hasn't had a new release
>> since then, so I'm using the sourceforge zip file because that's what
>> other projects have downloaded and used. Also I try to avoid the
>> automatically-generated GitHub archives because they're prone to change
>> hashes (although I see I forgot about that in the ledger package.)
>
> I haven't noticed a GitHub tarball change its content unexpectedly.
>
> However, I have noticed that for projects who distribute tarballs from
> both GitHub and another site, the tarballs are often different. The
> project distributes the result of something like `make dist` on the
> other site, while GitHub automatically generates a snapshot of the
> tagged commit.
"make dist" creates a real release and it is surely preferred
over a simple repo snapshot. But this is not the case.
> So, if utfcpp's GitHub and SourceForge tarballs are different, that
> could be the reason, and also a reason to use the SourceForge
> distribution.
No it's not the reason, this utfcpp doesn't even use any build system,
it consists of several files that are not built in any way. And
actually tarball from github has more files (samples and tests, but it
doesn't matter).
--
Alex
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/3] gnu: Add utfcpp.
2016-05-09 8:02 ` Alex Kost
@ 2016-05-10 23:31 ` Alex Griffin
2016-05-12 10:02 ` Alex Kost
0 siblings, 1 reply; 12+ messages in thread
From: Alex Griffin @ 2016-05-10 23:31 UTC (permalink / raw)
To: Alex Kost, Leo Famulari; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 73 bytes --]
Here's an updated patch with utfcpp moved to textutils.
--
Alex Griffin
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-utfcpp.patch --]
[-- Type: text/x-patch; name="0001-gnu-Add-utfcpp.patch", Size: 2952 bytes --]
From 0fada0c526a9d3aa1573d96ec488da1c20b43a0d Mon Sep 17 00:00:00 2001
From: Alex Griffin <a@ajgrf.com>
Date: Sat, 7 May 2016 12:16:39 -0500
Subject: [PATCH 1/2] gnu: Add utfcpp.
* gnu/packages/textutils.scm (utfcpp): New variable.
---
gnu/packages/textutils.scm | 44 +++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 43 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/textutils.scm b/gnu/packages/textutils.scm
index f6735a4..080c95b 100644
--- a/gnu/packages/textutils.scm
+++ b/gnu/packages/textutils.scm
@@ -4,6 +4,7 @@
;;; Copyright © 2015, 2016 Ben Woodcroft <donttrustben@gmail.com>
;;; Copyright © 2015 Roel Janssen <roel@gnu.org>
;;; Copyright © 2016 Jelle Licht <jlicht@fsfe.org>
+;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -27,8 +28,10 @@
#:use-module (guix git-download)
#:use-module (guix build-system gnu)
#:use-module (guix build-system cmake)
+ #:use-module (guix build-system trivial)
#:use-module (gnu packages autotools)
- #:use-module (gnu packages python))
+ #:use-module (gnu packages python)
+ #:use-module (gnu packages zip))
(define-public recode
(package
@@ -328,3 +331,42 @@ name comes from: \"The antidote against people who send Microsoft Word files
to everybody, because they believe that everybody runs Windows and therefore
runs Word\".")
(license license:gpl2+)))
+
+(define-public utfcpp
+ (package
+ (name "utfcpp")
+ (version "2.3.4")
+ (source (origin
+ (method url-fetch)
+ (uri
+ (string-append
+ "mirror://sourceforge/project/utfcpp/utf8cpp_2x/Release%20"
+ version "/utf8_v"
+ (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
+ ".zip"))
+ (file-name (string-append name "-" version ".zip"))
+ (sha256
+ (base32
+ "1vqhs0aipcvvdrwcs7h3jsryg6mgbmc4s34n5cm6d36q4nxwwwrk"))))
+ (build-system trivial-build-system)
+ (arguments
+ `(#:modules ((guix build utils))
+ #:builder
+ (begin
+ (use-modules (guix build utils))
+ (let ((source (assoc-ref %build-inputs "source"))
+ (out (assoc-ref %outputs "out"))
+ (unzip (string-append (assoc-ref %build-inputs "unzip")
+ "/bin/unzip")))
+ (mkdir-p out)
+ (with-directory-excursion out
+ (system* unzip source)
+ (mkdir-p "share/doc")
+ (rename-file "doc" "share/doc/utfcpp")
+ (rename-file "source" "include"))))))
+ (native-inputs `(("unzip" ,unzip)))
+ (home-page "https://github.com/nemtrif/utfcpp")
+ (synopsis "Portable C++ library for handling UTF-8")
+ (description "UTF8-CPP is a C++ library for handling UTF-8 encoded text
+in a portable way.")
+ (license license:boost1.0)))
--
2.7.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 1/3] gnu: Add utfcpp.
2016-05-10 23:31 ` Alex Griffin
@ 2016-05-12 10:02 ` Alex Kost
0 siblings, 0 replies; 12+ messages in thread
From: Alex Kost @ 2016-05-12 10:02 UTC (permalink / raw)
To: Alex Griffin; +Cc: guix-devel
Alex Griffin (2016-05-11 02:31 +0300) wrote:
> Here's an updated patch with utfcpp moved to textutils.
>
> From 0fada0c526a9d3aa1573d96ec488da1c20b43a0d Mon Sep 17 00:00:00 2001
> From: Alex Griffin <a@ajgrf.com>
> Date: Sat, 7 May 2016 12:16:39 -0500
> Subject: [PATCH 1/2] gnu: Add utfcpp.
>
> * gnu/packages/textutils.scm (utfcpp): New variable.
I will commit it when git.sv.gnu.org allows me to do it, thanks!
--
Alex
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/3] gnu: Add utfcpp.
2016-05-08 8:13 ` Alex Kost
2016-05-08 14:43 ` Alex Griffin
@ 2016-05-08 16:12 ` Ludovic Courtès
2016-05-08 19:22 ` Alex Kost
1 sibling, 1 reply; 12+ messages in thread
From: Ludovic Courtès @ 2016-05-08 16:12 UTC (permalink / raw)
To: Alex Kost; +Cc: guix-devel
Alex Kost <alezost@gmail.com> skribis:
> Not a big thing but we indent '#:use-module' by 2 spaces. Out of
> curiosity: what editor do you use?
[...]
> Please don't add leading spaces in descriptions :-)
Just a side remark: I think it’s preferable and more efficient if those
of us with commit access fix little issues like these on behalf of our
friendly newcomers. :-)
Ludo’.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/3] gnu: Add utfcpp.
2016-05-08 16:12 ` Ludovic Courtès
@ 2016-05-08 19:22 ` Alex Kost
0 siblings, 0 replies; 12+ messages in thread
From: Alex Kost @ 2016-05-08 19:22 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
Ludovic Courtès (2016-05-08 19:12 +0300) wrote:
> Alex Kost <alezost@gmail.com> skribis:
>
>> Not a big thing but we indent '#:use-module' by 2 spaces. Out of
>> curiosity: what editor do you use?
>
> [...]
>
>> Please don't add leading spaces in descriptions :-)
>
> Just a side remark: I think it’s preferable and more efficient if those
> of us with commit access fix little issues like these on behalf of our
> friendly newcomers. :-)
I agree and I usually do it, but this was not the only "problem".
--
Alex
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2016-05-12 10:02 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-07 18:36 [PATCH 1/3] gnu: Add utfcpp Alex Griffin
2016-05-07 22:19 ` Leo Famulari
2016-05-08 2:10 ` Alex Griffin
2016-05-08 8:13 ` Alex Kost
2016-05-08 14:43 ` Alex Griffin
2016-05-08 19:42 ` Alex Kost
2016-05-09 3:31 ` Leo Famulari
2016-05-09 8:02 ` Alex Kost
2016-05-10 23:31 ` Alex Griffin
2016-05-12 10:02 ` Alex Kost
2016-05-08 16:12 ` Ludovic Courtès
2016-05-08 19:22 ` Alex Kost
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).