From: Antero Mejr via Guix-patches via <guix-patches@gnu.org>
To: 56642@debbugs.gnu.org
Subject: [bug#56642] [PATCH] gnu: Make libphonenumber reproducible.
Date: Tue, 19 Jul 2022 11:27:50 -0400 [thread overview]
Message-ID: <20220719152750.128283-1-antero@mailbox.org> (raw)
* gnu/packages/telephony.scm (libphonenumber): New variable.
* gnu/packages/messaging.scm (libphonenumber): Delete variable (moved).
---
Moved libphonenumber because it's a telephony package, plus it will avoid
circular deps for other telephony packages than depend on it (like pn).
Used substitute* instead of a patch to make libphonenumber reproducible
because it's a 2-line change, I can do it using a patch if preferred.
gnu/packages/messaging.scm | 32 -----------------------------
gnu/packages/telephony.scm | 42 ++++++++++++++++++++++++++++++++++++++
2 files changed, 42 insertions(+), 32 deletions(-)
diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index b68a798715..f08df1a5e4 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -2772,38 +2772,6 @@ (define-public purple-lurch
(home-page "https://github.com/gkdr/lurch")
(license license:gpl3+)))
-(define-public libphonenumber
- (package
- (name "libphonenumber")
- (version "8.11.3")
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/google/libphonenumber")
- (commit (string-append "v" version))))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "06y3mh1d1mks6d0ynxp3980g712nkf8l5nyljpybsk326b246hg9"))))
- (arguments
- `(#:test-target "tests"
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'change-directory
- (lambda _ (chdir "cpp"))))))
- (build-system cmake-build-system)
- (native-inputs
- (list googletest pkg-config))
- (inputs
- (list boost protobuf icu4c))
- (synopsis "Library for parsing and using phone numbers")
- (description
- "This package provides a C++ library for parsing, formatting, and
-validating international phone numbers.")
- (home-page "https://github.com/google/libphonenumber")
- (license license:asl2.0)))
-
-
(define-public chatty
(package
(name "chatty")
diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm
index e3071d9b75..410d3d8591 100644
--- a/gnu/packages/telephony.scm
+++ b/gnu/packages/telephony.scm
@@ -22,6 +22,7 @@
;;; Copyright © 2021 LibreMiami <packaging-guix@libremiami.org>
;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
;;; Copyright © 2021 Demis Balbach <db@minikn.xyz>
+;;; Copyright © 2022 Antero Mejr <antero@mailbox.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -63,6 +64,7 @@ (define-module (gnu packages telephony)
#:use-module (gnu packages gnome)
#:use-module (gnu packages gnupg)
#:use-module (gnu packages gtk)
+ #:use-module (gnu packages icu4c)
#:use-module (gnu packages image)
#:use-module (gnu packages libcanberra)
#:use-module (gnu packages linphone)
@@ -893,3 +895,43 @@ (define-public libtgvoip
telephony functionality into custom Telegram clients.")
(home-page "https://github.com/zevlg/libtgvoip")
(license license:unlicense)))
+
+(define-public libphonenumber
+ (package
+ (name "libphonenumber")
+ (version "8.11.3")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/google/libphonenumber")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "06y3mh1d1mks6d0ynxp3980g712nkf8l5nyljpybsk326b246hg9"))))
+ (arguments
+ (list #:test-target "tests"
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'make-reproducible
+ (lambda _
+ (substitute*
+ "tools/cpp/src/cpp-build/generate_geocoding_data.cc"
+ (("return errno == 0;") "
+std::sort(entries->begin(), entries->end());
+ return errno == 0;")
+ (("DirEntryKinds kind\\(\\) const \\{ return kind_; \\}") "
+DirEntryKinds kind() const { return kind_; }
+bool operator<(const DirEntry& d) { return name_ < d.name(); }"))))
+ (add-after 'make-reproducible 'change-directory
+ (lambda _
+ (chdir "cpp"))))))
+ (build-system cmake-build-system)
+ (native-inputs (list googletest pkg-config))
+ (inputs (list boost protobuf icu4c))
+ (synopsis "Library for parsing and using phone numbers")
+ (description
+ "This package provides a C++ library for parsing, formatting, and
+validating international phone numbers.")
+ (home-page "https://github.com/google/libphonenumber")
+ (license license:asl2.0)))
--
2.36.1
next reply other threads:[~2022-07-19 15:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-19 15:27 Antero Mejr via Guix-patches via [this message]
2022-07-19 22:06 ` [bug#56642] [PATCH] gnu: Make libphonenumber reproducible Jonathan Brielmaier
2022-07-20 0:36 ` [bug#56642] [PATCH v2] gnu: libphonenumber: Build reproducibly Antero Mejr via Guix-patches via
2022-07-27 14:57 ` bug#56642: " Jonathan Brielmaier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220719152750.128283-1-antero@mailbox.org \
--to=guix-patches@gnu.org \
--cc=56642@debbugs.gnu.org \
--cc=antero@mailbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.