aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroki Sato <hrs@FreeBSD.org>2008-01-04 20:20:20 +0000
committerHiroki Sato <hrs@FreeBSD.org>2008-01-04 20:20:20 +0000
commita683cd69901b3ead7d2bdbbc708e418320ce1dbd (patch)
tree5cf8b8d2df22ffeaa5f10663b8b8478fd8fc01a6
parenteb37528ec9de1474d8c512ea888c67fa06b1ce82 (diff)
downloadports-a683cd69901b3ead7d2bdbbc708e418320ce1dbd.tar.gz
ports-a683cd69901b3ead7d2bdbbc708e418320ce1dbd.zip
Notes
-rw-r--r--print/acroreadwrapper/Makefile13
-rw-r--r--print/acroreadwrapper/files/acroread.in53
2 files changed, 55 insertions, 11 deletions
diff --git a/print/acroreadwrapper/Makefile b/print/acroreadwrapper/Makefile
index 1781758f8394..4fb27689a6f2 100644
--- a/print/acroreadwrapper/Makefile
+++ b/print/acroreadwrapper/Makefile
@@ -6,8 +6,7 @@
#
PORTNAME= acroreadwrapper
-PORTVERSION= 0.0.20060221
-PORTREVISION= 3
+PORTVERSION= 0.0.20071020
CATEGORIES= print
MASTER_SITES= # empty
DISTFILES= # empty
@@ -17,9 +16,10 @@ COMMENT= Wrapper script for Adobe Reader
ONLY_FOR_ARCHS= amd64 i386
NO_BUILD= yes
-PLIST_FILES= bin/acroread
+PLIST_FILES= bin/acroread7 bin/acroread8 bin/acroread
SUB_FILES= acroread
-SUB_LIST= ACROBASE=${ACROBASE} \
+SUB_LIST= ACROBASE7=${ACROBASE7} \
+ ACROBASE8=${ACROBASE8} \
ADOBE_LANG=${ADOBE_LANG:U} \
INSTALLDIR=${INSTALLDIR} \
LINUXBASE=${LINUXBASE} \
@@ -27,7 +27,8 @@ SUB_LIST= ACROBASE=${ACROBASE} \
PLUGINDIR=${PLUGINDIR} \
ADOBEBASE= Adobe
-ACROBASE= ${ADOBEBASE}/Acrobat7.0
+ACROBASE7= ${ADOBEBASE}/Acrobat7.0
+ACROBASE8= ${ADOBEBASE}/Reader8
PLUGINDIR= lib/browser_linux_plugins
do-fetch:
@@ -35,6 +36,8 @@ do-fetch:
do-install:
${INSTALL_SCRIPT} ${WRKDIR}/acroread ${PREFIX}/bin/acroread
+ cd ${PREFIX}/bin && ${LN} -s -f acroread acroread8
+ cd ${PREFIX}/bin && ${LN} -s -f acroread acroread7
post-install:
@${CAT} ${PKGMESSAGE}
diff --git a/print/acroreadwrapper/files/acroread.in b/print/acroreadwrapper/files/acroread.in
index 9fe631ca242e..803000d2ef71 100644
--- a/print/acroreadwrapper/files/acroread.in
+++ b/print/acroreadwrapper/files/acroread.in
@@ -1,6 +1,19 @@
#!%%LINUXBASE%%/bin/sh
# $FreeBSD$
+# environment variables:
+#
+# ADOBE_LANG:
+# Set this if you want to invoke a specific localized version.
+# If $LANG is set, this will be set automatically based on it.
+#
+# ADOBE_VER:
+# Set this if you want to invoke a specific version of
+# Adobe Reader by "acroread". Currently "7" and "8" are valid.
+# When this script is invoked as "acroread7" and "acroread8",
+# ADOBE_VER is automatically set.
+#
+
ADOBE_LANG=`echo "${ADOBE_LANG}" | tr a-z A-Z`
case ${LANG} in
@@ -54,12 +67,39 @@ JPN) : ${GTK_IM_MODULE:=xim}; export GTK_IM_MODULE ;;
KOR) : ${GDK_USE_XFT:=0}; export GDK_USE_XFT ;;
esac
+case ${ADOBE_VER} in
+"")
+ BN=${0##*/}
+ VN=${BN#????????}
+ case ${VN} in
+ [78]) ADOBE_VER=${VN} ;;
+ *)
+ if [ -d %%PREFIX%%/%%ACROBASE7%% ]; then ADOBE_VER=7; fi
+ if [ -d %%PREFIX%%/%%ACROBASE8%% ]; then ADOBE_VER=8; fi
+ ;;
+ esac
+;;
+esac
+
+case ${ADOBE_VER} in
+7)
+ ACROBASE=%%ACROBASE7%%
+ BINPREFIX=bin
+;;
+8)
+ ACROBASE=%%ACROBASE8%%
+ BINPREFIX=Adobe/Reader8/bin
+ MOZILLA_COMP_PATH=/../%%PREFIX%%/lib/linux-nvu
+ export MOZILLA_COMP_PATH
+;;
+esac
+
case $1 in
--install-plugin)
echo "installing PDF plugin..."
- echo "%%PREFIX%%/%%ACROBASE%%/${ADOBE_LANG}/Browser/intellinux/nppdf.so -> %%PREFIX%%/%%PLUGINDIR%%/nppdf.so"
+ echo "%%PREFIX%%/${ACROBASE}/${ADOBE_LANG}/Browser/intellinux/nppdf.so -> %%PREFIX%%/%%PLUGINDIR%%/nppdf.so"
mkdir -p /../%%PREFIX%%/%%PLUGINDIR%%
- ln -s -f %%PREFIX%%/%%ACROBASE%%/${ADOBE_LANG}/Browser/intellinux/nppdf.so \
+ ln -s -f %%PREFIX%%/${ACROBASE}/${ADOBE_LANG}/Browser/intellinux/nppdf.so \
/../%%PREFIX%%/%%PLUGINDIR%%/nppdf.so
exit 0
;;
@@ -72,13 +112,14 @@ case $1 in
esac
UNAME_s=Linux; export UNAME_s
-if [ -x %%PREFIX%%/%%ACROBASE%%/${ADOBE_LANG}/bin/acroread ]; then
- exec %%LINUXSH%% %%PREFIX%%/%%ACROBASE%%/${ADOBE_LANG}/bin/acroread "$@"
+
+if [ -x %%PREFIX%%/${ACROBASE}/${ADOBE_LANG}/${BINPREFIX}/acroread ]; then
+ exec %%LINUXSH%% %%PREFIX%%/${ACROBASE}/${ADOBE_LANG}/${BINPREFIX}/acroread "$@"
else
echo "?warning: localized acroread (${ADOBE_LANG}) not found." 1>&2
- if [ -x %%PREFIX%%/%%ACROBASE%%/ENU/bin/acroread ]; then
+ if [ -x %%PREFIX%%/${ACROBASE}/ENU/${BINPREFIX}/acroread ]; then
echo "Trying to invoke English version..." 1>&2
- exec %%LINUXSH%% %%PREFIX%%/%%ACROBASE%%/ENU/bin/acroread "$@"
+ exec %%LINUXSH%% %%PREFIX%%/${ACROBASE}/ENU/${BINPREFIX}/acroread "$@"
fi
fi
echo "!fatal: No acroread binary found. Check \$LANG or \$ADOBE_LANG, and installed acroread packages." 1>&2