summaryrefslogtreecommitdiff
path: root/app-text/djvu
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-11-18 10:15:03 +0000
committerV3n3RiX <venerix@redcorelinux.org>2019-11-18 10:15:03 +0000
commitb284a3168fa91a038925d2ecf5e4791011ea5e7d (patch)
tree16fe44748708acacd909d4e2e160a09a7f6d936a /app-text/djvu
parent77398e424e45d9e98c1cef3c43bdadb9d56e81ef (diff)
gentoo resync : 18.11.2019
Diffstat (limited to 'app-text/djvu')
-rw-r--r--app-text/djvu/Manifest6
-rw-r--r--app-text/djvu/djvu-3.5.25.3.ebuild72
-rw-r--r--app-text/djvu/djvu-3.5.27-r1.ebuild (renamed from app-text/djvu/djvu-3.5.27.ebuild)15
-rw-r--r--app-text/djvu/files/djvu-3.5.24-gcc46.patch40
-rw-r--r--app-text/djvu/files/fix-CVE-2019-18804.patch39
5 files changed, 51 insertions, 121 deletions
diff --git a/app-text/djvu/Manifest b/app-text/djvu/Manifest
index 3242cc7be020..25c1c4392769 100644
--- a/app-text/djvu/Manifest
+++ b/app-text/djvu/Manifest
@@ -1,6 +1,4 @@
-AUX djvu-3.5.24-gcc46.patch 859 BLAKE2B c11a240b930df4ddbf45272c2c2ba262b545d440cb6553107bac51894853b1ae28ca97620bef74bdde6ac674eee237cf14c63fa9313f9acf2afb70c8e6045f6e SHA512 8e27341bb994dca8ea27cf6da1141f06b5c96f1b853e7d4215214893c32a17fe3adc821c98ff8793d23cde458420f944b7f4d51e794fda9a061fea6f1eac08ca
-DIST djvulibre-3.5.25.3.tar.gz 2543949 BLAKE2B 8ae6004e74a7db0fa666a3cf15f5a3b335690984838e8d674ccd7fa7dda0728771f6fab5f61747b505646e3bb206effd0bbaf9c6035fb27993d587693ad1fa43 SHA512 0e38f56d77915ee6707dd19a36a8ca9167608c39449a5c73de9cd784d712852c07c068b79a794e25f6d3ded0f927d083413dde197c9fc8f7b68c03cffe68035b
+AUX fix-CVE-2019-18804.patch 1130 BLAKE2B d83e7f74fca659d58731cb051aface930f1f3d0ffc737056e59323d436bfbad9b43aba5fb2c353b368a4fdbe9c257ca34ba53769e8aa2f0a42ebbd0a8d48181f SHA512 587aa61a9f9f7f845f1f0a23f59503efa7247862074096c707368316ad91aee40025d48c76a7351dc09ec1687c3902198fdbd6aa8623c4f1d8654d0c549ec4e7
DIST djvulibre-3.5.27.tar.gz 3648522 BLAKE2B e1907b4b64c48304ceb24360cfd451e4690d38803f22231d4e136dbe754715527fa0300c623bb709fa05bba206348257137b2a755651bb51ca26259680e142d0 SHA512 62abcaa2fe7edab536477929ba38b882453dab1a06e119a3f838b38d5c61f5d8c252e4769e6534582b826e49bcfb490513179580fab9c3afa84aa92053ccebee
-EBUILD djvu-3.5.25.3.ebuild 1746 BLAKE2B 7061503856361dc69ac981e870962e262db8a95e9a9bad3328c81ec36e1b8bf1c582c25159b681dee8c3b05d50f1a041b0927bbedc1e5abe11b0e805fba488ce SHA512 ecaf46883bfc303c945356850c539f12491183864456564936d0cd2926d178273555072ee33221188c0e1e32b2f3ccfeb245abe995e55e8044334cb566b1335c
-EBUILD djvu-3.5.27.ebuild 1439 BLAKE2B c9af82a7de257769690fca1e1e855020ab98a33f35b1b7646d6deeb8792f892818db11b37c10e10bc428229fd4fe53404b93f0fb73ddbf009ca9bf91d2150ba2 SHA512 7828e17d01157054e7f7d54bc312786b5dff6ca110231ad9670db692d22c9fa71657bc8df0a720d8ae7317bad0f246de26c44432b2b4389ffa2bd49723b4157d
+EBUILD djvu-3.5.27-r1.ebuild 1576 BLAKE2B 20c0d04dff161eb7239be4b5220522303720d7f23796b41107a07684d1e5bea2ec6595c95758ff3ebf7f0f92d8910a439977626646c97bb6c9cb7785276f0d30 SHA512 7fbdeb60cd5846985bc4c9562ebbf3ad3aac2b3dc7a9cfb720f076b6c5edba788fae48c195bd713585772b56676cd87cc305a047474175dcee36f0f4981ad505
MISC metadata.xml 948 BLAKE2B 1d15a217967f10397d747f2cc0844ea76d4f876ed0ee8cb56733b74a3b92f023e3eeff11bfcb4265766c14dad4b1e35a18f7d2fdd7442068bf82c4a8302690db SHA512 e5cfa3a2b2077a3f0dbfcc99165fb678e8c8759724790d520f1bed670fed5e753a47207bbbcd7d2ff2d55def5b34bf32201771918c9e7a16583d91553ac75e42
diff --git a/app-text/djvu/djvu-3.5.25.3.ebuild b/app-text/djvu/djvu-3.5.25.3.ebuild
deleted file mode 100644
index ce39ce5ee796..000000000000
--- a/app-text/djvu/djvu-3.5.25.3.ebuild
+++ /dev/null
@@ -1,72 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit autotools eutils flag-o-matic xdg-utils
-
-MY_P="${PN}libre-${PV#*_p}"
-
-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 arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-solaris"
-IUSE="debug doc jpeg tiff xml"
-
-RDEPEND="jpeg? ( virtual/jpeg:0 )
- tiff? ( media-libs/tiff:0= )"
-DEPEND="${RDEPEND}
- || ( gnome-base/librsvg media-gfx/inkscape )"
-
-S=${WORKDIR}/${MY_P%%.3}
-
-src_prepare() {
- sed -i \
- -e 's/AC_CXX_OPTIMIZE/OPTS=;AC_SUBST(OPTS)/' \
- configure.ac || die #263688
- rm aclocal.m4 config/{libtool.m4,ltmain.sh,install-sh,config.sub,config.guess,ltoptions.m4,ltversion.m4,lt~obsolete.m4}
-# epatch "${FILESDIR}/${PN}-3.5.24-gcc46.patch"
- AT_M4DIR="config" eautoreconf
-}
-
-src_configure() {
- use debug && append-cppflags "-DRUNTIME_DEBUG_ONLY"
-
- # We install all desktop files by hand.
- econf \
- $(use_enable xml xmltools) \
- $(use_with jpeg) \
- $(use_with tiff) \
- --disable-desktopfiles
-}
-
-DOCS=( NEWS README )
-
-src_install() {
- default
- prune_libtool_files
-
- use doc && dodoc -r doc
-
- # Install desktop files.
- cd desktopfiles
- for i in {22,32,48,64}; do
- insinto /usr/share/icons/hicolor/${i}x${i}/mimetypes
- newins hi${i}-djvu.png image-vnd.djvu.png
- done
- insinto /usr/share/mime/packages
- doins djvulibre-mime.xml
-}
-
-pkg_postinst() {
- xdg_mimeinfo_database_update
- has_version app-text/djview || \
- optfeature "For djviewer or browser plugin" app-text/djview
-}
-
-pkg_postrm() {
- xdg_mimeinfo_database_update
-}
diff --git a/app-text/djvu/djvu-3.5.27.ebuild b/app-text/djvu/djvu-3.5.27-r1.ebuild
index 63ee44269e42..f15324a15f29 100644
--- a/app-text/djvu/djvu-3.5.27.ebuild
+++ b/app-text/djvu/djvu-3.5.27-r1.ebuild
@@ -1,21 +1,23 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
+EAPI=7
-inherit eutils flag-o-matic xdg-utils
+inherit desktop eutils flag-o-matic xdg-utils
MY_P="${PN}libre-${PV#*_p}"
DESCRIPTION="DjVu viewers, encoders and utilities"
HOMEPAGE="http://djvu.sourceforge.net/"
-SRC_URI="mirror://sourceforge/djvu/${MY_P}.tar.gz"
+SRC_URI="http://downloads.sourceforge.net/djvu/${MY_P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-solaris"
IUSE="debug doc jpeg tiff xml"
+PATCHES=( "${FILESDIR}"/fix-CVE-2019-18804.patch )
+
RDEPEND="jpeg? ( virtual/jpeg:0 )
tiff? ( media-libs/tiff:0= )"
DEPEND="${RDEPEND}
@@ -38,7 +40,8 @@ DOCS=( NEWS README )
src_install() {
default
- prune_libtool_files
+
+ find "${ED}" -name '*.la' -delete || die
use doc && dodoc -r doc
@@ -53,11 +56,13 @@ src_install() {
}
pkg_postinst() {
+ xdg_icon_cache_update
xdg_mimeinfo_database_update
has_version app-text/djview || \
optfeature "For djviewer or browser plugin" app-text/djview
}
pkg_postrm() {
+ xdg_icon_cache_update
xdg_mimeinfo_database_update
}
diff --git a/app-text/djvu/files/djvu-3.5.24-gcc46.patch b/app-text/djvu/files/djvu-3.5.24-gcc46.patch
deleted file mode 100644
index 2d1d099bfbb9..000000000000
--- a/app-text/djvu/files/djvu-3.5.24-gcc46.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-http://bugs.gentoo.org/361057 for GSmartPointer.h change
-
-Then include stddef.h in the installed headers to fix building of reverse
-dependencies, such as app-text/zathura-djvu
-
-These are all in upstream GIT
-
---- a/libdjvu/ddjvuapi.h
-+++ b/libdjvu/ddjvuapi.h
-@@ -64,6 +64,7 @@
- }
- #endif
-
-+#include <stddef.h>
- #include <stdlib.h>
- #include <stdio.h>
-
---- a/libdjvu/GSmartPointer.h
-+++ b/libdjvu/GSmartPointer.h
-@@ -62,6 +62,8 @@
- # pragma interface
- #endif
-
-+#include <cstddef>
-+
- /** @name GSmartPointer.h
-
- Files #"GSmartPointer.h"# and #"GSmartPointer.cpp"# define a smart-pointer
---- a/libdjvu/miniexp.h
-+++ b/libdjvu/miniexp.h
-@@ -38,7 +38,8 @@
- #ifndef MINILISPAPI
- # define MINILISPAPI /**/
- #endif
--
-+
-+#include <stddef.h>
-
- /* -------------------------------------------------- */
- /* LISP EXPRESSIONS */
diff --git a/app-text/djvu/files/fix-CVE-2019-18804.patch b/app-text/djvu/files/fix-CVE-2019-18804.patch
new file mode 100644
index 000000000000..b5d790ba1b1c
--- /dev/null
+++ b/app-text/djvu/files/fix-CVE-2019-18804.patch
@@ -0,0 +1,39 @@
+From c8bec6549c10ffaa2f2fbad8bbc629efdf0dd125 Mon Sep 17 00:00:00 2001
+From: Leon Bottou <leon@bottou.org>
+Date: Thu, 17 Oct 2019 22:20:31 -0400
+Subject: [PATCH] Fixed bug 309
+
+---
+ libdjvu/IW44EncodeCodec.cpp | 2 +-
+ tools/ddjvu.cpp | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libdjvu/IW44EncodeCodec.cpp b/libdjvu/IW44EncodeCodec.cpp
+index 00752a0..f81eaeb 100644
+--- a/libdjvu/IW44EncodeCodec.cpp
++++ b/libdjvu/IW44EncodeCodec.cpp
+@@ -405,7 +405,7 @@ filter_fv(short *p, int w, int h, int rowsize, int scale)
+ int y = 0;
+ int s = scale*rowsize;
+ int s3 = s+s+s;
+- h = ((h-1)/scale)+1;
++ h = (h>0) ? ((h-1)/scale)+1 : 0;
+ y += 1;
+ p += s;
+ while (y-3 < h)
+diff --git a/tools/ddjvu.cpp b/tools/ddjvu.cpp
+index 6d0df3b..7109952 100644
+--- a/tools/ddjvu.cpp
++++ b/tools/ddjvu.cpp
+@@ -279,7 +279,7 @@ render(ddjvu_page_t *page, int pageno)
+ prect.h = (ih * 100) / dpi;
+ }
+ /* Process aspect ratio */
+- if (flag_aspect <= 0)
++ if (flag_aspect <= 0 && iw>0 && ih>0)
+ {
+ double dw = (double)iw / prect.w;
+ double dh = (double)ih / prect.h;
+--
+2.23.0
+