/[gentoo-x86]/net-print/adobeps/adobeps-1.0.6.ebuild
Gentoo

Contents of /net-print/adobeps/adobeps-1.0.6.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Sun Feb 17 22:38:44 2008 UTC (6 years, 6 months ago) by sbriesen
Branch: MAIN
CVS Tags: HEAD
initial commit.
(Portage version: 2.1.4.4)

1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 inherit eutils
6
7 DESCRIPTION="Adobe PostScript drivers for Windows for use with CUPS"
8 HOMEPAGE="http://www.adobe.com/support/downloads/product.jsp?product=44&platform=Windows"
9 SRC_URI_BASE="ftp://ftp.adobe.com/pub/adobe/printerdrivers/win/1.x"
10 SRC_URI=""
11
12 LICENSE="AdobePS"
13 RESTRICT="mirror"
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86"
16 IUSE="cups"
17
18 DEPEND="app-arch/cabextract"
19 RDEPEND="cups? ( >=net-print/cups-1.2 )"
20
21 IUSE_LINGUAS=( en da de es fi fr it ja ko nl no pt_BR se zh_CN )
22 IUSE_FILES=( winsteng winstDan winstger winstspa winstfin winstfre winstita
23 winstjpn winstkor winstdut winstnor winstbrz winstswe Winstchs ) # winstcht
24
25 IUSE_LANGS=""
26 IUSE_CLOSE=""
27 for ((X=0; X < ${#IUSE_LINGUAS[*]}; X++)); do
28 IUSE="${IUSE} linguas_${IUSE_LINGUAS[X]}"
29 SRC_URI="${SRC_URI} linguas_${IUSE_LINGUAS[X]}? ( ${SRC_URI_BASE}/${IUSE_FILES[X]}.exe )"
30 IUSE_LANGS="${IUSE_LANGS} !linguas_${IUSE_LINGUAS[X]}? ("
31 IUSE_CLOSE="${IUSE_CLOSE} )"
32 done
33 SRC_URI="${SRC_URI} ${IUSE_LANGS} ${SRC_URI_BASE}/${IUSE_FILES[0]}.exe${IUSE_CLOSE}"
34
35 S="${WORKDIR}"
36
37 pkg_setup() {
38 local X L=""
39 ADOBEPS_LANG=""
40 for X in ${LINGUAS}; do
41 if [[ " ${IUSE_LINGUAS[*]} " =~ " ${X} " ]]; then
42 [ -z "${ADOBEPS_LANG}" ] && ADOBEPS_LANG="${X}"
43 L="${L} ${X}"
44 fi
45 done
46 if [ -z "${ADOBEPS_LANG}" ]; then
47 L="${IUSE_LINGUAS[0]}"; ADOBEPS_LANG="${L}"
48 fi
49 elog "Selected languages:" ${L}
50 use cups && elog "CUPS drivers language: ${ADOBEPS_LANG}"
51 }
52
53 src_unpack() {
54 local X L
55 for ((X=0; X < ${#IUSE_LINGUAS[*]}; X++)); do
56 L="${IUSE_LINGUAS[X]}"
57 if use linguas_${L} || [ "${L}" = "${ADOBEPS_LANG}" ]; then
58 cabextract -Lq -d "${S}/${IUSE_LINGUAS[X]}" \
59 "${DISTDIR}/${IUSE_FILES[X]}.exe" || die "unpack failed"
60 fi
61 done
62 }
63
64 src_install() {
65 local X
66 for X in ${IUSE_LINGUAS[*]}; do
67 if use linguas_${X} || [ "${X}" = "${ADOBEPS_LANG}" ]; then
68 # files and filenames taken from cupsaddsmb man-page
69 insinto "/usr/share/${PN}/${X}"
70 # Windows 2000 and higher
71 doins ${X}/winxp/{ps5ui.dll,pscript.hlp,pscript.ntf,pscript5.dll}
72 # Windows 95, 98, and Me
73 newins ${X}/windows/adfonts.mfm ADFONTS.MFM
74 newins ${X}/windows/adobeps4.drv ADOBEPS4.DRV
75 newins ${X}/windows/adobeps4.hlp ADOBEPS4.HLP
76 newins ${X}/windows/iconlib.dll ICONLIB.DLL
77 newins ${X}/windows/psmon.dll PSMON.DLL
78 fi
79 done
80 # symlink primary language to cups drivers
81 if use cups; then
82 dodir /usr/share/cups/drivers
83 for X in ps5ui.dll pscript.hlp pscript.ntf pscript5.dll \
84 ADFONTS.MFM ADOBEPS4.DRV ADOBEPS4.HLP ICONLIB.DLL PSMON.DLL; do
85 dosym "../../${PN}/${ADOBEPS_LANG}/${X}" "/usr/share/cups/drivers/${X}"
86 done
87 fi
88 }

  ViewVC Help
Powered by ViewVC 1.1.20