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

(-)Makefile (-16 / +14 lines)
Lines 2-9 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	pdf2djvu
4
PORTNAME=	pdf2djvu
5
PORTVERSION=	0.5.11
5
PORTVERSION=	0.7.17
6
PORTREVISION=	11
7
CATEGORIES=	converters
6
CATEGORIES=	converters
8
MASTER_SITES=	${MASTER_SITE_GOOGLE_CODE}
7
MASTER_SITES=	${MASTER_SITE_GOOGLE_CODE}
9
DISTNAME=	${PORTNAME}_${PORTVERSION}${EXTRACT_SUFFIX}
8
DISTNAME=	${PORTNAME}_${PORTVERSION}${EXTRACT_SUFFIX}
Lines 11-40 Link Here
11
MAINTAINER=	darcsis@gmail.com
10
MAINTAINER=	darcsis@gmail.com
12
COMMENT=	Pdf2djvu creates DjVu files from PDF files
11
COMMENT=	Pdf2djvu creates DjVu files from PDF files
13
12
14
DEPRECATED=	Broken for more than 6 month
13
LICENSE=	GPLv2
15
EXPIRATION_DATE=	2013-11-18
16
14
17
BUILD_DEPENDS=	${LOCALBASE}/include/pstreams/pstream.h:${PORTSDIR}/devel/pstreams
15
BUILD_DEPENDS=	${LOCALBASE}/include/pstreams/pstream.h:${PORTSDIR}/devel/pstreams
18
LIB_DEPENDS=	poppler:${PORTSDIR}/graphics/poppler
16
LIB_DEPENDS=	libpoppler.so:${PORTSDIR}/graphics/poppler \
19
LIB_DEPENDS+=	djvulibre:${PORTSDIR}/graphics/djvulibre
17
		libdjvulibre.so:${PORTSDIR}/graphics/djvulibre
20
18
21
GNU_CONFIGURE=	yes
19
GNU_CONFIGURE=	yes
22
CONFIGURE_ENV=	LIBS=-pthread
20
CONFIGURE_ENV=	LIBS=-pthread
23
CPPFLAGS+=	-I${LOCALBASE}/include
21
CPPFLAGS+=	-I${LOCALBASE}/include
24
USES=		pkgconfig
22
USES=		compiler:c++11-lang gmake pkgconfig
25
USE_GMAKE=	yes
26
23
27
BROKEN=		does not build
24
PLIST_FILES=	bin/pdf2djvu man/man1/pdf2djvu.1.gz
28
25
29
PLIST_FILES=	bin/pdf2djvu
26
WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
30
MAN1=		pdf2djvu.1
31
MANCOMPRESSED=	no
32
27
33
WRKSRC=	${WRKDIR}/${PORTNAME}-${PORTVERSION}
28
.include <bsd.port.options.mk>
34
29
35
NO_STAGE=	yes
30
.if ${OSVERSION} < 900014
31
FAVORITE_COMPILER=      gcc
32
.endif
33
36
do-install:
34
do-install:
37
	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
35
	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
38
	${INSTALL_MAN}  ${WRKSRC}/doc/${PORTNAME}.1 ${MANPREFIX}/man/man1
36
	${INSTALL_MAN}  ${WRKSRC}/doc/${PORTNAME}.1 ${STAGEDIR}${MANPREFIX}/man/man1
39
37
40
.include <bsd.port.mk>
38
.include <bsd.port.mk>
(-)distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (pdf2djvu_0.5.11.tar.gz) = 6e57f5be61e2274db2aaa78e2a18dff8ddc0fb5e107287bf87fc1270513f66ab
1
SHA256 (pdf2djvu_0.7.17.tar.gz) = fe6d6e2d6df53195f082890d3cb5e50080784510691e708a5e4614b49662f4da
2
SIZE (pdf2djvu_0.5.11.tar.gz) = 223827
2
SIZE (pdf2djvu_0.7.17.tar.gz) = 320923
(-)files/patch-configure (-24 lines)
Lines 1-24 Link Here
1
--- configure.orig	2009-07-31 17:17:53.000000000 +0200
2
+++ configure	2009-08-19 20:28:26.000000000 +0200
3
@@ -2993,9 +2993,9 @@
4
 printf 'P1 3 3 0 0 0 0 0 0 0 0 0 0' > conftest.458086.pbm
5
 "$djvulibre_bin_path/cjb2" conftest.458086.pbm conftest.458086.p1.djvu
6
 "$djvulibre_bin_path/cjb2" conftest.458086.pbm conftest.458086.p2.djvu
7
-printf 'AT&TFORM\0\0\0\x35DJVMDIRM\0\0\0\x29\x01\0\x02\xff\xff\xc6\xbf\x8a' > conftest.458086.djvu
8
-printf '\x1f\xeb\x4b\xff\x40\x8e\x37\x86\x3f\x6c\xbe\x78\x02\x3c\x93\x9b' >> conftest.458086.djvu
9
-printf '\x17\x57\x16\x67\x1d\x7a\xeb\x57\xf8\xf3\x7e\x64\x32\x42\x88\xd2\x4f' >> conftest.458086.djvu
10
+printf 'AT&TFORM\0\0\0\065DJVMDIRM\0\0\0\051\001\0\002\377\377\306\277\212' > conftest.458086.djvu
11
+printf '\037\353\113\377\100\216\067\206\077\154\276\170\002\074\223\233' >> conftest.458086.djvu
12
+printf '\027\127\026\147\035\172\353\127\370\363\176\144\062\102\210\322\117' >> conftest.458086.djvu
13
 printf '(bookmarks ("" ""))' > conftest.458086.outline
14
 "$djvulibre_bin_path/djvused" -s -e 'set-outline conftest.458086.outline' conftest.458086.djvu
15
 if ! "$djvulibre_bin_path/djvused" -e print-outline conftest.458086.djvu | grep '(bookmarks' > /dev/null
16
@@ -3170,7 +3170,7 @@
17
 fi
18
 
19
 
20
-
21
+pkg_failed=untried; echo "disabled"
22
 if test $pkg_failed = yes; then
23
 
24
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
(-)files/patch-pdf-backend.cc (-20 lines)
Lines 1-20 Link Here
1
--- pdf-backend.cc.orig	2010-10-31 16:26:02.000000000 +0100
2
+++ pdf-backend.cc	2010-10-31 16:27:10.000000000 +0100
3
@@ -99,7 +99,7 @@
4
   return html_color(rgb);
5
 }
6
 
7
-static void cmyk_to_rgb(double cmyk[], double rgb[])
8
+static void cmyk_to_rgb(const double cmyk[], double rgb[])
9
 {
10
   static pdf::gfx::DeviceCmykColorSpace cmyk_space;
11
   pdf::gfx::Color cmyk_cc;
12
@@ -124,7 +124,7 @@
13
     border_colors.push_back("");
14
     return true;
15
   }
16
-  double *values = color->getValues();
17
+  const double *values = color->getValues();
18
   switch (color->getSpace())
19
   {
20
   case pdf::ant::Color::colorTransparent:
(-)files/patch-pdf-backend.hh (-14 lines)
Lines 1-14 Link Here
1
--- pdf-backend.hh.orig	2011-10-23 16:16:08.000000000 +0000
2
+++ pdf-backend.hh	2011-10-23 16:17:13.000000000 +0000
3
@@ -77,7 +77,11 @@
4
 
5
   namespace link
6
   {
7
+#if POPPLER_VERSION < 1700
8
     typedef ::Link Link;
9
+#else
10
+    typedef ::AnnotLink Link;
11
+#endif
12
     typedef ::LinkAction Action;
13
     typedef ::LinkDest Destination;
14
     typedef ::LinkGoTo GoTo;
(-)files/patch-pdf2djvu.cc (+112 lines)
Line 0 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
     {
(-)files/patch-tools-xml2c (+34 lines)
Line 0 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

Return to bug 183133