summaryrefslogtreecommitdiff
blob: 84232b9729aefb9a2a841dbaed2564e4ecd404b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-fonts/acroread-asianfonts/acroread-asianfonts-7.0.8.ebuild,v 1.2 2007/04/09 14:09:03 matsuu Exp $

inherit eutils

BASE_URI="ftp://ftp.adobe.com/pub/adobe/reader/unix/7x/7.0.8/misc/FontPack708_"

DESCRIPTION="Asian font packs for Adobe Acrobat Reader"
HOMEPAGE="http://www.adobe.com/products/acrobat/acrrasianfontpack.html"
SRC_URI="linguas_zh_CN? ( ${BASE_URI}chs_i386-linux.tar.gz )
	linguas_zh_TW? ( ${BASE_URI}cht_i386-linux.tar.gz )
	linguas_ja? ( ${BASE_URI}jpn_i386-linux.tar.gz )
	linguas_ko? ( ${BASE_URI}kor_i386-linux.tar.gz )
	!linguas_zh_CN? ( !linguas_zh_TW? ( !linguas_ja? ( !linguas_ko? (
		${BASE_URI}chs_i386-linux.tar.gz
		${BASE_URI}cht_i386-linux.tar.gz
		${BASE_URI}jpn_i386-linux.tar.gz
		${BASE_URI}kor_i386-linux.tar.gz
	) ) ) )"
# linguas_ce? ( ${BASE_URI}ce_i386-linux.tar.gz )
# linguas_hatv? ( ${BASE_URI}hatv_i386-linux.tar.gz )
SLOT="0"
LICENSE="Adobe"
KEYWORDS="~amd64 ~x86"
IUSE="linguas_zh_CN linguas_zh_TW linguas_ja linguas_ko"
RESTRICT="nomirror"

DEPEND=">=app-text/acroread-7.0.8"

S="${WORKDIR}"

pkg_setup() {
	local NOUSE

	if ! use linguas_zh_CN && ! use linguas_zh_TW &&
		! use linguas_ja && ! use linguas_ko ; then
		NOUSE=true
	else
		NOUSE=false
	fi

	if ! built_with_use '>=app-text/acroread-7.0.8' linguas_zh_TW && (use linguas_zh_TW || $NOUSE); then
		INST_LANG="${INST_LANG} CHT"
	fi

	if ! built_with_use '>=app-text/acroread-7.0.8' linguas_ja && (use linguas_ja || $NOUSE); then
		INST_LANG="${INST_LANG} JPN"
	fi

	if ! built_with_use '>=app-text/acroread-7.0.8' linguas_ko && (use linguas_ko || $NOUSE); then
		INST_LANG="${INST_LANG} KOR"
	fi

	if ! built_with_use '>=app-text/acroread-7.0.8' linguas_zh_CN && (use linguas_zh_CN || $NOUSE); then
		INST_LANG="${INST_LANG} CHS"
	fi

	if [ "${INST_LANG}" = "" ] ; then
		eerror "You don't have to install acroread-asianfonts."
		eerror "Please unmerge acroread-asianfonts."
		einfo "# emerge -C acroread-asianfonts"
		die "You don't have to install acroread-asianfonts."
	fi
}

src_install() {
	local INSTALLDIR="/opt/Acrobat7/Resource"

	dodir ${INSTALLDIR}
	for lang in ${INST_LANG}
	do
		einfo "Installing ${lang} pack ..."
		tar xf "${lang}KIT/LANG${lang}.TAR" --no-same-owner -C "${D}/${INSTALLDIR}"
	done

	einfo "Installing Asian CMaps ..."
	tar xf ${INST_LANG/* /}KIT/LANGCOM.TAR --no-same-owner -C "${D}/${INSTALLDIR}"
	tar xf ${INST_LANG/* /}KIT/BINCOM.TAR --no-same-owner -C "${D}/${INSTALLDIR}"

	# bug 152288
	if [ -f "${D}/${INSTALLDIR}/CMap/Identity-V" ] ; then
		rm "${D}/${INSTALLDIR}/CMap/Identity-V"
	fi

	insinto ${INSTALLDIR}
	doins ${INST_LANG/* /}KIT/LICREAD.TXT || die

	fowners -R -L --dereference 0:0 ${INSTALLDIR}
}