1

Topic: Missing djvu viewer

The djvulibre library is packaged but the viewer djview is missing. Thankfully, it can be easily installed using Arch's PKGBUILD (after renaming one of the dependencies).

PKGBUILD

# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Paulo Matias <matias.archlinux-br.org>
# Contributor: Leslie P. Polzer <polzer.gnu.org>
# Contributor: erm67 <erm67.yahoo.it>
# Contributor: Daniel J Griffiths
# Contributor: Gaetan Bisson <bisson@archlinux.org>

pkgname=djview
pkgver=4.12
pkgrel=4
pkgdesc='Viewer for DjVu documents'
arch=('x86_64')
url='http://djvu.sourceforge.net/djview4.html'
license=('GPL2')
depends=('qt5-base' 'djvulibre')
makedepends=('qt-tools')
source=("https://downloads.sourceforge.net/djvu/$pkgname-$pkgver.tar.gz"
        'djvulibre-djview4.appdata.xml')
sha256sums=('5673c6a8b7e195b91a1720b24091915b8145de34879db1158bc936b100eaf3e3'
            '6527ff07bf11f3f2b7c79a97c5617d445343040ae070d18b52cfd4f91434c119')

prepare() {
  cd ${pkgname}4-$pkgver
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd ${pkgname}4-$pkgver
  ./configure --prefix=/usr --disable-nsdejavu
  make
}

package() {
  cd ${pkgname}4-$pkgver
  make DESTDIR="$pkgdir" install
  install -Dm644 ../djvulibre-djview4.appdata.xml "$pkgdir/usr/share/metainfo/djvulibre-djview4.appdata.xml"
  ln -s djview "$pkgdir/usr/bin/djview4"
}

djvulibre-djview4.appdata.xml

<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
  <id>net.sourceforge.djvu.DjView4</id>
  <launchable type="desktop-id">djvulibre-djview4.desktop</launchable>
  <name>DjView4</name>
  <summary>Viewer for DjVu documents</summary>
  <metadata_license>CC0-1.0</metadata_license>
  <project_license>GPL-2.0</project_license>
  <developer_name>Léon Bottou</developer_name>
  <description>
    <p>DjView4 is a portable DjVu viewer</p>
    <p>Highlights:</p>
    <ul>
      <li>Entirely based on the public djvulibre api.</li>
      <li>Entirely written in portable Qt4/Qt5.</li>
      <li>Works natively under Unix/X11, MS Windows, and MacOS X.</li>
      <li>Continuous scrolling of pages</li>
      <li>Side-by-side display of pages</li>
      <li>Ability to specify a url to the djview command</li>
      <li>All plugin and cgi options available from the command line</li>
      <li>All silly annotations implemented</li>
      <li>Display thumbnails as a grid</li>
      <li>Display outlines</li>
      <li>Page names supported (see djvused command set-page-title)</li>
      <li>Metadata dialog (see djvused command set-meta)</li>
      <li>Implemented as reusable Qt widgets</li>
    </ul>
  </description>
  <screenshots>
    <screenshot type="default">
      <image>https://a.fsdn.com/con/app/proj/djvu/screenshots/djview.jpg</image>
    </screenshot>
  </screenshots>
  <url type="bugtracker">https://sourceforge.net/p/djvu/bugs/</url>
  <url type="homepage">http://djvu.sourceforge.net/djview4.html</url>
  <update_contact>leon@bottou.org</update_contact>
</component>

2

Re: Missing djvu viewer

Thanks, will be added for 0.4.3 smile
But please look closer in the future as there are Debian-patches perhaps, the hashsum is not sha256 but sha512 for our packaging and we also mark the header different for integration. Also we don't have "qt5-base" within our repositories so dependencies is worth a look. The licensing is not working as GPL2 is not official named, so it would need GPL-2 besides a clear license-file integrated at packaging.

https://wiki.hyperbola.info/doku.php?id … guidelines

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

3

Re: Missing djvu viewer

For some reason, when I search via pacman for qt5-base and qt5-tools it finds qt-base and qt-tools so the package still builds fine but regardless the PKGBUILD can be corrected.

4

Re: Missing djvu viewer

Yes, to be explained:

https://www.hyperbola.info/packages/ext … /qt-tools/
(provdes-field)

https://www.hyperbola.info/packages/extra/i686/qt-base/
(provides-field)

It is most better to use the official package-name within dependencies. smile

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

5

Re: Missing djvu viewer

Package is now official available: https://www.hyperbola.info/packages/?q=djview

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

6 (edited by aloniv 2023-08-12 16:30:09)

Re: Missing djvu viewer

Many thanks! Is it possible to view the DjVu format using a regular document viewer such as MuPDF or epdfview (Evince, Okular and Zathura support the format but are not packaged)?

7

Re: Missing djvu viewer

Evince, Okular and Zathura are not packaged out of different reasonings for example some have no BSD-support, others demand furthermore libraries and frameworks we see problematic. So far there is no support for the DjVu format using other document-viewers for the moment known. If you find another solution, please feel free to note us.

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

8

Re: Missing djvu viewer

Lector seems to have potential but unfortunately I did not manage to get the PDF and DjVu plugins to work while EPUB appeared to work fine (I probably installed incompatible versions of the libraries python-djvulibre and python-pymupdf).
https://github.com/BasioMeusPuga/Lector

9

Re: Missing djvu viewer

You can surely share the PKGBUILDs, but we won't add another package and without the mentioned further python-dependencies this software would not reach out the result. So we would need to add further three packages at minimum. So the invitation stays to port it when HyperbolaBSD is ready and take over the role as maintainer.

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!