+e-books for convenient reading.")
+ ;; Calibre is largely GPL3+, but includes a number of components covered
+ ;; by other licenses. See COPYRIGHT for more details.
+ (license (list license:gpl3+
+ license:gpl2+
+ license:lgpl2.1+
+ license:lgpl2.1
+ license:bsd-3
+ license:expat
+ license:zpl2.1
+ license:asl2.0
+ license:public-domain
+ license:silofl1.1
+ license:cc-by-sa3.0))))
+
+(define-public liblinebreak
+ (package
+ (name "liblinebreak")
+ (version "2.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://sourceforge/vimgadgets"
+ "/liblinebreak/" version
+ "/liblinebreak-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1f36dbq7nc77lln1by2n1yl050g9dc63viawhs3gc3169mavm36x"))))
+ (build-system gnu-build-system)
+ (home-page "http://vimgadgets.sourceforge.net/liblinebreak/")
+ (synopsis "Library for detecting where linebreaks are allowed in text")
+ (description "@code{liblinebreak} is an implementation of the line
+breaking algorithm as described in Unicode 6.0.0 Standard Annex 14,
+Revision 26. It breaks lines that contain Unicode characters. It is
+designed to be used in a generic text renderer.")
+ (license license:zlib)))
+
+(define-public fbreader
+ (package
+ (name "fbreader")
+ (version "0.99.6")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/geometer/FBReader")
+ (commit (string-append version "-freebsdport"))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0c0s4silpax74kwfz3dfmzn4lkv6jsyb800vfak166vii0hvbv3d"))
+ (patches (search-patches "fbreader-curl-7.62.patch"))))
+ (build-system gnu-build-system)
+ (inputs
+ `(("curl" ,curl)
+ ("expat" ,expat)
+ ("fribidi" ,fribidi)
+ ("glib" ,glib)
+ ("gtk+-2" ,gtk+-2)
+ ("libjpeg" ,libjpeg)
+ ("liblinebreak" ,liblinebreak)
+ ("libxft" ,libxft)
+ ("sqlite" ,sqlite)
+ ("zlib" ,zlib)))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (arguments
+ `(#:tests? #f ; No tests exist.
+ #:make-flags `("CC=gcc" "TARGET_ARCH=desktop" "UI_TYPE=gtk"
+ "TARGET_STATUS=release"
+ ,(string-append "INSTALLDIR="
+ (assoc-ref %outputs "out"))
+ ,(string-append "LDFLAGS=-Wl,-rpath="
+ (assoc-ref %outputs "out") "/lib"))
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (add-after 'unpack 'fix-install-locations
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (substitute* "fbreader/desktop/Makefile"
+ (("/usr") out))
+ #t))))))
+ (home-page "https://fbreader.org/")
+ (synopsis "E-Book reader")
+ (description "@code{fbreader} is an E-Book reader. It supports the
+following formats:
+
+@enumerate
+@item CHM
+@item Docbook
+@item FB2
+@item HTML
+@item OEB
+@item PDB
+@item RTF
+@item TCR
+@item TXT
+@item XHTML
+@end enumerate")
+ (license license:gpl2+)))