ChangeLog

# ChangeLog for app-text/djvu
# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
# $Header: /var/cvsroot/gentoo-x86/app-text/djvu/ChangeLog,v 1.84 2008/11/07 10:16:04 pva Exp $

07 Nov 2008; Peter Volkov djvu-3.5.21.ebuild:
Works on mips, added ~mips keyword.

03 Nov 2008; Raúl Porcel djvu-3.5.21.ebuild:
alpha/ia64/sparc stable wrt #244258

28 Oct 2008; Jeroen Roovers djvu-3.5.21.ebuild:
Stable for HPPA (bug #244258).

26 Oct 2008; Markus Meier djvu-3.5.21.ebuild:
amd64/x86 stable, bug #244258

25 Oct 2008; nixnut djvu-3.5.21.ebuild:
Stable on ppc wrt bug 244258

14 Sep 2008; Peter Volkov
+files/djvu-3.5.21-parallel-build.patch, djvu-3.5.21.ebuild:
Fix parallel build, bug #236418, thank Walter Meinl for report.

28 Aug 2008; Peter Volkov djvu-3.5.21.ebuild:
Enable parallel build and install, bug #236001, thank Diego Pettenò for
report.

*djvu-3.5.21 (25 Aug 2008)

25 Aug 2008; Peter Volkov +djvu-3.5.21.ebuild:
Version bump.

22 Mar 2008; Santiago M. Mola djvu-3.5.20-r1.ebuild:
amd64 stable wrt bug #208144

01 Feb 2008; Jeroen Roovers djvu-3.5.20-r1.ebuild:
Stable for HPPA (bug #208144).

31 Jan 2008; Brent Baude djvu-3.5.20-r1.ebuild:
Marking djvu-3.5.20-r1 ppc64 for bug 208144

31 Jan 2008; nixnut djvu-3.5.20-r1.ebuild:
Stable on ppc wrt bug 208144

30 Jan 2008; Raúl Porcel djvu-3.5.20-r1.ebuild:
alpha/ia64/sparc stable wrt #208144

30 Jan 2008; Dawid Węgliński djvu-3.5.20-r1.ebuild:
Stable on x86 (bug #208144)

24 Dec 2007; -djvu-3.5.19-r1.ebuild, -djvu-3.5.20.ebuild,
djvu-3.5.20-r1.ebuild:
Die if nsplugin is asked to be built but qt3 is not in USE, bug #196209
reported by Miron , fixed by Jakub gentoo.org>. Remove unused.

*djvu-3.5.20-r1 (13 Dec 2007)

13 Dec 2007; +djvu-3.5.20-r1.ebuild:
Add LINGUAS handling thus fixes nls not having any effect, bug #201936,
thank Petr Pisar for report and fix.

*djvu-3.5.20 (10 Dec 2007)

10 Dec 2007; +djvu-3.5.20.ebuild:
Version bump.

*djvu-3.5.19-r1 (13 Aug 2007)

13 Aug 2007; +djvu-3.5.19-r1.ebuild:
Don't install desktop without viewer (bug 188691; thank Justin Blanchard
for report)

22 Jul 2007; -files/djvu-3.5.16-gcc41-hash.patch,
-files/djvu-3.5.16-gcc41.patch,
-files/djvu-3.5.17-dont-prestrip-bins.patch, -files/gentoo-acdesktop.m4,
-djvu-3.5.17.ebuild:
Cleaned old ebuild.

27 Jun 2007; Markus Rothe djvu-3.5.19.ebuild:
Stable on ppc64; bug #183056

26 Jun 2007; Lars Weiler djvu-3.5.19.ebuild:
Stable on ppc; bug #183056.

25 Jun 2007; Jeroen Roovers djvu-3.5.19.ebuild:
Stable for HPPA (bug #183056).

25 Jun 2007; Raúl Porcel djvu-3.5.19.ebuild:
alpha/ia64/x86 stable wrt #183056

24 Jun 2007; Christoph Mende djvu-3.5.19.ebuild:
Stable on amd64 wrt bug 183056

24 Jun 2007; Ferris McCormick djvu-3.5.19.ebuild:
Sparc stable --- Bug #183056 --- builds (with USE="jpeg nls qt3 tiff xml
doc") and works fine on its own document files.

*djvu-3.5.19 (22 May 2007)

22 May 2007; metadata.xml, +djvu-3.5.19.ebuild:
Version bump (bug #166016). Bug #97995 (mozilla-firefox crash when opening a
djvu file using the djvu plugin reported by Amit Kotlovski gmail.com>) and bug #150492 (app-text/djvu breaks images with X option
"Composite" enabled reported by ) should be fixed.
Automatic QT dependency reported by Michal Kurgan is
fixed too.

07 Apr 2007; Petteri Räty -djvu-3.5.12.ebuild,
-djvu-3.5.14.ebuild, -djvu-3.5.14-r1.ebuild, -djvu-3.5.16.ebuild:
Remove old versions some of which have broken autotools handling (bug #159985).

12 Mar 2007; Alexandre Buisse metadata.xml:
Replaced text-markup by tex as maintaining herd (text-markup split).

21 Feb 2007; Piotr Jaroszyński ChangeLog:
Transition to Manifest2.

04 Jan 2007; Diego Pettenò djvu-3.5.17.ebuild:
Fix broken autotools handling.

08 Dec 2006; Timothy Redaelli djvu-3.5.17.ebuild:
Add ~x86-fbsd keyword

03 Nov 2006; Alexandre Buisse djvu-3.5.17.ebuild:
Add notice about djview not being compiled if qt3 is not set in USE.

22 Oct 2006; Stefan Schweizer
+files/djvulibre-3.5.17-pthread-flag.patch, djvu-3.5.17.ebuild:
Add as-needed patch thanks to TGL in bug 132473

19 Oct 2006; Bryan Østergaard djvu-3.5.17.ebuild:
Stable on Alpha.

16 Aug 2006; Markus Rothe djvu-3.5.17.ebuild:
Stable on ppc64

17 Jul 2006; Daniel Gryniewicz djvu-3.5.17.ebuild:
Marked stable on amd64 for bug #139612

16 Jul 2006; Tobias Scherbaum djvu-3.5.17.ebuild:
hppa stable, bug #139612

14 Jul 2006; Tobias Scherbaum djvu-3.5.17.ebuild:
ppc stable, bug #139612

12 Jul 2006; Aron Griffis djvu-3.5.17.ebuild:
Mark 3.5.17 stable on ia64

12 Jul 2006; Chris Gianelloni djvu-3.5.17.ebuild:
Stable on x86 wrt bug #139612.

10 Jul 2006; Gustavo Zacarias djvu-3.5.17.ebuild:
Stable on sparc wrt #139612

24 Jun 2006; Doug Goldstein djvu-3.5.12.ebuild,
djvu-3.5.14.ebuild, djvu-3.5.14-r1.ebuild, djvu-3.5.16.ebuild,
djvu-3.5.17.ebuild:
USE flag change qt->qt3/qt4 bug #137785

08 Jun 2006; Joseph Jezak djvu-3.5.16.ebuild:
Marked ppc stable.

02 Jun 2006; Martin Ehmsen
+files/djvu-3.5.17-dont-prestrip-bins.patch, djvu-3.5.17.ebuild:
Patched Makefiles so they don't strip binaries, bug #135208.

30 May 2006; Martin Ehmsen djvu-3.5.17.ebuild:
Fixed problem with nspluging being installed also with unset use flag,
bug #134878.

29 May 2006; Jason Wever djvu-3.5.16.ebuild:
Stable on SPARC wrt bug #132349.

26 May 2006; Chris Gianelloni djvu-3.5.16.ebuild:
Stable on amd64 wrt bug #132349

25 May 2006; Chris Gianelloni djvu-3.5.16.ebuild:
Stable on x86 wrt bug #132349.

21 May 2006; Markus Rothe djvu-3.5.16.ebuild:
Stable on ppc64

05 May 2006; Tobias Scherbaum djvu-3.5.17.ebuild:
Added to ~hppa

*djvu-3.5.17 (03 May 2006)

03 May 2006; Martin Ehmsen +djvu-3.5.17.ebuild:
Version bump, bug #132028.

02 May 2006; Markus Rothe djvu-3.5.16.ebuild:
Added ~ppc64

24 Mar 2006; Aron Griffis djvu-3.5.16.ebuild:
Mark 3.5.16 stable on ia64

21 Feb 2006; Aron Griffis djvu-3.5.16.ebuild:
Mark 3.5.16 ~alpha

18 Feb 2006; Aron Griffis djvu-3.5.16.ebuild:
Mark 3.5.16 ~ia64

10 Feb 2006; Martin Ehmsen djvu-3.5.16.ebuild:
Only include gcc-4 compilation fix if gcc-4 is being used, bug #122329.

09 Feb 2006; Patrick McLean djvu-3.5.16.ebuild:
Install plugins in proper libdir for multilib (bug #122243).

31 Jan 2006; Martin Ehmsen
+files/djvu-3.5.16-gcc41-hash.patch, +files/djvu-3.5.16-gcc41.patch,
djvu-3.5.16.ebuild:
Fixed gcc-4 compilation problem thanks to Kristiaan Lenaerts
, see bug #120801.

*djvu-3.5.16 (23 Jan 2006)

23 Jan 2006; Martin Ehmsen +djvu-3.5.16.ebuild:
DjVu must be compile with threads if qt is enabled for djview to get
compiled, see bug #89544.
Fixed nsbrowser plugin install location.
Version bump, see bug #101389.

16 Sep 2005; Ciaran McCreesh ChangeLog:
Converted to UTF-8, fixed encoding screwups

21 Jul 2005; Caleb Tennis djvu-3.5.12.ebuild,
djvu-3.5.14.ebuild, djvu-3.5.14-r1.ebuild:
Change Qt deps per bug #98180

21 Apr 2005; Simon Stelling djvu-3.5.14.ebuild:
stable on amd64

15 Apr 2005; djvu-3.5.14-r1.ebuild:
removed pic USE flag

*djvu-3.5.14-r1 (09 Apr 2005)

09 Apr 2005; Mamoru KOMACHI +files/gentoo-acdesktop.m4,
+djvu-3.5.14-r1.ebuild:
Added several USE flags requested on bug #83311. Thanks to Diego Pettenò
for the patch.

16 Oct 2004; Jason Wever djvu-3.5.14.ebuild:
Stable on sparc.

10 Oct 2004; Mamoru KOMACHI djvu-3.5.14.ebuild:
Stable on x86 and ppc.

03 Sep 2004; David Holm djvu-3.5.14.ebuild:
Added to ~ppc.

*djvu-3.5.14 (24 Aug 2004)

24 Aug 2004; Mamoru KOMACHI +djvu-3.5.14.ebuild,
-djvu-3.5.7.ebuild, -djvu-3.5.9-r1.ebuild, -djvu-3.5.9.ebuild:
Version bumped. This closes bug #60882. Cleaned up old ebuilds.

02 May 2004; Danny van Dyk djvu-3.5.12.ebuild:
Marked ~amd64.

21 Mar 2004; Martin Holzer djvu-3.5.12.ebuild,
djvu-3.5.7.ebuild, djvu-3.5.9-r1.ebuild, djvu-3.5.9.ebuild:
adding categorie. see 45110 for details

13 Mar 2004; Jason Wever djvu-3.5.12.ebuild:
Stable on sparc.

21 Feb 2004; Mamoru KOMACHI djvu-3.5.12.ebuild:
Marked stable on x86, see bug #41659 and #38430

15 Sep 2003; Mike Gardiner djvu-3.5.12.ebuild:
Added qt use options, see bug #28621

*djvu-3.5.12 (13 Sep 2003)

13 Sep 2003; Mike Gardiner djvu-3.5.12.ebuild, metadata.xml:
New version, add replace-flags for pentium4 compile problems, use xml for xml
support and fixed up DEPENDS

06 Dec 2002; Rodney Rees : changed sparc ~sparc keywords

*djvu-3.5.9-r1 (21 Nov 2002)

21 Nov 2002; phoen][x djvu-3.5.9-r1.ebuild,
files/digest-djvu-3.5.9-r1.ebuild :
Switched to the new nsplugins layout.

*djvu-3.5.9 (25 Oct 2002)

25 Oct 2002; Matthew Turk djvu-3.5.9.ebuild :
Closing bug 8295; version bump to 3.5.9.

*djvu-3.5.7 (02 Aug 2002)

19 Oct 2002; Daniel Ahlberg djvu-3.5.7.ebuild :
Updated to mirror://sourceforge in SRC_URI.

02 Aug 2002; Daniel Ahlberg djvu-3.5.7.ebuild:
Initial import. Ebuild submitted by Christian V. J. Brüssow .

Manifest

AUX djvu-3.5.21-parallel-build.patch 2664 RMD160 82b42bc660a02f15f8f71e8ccb164fcc21221ebc SHA1 9b3632421fb3710f0e849530cec1fdfab5844a77 SHA256 074f9e76509976fbe72c1432c1794300501e3fee8e59d10143fb9c8dd13665fc
AUX djvulibre-3.5.17-pthread-flag.patch 2419 RMD160 35f4c484e567ed7a7dcfb51559925ed49ad5db26 SHA1 2c028fd4bff1316a9278bc9047f6595ea3fc1e64 SHA256 e5bd52eba105c7792866f13f5abccf07daca220dc68ac045a4abc431c329805f
DIST djvulibre-3.5.19.tar.gz 2380092 RMD160 2eb9b5df021bb7121a051d3256999da27dd3b682 SHA1 439977e03c8c35ca74eb5887993edb317923133f SHA256 57ffa154f45de309b352ce53aa6618af2f8639d1e330470c3c955241d44ccd78
DIST djvulibre-3.5.20.tar.gz 2416958 RMD160 fb755064912586585656b9701b7d98bd3019c67b SHA1 88ec94512f3f7845b42c2585f75e07a9cf147380 SHA256 d937528e10c16831d8df31893ee24da8ec2bfd9e9170671c482a1b1abfc5efc3
DIST djvulibre-3.5.21.tar.gz 2993718 RMD160 2163b784d705cc7b55bb3d9c9eb85edec44f28a7 SHA1 a6ef5cb1445baa333883754c703abd75cc5b34f6 SHA256 39f80c1810be22c5ea7f6a44bbb449c3e29902895dcff9da6a8440891a67b8b4
EBUILD djvu-3.5.19.ebuild 3295 RMD160 85ad554d5a7c8dd8990f8f8408c3b3953eba8704 SHA1 965f1fc093303026bba9eaf4829e1438ed84f898 SHA256 8c50ba5e182e3ecd34ec9a002159c8365f1a9e4c4b9af3be3ffd58734f60f9ce
EBUILD djvu-3.5.20-r1.ebuild 3524 RMD160 f9d14a06cdb2f57eeb4f41ff1ca3de87656551f1 SHA1 b9cdaec5cb6decb40a2d0aa49f639e71bc0dfef2 SHA256 b9ea8ac19f23d61e8db831eff08af6bae3b1c33f83880ce397ef0d9c8de8bc04
EBUILD djvu-3.5.21.ebuild 3264 RMD160 fe8467d10ea3bc695b2e81101ce59e60cf727c18 SHA1 46a900f845b302937a901c257dd066924a3a0a29 SHA256 b1a912233bf460235c62977975d490f25c28d58684db0fd015bd435b548c97e7
MISC ChangeLog 10923 RMD160 9fc3529895686eefddd32d338b4f97bc532ae85d SHA1 5f4ec8be354d7ae5cd922ba56a58147a7bdfaa55 SHA256 100342a6406cb9b7756ce0b9b76aec88384b272d779fdde17f701b09e08aa9fc
MISC metadata.xml 865 RMD160 09cb90b4680856217c680e395e15957263c01472 SHA1 35e8a38a7dbed0d7f547cf21fa5bbb0133591e3d SHA256 13f4ad340f245deb6b5ba0d5ecfd5fe5aa408ff8ef9b2fe37a2f63ffc793c672

djvu-3.5.19.ebuild

# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-text/djvu/djvu-3.5.19.ebuild,v 1.9 2007/06/27 06:03:59 corsair Exp $

WANT_AUTOCONF="latest"
WANT_AUTOMAKE="latest"
inherit fdo-mime nsplugins flag-o-matic eutils multilib toolchain-funcs autotools

MY_P="${PN}libre-${PV}"

DESCRIPTION="DjVu viewers, encoders and utilities."
HOMEPAGE="http://djvu.sourceforge.net"
SRC_URI="mirror://sourceforge/djvu/${MY_P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
IUSE="xml qt3 jpeg tiff debug threads nls nsplugin kde doc"

DEPEND="jpeg? ( >=media-libs/jpeg-6b-r2 )
tiff? ( media-libs/tiff )
qt3? (
S="${WORKDIR}/${MY_P}"

pkg_setup() {
if ! use qt3; then
ewarn
ewarn "The standalone djvu viewer, djview, will not be compiled."
ewarn "Add \"qt3\" to your USE flags if you want it."
ewarn
fi
}

src_unpack() {
unpack ${A}
cd "${S}"

# Do not strip binaries as portage does this for us. bug #135208
sed -i 's:${INSTALL_PROGRAM} -s:${INSTALL_PROGRAM}:' \
gui/djview/Makefile.in tools/Makefile.in xmltools/Makefile.in

# Fix compilaton with --as-needed. bug #132473
epatch "${FILESDIR}"/djvulibre-3.5.17-pthread-flag.patch

AT_M4DIR="config" eautoreconf
}

src_compile() {
# assembler problems and hence non-building with pentium4
#
replace-flags -march=pentium4 -march=pentium3
echo LINGUAS=$LINGUAS

# When enabling qt it must be compiled with threads. See bug #89544.
if use qt3 ; then
QTCONF=" --with-qt --enable-threads "
elif use threads ; then
QTCONF=" --without-qt --disable-djview --enable-threads "
else
QTCONF=" --without-qt --disable-djview --disable-threads "
fi

# We install all desktop files by hand.
econf --disable-desktopfiles \
$(use_enable xml xmltools) \
$(use_with jpeg) \
$(use_with tiff) \
$(use_enable nls i18n) \
$(use_enable debug) \
${QTCONF} \
|| die "econf failed"

if ! use nsplugin; then
sed -e 's:nsdejavu::' -i "${S}"/gui/Makefile || die
fi

emake -j1 || die "emake failed"
}

src_install() {
make DESTDIR="${D}" plugindir=/usr/$(get_libdir)/${PLUGINS_DIR} install

dodoc README TODO NEWS

use doc && cp -r doc/ "${D}"/usr/share/doc/${PF}

# Install desktop files.
cd desktopfiles
insinto /usr/share/icons/hicolor/22x22/mimetypes && newins hi22-djvu.png image-vnd.djvu.png
insinto /usr/share/icons/hicolor/32x32/mimetypes && newins hi32-djvu.png image-vnd.djvu.png
insinto /usr/share/icons/hicolor/48x48/mimetypes && newins hi48-djvu.png image-vnd.djvu.png
insinto /usr/share/mime/packages && doins djvulibre-mime.xml
if use kde ; then
insinto /usr/share/mimelnk/image && doins vnd.djvu.desktop x-djvu.desktop
cp "${D}"/usr/share/mimelnk/image/{vnd.djvu.desktop,x-djvu.desktop}
sed -i -e 's:image/vnd.djvu:image/x-djvu:' "${D}"/usr/share/mimelnk/image/x-djvu.desktop
fi

insinto /usr/share/icons/hicolor/32x32/apps && newins hi32-djview3.png djvulibre-djview3.png
insinto /usr/share/applications/ && doins djvulibre-djview3.desktop
}

pkg_postinst() {
fdo-mime_desktop_database_update
fdo-mime_mime_database_update
}

pkg_postrm() {
fdo-mime_desktop_database_update
fdo-mime_mime_database_update
}

djvu-3.5.20-r1.ebuild

# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-text/djvu/djvu-3.5.20-r1.ebuild,v 1.9 2008/10/27 05:50:09 vapier Exp $

WANT_AUTOCONF="latest"
WANT_AUTOMAKE="latest"
inherit fdo-mime nsplugins flag-o-matic eutils multilib toolchain-funcs autotools confutils

MY_P="${PN}libre-${PV}"

DESCRIPTION="DjVu viewers, encoders and utilities."
HOMEPAGE="http://djvu.sourceforge.net"
SRC_URI="mirror://sourceforge/djvu/${MY_P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
IUSE="xml qt3 jpeg tiff debug threads nls nsplugin kde doc"

DEPEND="jpeg? ( >=media-libs/jpeg-6b-r2 )
tiff? ( media-libs/tiff )
qt3? ( =x11-libs/qt-3* )"

S=${WORKDIR}/${MY_P}

LANGS="cs de fr ja"
for X in ${LANGS}; do
IUSE="${IUSE} linguas_${X}"
done

pkg_setup() {
if ! use qt3; then
ewarn
ewarn "The standalone djvu viewer, djview, will not be compiled."
ewarn "Add \"qt3\" to your USE flags if you want it."
ewarn
fi

confutils_use_depend_all nsplugin qt3
}

src_unpack() {
unpack ${A}
cd "${S}"

# Do not strip binaries as portage does this for us. bug #135208
find -name Makefile.in -exec sed -i 's:${INSTALL_PROGRAM} -s:${INSTALL_PROGRAM}:' \{\} \;
eautomake
}

src_compile() {
# assembler problems and hence non-building with pentium4
#
replace-flags -march=pentium4 -march=pentium3

local I18N
if use nls; then
for X in ${LANGS}; do
if use linguas_${X}; then
I18N="${I18N} ${X}"
fi
done
I18N="${I18N# }"
if test -n "$I18N"; then
I18N="--enable-i18n=${I18N}"
else
I18N="--enable-i18n"
fi
else
I18N="--disable-i18n"
fi

# When enabling qt it must be compiled with threads. See bug #89544.
if use qt3 ; then
QTCONF=" --with-qt --enable-threads "
elif use threads ; then
QTCONF=" --without-qt --disable-djview --enable-threads "
else
QTCONF=" --without-qt --disable-djview --disable-threads "
fi

# We install all desktop files by hand.
econf --disable-desktopfiles \
$(use_enable xml xmltools) \
$(use_with jpeg) \
$(use_with tiff) \
"${I18N}" \
$(use_enable debug) \
${QTCONF} \
|| die "econf failed"

if ! use nsplugin; then
sed -e 's:nsdejavu::' -i "${S}"/gui/Makefile || die
fi

emake -j1 || die "emake failed"
}

src_install() {
make DESTDIR="${D}" plugindir=/usr/$(get_libdir)/${PLUGINS_DIR} install

dodoc README TODO NEWS

use doc && cp -r doc/ "${D}"/usr/share/doc/${PF}

# Install desktop files.
cd desktopfiles
insinto /usr/share/icons/hicolor/22x22/mimetypes && newins hi22-djvu.png image-vnd.djvu.png
insinto /usr/share/icons/hicolor/32x32/mimetypes && newins hi32-djvu.png image-vnd.djvu.png
insinto /usr/share/icons/hicolor/48x48/mimetypes && newins hi48-djvu.png image-vnd.djvu.png
insinto /usr/share/mime/packages && doins djvulibre-mime.xml
if use kde ; then
insinto /usr/share/mimelnk/image && doins vnd.djvu.desktop x-djvu.desktop
cp "${D}"/usr/share/mimelnk/image/{vnd.djvu.desktop,x-djvu.desktop}
sed -i -e 's:image/vnd.djvu:image/x-djvu:' "${D}"/usr/share/mimelnk/image/x-djvu.desktop
fi

if use qt3 ; then
insinto /usr/share/icons/hicolor/32x32/apps && newins hi32-djview3.png djvulibre-djview3.png
insinto /usr/share/applications/ && doins djvulibre-djview3.desktop
fi
}

pkg_postinst() {
fdo-mime_desktop_database_update
fdo-mime_mime_database_update
}

pkg_postrm() {
fdo-mime_desktop_database_update
fdo-mime_mime_database_update
}

djvu-3.5.21.ebuild

# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-text/djvu/djvu-3.5.21.ebuild,v 1.9 2008/11/07 10:16:04 pva Exp $

EAPI=1
inherit fdo-mime nsplugins flag-o-matic eutils multilib toolchain-funcs confutils

MY_P="${PN}libre-${PV}"

DESCRIPTION="DjVu viewers, encoders and utilities."
HOMEPAGE="http://djvu.sourceforge.net"
SRC_URI="mirror://sourceforge/djvu/${MY_P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ~ppc64 s390 sh sparc x86 ~x86-fbsd"
IUSE="xml qt3 jpeg tiff debug threads nls nsplugin kde doc"

DEPEND="jpeg? ( >=media-libs/jpeg-6b-r2 )
tiff? ( media-libs/tiff )
qt3? ( x11-libs/qt:3 )"

S=${WORKDIR}/${MY_P}

LANGS="cs de en fr ja zh"
for X in ${LANGS}; do
IUSE="${IUSE} linguas_${X}"
done

pkg_setup() {
if ! use qt3; then
ewarn
ewarn "The standalone djvu viewer, djview, will not be compiled."
ewarn "Add \"qt3\" to your USE flags if you want it."
ewarn
fi

confutils_use_depend_all nsplugin qt3
}

src_unpack() {
unpack ${A}
cd "${S}"

epatch "${FILESDIR}"/${P}-parallel-build.patch
}

src_compile() {
local I18N
if use nls; then
for X in ${LANGS}; do
if use linguas_${X}; then
I18N="${I18N} ${X}"
fi
done
I18N="${I18N# }"
if test -n "$I18N"; then
I18N="--enable-i18n=${I18N}"
else
I18N="--enable-i18n"
fi
else
I18N="--disable-i18n"
fi

# When enabling qt it must be compiled with threads. See bug #89544.
if use qt3 ; then
QTCONF=" --with-qt --enable-threads "
elif use threads ; then
QTCONF=" --without-qt --disable-djview --enable-threads "
else
QTCONF=" --without-qt --disable-djview --disable-threads "
fi

# We install all desktop files by hand.
econf --disable-desktopfiles \
$(use_enable xml xmltools) \
$(use_with jpeg) \
$(use_with tiff) \
"${I18N}" \
$(use_enable debug) \
${QTCONF} \
|| die "econf failed"

if ! use nsplugin; then
sed -e 's:nsdejavu::' -i "${S}"/gui/Makefile || die
fi

emake || die "emake failed"
}

src_install() {
emake DESTDIR="${D}" plugindir=/usr/$(get_libdir)/${PLUGINS_DIR} install

dodoc README TODO NEWS

use doc && cp -r doc/ "${D}"/usr/share/doc/${PF}

# Install desktop files.
cd desktopfiles
insinto /usr/share/icons/hicolor/22x22/mimetypes && newins hi22-djvu.png image-vnd.djvu.png || die
insinto /usr/share/icons/hicolor/32x32/mimetypes && newins hi32-djvu.png image-vnd.djvu.png || die
insinto /usr/share/icons/hicolor/48x48/mimetypes && newins hi48-djvu.png image-vnd.djvu.png || die
insinto /usr/share/mime/packages && doins djvulibre-mime.xml || die
if use kde ; then
insinto /usr/share/mimelnk/image && doins vnd.djvu.desktop || die
cp "${D}"/usr/share/mimelnk/image/{vnd.djvu.desktop,x-djvu.desktop}
sed -i -e 's:image/vnd.djvu:image/x-djvu:' "${D}"/usr/share/mimelnk/image/x-djvu.desktop
fi

if use qt3 ; then
insinto /usr/share/icons/hicolor/32x32/apps && newins hi32-djview3.png djvulibre-djview3.png || die
insinto /usr/share/applications/ && doins djvulibre-djview3.desktop || die
fi
}

pkg_postinst() {
fdo-mime_desktop_database_update
fdo-mime_mime_database_update
}

pkg_postrm() {
fdo-mime_desktop_database_update
fdo-mime_mime_database_update
}

files

metadata.xml




tex

pva@gentoo.org
Peter Volkov


DjVu is a web-centric format and software platform for distributing documents
and images. DjVu can advantageously replace PDF, PS, TIFF, JPEG, and GIF for
distributing scanned documents, digital documents, or high-resolution pictures.
DjVu content downloads faster, displays and renders faster, looks nicer on a
screen, and consume less client resources than competing formats. DjVu images
display instantly and can be smoothly zoomed and panned with no lengthy
re-rendering. DjVu is used by hundreds of academic, commercial, governmental,
and non-commercial web sites around the world.