From: danny@spesh.com
To: 61263@debbugs.gnu.org
Cc: Danny O'Brien <danny@spesh.com>
Subject: [bug#61263] [PATCH] gnu: dbacl: Fix failing check phase.
Date: Fri, 3 Feb 2023 21:08:35 -0800 [thread overview]
Message-ID: <2f81f17ea425ae674aedb7f92826e58c8bea4412.1675487305.git.danny@spesh.com> (raw)
From: Danny O'Brien <danny@spesh.com>
* gnu/packages/textutils.scm (dbacl): New patch.
* gnu/packages/patches/dbacl-icheck-multiple-definitions.patch: New file.
---
.../dbacl-icheck-multiple-definitions.patch | 33 +++++
gnu/packages/textutils.scm | 114 +++++++++---------
2 files changed, 92 insertions(+), 55 deletions(-)
create mode 100644 gnu/packages/patches/dbacl-icheck-multiple-definitions.patch
diff --git a/gnu/packages/patches/dbacl-icheck-multiple-definitions.patch b/gnu/packages/patches/dbacl-icheck-multiple-definitions.patch
new file mode 100644
index 0000000000..e82d0819bb
--- /dev/null
+++ b/gnu/packages/patches/dbacl-icheck-multiple-definitions.patch
@@ -0,0 +1,33 @@
+From f5df6813e305372e25b8a2124c491293a176e115 Mon Sep 17 00:00:00 2001
+From: Danny O'Brien <danny@spesh.com>
+Date: Fri, 3 Feb 2023 16:48:59 -0800
+Subject: [PATCH] Fix failing build of icheck.
+
+Building icheck fails with a duplicate symbol definition
+error. This allows the icheck executable to compile.
+
+Submitted upstream[1] but not yet moderated/accepted.
+
+[1] https://sourceforge.net/p/dbacl/discussion/239876/thread/87636b0114/
+
+---
+ src/icheck.c | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/src/icheck.c b/src/icheck.c
+index efbb6a5..12a3b7a 100644
+--- a/src/icheck.c
++++ b/src/icheck.c
+@@ -39,9 +39,6 @@ extern regex_count_t regex_count;
+ extern empirical_t empirical;
+
+ extern int cmd;
+-char *progname = "icheck";
+-char *inputfile = "";
+-long inputline = 0;
+
+ extern long system_pagesize;
+ extern void *in_iobuf;
+--
+2.39.1
+
diff --git a/gnu/packages/textutils.scm b/gnu/packages/textutils.scm
index 151add964e..5ead8dec96 100644
--- a/gnu/packages/textutils.scm
+++ b/gnu/packages/textutils.scm
@@ -705,59 +705,63 @@ (define-public dbacl
(package
(name "dbacl")
(version "1.14.1")
- (source
- (origin
- (method url-fetch)
- (uri (string-append "mirror://sourceforge/dbacl/dbacl/" version "/"
- "dbacl-" version ".tar.gz"))
- (sha256
- (base32 "1gas0112wqjvwn9qg3hxnawk7h3prr0w9b2h68f3p1ifd1kzn3gz"))
- (patches (search-patches "dbacl-include-locale.h.patch"))))
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://sourceforge/dbacl/dbacl/"
+ version
+ "/"
+ "dbacl-"
+ version
+ ".tar.gz"))
+ (sha256
+ (base32
+ "1gas0112wqjvwn9qg3hxnawk7h3prr0w9b2h68f3p1ifd1kzn3gz"))
+ (patches (search-patches "dbacl-include-locale.h.patch"
+ "dbacl-icheck-multiple-definitions.patch"))))
(build-system gnu-build-system)
(arguments
- `(#:make-flags
- (list
- (string-append "-I" (assoc-ref %build-inputs "slang")
- "/include/slang")
- (string-append "-I" (assoc-ref %build-inputs "ncurses")
- "/include/ncurses"))
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'delete-sample6-and-japanese
- (lambda _
- (substitute* "doc/Makefile.am"
- (("sample6.txt") "")
- (("japanese.txt") ""))
- (delete-file "doc/sample6.txt")
- (delete-file "doc/japanese.txt")
- (substitute* (list "src/tests/Makefile.am"
- "src/tests/Makefile.in")
- (("dbacl-jap.shin") "")
- (("dbacl-jap.sh") ""))
- #t))
- (add-after 'unpack 'delete-test
- ;; See comments about the license.
- (lambda _
- (delete-file "src/tests/dbacl-jap.shin")
- #t))
- (add-after 'unpack 'fix-test-files
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (bin (string-append out "/bin")))
- (substitute* (find-files "src/tests/" "\\.shin$")
- (("PATH=/bin:/usr/bin")
- "#PATH=/bin:/usr/bin")
- (("diff") (string-append (which "diff")))
- (("tr") (string-append (which "tr"))))
- #t)))
- (replace 'bootstrap
- (lambda _
- (invoke "autoreconf" "-vif")
- #t)))))
- (inputs
- (list ncurses perl readline slang))
- (native-inputs
- (list libtool autoconf automake pkg-config))
+ `(#:make-flags (list (string-append "-I"
+ (assoc-ref %build-inputs "slang")
+ "/include/slang")
+ (string-append "-I"
+ (assoc-ref %build-inputs "ncurses")
+ "/include/ncurses"))
+ #:phases (modify-phases %standard-phases
+ (add-after 'unpack 'delete-sample6-and-japanese
+ (lambda _
+ (substitute* "doc/Makefile.am"
+ (("sample6.txt")
+ "")
+ (("japanese.txt")
+ ""))
+ (delete-file "doc/sample6.txt")
+ (delete-file "doc/japanese.txt")
+ (substitute* (list "src/tests/Makefile.am"
+ "src/tests/Makefile.in")
+ (("dbacl-jap.shin")
+ "")
+ (("dbacl-jap.sh")
+ "")) #t))
+ (add-after 'unpack 'delete-test
+ ;; See comments about the license.
+ (lambda _
+ (delete-file "src/tests/dbacl-jap.shin") #t))
+ (add-after 'unpack 'fix-test-files
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin")))
+ (substitute* (find-files "src/tests/" "\\.shin$")
+ (("PATH=/bin:/usr/bin")
+ "#PATH=/bin:/usr/bin")
+ (("diff")
+ (string-append (which "diff")))
+ (("tr")
+ (string-append (which "tr")))) #t)))
+ (replace 'bootstrap
+ (lambda _
+ (invoke "autoreconf" "-vif") #t)))))
+ (inputs (list ncurses perl readline slang))
+ (native-inputs (list libtool autoconf automake pkg-config))
(home-page "https://www.lbreyer.com/dbacl.html")
(synopsis "Bayesian text and email classifier")
(description
@@ -768,13 +772,13 @@ (define-public dbacl
;; The software is licensed as GPLv3 or later, but
;; includes various sample texts in the doc dir:
;; - sample1.txt, sample3 and sampe5.txt are in the public domain,
- ;; by Mark Twain.
+ ;; by Mark Twain.
;; - sample2.txt, sample4.txt are in the public domain, by Aristotle.
;; - sample6.txt is a forwarded email, copyright unknown.
- ;; Guix does exclude sample6.txt.
+ ;; Guix does exclude sample6.txt.
;; - japanese.txt is a Japanese unoffical translation of the
- ;; GNU General Public License, (c) by the Free Software Foundation.
- ;; Guix excludes this file.
+ ;; GNU General Public License, (c) by the Free Software Foundation.
+ ;; Guix excludes this file.
(license (list license:gpl3+ license:public-domain))))
(define-public dotconf
base-commit: c3e50c731d8c175133cae1869e445cbb7a3b4d6f
--
2.39.1
next reply other threads:[~2023-02-04 5:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-04 5:08 danny [this message]
2023-02-04 10:07 ` [bug#61263] [PATCH] gnu: dbacl: Fix failing check phase Tobias Geerinckx-Rice via Guix-patches via
2023-02-05 4:53 ` Danny O'Brien
2023-03-04 16:37 ` [bug#61263] bug#61270: " Ludovic Courtès
2023-03-05 7:24 ` [bug#61270] " Danny O'Brien via Guix-patches via
2023-03-22 2:13 ` bug#61263: bug#61270: " Maxim Cournoyer
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=2f81f17ea425ae674aedb7f92826e58c8bea4412.1675487305.git.danny@spesh.com \
--to=danny@spesh.com \
--cc=61263@debbugs.gnu.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.