/[gentoo-x86]/app-i18n/atokx3/atokx3-3.0.0-r6.ebuild
Gentoo

Contents of /app-i18n/atokx3/atokx3-3.0.0-r6.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Thu Jan 26 21:47:04 2012 UTC (2 years, 10 months ago) by ulm
Branch: MAIN
Changes since 1.2: +3 -4 lines
Migrate to cdrom.eclass, bug 398809.

(Portage version: 2.1.10.44/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-i18n/atokx3/atokx3-3.0.0-r6.ebuild,v 1.2 2011/03/27 10:43:48 nirbheek Exp $
4
5 EAPI="1"
6
7 inherit cdrom eutils multilib
8
9 MY_UPDATE_P="${PN}up2"
10 MY_UPDATE_GTK="${PN}gtk216"
11 MY_ZIPCODE_P="a20y1006lx"
12
13 DESCRIPTION="ATOK X3 for Linux - The most famous Japanese Input Method Engine"
14 HOMEPAGE="http://www.justsystems.com/jp/products/atok_linux/"
15 SRC_URI="http://www3.justsystem.co.jp/download/atok/up/lin/${MY_UPDATE_P}.tar.gz
16 http://www3.justsystem.co.jp/download/atok/up/lin/${MY_UPDATE_GTK}.tar.gz
17 http://www3.justsystem.co.jp/download/zipcode/up/lin/${MY_ZIPCODE_P}.tgz"
18
19 LICENSE="ATOK MIT"
20
21 SLOT="0"
22 KEYWORDS="~amd64 ~x86"
23 IUSE=""
24
25 RESTRICT="strip mirror binchecks"
26
27 RDEPEND="!app-i18n/atokx2
28 !dev-libs/libiiimcf
29 !dev-libs/csconv
30 !app-i18n/iiimgcf
31 !dev-libs/libiiimp
32 !app-i18n/iiimsf
33 !app-i18n/iiimxcf
34 dev-libs/atk
35 dev-libs/glib:2
36 dev-libs/libxml2:2
37 media-libs/fontconfig
38 media-libs/libpng
39 sys-apps/tcp-wrappers
40 sys-libs/pam
41 x11-libs/cairo
42 >=x11-libs/gtk+-2.4.13:2
43 x11-libs/libICE
44 x11-libs/libSM
45 x11-libs/libXcomposite
46 x11-libs/libXcursor
47 x11-libs/libXdamage
48 x11-libs/libXext
49 x11-libs/libXfixes
50 x11-libs/libXi
51 x11-libs/libXrandr
52 x11-libs/libXrender
53 x11-libs/libXxf86vm
54 x11-libs/libdrm
55 x11-libs/pango
56 amd64? (
57 >=app-emulation/emul-linux-x86-baselibs-20091226
58 app-emulation/emul-linux-x86-gtklibs
59 app-emulation/emul-linux-x86-xlibs
60 )"
61
62 S="${WORKDIR}"
63
64 pkg_setup() {
65 if has_multilib_profile ; then
66 GTK2_CONFDIR="/etc/gtk-2.0/${CHOST}"
67 fi
68 GTK2_CONFDIR=${GTK2_CONFDIR:=/etc/gtk-2.0/}
69
70 if ! cdrom_get_cds atokx3index ; then
71 die "Please mount ATOK for Linux CD-ROM or set CD_ROOT variable to the directory containing ATOK X3 for Linux."
72 fi
73 }
74
75 src_unpack() {
76 local targets="
77 IIIMF/iiimf-client-lib-trunk_r3104-js*.i386.tar.gz
78 IIIMF/iiimf-gtk-trunk_r3104-js*.i386.tar.gz
79 IIIMF/iiimf-protocol-lib-trunk_r3104-js*.i386.tar.gz
80 IIIMF/iiimf-server-trunk_r3104-js*.i386.tar.gz
81 IIIMF/iiimf-x-trunk_r3104-js*.i386.tar.gz
82 IIIMF/iiimf-client-lib-devel-trunk_r3104-js*.i386.tar.gz
83 IIIMF/iiimf-protocol-lib-devel-trunk_r3104-js*.i386.tar.gz
84 ATOK/atokx-20.0-*.0.0.i386.tar.gz"
85 # IIIMF/iiimf-properties-trunk_r3104-js*.i386.tar.gz
86 # IIIMF/iiimf-docs-trunk_r3104-js*.i386.tar.gz
87 # IIIMF/iiimf-notuse-trunk_r3104-js*.i386.tar.gz
88
89 if use amd64 ; then
90 targets="${targets}
91 IIIMF/iiimf-client-lib-64-trunk_r3104-js*.x86_64.tar.gz
92 IIIMF/iiimf-gtk-64-trunk_r3104-js*.x86_64.tar.gz
93 IIIMF/iiimf-protocol-lib-64-trunk_r3104-js*.x86_64.tar.gz
94 ATOK/atokx-64-20.0-*.0.0.x86_64.tar.gz"
95 # IIIMF/iiimf-client-lib-devel-64-trunk_r3104-js*.x86_64.tar.gz
96 # IIIMF/iiimf-protocol-lib-devel-64-trunk_r3104-js*.x86_64.tar.gz
97 # IIIMF/iiimf-notuse-64-trunk_r3104-js*.x86_64.tar.gz
98 fi
99
100 targets="${targets} ATOK/atokxup-20.0-*.0.0.i386.tar.gz"
101
102 unpack ${MY_UPDATE_P}.tar.gz
103
104 for i in ${targets}
105 do
106 if [ -f "${S}"/${MY_UPDATE_P}/bin/${i} ] ; then
107 einfo "unpack" $(basename "${S}"/${MY_UPDATE_P}/bin/${i})
108 tar xzf "${S}"/${MY_UPDATE_P}/bin/${i} || die "Failed to unpack ${i}"
109 elif [ -f "${CDROM_ROOT}"/bin/tarball/${i} ] ; then
110 einfo "unpack" $(basename "${CDROM_ROOT}"/bin/tarball/${i})
111 tar xzf "${CDROM_ROOT}"/bin/tarball/${i} || die "Failed to unpack ${i}"
112 else
113 eerror "${i} not found."
114 die "${i} not found."
115 fi
116 done
117 unpack ${MY_UPDATE_GTK}.tar.gz
118 unpack ${MY_ZIPCODE_P}.tgz
119
120 if use amd64 ; then
121 local lib32="$(ABI=x86 get_libdir)"
122 local lib64="$(get_libdir)"
123 if [ "lib" != "${lib32}" ] ; then
124 mv usr/lib "usr/${lib32}" || die
125 fi
126 if [ "lib64" != "${lib64}" ] ; then
127 mv usr/lib64 "usr/${lib64}" || die
128 fi
129 mkdir -p "usr/${lib64}/iiim/le/atokx3" || die
130 mv "usr/${lib32}/iiim/le/atokx3/64" "usr/${lib64}/iiim/le/atokx3/64" || die
131 rm "usr/${lib32}/iiim/le/atokx3/amd64" || die
132 fi
133 }
134
135 src_install() {
136 dodoc atokx3up2/README_UP2.txt
137 # atokx3up2
138 rm -rf atokx3up2
139
140 cp -dpR * "${D}" || die
141
142 # amd64 hack
143 if use amd64 ; then
144 local lib32="$(ABI=x86 get_libdir)"
145 local lib64="$(get_libdir)"
146 if [ "${lib32}" != "${lib64}" ] ; then
147 for f in /usr/"${lib32}"/iiim/*iiim* ; do
148 dosym "${f}" /usr/"${lib64}"/iiim/ || die
149 done
150 for f in /usr/"${lib32}"/iiim/le/atokx3/atokx3*.so ; do
151 dosym "${f}" /usr/"${lib64}"/iiim/le/atokx3/ || die
152 done
153 dosym /usr/"${lib64}"/iiim/le/atokx3/64 /usr/"${lib32}"/iiim/le/atokx3/amd64 || die
154 dosym /usr/"${lib32}"/libiiimcf.la /usr/"${lib64}"/libiiimcf.la || die
155 dosym /usr/"${lib32}"/libiiimp.la /usr/"${lib64}"/libiiimp.la || die
156 fi
157 fi
158
159 dodoc "${CDROM_ROOT}"/doc/atok.pdf || die
160 dohtml "${CDROM_ROOT}"/readme.html || die
161 }
162
163 pkg_postinst() {
164 elog
165 elog "To use ATOK for Linux, you need to add following to .xinitrc or .xprofile:"
166 elog
167 elog ". /opt/atokx3/bin/atokx3start.sh"
168 elog
169 [ "${ROOT}" == "/" ] && gtk-query-immodules-2.0 > "${ROOT}/${GTK2_CONFDIR}/gtk.immodules"
170 }
171
172 pkg_postrm() {
173 [ "${ROOT}" == "/" ] && gtk-query-immodules-2.0 > "${ROOT}/${GTK2_CONFDIR}/gtk.immodules"
174 }

  ViewVC Help
Powered by ViewVC 1.1.20