mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-24 04:33:24 +00:00
Update pdf2djvu to 0.7.21.
This version builds with poppler 0.34.0. Update WWW to new homepage. PR: 201660 Submitted by: myself Approved by: maintainer timeout (16 days)
This commit is contained in:
parent
757724fd75
commit
7299f2d25b
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=393432
@ -2,11 +2,9 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= pdf2djvu
|
||||
PORTVERSION= 0.7.17
|
||||
PORTREVISION= 4
|
||||
PORTVERSION= 0.7.21
|
||||
CATEGORIES= converters
|
||||
MASTER_SITES= GOOGLE_CODE
|
||||
DISTNAME= ${PORTNAME}_${PORTVERSION}
|
||||
MASTER_SITES= https://bitbucket.org/jwilk/pdf2djvu/downloads/
|
||||
|
||||
MAINTAINER= darcsis@gmail.com
|
||||
COMMENT= Pdf2djvu creates DjVu files from PDF files
|
||||
@ -18,12 +16,10 @@ LIB_DEPENDS= libpoppler.so:${PORTSDIR}/graphics/poppler \
|
||||
libdjvulibre.so:${PORTSDIR}/graphics/djvulibre
|
||||
|
||||
GNU_CONFIGURE= yes
|
||||
USES= compiler:c++11-lang gmake pkgconfig
|
||||
USES= compiler:c++11-lang gmake pkgconfig tar:xz
|
||||
|
||||
PLIST_FILES= bin/pdf2djvu man/man1/pdf2djvu.1.gz
|
||||
|
||||
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.if ${OSVERSION} < 900014
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (pdf2djvu_0.7.17.tar.gz) = fe6d6e2d6df53195f082890d3cb5e50080784510691e708a5e4614b49662f4da
|
||||
SIZE (pdf2djvu_0.7.17.tar.gz) = 320923
|
||||
SHA256 (pdf2djvu-0.7.21.tar.xz) = 12d480cc3ce2369e1f1b39b7f5e6fbb44351d8b07861295d34e6978f58b687b9
|
||||
SIZE (pdf2djvu-0.7.21.tar.xz) = 229020
|
||||
|
@ -1,112 +0,0 @@
|
||||
--- pdf2djvu.cc.orig 2013-05-30 22:22:26.000000000 +0200
|
||||
+++ pdf2djvu.cc 2013-10-19 16:11:38.078951359 +0200
|
||||
@@ -212,7 +212,7 @@
|
||||
|
||||
Command &operator <<(Command &command, const Component &component)
|
||||
{
|
||||
- command << *component.file;
|
||||
+ command << std::string(*component.file);
|
||||
return command;
|
||||
}
|
||||
|
||||
@@ -980,7 +980,7 @@
|
||||
{
|
||||
debug(3) << _("creating document outline with `djvused`") << std::endl;
|
||||
DjVuCommand djvused("djvused");
|
||||
- djvused << "-s" << "-f" << outlines_sed_file << this->index_file;
|
||||
+ djvused << "-s" << "-f" << std::string(outlines_sed_file) << std::string(this->index_file);
|
||||
djvused(); // djvused -s -f <outlines-sed-file> <index-djvu-file>
|
||||
}
|
||||
|
||||
@@ -991,7 +991,7 @@
|
||||
{
|
||||
debug(3) << _("setting metadata with `djvused`") << std::endl;
|
||||
DjVuCommand djvused("djvused");
|
||||
- djvused << "-s" << "-f" << metadata_sed_file << this->index_file;
|
||||
+ djvused << "-s" << "-f" << std::string(metadata_sed_file) << std::string(this->index_file);
|
||||
djvused(); // djvused -s -f <metadata-sed-file> <index-djvu-file>
|
||||
}
|
||||
else
|
||||
@@ -1025,7 +1025,7 @@
|
||||
dummy_components.push_back(this->components[i]);
|
||||
this->do_create(dummy_components);
|
||||
DjVuCommand djvused("djvused");
|
||||
- djvused << "-s" << "-f" << dummy_sed_file << this->index_file;
|
||||
+ djvused << "-s" << "-f" << std::string(dummy_sed_file) << std::string(this->index_file);
|
||||
djvused(); // djvused -s -f <dummy-sed-file> <output-djvu-file>
|
||||
dummy_components.pop_back();
|
||||
}
|
||||
@@ -1033,7 +1033,7 @@
|
||||
dummy_components.push_back(this->components[size - 1]);
|
||||
this->do_create(dummy_components);
|
||||
DjVuCommand djvused("djvused");
|
||||
- djvused << "-s" << "-f" << metadata_sed_file << this->index_file;
|
||||
+ djvused << "-s" << "-f" << std::string(metadata_sed_file) << std::string(this->index_file);
|
||||
djvused(); // djvused -s -f <metadata-sed-file> <output-djvu-file>
|
||||
/* Finally, recreate the index. */
|
||||
this->do_create(this->components, true /* include shared annotations */);
|
||||
@@ -1089,8 +1089,8 @@
|
||||
{
|
||||
this->converter
|
||||
<< "-b"
|
||||
- << *this->index_file
|
||||
- << this->output_file;
|
||||
+ << std::string(*this->index_file)
|
||||
+ << std::string(this->output_file);
|
||||
this->converter(); // djvmcvt -b <output-djvu-file> <index-djvu-file>
|
||||
this->index_file.reset(NULL);
|
||||
}
|
||||
@@ -1122,7 +1122,7 @@
|
||||
}
|
||||
bzz_file.close();
|
||||
DjVuCommand bzz("bzz");
|
||||
- bzz << "-e" << bzz_file << "-";
|
||||
+ bzz << "-e" << std::string(bzz_file) << "-";
|
||||
bzz(index_file);
|
||||
}
|
||||
size = this->index_file.size();
|
||||
@@ -1498,7 +1498,7 @@
|
||||
csepdjvu << "-q" << config.bg_slices;
|
||||
if (config.text == config.TEXT_LINES)
|
||||
csepdjvu << "-t";
|
||||
- csepdjvu << sep_file << component;
|
||||
+ csepdjvu << std::string(sep_file) << component;
|
||||
csepdjvu();
|
||||
}
|
||||
const bool should_have_fgbz = has_background || has_foreground || nonwhite_background_color;
|
||||
@@ -1528,7 +1528,7 @@
|
||||
TemporaryFile pbm_file;
|
||||
debug(3) << _("encoding monochrome image with `cjb2`") << std::endl;
|
||||
DjVuCommand cjb2("cjb2");
|
||||
- cjb2 << "-losslevel" << config.loss_level << pbm_file << sjbz_file;
|
||||
+ cjb2 << "-losslevel" << config.loss_level << std::string(pbm_file) << std::string(sjbz_file);
|
||||
pbm_file << "P4 " << width << " " << height << std::endl;
|
||||
pdf::Pixmap bmp(outm->has_skipped_elements() ? out1.get() : outm.get());
|
||||
pbm_file << bmp;
|
||||
@@ -1543,7 +1543,7 @@
|
||||
TemporaryFile ppm_file;
|
||||
debug(3) << _("creating new background image with `c44`") << std::endl;
|
||||
DjVuCommand c44("c44");
|
||||
- c44 << "-slice" << "97" << ppm_file << c44_file;
|
||||
+ c44 << "-slice" << "97" << std::string(ppm_file) << std::string(c44_file);
|
||||
int bg_width = (width + 11) / 12;
|
||||
int bg_height = (height + 11) / 12;
|
||||
ppm_file << "P6 " << bg_width << " " << bg_height << " 255" << std::endl;
|
||||
@@ -1560,7 +1560,7 @@
|
||||
{ /* Replace previous (dummy) BG44 chunk with the newly created one: */
|
||||
debug(3) << _("recovering image chunks with `djvuextract`") << std::endl;
|
||||
DjVuCommand djvuextract("djvuextract");
|
||||
- djvuextract << c44_file << std::string("BG44=") + std::string(bg44_file);
|
||||
+ djvuextract << std::string(c44_file) << std::string("BG44=") + std::string(bg44_file);
|
||||
djvuextract(config.verbose < 3);
|
||||
}
|
||||
}
|
||||
@@ -1601,7 +1601,7 @@
|
||||
{ /* Add per-page non-raster data into the DjVu file: */
|
||||
debug(3) << _("adding non-raster data with `djvused`") << std::endl;
|
||||
DjVuCommand djvused("djvused");
|
||||
- djvused << component << "-s" << "-f" << sed_file;
|
||||
+ djvused << component << "-s" << "-f" << std::string(sed_file);
|
||||
djvused();
|
||||
}
|
||||
{
|
@ -1,34 +0,0 @@
|
||||
--- tools/xml2c.orig 2013-05-30 22:22:26.000000000 +0200
|
||||
+++ tools/xml2c 2013-10-19 15:09:40.124205826 +0200
|
||||
@@ -1,16 +1,24 @@
|
||||
#!/bin/sh
|
||||
|
||||
-# Copyright © 2009 Jakub Wilk
|
||||
+# Copyright © 2009, 2013 Jakub Wilk
|
||||
#
|
||||
# This package is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; version 2 dated June, 1991.
|
||||
|
||||
-exec sed \
|
||||
- -e '/<!--# *\(.*\) *#-->/ { s//\1/; b; }' \
|
||||
- -e '/<!--.*-->/ { s///g; b; }' \
|
||||
- -e 's/\\\\/\\\\/g' \
|
||||
- -e 's/"/\\"/g' \
|
||||
- -e 's/^/"/; s/$/\\n"/'
|
||||
+exec sed -e '
|
||||
+/<!--# *\(.*\) *#-->/ {
|
||||
+ s//\1/
|
||||
+ b
|
||||
+}
|
||||
+/<!--.*-->/ {
|
||||
+ s///g
|
||||
+ b
|
||||
+}
|
||||
+s/\\\\/\\\\/g
|
||||
+s/"/\\"/g
|
||||
+s/^/"/
|
||||
+s/$/\\n"/
|
||||
+'
|
||||
|
||||
# vim:ts=2 sw=2 et
|
@ -2,4 +2,4 @@ pdf2djvu creates DjVu files from PDF files. It's able to extract:
|
||||
graphics, text layer, hyperlinks, document outline (bookmarks), and
|
||||
metadata.
|
||||
|
||||
WWW: http://code.google.com/p/pdf2djvu/
|
||||
WWW: http://jwilk.net/software/pdf2djvu
|
||||
|
Loading…
Reference in New Issue
Block a user