aboutsummaryrefslogtreecommitdiffstats
path: root/print
diff options
context:
space:
mode:
authorhrs <hrs@FreeBSD.org>2006-02-22 02:41:38 +0800
committerhrs <hrs@FreeBSD.org>2006-02-22 02:41:38 +0800
commitacea76fbc04359cfcfdc1e14cd7e2615d1b3130c (patch)
treeecda8f650ee77e627fe59dc81297302a99d82a55 /print
parent06dc69555071681b02309c6a9b64366634077af9 (diff)
downloadfreebsd-ports-gnome-acea76fbc04359cfcfdc1e14cd7e2615d1b3130c.tar.gz
freebsd-ports-gnome-acea76fbc04359cfcfdc1e14cd7e2615d1b3130c.tar.zst
freebsd-ports-gnome-acea76fbc04359cfcfdc1e14cd7e2615d1b3130c.zip
Add print/acroreadwrapper, a wrapper script for Adobe Reader to pick
up one of the localized versions installed according to ${LANG} or ${ADOBE_LANG} environment variable. Discussed with: netchild and mezz
Diffstat (limited to 'print')
-rw-r--r--print/Makefile1
-rw-r--r--print/acroreadwrapper/Makefile43
-rw-r--r--print/acroreadwrapper/files/acroread.in82
-rw-r--r--print/acroreadwrapper/pkg-descr2
-rw-r--r--print/acroreadwrapper/pkg-message7
-rw-r--r--print/acroreadwrapper/pkg-plist5
6 files changed, 140 insertions, 0 deletions
diff --git a/print/Makefile b/print/Makefile
index c75ef2a2853b..049736b56112 100644
--- a/print/Makefile
+++ b/print/Makefile
@@ -11,6 +11,7 @@
SUBDIR += abntex
SUBDIR += acrobatviewer
SUBDIR += acroread7
+ SUBDIR += acroreadwrapper
SUBDIR += adobe-cmaps
SUBDIR += afm
SUBDIR += alignmargins
diff --git a/print/acroreadwrapper/Makefile b/print/acroreadwrapper/Makefile
new file mode 100644
index 000000000000..c8faca75eefe
--- /dev/null
+++ b/print/acroreadwrapper/Makefile
@@ -0,0 +1,43 @@
+# New ports collection makefile for: acroreadwrapper
+# Date created: 20 February 2006
+# Whom: hrs
+#
+# $FreeBSD$
+#
+
+PORTNAME= acroreadwrapper
+PORTVERSION= 0.0.20060220
+CATEGORIES= print
+MASTER_SITES= # empty
+DISTNAME= # empty
+
+MAINTAINER= hrs@FreeBSD.org
+COMMENT= Wrapper script for Adobe Reader
+
+ONLY_FOR_ARCHS= amd64 i386
+USE_X_PREFIX= yes
+NO_BUILD= yes
+PLIST_SUB= ACRODIR=${ACRODIR} \
+ ADOBEDIR=${ADOBEDIR}
+SUB_FILES= acroread
+SUB_LIST= ACRODIR=${ACRODIR} \
+ ADOBE_LANG=${ADOBE_LANG:U} \
+ INSTALLDIR=${INSTALLDIR} \
+ LINUXBASE=${LINUXBASE} \
+ PLUGINDIR=${PLUGINDIR}
+
+ADOBEDIR= Adobe
+ACRODIR= ${ADOBEDIR}/Acrobat7.0
+PLUGINDIR= lib/browser_linux_plugins
+
+do-fetch:
+ @${DO_NADA}
+
+do-install:
+ ${INSTALL_SCRIPT} ${WRKDIR}/acroread ${PREFIX}/bin/acroread
+ ${MKDIR} ${PREFIX}/${ACRODIR}
+
+post-install:
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.mk>
diff --git a/print/acroreadwrapper/files/acroread.in b/print/acroreadwrapper/files/acroread.in
new file mode 100644
index 000000000000..1470d868a020
--- /dev/null
+++ b/print/acroreadwrapper/files/acroread.in
@@ -0,0 +1,82 @@
+#!%%LINUXBASE%%/bin/sh
+# $FreeBSD$
+
+ADOBE_LANG=`echo "${ADOBE_LANG}" | tr a-z A-Z`
+
+case ${LANG} in
+af_*) : ${ADOBE_LANG:=ENU} ;;
+am_*) : ${ADOBE_LANG:=ENU} ;;
+be_*) : ${ADOBE_LANG:=ENU} ;;
+ca_*) : ${ADOBE_LANG:=ENU} ;;
+da_*) : ${ADOBE_LANG:=DAN} ;;
+de_*) : ${ADOBE_LANG:=DEU} ;;
+el_*) : ${ADOBE_LANG:=ENU} ;;
+en_*) : ${ADOBE_LANG:=ENU} ;;
+es_*) : ${ADOBE_LANG:=ESP} ;;
+et_*) : ${ADOBE_LANG:=ENU} ;;
+eu_*) : ${ADOBE_LANG:=ENU} ;;
+fi_*) : ${ADOBE_LANG:=SUO} ;;
+fr_*) : ${ADOBE_LANG:=FRA} ;;
+he_*) : ${ADOBE_LANG:=ENU} ;;
+hi_*) : ${ADOBE_LANG:=ENU} ;;
+hr_*) : ${ADOBE_LANG:=ENU} ;;
+hu_*) : ${ADOBE_LANG:=ENU} ;;
+hy_*) : ${ADOBE_LANG:=ENU} ;;
+is_*) : ${ADOBE_LANG:=ENU} ;;
+it_*) : ${ADOBE_LANG:=ITA} ;;
+ja_*) : ${ADOBE_LANG:=JPN} ;;
+kk_*) : ${ADOBE_LANG:=ENU} ;;
+ko_*) : ${ADOBE_LANG:=KOR} ;;
+la_*) : ${ADOBE_LANG:=ENU} ;;
+lt_*) : ${ADOBE_LANG:=ENU} ;;
+nl_*) : ${ADOBE_LANG:=NLD} ;;
+no_*) : ${ADOBE_LANG:=NOR} ;;
+pl_*) : ${ADOBE_LANG:=ENU} ;;
+pt_*) : ${ADOBE_LANG:=PTB} ;;
+ro_*) : ${ADOBE_LANG:=ENU} ;;
+ru_*) : ${ADOBE_LANG:=ENU} ;;
+sk_*) : ${ADOBE_LANG:=ENU} ;;
+sl_*) : ${ADOBE_LANG:=ENU} ;;
+sr_*) : ${ADOBE_LANG:=ENU} ;;
+sv_*) : ${ADOBE_LANG:=SVE} ;;
+tr_*) : ${ADOBE_LANG:=ENU} ;;
+uk_*) : ${ADOBE_LANG:=ENU} ;;
+zh_CN.*): ${ADOBE_LANG:=CHS} ;;
+zh_HK.*): ${ADOBE_LANG:=CHS} ;;
+zh_TW.*): ${ADOBE_LANG:=CHT} ;;
+*) : ${ADOBE_LANG:=ENU} ;;
+esac
+
+case ${ADOBE_LANG} in
+CHS) : ${GDK_USE_XFT:=0}; export GDK_USE_XFT ;;
+CHT) : ${GDK_USE_XFT:=0}; export GDK_USE_XFT ;;
+JPN) : ${GTK_IM_MODULE:=xim}; export GTK_IM_MODULE ;;
+KOR) : ${GDK_USE_XFT:=0}; export GDK_USE_XFT ;;
+esac
+
+case $1 in
+--install-plugin)
+ echo "installing PDF plugin..."
+ echo "%%PREFIX%%/%%ACRODIR%%/${ADOBE_LANG}/Browser/intellinux/nppdf.so -> %%PREFIX%%/%%PLUGINDIR%%/nppdf.so"
+ mkdir -p %%PREFIX%%/%%PLUGINDIR%%
+ ln -s -f %%PREFIX%%/%%ACRODIR%%/${ADOBE_LANG}/Browser/intellinux/nppdf.so \
+ %%PREFIX%%/%%PLUGINDIR%%/nppdf.so
+ exit 0
+;;
+--deinstall-plugin)
+ echo "deinstalling PDF plugin..."
+ rm -f %%PREFIX%%/%%PLUGINDIR%%/nppdf.so
+ rmdir %%PREFIX%%/%%PLUGINDIR%% 2> /dev/null || true
+ exit 0
+;;
+esac
+
+UNAME_s=Linux; export UNAME_s
+if [ -x %%PREFIX%%/%%ACRODIR%%/${ADOBE_LANG}/bin/acroread ]; then
+ exec %%PREFIX%%/%%ACRODIR%%/${ADOBE_LANG}/bin/acroread "$@"
+elif [ -x %%PREFIX%%/%%ACRODIR%%/ENU/bin/acroread ]; then
+ exec %%PREFIX%%/%%ACRODIR%%/ENU/bin/acroread "$@"
+else
+ echo "!fatal: acroread binary not found."
+ exit 1
+fi
diff --git a/print/acroreadwrapper/pkg-descr b/print/acroreadwrapper/pkg-descr
new file mode 100644
index 000000000000..f3b36c50a648
--- /dev/null
+++ b/print/acroreadwrapper/pkg-descr
@@ -0,0 +1,2 @@
+This is a wrapper script for Adobe Reader to pick up one of the localized
+versions installed according to ${LANG} or ${ADOBE_LANG} environment variable.
diff --git a/print/acroreadwrapper/pkg-message b/print/acroreadwrapper/pkg-message
new file mode 100644
index 000000000000..c4cb439c52ab
--- /dev/null
+++ b/print/acroreadwrapper/pkg-message
@@ -0,0 +1,7 @@
+====
+This wrapper script supports the following options not to be passed
+to the acroread actually:
+
+--install-plugin: install PDF plugin
+--deinstall-plugin: deinstall PDF plugin
+====
diff --git a/print/acroreadwrapper/pkg-plist b/print/acroreadwrapper/pkg-plist
new file mode 100644
index 000000000000..bc4f89becb33
--- /dev/null
+++ b/print/acroreadwrapper/pkg-plist
@@ -0,0 +1,5 @@
+@comment $FreeBSD$
+bin/acroread
+@exec mkdir -p %D/%%ACRODIR%%
+@dirrm %%ACRODIR%%
+@dirrm %%ADOBEDIR%%