]> Pileus Git - ~andy/sunrise/blob - dev-embedded/PalmSDK/PalmSDK-1.4.1.427.ebuild
69c761022a76aaf12b8de1893f6cff66138d1d69
[~andy/sunrise] / dev-embedded / PalmSDK / PalmSDK-1.4.1.427.ebuild
1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI=2
6
7 inherit eutils versionator
8
9 DESCRIPTION="Palm WebOS SDK with Mojo Application Framework and emulator to develop Palm Pre applications"
10 HOMEPAGE="http://developer.palm.com/"
11
12 MY_VER="$(get_version_component_range 1-3)-svn274946-sdk1436-pho$(get_version_component_range 4)"
13 SRC_URI="http://cdn.downloads.palm.com/sdkdownloads/${PV}/sdkBinaries/palm-sdk_${MY_VER}_i386.deb"
14
15 LICENSE="${PN}"
16 SLOT="0"
17 KEYWORDS="~amd64 ~x86 -*"
18 MY_LINGUAS="linguas_de linguas_it linguas_pt_BR linguas_ru linguas_sv"
19 IUSE=${MY_LINGUAS}
20
21 RDEPEND="|| (
22                 app-emulation/virtualbox-bin
23                 app-emulation/virtualbox
24         )
25         >=virtual/jre-1.5
26         x86? (
27                 net-libs/libproxy
28                 net-libs/libsoup:2.4
29                 net-libs/libsoup-gnome:2.4
30                 net-libs/webkit-gtk
31                 x11-libs/gtk+:2
32         )"
33
34 QA_PRESTRIPPED_x86="
35         opt/PalmSDK/0.1/bin/palminspector
36         opt/PalmSDK/0.1/bin/proxy"
37 QA_PRESTRIPPED_amd64="${QA_PRESTRIPPED_x86}
38         opt/PalmSDK/0.1/lib/libproxy.so
39         opt/PalmSDK/0.1/lib/libproxy.so.0
40         opt/PalmSDK/0.1/lib/libproxy.so.0.0.0
41         opt/PalmSDK/0.1/lib/libproxy/0.2.3/plugins/envvar.so
42         opt/PalmSDK/0.1/lib/libproxy/0.2.3/plugins/file.so
43         opt/PalmSDK/0.1/lib/libproxy/0.2.3/plugins/gnome.so
44         opt/PalmSDK/0.1/lib/libproxy/0.2.3/plugins/kde.so"
45
46 src_unpack() {
47         unpack ${A}
48         unpack ./data.tar.gz
49 }
50
51 src_prepare() {
52         local my_linguas
53         for my_linguas in ${MY_LINGUAS} ; do
54                 use ${my_linguas} && continue
55                 rm -rf "opt/${PN}/0.1/share/locale/${my_linguas#linguas_}" || die
56         done
57
58         rm -rf opt/${PN}/0.1/lib/lib{soup,webkit}* || die
59
60         if use x86 ; then
61                 rm -rf opt/${PN}/0.1/lib/libproxy* || die
62         fi
63 }
64
65 src_install() {
66         local my_bin
67         for my_bin in $(find opt/${PN}/0.1/bin -maxdepth 1 -type f) ; do
68                 dosym "/${my_bin}" "/opt/bin/$(basename "${my_bin}")" || die
69         done
70
71         insinto opt/${PN}
72         doins -r opt/${PN}/0.1 || die
73         fperms -R a+x /opt/${PN}/0.1/{bin,lib} || die
74
75         dosym 0.1 opt/PalmSDK/Current || die
76
77         newicon "${FILESDIR}/${PN}-palm-emulator.png" palm-emulator.png || die
78         make_desktop_entry /opt/bin/palm-emulator "Palm Mojo SDK Emulator" palm-emulator Development
79
80         if use amd64 ; then
81                 ewarn "palminspector does not work on amd64 due to missing 32bit libraries "
82                 ewarn "libenchant.so.1 libicu{data,i18n,uc}.so.38 and libgnutls.so.13."
83                 ewarn "The execute bit will be removed to silence revdep-rebuild."
84                 ewarn "You can obtain these by using portage2.2 and multilib overlay."
85                 ewarn "See http://github.com/sjnewbury/multilib-overlay for details."
86                 fperms a-x /opt/${PN}/0.1/bin/palminspector || die
87         fi
88 }
89
90 pkg_postinst() {
91         if ! grep 'localhost' /etc/hosts | grep -s -q '127.0.0.1' ; then
92                 ewarn 'Add "127.0.0.1 localhost" to your /etc/hosts'
93         fi
94         if ! grep -s -q '127.0.0.1 qemu' /etc/hosts ; then
95                 ewarn 'Add "127.0.0.1 qemu" to your /etc/hosts'
96         fi
97         if ! grep -s -q '192.168.2.101 device' /etc/hosts ; then
98                 ewarn 'Add something like "192.168.2.101 device" to your /etc/hosts'
99         fi
100         elog 'Do not forget to add your account to the vboxusers group!'
101 }