You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-misc/xmind/xmind-3.5.3.201506180105-r2...

81 lines
2.1 KiB

# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=5
inherit desktop eutils multilib optfeature xdg
MY_PN="${PN}-portable"
MY_P="${MY_PN}-${PV}"
DESCRIPTION="A brainstorming and mind mapping software tool"
HOMEPAGE="https://www.xmind.net"
SRC_URI="http://dl2.xmind.net/xmind-downloads/${MY_P}.zip
https://dev.gentoo.org/~creffett/distfiles/xmind-icons.tar.xz"
LICENSE="EPL-1.0 LGPL-3"
SLOT="0"
KEYWORDS="amd64 x86"
DEPEND="app-arch/unzip"
RDEPEND="
>=virtual/jre-1.5
x11-libs/gtk+:2
"
S=${WORKDIR}
QA_PRESTRIPPED="opt/xmind/XMind/libcairo-swt.so"
QA_FLAGS_IGNORED="
opt/xmind/Commons/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20120522-1813/eclipse_1502.so
opt/xmind/Commons/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.1.200.v20120522-1813/eclipse_1502.so
opt/xmind/XMind/libcairo-swt.so
opt/xmind/XMind/XMind
"
src_configure() {
if use amd64; then
XDIR="XMind_Linux_64bit"
else
XDIR="XMind_Linux"
fi
mv "$XDIR" XMind || die
mv XMind/.eclipseproduct Commons || die
cp "${FILESDIR}"/${PN}-3.4.0-config.ini Commons/configuration || die #Combined common+linux config.ini
# force data instance & config area to be at home/.xmind directory
sed \
-e '/-configuration/d' \
-e '/\.\/configuration/d' \
-e '/-data/d' \
-e '/\.\.\/Commons\/data\/workspace-cathy/d' \
-e 's/\.\.\/Commons/\/opt\/xmind\/Commons/g' \
-i XMind/XMind.ini || die
echo '-Dosgi.instance.area=@user.home/.xmind/workspace-cathy' >> XMind/XMind.ini || die
echo '-Dosgi.configuration.area=@user.home/.xmind/configuration-cathy' >> XMind/XMind.ini || die
}
src_compile() {
:
}
src_install() {
insinto /opt/xmind
doins -r Commons XMind
fperms a+rx "/opt/xmind/XMind/XMind"
exeinto /opt/bin
newexe "${FILESDIR}/xmind-wrapper-3.5.3" xmind
# install icons
local res
for res in 16 32 48; do
newicon -s ${res} "${WORKDIR}/xmind-icons/xmind.${res}.png" xmind.png
done
make_desktop_entry ${PN} "XMind" ${PN} "Office" "MimeType=application/x-xmind;"
}
pkg_postinst() {
xdg_pkg_postinst
optfeature "audio notes support" media-sound/lame
}