gnu: dealii: Update to 8.5.0.
[jackhill/guix/guix.git] / gnu / packages / libidn.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
5 ;;;
6 ;;; This file is part of GNU Guix.
7 ;;;
8 ;;; GNU Guix is free software; you can redistribute it and/or modify it
9 ;;; under the terms of the GNU General Public License as published by
10 ;;; the Free Software Foundation; either version 3 of the License, or (at
11 ;;; your option) any later version.
12 ;;;
13 ;;; GNU Guix is distributed in the hope that it will be useful, but
14 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;;; GNU General Public License for more details.
17 ;;;
18 ;;; You should have received a copy of the GNU General Public License
19 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20
21 (define-module (gnu packages libidn)
22 #:use-module (gnu packages)
23 #:use-module (gnu packages libunistring)
24 #:use-module (guix licenses)
25 #:use-module (guix packages)
26 #:use-module (guix download)
27 #:use-module (guix build-system gnu))
28
29 (define-public libidn
30 (package
31 (name "libidn")
32 (version "1.33")
33 (source (origin
34 (method url-fetch)
35 (uri (string-append "mirror://gnu/libidn/libidn-" version
36 ".tar.gz"))
37 (sha256
38 (base32
39 "068fjg2arlppjqqpzd714n1lf6gxkpac9v5yyvp1qwmv6nvam9s4"))))
40 (build-system gnu-build-system)
41 ;; FIXME: No Java and C# libraries are currently built.
42 (synopsis "Internationalized string processing library")
43 (description
44 "libidn is a library implementing of the Stringprep, Punycode and IDNA
45 specifications. These are used to encode and decode internationalized domain
46 names according to the IDNA2003 specifications. It includes native C, C# and
47 Java libraries.")
48 ;; The C code is dual-licensed gpl2+ lgpl3+, the manual is fdl1.3+,
49 ;; the command line tool is gpl3+.
50 (license (list gpl2+ gpl3+ lgpl3+ fdl1.3+))
51 (home-page "https://www.gnu.org/software/libidn/")))
52
53 (define-public libidn2
54 (package
55 (name "libidn2")
56 (version "0.16")
57 (source (origin
58 (method url-fetch)
59 (uri (string-append "ftp://alpha.gnu.org/gnu/libidn/libidn2-"
60 version ".tar.gz"))
61 (sha256
62 (base32
63 "13v8kh4d5nfkymai88zlw3h7k4x9khrpdpv97waf4ah8ykzrxb9g"))))
64 ;; XXX: Make sure to remove the 'create-pkg-config' phase
65 ;; below when this package is updated to >= 0.17.
66 (inputs
67 `(("libunistring" ,libunistring)))
68 (build-system gnu-build-system)
69 (arguments
70 `(#:phases
71 (modify-phases %standard-phases
72 (add-after 'install 'create-pkgconfig-file
73 (lambda* (#:key outputs #:allow-other-keys)
74 (let* ((out (assoc-ref outputs "out"))
75 (pkgconfig (string-append out "/lib/pkgconfig")))
76 (mkdir-p pkgconfig)
77 (call-with-output-file (string-append pkgconfig "/libidn2.pc")
78 (lambda (port)
79 (format port "prefix=~a
80 exec_prefix=${prefix}
81 libdir=${exec_prefix}/lib
82 includedir=${prefix}/include
83
84 Name: Libidn2
85 Description: Library implementing IDNA2008 and TR46
86 Version: ~a
87 Libs: -L${libdir} -lidn2
88 Cflags: -I${includedir}
89 "
90 out ,version)))
91 #t))))))
92 (synopsis "Internationalized domain name library for IDNA2008")
93 (description "Libidn2 is an internationalized domain library implementing
94 the IDNA2008 specifications. Libidn2 is believed to be a complete IDNA2008
95 implementation, but has yet to be as extensively used as the original Libidn
96 library.")
97 (home-page "https://www.gnu.org/software/libidn/#libidn2")
98 ;; The command-line tool 'idn2' is GPL3+, while the library is dual-licensed
99 ;; GPL2+ or LGPL3+.
100 (license (list gpl2+ gpl3+ lgpl3+))))