diff options
Diffstat (limited to 'app-text/pdf2djvu')
-rw-r--r-- | app-text/pdf2djvu/Manifest | 5 | ||||
-rw-r--r-- | app-text/pdf2djvu/files/pdf2djvu-0.9.12-poppler-0.76-1.patch | 35 | ||||
-rw-r--r-- | app-text/pdf2djvu/files/pdf2djvu-0.9.12-poppler-0.76-2.patch | 69 | ||||
-rw-r--r-- | app-text/pdf2djvu/files/pdf2djvu-0.9.12-poppler-0.76-3.patch | 38 | ||||
-rw-r--r-- | app-text/pdf2djvu/pdf2djvu-0.9.12.ebuild | 4 |
5 files changed, 150 insertions, 1 deletions
diff --git a/app-text/pdf2djvu/Manifest b/app-text/pdf2djvu/Manifest index 55b3a7ee097c..ca4cba99a052 100644 --- a/app-text/pdf2djvu/Manifest +++ b/app-text/pdf2djvu/Manifest @@ -1,7 +1,10 @@ +AUX pdf2djvu-0.9.12-poppler-0.76-1.patch 1038 BLAKE2B 5867bf9bb8a9eceec872c6d366bf9acf489c2d7eaaea374115e7c308a58acf1c55ef0f85b0d8326414af2d84d489e5b7aa3c5fd42c8ab860cacad989a50e8c71 SHA512 ce2d2f486ba451e630ec2f7b4763b92f29d5546ced5600ba34205dec9f50cd26d5ed3464a6cec1431935976c3061dc21eccbe899951b5b5826264b8c3b502c5d +AUX pdf2djvu-0.9.12-poppler-0.76-2.patch 2083 BLAKE2B 6d861148705ca78b03dead9a7e2c1e98039d0bdc5a8e70fafbd6ddb71c428c2df242e74f956ae972cccb73aeb5dbddafc95cbf9a05f5acdb34ac6af3e65d26a4 SHA512 ebe0594918f421cfa396ec0291da9da71f482dc2e869f8dd2374e8638253b150a4896b3c361f5e972dbda03994df18959c2ee9665da63225ec19a98d4ed5fca3 +AUX pdf2djvu-0.9.12-poppler-0.76-3.patch 1127 BLAKE2B 2556851d29ebe02e0e17b3e2fa733a533cbf98b61fa6a20b7fb9f9befe800d2ed0d5826b61d7aa1deade63277ef61173a6080782e0c33d5946fd1fd076c064fe SHA512 07ee2c2b8277d4c9ba90fc192885c299451b20558b3ee5c268030bf21e69e37c0e3f750b1158b9cb927d7504ee2458ced8fb662cb65ad2ecae76d14ae729ce10 DIST pdf2djvu-0.9.11.tar.xz 291356 BLAKE2B 726d9132c43c7dabdecf1e6174a3f2627db7f6981b3ba1f280ea131272ea0fef38acdaaa0f78ab0c883dd2cd046017edac46bb10d91e10668a6e480322e465fb SHA512 7b47ff4cd3a49f3fa1fec08490a192725899307d9c2a75a65a21d36abcece2f308e56161ec4c4f77f32fbdedcc167520657cad2b06cf178335f7e2169b7ada82 DIST pdf2djvu-0.9.12.tar.xz 295088 BLAKE2B 6dd8b04f089e464becd7923c96ac2ca35efc28412c1913270c8c85656b58a74a47777b1b5b932d29e3ee2ad4d75bc6bcb85b835e5aa7e9d9c6a0ef7b242b5c46 SHA512 2a3acd8efa682541f45a0650070c0260903dadbd49ac6d4560e2e5ee3c5a68a1310dcb9d170035ee8fec0e588171f2c402047b3d7dc4e7d4033abe95f2ebde74 DIST pdf2djvu-0.9.8.tar.xz 268976 BLAKE2B 318ef4fd5677056d2404d769bf54911c9474d6f0f839ef472e121375ee268db31ddaaad2b8ed791ef093d6cb1c665f6431619918ee852e479b4a11a3d7ae0e23 SHA512 5f5330d3d15808b5b6233a15a984d0ebf28619cfb50807a20c8992fed68d17f73d1edd62b1ad7cd3a09d526f6c9f0827e2c5e03d6d7c8ad92c1f106755025f5e EBUILD pdf2djvu-0.9.11.ebuild 1248 BLAKE2B 2c853db54877e60077815a89a9257a0258fc6a5aa6f6a8baefa9b11b5c10f1819fdb4b93ae3cb23b1c604ee9401b3e69304838b6998bd60663637f492d3b976c SHA512 8b7525c6af445582c5710fb92c4133aecef5e1e8e6acd9764bebb0a12e61ad3981d3bfbb83c6d224f95d31cb9a0dc7bc128c9d89e4481a2ae3a57de24fe9c445 -EBUILD pdf2djvu-0.9.12.ebuild 1248 BLAKE2B 314a6564b04a6d638ce2f33f98eb5e66a1066210db47fd535430106b46253c5f064c7e03ba2d83a9b6403ccbec6c15cce8cbb0bfba60a30fd7de0faad7a2a802 SHA512 bd531152726f48d84dd71c02ceb60dd779708571fd015c1243c1b1b5b44ef9b7fb11a0ef70cf3d7af9d74a1fe2a3deb0e19fc457e3d8619ba11b71bf42fa9e0d +EBUILD pdf2djvu-0.9.12.ebuild 1308 BLAKE2B 588df751c039d93819cdc71718fe8c6e31a33094c2e8005935786fff973cb86c2c2f45371d19220f4027e1468d474e21a5ec256bd8f270aa563dc8dce8fe1663 SHA512 4b07d93a9c82449ce81ae5e3513cfe5f9fc1a01cefdb55eb5cfc027c121d2b6558d5e9dfa54cc81392ee9c5ec2a9a658a68ac01cbd5ad9780364ff95bde07073 EBUILD pdf2djvu-0.9.8.ebuild 1251 BLAKE2B 6a3487ef4e2195daf5c78447960874a504bcb4a2f5187b49e058df35ed7482f820058aec8d719a52aca3a558ce86cef5705c006d422ef516db9de69632767404 SHA512 b2a2ed2d2f9ebe91f15f2da833b5e5a638bc9a82b7a2562eb4548909bfca18d519f9d76f5f2e843115e73af8c7a232ad4b5f5de419ac08371114762ef2d42013 MISC metadata.xml 351 BLAKE2B 68816123c075f603535faa42307dfc58066cc7c9db272b1f6004a9e0bba5d71d0a798b5b2fed9d4af704ed5145264b400f406c5b1185e3b759c97c0ccccc05d1 SHA512 98cfb584785e967dfd11dc82da694ccde0031609c28faca492d2384d6257020ebf8ac264dcb512129f5a681455ce3228b9f443aa2aa99197134ed7957901eb06 diff --git a/app-text/pdf2djvu/files/pdf2djvu-0.9.12-poppler-0.76-1.patch b/app-text/pdf2djvu/files/pdf2djvu-0.9.12-poppler-0.76-1.patch new file mode 100644 index 000000000000..06341298ff68 --- /dev/null +++ b/app-text/pdf2djvu/files/pdf2djvu-0.9.12-poppler-0.76-1.patch @@ -0,0 +1,35 @@ +From aa3fdae51c19ad2865f92882ec9007feeb7e477a Mon Sep 17 00:00:00 2001 +From: Jakub Wilk <jwilk@jwilk.net> +Date: Mon, 1 Apr 2019 08:23:51 +0200 +Subject: [PATCH] Put Ref in pdf namespace. + +--- + pdf-backend.hh | 1 + + pdf2djvu.cc | 2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/pdf-backend.hh b/pdf-backend.hh +index 43899c0..d7872c3 100644 +--- a/pdf-backend.hh ++++ b/pdf-backend.hh +@@ -82,6 +82,7 @@ namespace pdf + typedef ::Catalog Catalog; + typedef ::GooString String; + typedef ::Goffset Offset; ++ typedef ::Ref Ref; + + /* type definitions — annotations + * ============================== +diff --git a/pdf2djvu.cc b/pdf2djvu.cc +index 669eba5..d9e1532 100644 +--- a/pdf2djvu.cc ++++ b/pdf2djvu.cc +@@ -86,7 +86,7 @@ static int get_page_for_goto_link(pdf::link::GoTo *goto_link, pdf::Catalog *cata + int page; + if (dest->isPageRef()) + { +- Ref pageref = dest->getPageRef(); ++ pdf::Ref pageref = dest->getPageRef(); + page = catalog->findPage(pageref.num, pageref.gen); + } + else diff --git a/app-text/pdf2djvu/files/pdf2djvu-0.9.12-poppler-0.76-2.patch b/app-text/pdf2djvu/files/pdf2djvu-0.9.12-poppler-0.76-2.patch new file mode 100644 index 000000000000..356153b5cca0 --- /dev/null +++ b/app-text/pdf2djvu/files/pdf2djvu-0.9.12-poppler-0.76-2.patch @@ -0,0 +1,69 @@ +From 8b0348b3d5f33494d7e637411633fbea511a78d7 Mon Sep 17 00:00:00 2001 +From: Jakub Wilk <jwilk@jwilk.net> +Date: Mon, 1 Apr 2019 08:49:02 +0200 +Subject: [PATCH] Use Catalog::findPage(Ref) as alternative to + Catalog::findPage(int, int). +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes: + + pdf2djvu.cc: In function ‘int get_page_for_goto_link(pdf::link::GoTo*, pdf::Catalog*)’: + pdf2djvu.cc:90:56: error: no matching function for call to ‘Catalog::findPage(int&, int&)’ +--- + pdf-backend.cc | 15 +++++++++++++++ + pdf-backend.hh | 2 ++ + pdf2djvu.cc | 2 +- + 3 files changed, 18 insertions(+), 1 deletion(-) + +diff --git a/pdf-backend.cc b/pdf-backend.cc +index f1d7662..a1b9b63 100644 +--- a/pdf-backend.cc ++++ b/pdf-backend.cc +@@ -631,4 +631,19 @@ const char * pdf::get_c_string(const pdf::String *str) + } + #endif + ++template <typename C> static auto find_page_impl(C *catalog, pdf::Ref pgref) -> decltype(catalog->findPage(0, 0)) ++{ ++ return catalog->findPage(pgref.num, pgref.gen); ++} ++ ++template <typename C> static auto find_page_impl(C *catalog, pdf::Ref pgref) -> decltype(catalog->findPage(pgref)) ++{ ++ return catalog->findPage(pgref); ++} ++ ++int pdf::find_page(pdf::Catalog *catalog, pdf::Ref pgref) ++{ ++ return find_page_impl<pdf::Catalog>(catalog, pgref); ++} ++ + // vim:ts=2 sts=2 sw=2 et +diff --git a/pdf-backend.hh b/pdf-backend.hh +index d7872c3..d88c956 100644 +--- a/pdf-backend.hh ++++ b/pdf-backend.hh +@@ -436,6 +436,8 @@ namespace pdf + + const char * get_c_string(const pdf::String *str); + ++ int find_page(pdf::Catalog *catalog, pdf::Ref pgref); ++ + } + + #endif +diff --git a/pdf2djvu.cc b/pdf2djvu.cc +index d9e1532..21f2d50 100644 +--- a/pdf2djvu.cc ++++ b/pdf2djvu.cc +@@ -87,7 +87,7 @@ static int get_page_for_goto_link(pdf::link::GoTo *goto_link, pdf::Catalog *cata + if (dest->isPageRef()) + { + pdf::Ref pageref = dest->getPageRef(); +- page = catalog->findPage(pageref.num, pageref.gen); ++ page = pdf::find_page(catalog, pageref); + } + else + page = dest->getPageNum(); diff --git a/app-text/pdf2djvu/files/pdf2djvu-0.9.12-poppler-0.76-3.patch b/app-text/pdf2djvu/files/pdf2djvu-0.9.12-poppler-0.76-3.patch new file mode 100644 index 000000000000..b3d8cfad6df2 --- /dev/null +++ b/app-text/pdf2djvu/files/pdf2djvu-0.9.12-poppler-0.76-3.patch @@ -0,0 +1,38 @@ +From 8325358a9769e8aa33693fc5ea2ac771dd82716f Mon Sep 17 00:00:00 2001 +From: Jakub Wilk <jwilk@jwilk.net> +Date: Tue, 23 Apr 2019 08:23:46 +0200 +Subject: [PATCH] pdf-backend: simplify find_page() implementation. + +--- + pdf-backend.cc | 16 +++++----------- + 1 file changed, 5 insertions(+), 11 deletions(-) + +diff --git a/pdf-backend.cc b/pdf-backend.cc +index f6f5267..a94383e 100644 +--- a/pdf-backend.cc ++++ b/pdf-backend.cc +@@ -631,19 +631,13 @@ const char * pdf::get_c_string(const pdf::String *str) + } + #endif + +-template <typename C> static auto find_page_impl(C *catalog, pdf::Ref pgref) -> decltype(catalog->findPage(0, 0)) +-{ +- return catalog->findPage(pgref.num, pgref.gen); +-} +- +-template <typename C> static auto find_page_impl(C *catalog, pdf::Ref pgref) -> decltype(catalog->findPage(pgref)) +-{ +- return catalog->findPage(pgref); +-} +- + int pdf::find_page(pdf::Catalog *catalog, pdf::Ref pgref) + { +- return find_page_impl<pdf::Catalog>(catalog, pgref); ++#if POPPLER_VERSION >= 7600 ++ return catalog->findPage(pgref); ++#else ++ return catalog->findPage(pgref.num, pgref.gen); ++#endif + } + + // vim:ts=2 sts=2 sw=2 et diff --git a/app-text/pdf2djvu/pdf2djvu-0.9.12.ebuild b/app-text/pdf2djvu/pdf2djvu-0.9.12.ebuild index 069fd000f70f..ca3f9f534524 100644 --- a/app-text/pdf2djvu/pdf2djvu-0.9.12.ebuild +++ b/app-text/pdf2djvu/pdf2djvu-0.9.12.ebuild @@ -39,6 +39,10 @@ DOCS=( doc/{changelog,credits,djvudigital,README} ) +PATCHES=( + "${FILESDIR}"/${P}-poppler-0.76-{1,2,3}.patch +) + pkg_setup() { use test && python-any-r1_pkg_setup } |