Readd and rework convertes/pdf2djvu

This port was deleted due to no public distfiles. Now upstream distributes
tarballs on GitHub [1].

- Update to 0.9.12
- Add USES=autoreconf:build and a bootstrap file; define the target pre-configure
- Make the manual within the post-build target
- Add USE_CXXSTD=c++11
- Add options COLOR_QUANTIZATION, NLS, MULTITHREADING, XMP
- Add LICENSE_FILE
- Patch tools/install-manpages for proper echoing (no functional change)
- Remove the port name from COMMENT to follow the guidelines of the handbook
- Strip the executable within the post-install target
- Submitter is the new MAINTAINER

[1] https://github.com/jwilk/pdf2djvu

PR:		236299
Submitted by:	Samy Mahmoudi <samy.mahmoudi@gmail.com>
This commit is contained in:
Koichiro Iwao 2019-03-11 02:32:04 +00:00
parent a4ef1b711d
commit 1ec0ed2c27
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=495325
7 changed files with 101 additions and 1 deletions

1
MOVED
View file

@ -10197,7 +10197,6 @@ comms/java-commapi-freebsd||2018-06-07|Has expired: Depends on BROKEN and expiri
comms/soundmodem||2018-06-07|Has expired: Broken for more than 6 months
comms/jsdr||2018-06-07|Has expired: Broken for more than 6 months
comms/java-commapi||2018-06-07|Has expired: Broken for more than 6 months
converters/pdf2djvu||2018-06-07|Has expired: Broken for more than 6 months
databases/rdb||2018-06-07|Has expired: Broken for more than 6 months
databases/animenfo-client||2018-06-07|Has expired: Broken for more than 6 months
databases/ruby-mysql||2018-06-07|Has expired: Broken for more than 6 months

View file

@ -136,6 +136,7 @@
SUBDIR += p5-XML-WBXML
SUBDIR += p5-bsdconv
SUBDIR += p5-plutil
SUBDIR += pdf2djvu
SUBDIR += pear-Services_JSON
SUBDIR += pecl-igbinary
SUBDIR += php-bsdconv

View file

@ -0,0 +1,63 @@
# $FreeBSD$
PORTNAME= pdf2djvu
PORTVERSION= 0.9.12
CATEGORIES= converters
MAINTAINER= samy.mahmoudi@gmail.com
COMMENT= Creates DjVu files from PDF files
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING
BUILD_DEPENDS= ${LOCALBASE}/include/pstreams/pstream.h:devel/pstreams
LIB_DEPENDS= libdjvulibre.so:graphics/djvulibre \
libpoppler.so:graphics/poppler
USES= autoreconf:build compiler:c++11-lang gettext-tools \
gmake iconv localbase pkgconfig tar:xz
USE_CXXSTD= c++11
USE_GITHUB= yes
GH_TUPLE= jwilk:${PORTNAME}:${PORTVERSION}
GNU_CONFIGURE= yes
PLIST_FILES= bin/pdf2djvu
OPTIONS_DEFINE= COLOR_QUANTIZATION DOCS NLS MULTITHREADING XMP
OPTIONS_DEFAULT=COLOR_QUANTIZATION MULTITHREADING XMP
COLOR_QUANTIZATION_DESC=Color quantization via GraphicsMagick++
DOCS= Generate the man page
NLS_DESC= Native Language Support via gettext utilities
MULTITHREADING_DESC= Multithreading support via OpenMP
XMP_DESC= XMP metadata support via Exiv2
COLOR_QUANTIZATION_CONFIGURE_WITH=graphicsmagick
COLOR_QUANTIZATION_LIB_DEPENDS= \
libGraphicsMagick++.so:graphics/GraphicsMagick \
libGraphicsMagick.so:graphics/GraphicsMagick
DOCS_BUILD_DEPENDS= docbook-xsl>0:textproc/docbook-xsl \
xsltproc:textproc/libxslt
DOCS_PLIST_FILES= man/man1/pdf2djvu.1.gz
NLS_CONFIGURE_ENABLE= nls
NLS_USES= gettext-runtime
MULTITHREADING_CONFIGURE_ENABLE=openmp
MULTITHREADING_LIB_DEPENDS= libomp.so:devel/openmp
XMP_CONFIGURE_ENABLE= xmp
XMP_LIB_DEPENDS= libexiv2.so:graphics/exiv2
pre-configure:
@cd ${WRKSRC} && ${SH} ${FILESDIR}/bootstrap
post-build-DOCS-on:
@cd ${WRKSRC}/doc && ${GMAKE}
post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
.include <bsd.port.mk>

View file

@ -0,0 +1,3 @@
TIMESTAMP = 1551662199
SHA256 (jwilk-pdf2djvu-0.9.12_GH0.tar.gz) = 83f08f80a4bf24912e542ccaf3179cd57715bfee82c50e87272060475a454e2d
SIZE (jwilk-pdf2djvu-0.9.12_GH0.tar.gz) = 191227

View file

@ -0,0 +1,9 @@
#!/bin/sh
mkdir -p m4
aclocal
autoconf
autoheader
automake --add-missing
autopoint
exit 0

View file

@ -0,0 +1,20 @@
--- tools/install-manpages.orig 2019-03-05 23:29:08 UTC
+++ tools/install-manpages
@@ -28,14 +28,14 @@ do
basename=$(basename "$manpage")
suffix=${basename#*.}
locale=${suffix%.*}
- [ "$locale" = "$suffix" ] && locale=
+ [ "$locale" = "$suffix" ] && locale= || locale=$locale/
section=${suffix#*.}
basename=${basename%%.*}
(
PS4='$ '
set -x
- $INSTALL -d "$mandir/$locale/man$section"
- $INSTALL -m 644 "$manpage" "$mandir/$locale/man$section/$basename.$section"
+ $INSTALL -d "$mandir/${locale}man$section"
+ $INSTALL -m 644 "$manpage" "$mandir/${locale}man$section/$basename.$section"
)
done

View file

@ -0,0 +1,5 @@
pdf2djvu creates DjVu files from PDF files. It's able to extract:
graphics, text layer, hyperlinks, document outline (bookmarks), and
metadata.
WWW: http://jwilk.net/software/pdf2djvu