diff options
author | Stanislav Sedov <stas@FreeBSD.org> | 2008-08-02 15:48:21 +0000 |
---|---|---|
committer | Stanislav Sedov <stas@FreeBSD.org> | 2008-08-02 15:48:21 +0000 |
commit | f73f1616c7b32efd162fec628982d7d247593c5b (patch) | |
tree | 00d6db70ba90a16e1399aa4e79024027fde53253 /graphics/djvulibre | |
parent | 63b97c757602f7e9ba2384271865276ad0f04317 (diff) | |
download | ports-f73f1616c7b32efd162fec628982d7d247593c5b.tar.gz ports-f73f1616c7b32efd162fec628982d7d247593c5b.zip |
Notes
Diffstat (limited to 'graphics/djvulibre')
-rw-r--r-- | graphics/djvulibre/Makefile | 76 | ||||
-rw-r--r-- | graphics/djvulibre/files/patch-desktopfiles_Makefile.in | 28 | ||||
-rw-r--r-- | graphics/djvulibre/files/patch-tools_any2djvu | 95 | ||||
-rw-r--r-- | graphics/djvulibre/pkg-plist | 112 |
4 files changed, 59 insertions, 252 deletions
diff --git a/graphics/djvulibre/Makefile b/graphics/djvulibre/Makefile index a0ad67c0fa6f..e538a791b334 100644 --- a/graphics/djvulibre/Makefile +++ b/graphics/djvulibre/Makefile @@ -12,10 +12,11 @@ CATEGORIES= graphics www MASTER_SITES= SF/djvu MAINTAINER= stas@FreeBSD.org -COMMENT?= DjVu viewers, encoders, browser plugin, and utilities +COMMENT= DjVu viewers and browser plugin LIB_DEPENDS= jpeg.9:${PORTSDIR}/graphics/jpeg \ - tiff.4:${PORTSDIR}/graphics/tiff + tiff.4:${PORTSDIR}/graphics/tiff \ + djvulibre.20:${PORTSDIR}/graphics/djvulibre-nox11 USE_ICONV= yes USE_GNOME= gnomehack gnometarget @@ -31,42 +32,31 @@ CONFIGURE_ENV= JPEG_CFLAGS="-I${LOCALBASE}/include" \ CONFIGURE_ARGS= --enable-threads=pthread --enable-shared USE_LDCONFIG= yes -OPTIONS= ANY2DJVU "Install any2djvu script (requires curl)" off +INSTALL_TARGET= install-gui install-i18n -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 - -.if !defined(WITHOUT_X11) USE_QT_VER= 3 CONFIGURE_ENV+= QTLIBS="-L${QT_PREFIX}/lib -lqt-mt" -MAN1+= djview3.1 nsdejavu.1 -MLINKS+= djview3.1 djview.1 -PLIST_SUB+= X11='' -.else -PKGNAMESUFFIX= -nox11 -CONFIGURE_ARGS+= --disable-djview --without-x -PLIST_SUB+= X11='@comment ' -.endif +MANLANG= "" ja +MAN1= djview3.1 nsdejavu.1 +MLINKS= djview3.1 djview.1 +DESKTOPDIR= ${PREFIX}/share/djvu/djview3/desktop .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 \ + -e 's,(SUBDIRS_FIRST[[:space:]]+=[[:space:]]+).*,\1,' \ + -e 's,(SUBDIRS_XML[[:space:]]+=[[:space:]]+).*,\1,' \ + ${WRKSRC}/Makefile.in + @${FIND} ${WRKSRC}/i18n/ -name "Makefile.in" | \ + ${XARGS} ${REINPLACE_CMD} -E -e \ + 's,(MANFILES[[:space:]]*=[[:space:]]*).*,\1$${MANFILES_GUI},' + @${REINPLACE_CMD} -E -e \ + 's,(LIBDJVU[[:space:]]+=[[:space:]]+).*,\1-ldjvulibre,' \ + ${WRKSRC}/gui/djview/Makefile.in \ + ${WRKSRC}/gui/bin2cpp/Makefile.in \ + ${WRKSRC}/tools/Makefile.in \ + ${WRKSRC}/xmltools/Makefile.in @${REINPLACE_CMD} -e '/-O\*/d ; \ s|$$OPTS -O3|$$OPTS|g ; \ s|$$OPTS -O2|$$OPTS|g ; \ @@ -81,20 +71,22 @@ post-patch: 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(WITHOUT_X11) +# +# Install desktop files. +# + ${MKDIR} ${DESKTOPDIR} + ${INSTALL_DATA} ${WRKSRC}/desktopfiles/djvulibre-djview3.desktop \ + ${WRKSRC}/desktopfiles/hi32-djview3.png \ + ${DESKTOPDIR} + ${INSTALL_SCRIPT} ${WRKSRC}/desktopfiles/register-djview-menu \ + ${DESKTOPDIR} + +# +# Install browser plugin. +# @${MKDIR} ${LOCALBASE}/lib/browser_plugins ${LN} -sf ${PREFIX}/lib/djvulibre/plugins/nsdejavu.so \ ${LOCALBASE}/lib/browser_plugins/nsdejavu.so -.endif - -.if !defined(NOPORTDOCS) - @${MKDIR} ${DOCSDIR} - ${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/doc/,} ${DOCSDIR}/ -.endif .include <bsd.port.post.mk> diff --git a/graphics/djvulibre/files/patch-desktopfiles_Makefile.in b/graphics/djvulibre/files/patch-desktopfiles_Makefile.in deleted file mode 100644 index c1b329e32cd8..000000000000 --- a/graphics/djvulibre/files/patch-desktopfiles_Makefile.in +++ /dev/null @@ -1,28 +0,0 @@ ---- 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" diff --git a/graphics/djvulibre/files/patch-tools_any2djvu b/graphics/djvulibre/files/patch-tools_any2djvu deleted file mode 100644 index b906d741f7de..000000000000 --- a/graphics/djvulibre/files/patch-tools_any2djvu +++ /dev/null @@ -1,95 +0,0 @@ ---- 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" diff --git a/graphics/djvulibre/pkg-plist b/graphics/djvulibre/pkg-plist index 38f70b4c2341..4dcef853b7fd 100644 --- a/graphics/djvulibre/pkg-plist +++ b/graphics/djvulibre/pkg-plist @@ -1,89 +1,27 @@ -%%ANY2DJVU%%bin/any2djvu -bin/bzz -bin/c44 -bin/cjb2 -bin/cpaldjvu -bin/csepdjvu -bin/ddjvu -%%X11%%bin/djview -%%X11%%bin/djview3 -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 -%%X11%%lib/djvulibre/plugins/nsdejavu.so -lib/libdjvulibre.la -lib/libdjvulibre.so -lib/libdjvulibre.so.20 -libdata/pkgconfig/ddjvuapi.pc -%%X11%%share/djvu/djview3/cs/djview.qm -%%X11%%share/djvu/djview3/cs/qt.qm -%%X11%%share/djvu/djview3/de/djview.qm -%%X11%%share/djvu/djview3/de/qt.qm -%%X11%%share/djvu/djview3/desktop/djvulibre-djview3.desktop -%%X11%%share/djvu/djview3/desktop/hi32-djview3.png -%%X11%%share/djvu/djview3/desktop/register-djview-menu -%%X11%%share/djvu/djview3/fr/djview.qm -%%X11%%share/djvu/djview3/fr/qt.qm -%%X11%%share/djvu/djview3/ja/djview.qm -%%X11%%%%X11%%share/djvu/djview3/ja/qt.qm -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 -%%X11%%@exec mkdir -p %%LOCALBASE%%/lib/browser_plugins -%%X11%%@exec ln -sf %D/lib/djvulibre/plugins/nsdejavu.so %%LOCALBASE%%/lib/browser_plugins/nsdejavu.so -%%X11%%@unexec rm -f %%LOCALBASE%%/lib/browser_plugins/nsdejavu.so -@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 -%%X11%%@dirrm share/djvu/djview3/ja -%%X11%%@dirrm share/djvu/djview3/fr -%%X11%%@dirrm share/djvu/djview3/desktop -%%X11%%@dirrm share/djvu/djview3/de -%%X11%%@dirrm share/djvu/djview3/cs -%%X11%%@dirrm share/djvu/djview3 +bin/djview +bin/djview3 +lib/djvulibre/plugins/nsdejavu.so +share/djvu/djview3/cs/djview.qm +share/djvu/djview3/cs/qt.qm +share/djvu/djview3/de/djview.qm +share/djvu/djview3/de/qt.qm +share/djvu/djview3/desktop/djvulibre-djview3.desktop +share/djvu/djview3/desktop/hi32-djview3.png +share/djvu/djview3/desktop/register-djview-menu +share/djvu/djview3/fr/djview.qm +share/djvu/djview3/fr/qt.qm +share/djvu/djview3/ja/djview.qm +share/djvu/djview3/ja/qt.qm +@exec mkdir -p %%LOCALBASE%%/lib/browser_plugins +@exec ln -sf %D/lib/djvulibre/plugins/nsdejavu.so %%LOCALBASE%%/lib/browser_plugins/nsdejavu.so +@unexec rm -f %%LOCALBASE%%/lib/browser_plugins/nsdejavu.so +@dirrm share/djvu/djview3/ja +@dirrm share/djvu/djview3/fr +@dirrm share/djvu/djview3/desktop +@dirrm share/djvu/djview3/de +@dirrm share/djvu/djview3/cs +@dirrm share/djvu/djview3 @dirrmtry share/djvu -@dirrmtry man/fr/man1 -@dirrmtry man/fr -@dirrmtry man/de/man1 -@dirrmtry man/de -%%X11%%@dirrm lib/djvulibre/plugins -%%X11%%@dirrm lib/djvulibre -@dirrm include/libdjvu +@dirrm lib/djvulibre/plugins +@dirrm lib/djvulibre @unexec rmdir %%LOCALBASE%%/lib/browser_plugins 2>/dev/null || true |