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

Contents of /app-i18n/atokx3/atokx3-3.0.0-r7.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, 8 months ago) by ulm
Branch: MAIN
Changes since 1.2: +4 -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-r7.ebuild,v 1.2 2011/03/27 10:43:48 nirbheek Exp $
4
5 EAPI="3"
6
7 inherit cdrom eutils multilib
8
9 MY_UPDATE_P="${PN}up2"
10 MY_UPDATE_GTK="${PN}gtk216"
11 MY_ZIPCODE_P="a20y1011lx"
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 update_gtk_immodules() {
65 if use amd64 && has_multilib_profile ; then
66 if [ -x "${EPREFIX}"/usr/bin/gtk-query-immodules-2.0 ] ; then
67 "${EPREFIX}"/usr/bin/gtk-query-immodules-2.0 > "${EPREFIX}/etc/gtk-2.0/$(get_abi_CHOST)/gtk.immodules"
68 fi
69 if [ -x "${EPREFIX}"/usr/bin/gtk-query-immodules-2.0-32 ] ; then
70 "${EPREFIX}"/usr/bin/gtk-query-immodules-2.0-32 > "${EPREFIX}/etc/gtk-2.0/$(get_abi_CHOST x86)/gtk.immodules"
71 fi
72 else
73 if [ -x "${EPREFIX}"/usr/bin/gtk-query-immodules-2.0 ] ; then
74 "${EPREFIX}"/usr/bin/gtk-query-immodules-2.0 > "${EPREFIX}/etc/gtk-2.0/gtk.immodules"
75 fi
76 fi
77 }
78
79 pkg_setup() {
80 if ! cdrom_get_cds atokx3index ; then
81 die "Please mount ATOK for Linux CD-ROM or set CD_ROOT variable to the directory containing ATOK X3 for Linux."
82 fi
83 }
84
85 src_unpack() {
86 local targets="
87 IIIMF/iiimf-client-lib-trunk_r3104-js*.i386.tar.gz
88 IIIMF/iiimf-gtk-trunk_r3104-js*.i386.tar.gz
89 IIIMF/iiimf-protocol-lib-trunk_r3104-js*.i386.tar.gz
90 IIIMF/iiimf-server-trunk_r3104-js*.i386.tar.gz
91 IIIMF/iiimf-x-trunk_r3104-js*.i386.tar.gz
92 IIIMF/iiimf-client-lib-devel-trunk_r3104-js*.i386.tar.gz
93 IIIMF/iiimf-protocol-lib-devel-trunk_r3104-js*.i386.tar.gz
94 ATOK/atokx-20.0-*.0.0.i386.tar.gz"
95 # IIIMF/iiimf-properties-trunk_r3104-js*.i386.tar.gz
96 # IIIMF/iiimf-docs-trunk_r3104-js*.i386.tar.gz
97 # IIIMF/iiimf-notuse-trunk_r3104-js*.i386.tar.gz
98
99 if use amd64 ; then
100 targets="${targets}
101 IIIMF/iiimf-client-lib-64-trunk_r3104-js*.x86_64.tar.gz
102 IIIMF/iiimf-gtk-64-trunk_r3104-js*.x86_64.tar.gz
103 IIIMF/iiimf-protocol-lib-64-trunk_r3104-js*.x86_64.tar.gz
104 ATOK/atokx-64-20.0-*.0.0.x86_64.tar.gz"
105 # IIIMF/iiimf-client-lib-devel-64-trunk_r3104-js*.x86_64.tar.gz
106 # IIIMF/iiimf-protocol-lib-devel-64-trunk_r3104-js*.x86_64.tar.gz
107 # IIIMF/iiimf-notuse-64-trunk_r3104-js*.x86_64.tar.gz
108 fi
109
110 targets="${targets} ATOK/atokxup-20.0-*.0.0.i386.tar.gz"
111
112 unpack ${MY_UPDATE_P}.tar.gz
113
114 for i in ${targets} ; do
115 if [ -f "${S}"/${MY_UPDATE_P}/bin/${i} ] ; then
116 einfo "unpack" $(basename "${S}"/${MY_UPDATE_P}/bin/${i})
117 tar xzf "${S}"/${MY_UPDATE_P}/bin/${i} || die "Failed to unpack ${i}"
118 elif [ -f "${CDROM_ROOT}"/bin/tarball/${i} ] ; then
119 einfo "unpack" $(basename "${CDROM_ROOT}"/bin/tarball/${i})
120 tar xzf "${CDROM_ROOT}"/bin/tarball/${i} || die "Failed to unpack ${i}"
121 else
122 eerror "${i} not found."
123 die "${i} not found."
124 fi
125 done
126 unpack ${MY_UPDATE_GTK}.tar.gz
127 unpack ${MY_ZIPCODE_P}.tgz
128 }
129
130 src_prepare() {
131 if use amd64 ; then
132 local lib32="$(ABI=x86 get_libdir)"
133 local lib64="$(get_libdir)"
134 if [ "lib" != "${lib32}" ] ; then
135 mv usr/lib "usr/${lib32}" || die
136 fi
137 if [ "lib64" != "${lib64}" ] ; then
138 mv usr/lib64 "usr/${lib64}" || die
139 fi
140 mkdir -p "usr/${lib64}/iiim/le/atokx3" || die
141 mv "usr/${lib32}/iiim/le/atokx3/64" "usr/${lib64}/iiim/le/atokx3/64" || die
142 rm "usr/${lib32}/iiim/le/atokx3/amd64" || die
143 sed -e "s:/usr/lib:/usr/${lib64}:" \
144 "usr/${lib32}/libiiimcf.la" > "usr/${lib64}/libiiimcf.la" || die
145 sed -e "s:/usr/lib:/usr/${lib64}:" \
146 "usr/${lib32}/libiiimp.la" > "usr/${lib64}/libiiimp.la" || die
147 sed -i -e "s:/usr/lib:/usr/${lib32}:" "usr/${lib32}/libiiimcf.la" || die
148 sed -i -e "s:/usr/lib:/usr/${lib32}:" "usr/${lib32}/libiiimp.la" || die
149 fi
150 }
151
152 src_install() {
153 dodoc "${MY_UPDATE_P}/README_UP2.txt" || die
154 rm -rf "${MY_UPDATE_P}"
155
156 cp -dpR * "${ED}" || die
157
158 # amd64 hack
159 if use amd64 ; then
160 local lib32="$(ABI=x86 get_libdir)"
161 local lib64="$(get_libdir)"
162 if [ "${lib32}" != "${lib64}" ] ; then
163 for f in /usr/"${lib32}"/iiim/*iiim* ; do
164 dosym "${f}" /usr/"${lib64}"/iiim/ || die
165 done
166 for f in /usr/"${lib32}"/iiim/le/atokx3/atokx3*.so ; do
167 dosym "${f}" /usr/"${lib64}"/iiim/le/atokx3/ || die
168 done
169 dosym /usr/"${lib64}"/iiim/le/atokx3/64 /usr/"${lib32}"/iiim/le/atokx3/64 || die
170 dosym /usr/"${lib64}"/iiim/le/atokx3/64 /usr/"${lib32}"/iiim/le/atokx3/amd64 || die
171 fi
172 fi
173
174 sed -e "s:@EPREFIX@:${EPREFIX}:" "${FILESDIR}/xinput-iiimf" > "${T}/iiimf.conf" || die
175 insinto /etc/X11/xinit/xinput.d
176 doins "${T}/iiimf.conf" || die
177
178 dodoc "${CDROM_ROOT}"/doc/atok.pdf || die
179 dohtml "${CDROM_ROOT}"/readme.html || die
180 }
181
182 pkg_preinst() {
183 # bug #343325
184 if use amd64 && has_multilib_profile && [ -L "${EPREFIX}/usr/$(get_libdir)/iiim" ] ; then
185 rm -f "${EPREFIX}/usr/$(get_libdir)/iiim"
186 fi
187 }
188
189 pkg_postinst() {
190 elog
191 elog "To use ATOK for Linux, you need to add following to .xinitrc or .xprofile:"
192 elog
193 elog ". /opt/atokx3/bin/atokx3start.sh"
194 elog
195 update_gtk_immodules
196 }
197
198 pkg_postrm() {
199 update_gtk_immodules
200 }

  ViewVC Help
Powered by ViewVC 1.1.20