View | Details | Raw Unified | Return to bug 201660
Collapse All | Expand All

(-)converters/pdf2djvu/Makefile (-7 / +3 lines)
Lines 2-12 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	pdf2djvu
4
PORTNAME=	pdf2djvu
5
PORTVERSION=	0.7.17
5
PORTVERSION=	0.7.21
6
PORTREVISION=	4
7
CATEGORIES=	converters
6
CATEGORIES=	converters
8
MASTER_SITES=	GOOGLE_CODE
7
MASTER_SITES=	https://bitbucket.org/jwilk/pdf2djvu/downloads/
9
DISTNAME=	${PORTNAME}_${PORTVERSION}
10
8
11
MAINTAINER=	darcsis@gmail.com
9
MAINTAINER=	darcsis@gmail.com
12
COMMENT=	Pdf2djvu creates DjVu files from PDF files
10
COMMENT=	Pdf2djvu creates DjVu files from PDF files
Lines 18-29 Link Here
18
		libdjvulibre.so:${PORTSDIR}/graphics/djvulibre
16
		libdjvulibre.so:${PORTSDIR}/graphics/djvulibre
19
17
20
GNU_CONFIGURE=	yes
18
GNU_CONFIGURE=	yes
21
USES=		compiler:c++11-lang gmake pkgconfig
19
USES=		compiler:c++11-lang gmake pkgconfig tar:xz
22
20
23
PLIST_FILES=	bin/pdf2djvu man/man1/pdf2djvu.1.gz
21
PLIST_FILES=	bin/pdf2djvu man/man1/pdf2djvu.1.gz
24
22
25
WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
26
27
.include <bsd.port.options.mk>
23
.include <bsd.port.options.mk>
28
24
29
.if ${OSVERSION} < 900014
25
.if ${OSVERSION} < 900014
(-)converters/pdf2djvu/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (pdf2djvu_0.7.17.tar.gz) = fe6d6e2d6df53195f082890d3cb5e50080784510691e708a5e4614b49662f4da
1
SHA256 (pdf2djvu-0.7.21.tar.xz) = 12d480cc3ce2369e1f1b39b7f5e6fbb44351d8b07861295d34e6978f58b687b9
2
SIZE (pdf2djvu_0.7.17.tar.gz) = 320923
2
SIZE (pdf2djvu-0.7.21.tar.xz) = 229020
(-)converters/pdf2djvu/files/patch-pdf2djvu.cc (-112 lines)
Lines 1-112 Link Here
1
--- pdf2djvu.cc.orig	2013-05-30 22:22:26.000000000 +0200
2
+++ pdf2djvu.cc	2013-10-19 16:11:38.078951359 +0200
3
@@ -212,7 +212,7 @@
4
 
5
 Command &operator <<(Command &command, const Component &component)
6
 {
7
-  command << *component.file;
8
+  command << std::string(*component.file);
9
   return command;
10
 }
11
 
12
@@ -980,7 +980,7 @@
13
   {
14
     debug(3) << _("creating document outline with `djvused`") << std::endl;
15
     DjVuCommand djvused("djvused");
16
-    djvused << "-s" << "-f" << outlines_sed_file << this->index_file;
17
+    djvused << "-s" << "-f" << std::string(outlines_sed_file) << std::string(this->index_file);
18
     djvused(); // djvused -s -f <outlines-sed-file> <index-djvu-file>
19
   }
20
 
21
@@ -991,7 +991,7 @@
22
     {
23
       debug(3) << _("setting metadata with `djvused`") << std::endl;
24
       DjVuCommand djvused("djvused");
25
-      djvused << "-s" << "-f" << metadata_sed_file << this->index_file;
26
+      djvused << "-s" << "-f" << std::string(metadata_sed_file) << std::string(this->index_file);
27
       djvused(); // djvused -s -f <metadata-sed-file> <index-djvu-file>
28
     }
29
     else
30
@@ -1025,7 +1025,7 @@
31
         dummy_components.push_back(this->components[i]);
32
         this->do_create(dummy_components);
33
         DjVuCommand djvused("djvused");
34
-        djvused << "-s" << "-f" << dummy_sed_file << this->index_file;
35
+        djvused << "-s" << "-f" << std::string(dummy_sed_file) << std::string(this->index_file);
36
         djvused(); // djvused -s -f <dummy-sed-file> <output-djvu-file>
37
         dummy_components.pop_back();
38
       }
39
@@ -1033,7 +1033,7 @@
40
       dummy_components.push_back(this->components[size - 1]);
41
       this->do_create(dummy_components);
42
       DjVuCommand djvused("djvused");
43
-      djvused << "-s" << "-f" << metadata_sed_file << this->index_file;
44
+      djvused << "-s" << "-f" << std::string(metadata_sed_file) << std::string(this->index_file);
45
       djvused(); // djvused -s -f <metadata-sed-file> <output-djvu-file>
46
       /* Finally, recreate the index. */
47
       this->do_create(this->components, true /* include shared annotations */);
48
@@ -1089,8 +1089,8 @@
49
 {
50
   this->converter
51
     << "-b"
52
-    << *this->index_file
53
-    << this->output_file;
54
+    << std::string(*this->index_file)
55
+    << std::string(this->output_file);
56
   this->converter(); // djvmcvt -b <output-djvu-file> <index-djvu-file>
57
   this->index_file.reset(NULL);
58
 }
59
@@ -1122,7 +1122,7 @@
60
     }
61
     bzz_file.close();
62
     DjVuCommand bzz("bzz");
63
-    bzz << "-e" << bzz_file << "-";
64
+    bzz << "-e" << std::string(bzz_file) << "-";
65
     bzz(index_file);
66
   }
67
   size = this->index_file.size();
68
@@ -1498,7 +1498,7 @@
69
         csepdjvu << "-q" << config.bg_slices;
70
       if (config.text == config.TEXT_LINES)
71
         csepdjvu << "-t";
72
-      csepdjvu << sep_file << component;
73
+      csepdjvu << std::string(sep_file) << component;
74
       csepdjvu();
75
     }
76
     const bool should_have_fgbz = has_background || has_foreground || nonwhite_background_color;
77
@@ -1528,7 +1528,7 @@
78
         TemporaryFile pbm_file;
79
         debug(3) << _("encoding monochrome image with `cjb2`") << std::endl;
80
         DjVuCommand cjb2("cjb2");
81
-        cjb2 << "-losslevel" << config.loss_level << pbm_file << sjbz_file;
82
+        cjb2 << "-losslevel" << config.loss_level << std::string(pbm_file) << std::string(sjbz_file);
83
         pbm_file << "P4 " << width << " " << height << std::endl;
84
         pdf::Pixmap bmp(outm->has_skipped_elements() ? out1.get() : outm.get());
85
         pbm_file << bmp;
86
@@ -1543,7 +1543,7 @@
87
           TemporaryFile ppm_file;
88
           debug(3) << _("creating new background image with `c44`") << std::endl;
89
           DjVuCommand c44("c44");
90
-          c44 << "-slice" << "97" << ppm_file << c44_file;
91
+          c44 << "-slice" << "97" << std::string(ppm_file) << std::string(c44_file);
92
           int bg_width = (width + 11) / 12;
93
           int bg_height = (height + 11) / 12;
94
           ppm_file << "P6 " << bg_width << " " << bg_height << " 255" << std::endl;
95
@@ -1560,7 +1560,7 @@
96
         { /* Replace previous (dummy) BG44 chunk with the newly created one: */
97
           debug(3) << _("recovering image chunks with `djvuextract`") << std::endl;
98
           DjVuCommand djvuextract("djvuextract");
99
-          djvuextract << c44_file << std::string("BG44=") + std::string(bg44_file);
100
+          djvuextract << std::string(c44_file) << std::string("BG44=") + std::string(bg44_file);
101
           djvuextract(config.verbose < 3);
102
         }
103
       }
104
@@ -1601,7 +1601,7 @@
105
     { /* Add per-page non-raster data into the DjVu file: */
106
       debug(3) << _("adding non-raster data with `djvused`") << std::endl;
107
       DjVuCommand djvused("djvused");
108
-      djvused << component << "-s" << "-f" << sed_file;
109
+      djvused << component << "-s" << "-f" << std::string(sed_file);
110
       djvused();
111
     }
112
     {
(-)converters/pdf2djvu/files/patch-tools-xml2c (-34 lines)
Lines 1-34 Link Here
1
--- tools/xml2c.orig	2013-05-30 22:22:26.000000000 +0200
2
+++ tools/xml2c	2013-10-19 15:09:40.124205826 +0200
3
@@ -1,16 +1,24 @@
4
 #!/bin/sh
5
 
6
-# Copyright © 2009 Jakub Wilk
7
+# Copyright © 2009, 2013 Jakub Wilk
8
 #
9
 # This package is free software; you can redistribute it and/or modify
10
 # it under the terms of the GNU General Public License as published by
11
 # the Free Software Foundation; version 2 dated June, 1991.
12
 
13
-exec sed \
14
-  -e '/<!--# *\(.*\) *#-->/ { s//\1/; b; }' \
15
-  -e '/<!--.*-->/ { s///g; b; }' \
16
-  -e 's/\\\\/\\\\/g' \
17
-  -e 's/"/\\"/g' \
18
-  -e 's/^/"/; s/$/\\n"/'
19
+exec sed -e '
20
+/<!--# *\(.*\) *#-->/ {
21
+  s//\1/
22
+  b
23
+}
24
+/<!--.*-->/ {
25
+  s///g
26
+  b
27
+}
28
+s/\\\\/\\\\/g
29
+s/"/\\"/g
30
+s/^/"/
31
+s/$/\\n"/
32
+'
33
 
34
 # vim:ts=2 sw=2 et
(-)converters/pdf2djvu/pkg-descr (-1 / +1 lines)
Lines 2-5 Link Here
2
graphics, text layer, hyperlinks, document outline (bookmarks), and
2
graphics, text layer, hyperlinks, document outline (bookmarks), and
3
metadata.
3
metadata.
4
4
5
WWW: http://code.google.com/p/pdf2djvu/
5
WWW: http://jwilk.net/software/pdf2djvu

Return to bug 201660