Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Nov 2013 18:04:20 +0000 (UTC)
From:      Guido Falsi <madpilot@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r333019 - in head/converters/pdf2djvu: . files
Message-ID:  <201311061804.rA6I4K1Q082434@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: madpilot
Date: Wed Nov  6 18:04:20 2013
New Revision: 333019
URL: http://svnweb.freebsd.org/changeset/ports/333019

Log:
  - Update to 0.7.17
  - Undeprecate
  - Add LICENSE
  - Convert to new LIB_DEPENDS format
  - Convert to USES
  - Convert to staging
  
  PR:		ports/183133
  Submitted by:	Me
  Approved by:	Maintainer timeout

Added:
  head/converters/pdf2djvu/files/patch-pdf2djvu.cc   (contents, props changed)
  head/converters/pdf2djvu/files/patch-tools-xml2c   (contents, props changed)
Deleted:
  head/converters/pdf2djvu/files/patch-configure
  head/converters/pdf2djvu/files/patch-pdf-backend.cc
  head/converters/pdf2djvu/files/patch-pdf-backend.hh
Modified:
  head/converters/pdf2djvu/Makefile
  head/converters/pdf2djvu/distinfo   (contents, props changed)

Modified: head/converters/pdf2djvu/Makefile
==============================================================================
--- head/converters/pdf2djvu/Makefile	Wed Nov  6 17:52:42 2013	(r333018)
+++ head/converters/pdf2djvu/Makefile	Wed Nov  6 18:04:20 2013	(r333019)
@@ -2,8 +2,7 @@
 # $FreeBSD$
 
 PORTNAME=	pdf2djvu
-PORTVERSION=	0.5.11
-PORTREVISION=	11
+PORTVERSION=	0.7.17
 CATEGORIES=	converters
 MASTER_SITES=	${MASTER_SITE_GOOGLE_CODE}
 DISTNAME=	${PORTNAME}_${PORTVERSION}${EXTRACT_SUFFIX}
@@ -11,30 +10,29 @@ DISTNAME=	${PORTNAME}_${PORTVERSION}${EX
 MAINTAINER=	darcsis@gmail.com
 COMMENT=	Pdf2djvu creates DjVu files from PDF files
 
-DEPRECATED=	Broken for more than 6 month
-EXPIRATION_DATE=	2013-11-18
+LICENSE=	GPLv2
 
 BUILD_DEPENDS=	${LOCALBASE}/include/pstreams/pstream.h:${PORTSDIR}/devel/pstreams
-LIB_DEPENDS=	poppler:${PORTSDIR}/graphics/poppler
-LIB_DEPENDS+=	djvulibre:${PORTSDIR}/graphics/djvulibre
+LIB_DEPENDS=	libpoppler.so:${PORTSDIR}/graphics/poppler \
+		libdjvulibre.so:${PORTSDIR}/graphics/djvulibre
 
 GNU_CONFIGURE=	yes
 CONFIGURE_ENV=	LIBS=-pthread
 CPPFLAGS+=	-I${LOCALBASE}/include
-USES=		pkgconfig
-USE_GMAKE=	yes
+USES=		compiler:c++11-lang gmake pkgconfig
 
-BROKEN=		does not build
+PLIST_FILES=	bin/pdf2djvu man/man1/pdf2djvu.1.gz
 
-PLIST_FILES=	bin/pdf2djvu
-MAN1=		pdf2djvu.1
-MANCOMPRESSED=	no
+WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
 
-WRKSRC=	${WRKDIR}/${PORTNAME}-${PORTVERSION}
+.include <bsd.port.options.mk>
+
+.if ${OSVERSION} < 900014
+FAVORITE_COMPILER=      gcc
+.endif
 
-NO_STAGE=	yes
 do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
-	${INSTALL_MAN}  ${WRKSRC}/doc/${PORTNAME}.1 ${MANPREFIX}/man/man1
+	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
+	${INSTALL_MAN}  ${WRKSRC}/doc/${PORTNAME}.1 ${STAGEDIR}${MANPREFIX}/man/man1
 
 .include <bsd.port.mk>

Modified: head/converters/pdf2djvu/distinfo
==============================================================================
--- head/converters/pdf2djvu/distinfo	Wed Nov  6 17:52:42 2013	(r333018)
+++ head/converters/pdf2djvu/distinfo	Wed Nov  6 18:04:20 2013	(r333019)
@@ -1,2 +1,2 @@
-SHA256 (pdf2djvu_0.5.11.tar.gz) = 6e57f5be61e2274db2aaa78e2a18dff8ddc0fb5e107287bf87fc1270513f66ab
-SIZE (pdf2djvu_0.5.11.tar.gz) = 223827
+SHA256 (pdf2djvu_0.7.17.tar.gz) = fe6d6e2d6df53195f082890d3cb5e50080784510691e708a5e4614b49662f4da
+SIZE (pdf2djvu_0.7.17.tar.gz) = 320923

Added: head/converters/pdf2djvu/files/patch-pdf2djvu.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/converters/pdf2djvu/files/patch-pdf2djvu.cc	Wed Nov  6 18:04:20 2013	(r333019)
@@ -0,0 +1,112 @@
+--- 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();
+     }
+     {

Added: head/converters/pdf2djvu/files/patch-tools-xml2c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/converters/pdf2djvu/files/patch-tools-xml2c	Wed Nov  6 18:04:20 2013	(r333019)
@@ -0,0 +1,34 @@
+--- 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311061804.rA6I4K1Q082434>