;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
;;;
;;; This file is part of GNU Guix.
#:use-module (guix licenses)
#:use-module (guix download)
#:use-module (gnu packages)
+ #:use-module (gnu packages gcc)
#:use-module (gnu packages tcl))
(define-public wordnet
;; Provide the `result' field in `Tcl_Interp'.
;; See <https://bugs.gentoo.org/show_bug.cgi?id=452034>.
- "CFLAGS=-DUSE_INTERP_RESULT")
- #:phases (alist-cons-after
- 'install 'post-install
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out"))
- (bin (assoc-ref outputs "tk"))
- (tk (assoc-ref inputs "tk"))
- (tkv ,(let ((v (package-version tk)))
- (string-take v (string-index-right v #\.)))))
- ;; Move `wishwn' and `wnb' to BIN.
- (for-each (lambda (prog)
- (let ((orig (string-append out "/bin/" prog))
- (dst (string-append bin "/bin/" prog))
- (dir (string-append tk "/lib/tk" tkv)))
- (mkdir-p (dirname dst))
- (copy-file orig dst)
- (delete-file orig)
- (wrap-program dst
- `("TK_LIBRARY" "" = (,dir))
- `("PATH" ":" prefix
- (,(string-append out
- "/bin"))))))
- '("wishwn" "wnb"))
- #t))
- %standard-phases)))
+ "CFLAGS=-DUSE_INTERP_RESULT -O2")
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'build-libwn-PIC
+ (lambda _
+ ;; GNU Dico links libWN.a in its wordnet.so plugin, so it needs
+ ;; PIC.
+ (invoke "make" "-C" "lib" "CFLAGS=-O2 -g -fPIC"
+ "LDFLAGS=-fPIC")))
+ (add-after 'install 'post-install
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (bin (assoc-ref outputs "tk"))
+ (tk (assoc-ref inputs "tk"))
+ (tkv ,(let ((v (package-version tk)))
+ (string-take v (string-index-right v #\.)))))
+ ;; Move `wishwn' and `wnb' to BIN.
+ (for-each (lambda (prog)
+ (let ((orig (string-append out "/bin/" prog))
+ (dst (string-append bin "/bin/" prog))
+ (dir (string-append tk "/lib/tk" tkv)))
+ (mkdir-p (dirname dst))
+ (copy-file orig dst)
+ (delete-file orig)
+ (wrap-program dst
+ `("TK_LIBRARY" "" = (,dir))
+ `("PATH" ":" prefix
+ (,(string-append out
+ "/bin"))))))
+ '("wishwn" "wnb"))
+ #t))))))
(outputs '("out"
"tk")) ; for the Tcl/Tk GUI
+
(inputs `(("tk" ,tk)
("tcl" ,tcl)))
- (home-page "http://wordnet.princeton.edu/")
+ (home-page "https://wordnet.princeton.edu/")
(synopsis "Lexical database for the English language")
(description
- "WordNet® is a large lexical database of English. Nouns, verbs,
+ "WordNet is a large lexical database of English. Nouns, verbs,
adjectives and adverbs are grouped into sets of cognitive synonyms (synsets),
each expressing a distinct concept. Synsets are interlinked by means of
conceptual-semantic and lexical relations. The resulting network of