- Transform djvulibre-nox11 to a separate port to eliminate

conflict with graphics/djvulibre. This way one cane have
  both ports installed without any problems. This also
  simplify dependencies handling in dependent ports.

Requested by:	mezz
This commit is contained in:
Stanislav Sedov 2008-08-02 15:42:12 +00:00
parent 5e48ad887b
commit 63b97c7576
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=217942
6 changed files with 280 additions and 8 deletions

View file

@ -1,15 +1,84 @@
# New ports collection makefile for: djvulibre-nox11
# Date created: 2005-09-05
# Whom: Michael Johnson <ahze@FreeBSD.org>
# New ports collection makefile for: libdjvu++
# Date Created: 20 July 1999
# Whom: Mikhail Teterin <mi@aldan.algebra.com>
#
# $FreeBSD$
# $MCom: ports/graphics/djvulibre-nox11/Makefile,v 1.1 2005/09/06 01:42:08 ahze Exp $
#
COMMENT= DjVu viewers, encoders, browser plugin, and utilites with out Qt
PORTNAME= djvulibre
PORTVERSION= 3.5.20
PORTREVISION= 2
CATEGORIES= graphics www
MASTER_SITES= SF/djvu
PKGNAMESUFFIX= -nox11
WITHOUT_X11= yes
MAINTAINER= stas@FreeBSD.org
COMMENT= DjVu base libraries and utilities
MASTERDIR= ${.CURDIR}/../../graphics/djvulibre
LIB_DEPENDS= jpeg.9:${PORTSDIR}/graphics/jpeg \
tiff.4:${PORTSDIR}/graphics/tiff
.include "${MASTERDIR}/Makefile"
USE_ICONV= yes
USE_GNOME= gnomehack gnometarget
GNU_CONFIGURE= yes
CONFIGURE_ENV= JPEG_CFLAGS="-I${LOCALBASE}/include" \
JPEG_LIBS="-L${LOCALBASE}/lib -ljpeg" \
TIFF_CFLAGS="-I${LOCALBASE}/include" \
TIFF_LIBS="-L${LOCALBASE}/lib -ltiff" \
PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
PTHREAD_LIBS="${PTHREAD_LIBS}" \
LOCALBASE="${LOCALBASE}" \
CXX="${CXX}"
CONFIGURE_ARGS= --enable-threads=pthread --enable-shared
USE_LDCONFIG= yes
OPTIONS= ANY2DJVU "Install any2djvu script (requires curl)" off
MANLANG= "" ja
MAN1= bzz.1 c44.1 cjb2.1 cpaldjvu.1 csepdjvu.1 ddjvu.1 djvm.1 \
djvmcvt.1 djvu.1 djvudump.1 djvuextract.1 djvumake.1 djvups.1 \
djvused.1 djvuserve.1 djvutxt.1
MAN1_EN= djvutoxml.1 djvuxml.1 djvuxmlparser.1 djvudigital.1
PORTDOCS= djvu2spec.djvu lizard2002.djvu
CONFIGURE_ARGS+= --disable-djview --without-x
.include <bsd.port.pre.mk>
.if defined(WITH_ANY2DJVU)
MAN1_EN+= any2djvu.1
RUN_DEPENDS+= curl:${PORTSDIR}/ftp/curl
PLIST_SUB+= ANY2DJVU=""
.else
PLIST_SUB+= ANY2DJVU="@comment "
.endif
post-patch:
@${REINPLACE_CMD} -e \
's|$${libdir}/pkgconfig|${PREFIX}/libdata/pkgconfig|' \
${WRKSRC}/libdjvu/Makefile.in
@${REINPLACE_CMD} -e '/-O\*/d ; \
s|$$OPTS -O3|$$OPTS|g ; \
s|$$OPTS -O2|$$OPTS|g ; \
s|$$OPTS $$opt|$$OPTS|g' ${WRKSRC}/configure
@${FIND} ${WRKSRC} -name "Makefile.in" | ${XARGS} ${REINPLACE_CMD} -e \
's|= @CPPFLAGS|= $${FLAGS} @CPPFLAGS|g ; \
s|@ $${FLAGS}|@|g ; \
s|} $${FLAGS}|}|g ; \
s|/netscape/|/djvulibre/|g ; \
s|eucjp|eucJP|g ; \
s|_PROGRAM} -m|} -m|g'
.if !defined(WITH_ANY2DJVU)
@${REINPLACE_CMD} -e 's,any2djvu,,' ${WRKSRC}/tools/Makefile.in
.endif
post-install:
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/doc/,} ${DOCSDIR}/
.endif
.include <bsd.port.post.mk>

View file

@ -0,0 +1,3 @@
MD5 (djvulibre-3.5.20.tar.gz) = c94091de014b3aaf037d3d0f398d36c2
SHA256 (djvulibre-3.5.20.tar.gz) = d937528e10c16831d8df31893ee24da8ec2bfd9e9170671c482a1b1abfc5efc3
SIZE (djvulibre-3.5.20.tar.gz) = 2416958

View file

@ -0,0 +1,28 @@
--- desktopfiles/Makefile.in.orig 2007-09-10 20:23:30.000000000 +0400
+++ desktopfiles/Makefile.in 2007-09-10 20:55:26.000000000 +0400
@@ -29,6 +29,7 @@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_DATA = @INSTALL_DATA@
XDG_MIME = @XDG_MIME@
XDG_ICON_RESOURCE = @XDG_ICON_RESOURCE@
@@ -71,7 +72,7 @@
install-djvu-files: FORCE
${INSTALL} -d ${DESTDIR}${datadir_djvu}
- ${INSTALL_PROGRAM} register-djvu-mime ${DESTDIR}${datadir_djvu}
+ ${INSTALL_SCRIPT} register-djvu-mime ${DESTDIR}${datadir_djvu}
${INSTALL_DATA} ${srcdir}/*djvu.png ${DESTDIR}${datadir_djvu}
${INSTALL_DATA} ${srcdir}/*mime.xml ${DESTDIR}${datadir_djvu}
-@echo "Run ${datadir_djvu}/register-djvu-mime install"
@@ -79,7 +80,7 @@
install-djview-files: FORCE
${INSTALL} -d ${DESTDIR}${datadir_djview}
- ${INSTALL_PROGRAM} register-djview-menu ${DESTDIR}${datadir_djview}
+ ${INSTALL_SCRIPT} register-djview-menu ${DESTDIR}${datadir_djview}
${INSTALL_DATA} ${srcdir}/*djview3.png ${DESTDIR}${datadir_djview}
${INSTALL_DATA} ${srcdir}/*djview3.desktop ${DESTDIR}${datadir_djview}
-@echo "Run ${datadir_djview}/register-djview-menu install"

View file

@ -0,0 +1,95 @@
--- tools/any2djvu.orig 2008-02-17 20:18:08.000000000 +0300
+++ tools/any2djvu 2008-02-17 20:20:31.000000000 +0300
@@ -1,11 +1,11 @@
-#! /bin/bash -f
+#!/bin/sh
# CVS version control block - do not edit manually
# $RCSfile: any2djvu,v $
# $Revision: 1.3 $
# $Date: 2007/08/10 08:08:55 $
# $Source: /cvsroot/djvu/djvulibre-3.5/tools/any2djvu,v $
-function copyright()
+copyright()
{
echo "Copyright (C) 2002 David Kreil <D.Kreil@IEEE.Org>"
echo "Modified by Barak A. Pearlmutter <bap@debian.org>"
@@ -14,7 +14,7 @@
echo "Released under the GNU GPL v2, 21-Oct-2002."
}
-function warranty()
+warranty()
{
echo "This program is distributed in the hope that it will be useful,"
echo "but WITHOUT ANY WARRANTY; without even the implied warranty of"
@@ -22,7 +22,7 @@
echo "GNU General Public License for more details."
}
-function disclaimer()
+disclaimer()
{
echo "By using this tool you accept the following disclaimer:"
echo " Because the any2djvu service is free of charge, there is no"
@@ -40,7 +40,7 @@
ocr=1
docformat=2
-function warn()
+warn()
{
echo "Notes:"
echo " - Internet connection is required."
@@ -53,7 +53,7 @@
echo " - This software comes with NO WARRANTY."
}
-function format_help()
+format_help()
{
echo "Codes for the formats of the input documents to use with -f"
echo " 1 - DjVu Document (for verification or OCR)"
@@ -67,7 +67,7 @@
echo " 9 - Scanned Document - Color/Mixed - >400 dpi"
}
-function usage()
+usage()
{
echo "Convert files from .ps/.ps.gz/.pdf to .djvu"
echo "Usage: $0 [options] [url] {filename(s)}"
@@ -123,13 +123,13 @@
fi
# check OCR option
-if [ ! "x$ocr" == x0 ] && [ ! "x$ocr" == x1 ]; then
+if [ ! "x$ocr" = x0 ] && [ ! "x$ocr" = x1 ]; then
echo 'error: -o OCR must be 0 or 1'
exit 2
fi
# if help is requested or docformat is not specified right - show help
-if [ "x$docformat" == x'help' ]; then
+if [ "x$docformat" = x'help' ]; then
format_help
exit 0
fi
@@ -215,7 +215,7 @@
-F ocr=$ocr -F legal=1 "$rurl/$rcgi" \
| eval tee "'$log'" $shellopts
else
- wget $wgetopts -O - "$rurl/$rcgi?urlupload=$lurl/$in$cgiopts" \
+ /usr/bin/fetch$wgetopts -o - "$rurl/$rcgi?urlupload=$lurl/$in$cgiopts" \
| eval tee "'$log'" $shellopts
fi
l=`egrep 'href=djvu/.*\.djvu' "$log"`
@@ -225,7 +225,7 @@
echo "error: something got wrong. check log file"
exit 1
fi
- wget $wgetopts -O "$b.djvu" "$rurl/$l"
+ /usr/bin/fetch $wgetopts -o $b.djvu "$rurl/$l"
[ -z "$doclean" ] || rm "$log"
[ -z $silent ] && ls -l "$b.djvu"

View file

@ -0,0 +1,14 @@
DjVu is a web-centric format and software platform for distributing
documents and images. DjVu was originally developped at AT&T
Labs-Research. In March 2000, AT&T sold DjVu to LizardTech Inc. who
now distributes Windows/Mac plug-ins, and commercial encoders (mostly
on Windows)
The LizardTech released the reference implementation of DjVu under
the GNU GPL in October 2000. DjVuLibre (which means free DjVu), is
an enhanced version of that code maintained by the original inventors
of DjVu. It is compatible with version 3.5 of the LizardTech DjVu
software suite.
Author: Leon Bottou <leonb@users.sf.net>
WWW: http://djvu.sourceforge.net/

View file

@ -0,0 +1,63 @@
%%ANY2DJVU%%bin/any2djvu
bin/bzz
bin/c44
bin/cjb2
bin/cpaldjvu
bin/csepdjvu
bin/ddjvu
bin/djvm
bin/djvmcvt
bin/djvudigital
bin/djvudump
bin/djvuextract
bin/djvumake
bin/djvups
bin/djvused
bin/djvuserve
bin/djvutoxml
bin/djvutxt
bin/djvuxmlparser
include/libdjvu/ddjvuapi.h
include/libdjvu/miniexp.h
lib/libdjvulibre.la
lib/libdjvulibre.so
lib/libdjvulibre.so.20
libdata/pkgconfig/ddjvuapi.pc
share/djvu/osi/cs/messages.xml
share/djvu/osi/de/libdjvu++.xml
share/djvu/osi/de/messages.xml
share/djvu/osi/desktop/djvulibre-mime.xml
share/djvu/osi/desktop/hi22-djvu.png
share/djvu/osi/desktop/hi32-djvu.png
share/djvu/osi/desktop/hi48-djvu.png
share/djvu/osi/desktop/register-djvu-mime
share/djvu/osi/en/djvutools-reference.xml
share/djvu/osi/en/libdjvu++.xml
share/djvu/osi/en/messages.xml
share/djvu/osi/en/unixgui-shared.xml
share/djvu/osi/en/unixgui-viewer.xml
share/djvu/osi/fr/libdjvu++.xml
share/djvu/osi/fr/messages.xml
share/djvu/osi/ja/libdjvu++.xml
share/djvu/osi/ja/messages.xml
share/djvu/osi/languages.xml
share/djvu/osi/zh/libdjvu++.xml
share/djvu/osi/zh/messages.xml
share/djvu/pubtext/DjVuMessages.dtd
share/djvu/pubtext/DjVuOCR.dtd
share/djvu/pubtext/DjVuXML-s.dtd
@dirrm share/djvu/pubtext
@dirrm share/djvu/osi/zh
@dirrm share/djvu/osi/ja
@dirrm share/djvu/osi/fr
@dirrm share/djvu/osi/en
@dirrm share/djvu/osi/desktop
@dirrm share/djvu/osi/de
@dirrm share/djvu/osi/cs
@dirrm share/djvu/osi
@dirrmtry share/djvu
@dirrmtry man/fr/man1
@dirrmtry man/fr
@dirrmtry man/de/man1
@dirrmtry man/de
@dirrm include/libdjvu