app-misc/linux-logo: Adds arm64 support
[gentoo.git] / app-misc / xmind / xmind-3.7.2.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit eutils multilib gnome2-utils font
7
8 MY_PV="8-update2"
9 MY_P="${PN}-${MY_PV}-linux"
10
11 DESCRIPTION="A brainstorming and mind mapping software tool"
12 HOMEPAGE="http://www.xmind.net"
13 SRC_URI="http://dl2.xmind.net/xmind-downloads/${MY_P}.zip
14         https://dev.gentoo.org/~creffett/distfiles/xmind-icons.tar.xz"
15 LICENSE="EPL-1.0 LGPL-3"
16 SLOT="0"
17 KEYWORDS="~amd64 ~x86"
18 IUSE=""
19
20 RDEPEND="
21         >=virtual/jre-1.8
22         x11-libs/gtk+:2
23 "
24
25 S=${WORKDIR}
26
27 QA_PRESTRIPPED="opt/xmind/XMind/libcairo-swt.so"
28 QA_FLAGS_IGNORED="
29         opt/xmind/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.1.400.v20160518-1444/eclipse_1617.so
30         opt/xmind/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.400.v20160518-1444/eclipse_1617.so
31         opt/xmind/XMind/XMind
32 "
33
34 FONT_SUFFIX="ttf"
35 FONT_S="${S}/fonts"
36
37 src_configure() {
38         if use amd64; then
39                 XDIR="XMind_amd64"
40         else
41                 XDIR="XMind_i388"
42         fi
43         mv "$XDIR" XMind || die
44         # force data instance & config area to be at home/.xmind directory
45         sed \
46                 -e '/-configuration/d' \
47                 -e '/\.\/configuration/d' \
48                 -e '/-data/d' \
49                 -e '/\.\.\/Commons\/data\/workspace-cathy/d' \
50                 -e 's/\.\.\/plugins/\/opt\/xmind\/plugins/g' \
51                 -e '/-vmargs/i-showsplash' \
52                 -e '/vmargs/iorg.xmind.cathy' \
53                 -i XMind/XMind.ini || die
54         echo '-Dosgi.instance.area=@user.home/.xmind/workspace-cathy' >> XMind/XMind.ini || die
55         echo '-Dosgi.configuration.area=@user.home/.xmind/configuration-cathy' >> XMind/XMind.ini || die
56 }
57
58 src_compile() {
59         :
60 }
61
62 src_install() {
63         insinto /opt/xmind
64         doins -r plugins configuration features XMind
65         fperms a+rx  "/opt/xmind/XMind/XMind"
66
67         exeinto /opt/bin
68         newexe "${FILESDIR}/xmind-wrapper-3.7.0" xmind
69
70         # install icons
71         local res
72         for res in 16 32 48; do
73                 newicon -s ${res} "${WORKDIR}/xmind-icons/xmind.${res}.png" xmind.png
74         done
75
76         make_desktop_entry ${PN} "XMind" ${PN} "Office" "MimeType=application/x-xmind;"
77         font_src_install
78 }
79
80 pkg_preinst() {
81         gnome2_icon_savelist
82 }
83
84 pkg_postinst() {
85         gnome2_icon_cache_update
86         font_pkg_postinst
87         elog "For audio notes support, install media-sound/lame"
88 }
89
90 pkg_postrm() {
91         gnome2_icon_cache_update
92 }