summaryrefslogtreecommitdiff
blob: a56f505252054aee0c1b02e1bb8f032e6284bebb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=5

inherit eutils

DESCRIPTION="A Plasmid Editor"
HOMEPAGE="http://www.biology.utah.edu/jorgensen/wayned/ape/"
SRC_URI="http://www.biology.utah.edu/jorgensen/wayned/ape/Download/Linux/ApE_linux_current.zip -> ${P}.zip"

LICENSE="ApE"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

DEPEND="app-arch/unzip"
RDEPEND="
	dev-lang/tcl:0
	dev-lang/tk:0"

RESTRICT="bindist mirror"

S="${WORKDIR}/ApE Linux/"

src_compile() { :; }

src_install() {
	cat >> "${T}/ApE" <<- "EOF"
	#!/bin/bash
	cmdArgs=""

	# AppMain.tcl searches files relative to the directory where it resides.
	# Add absolute path to file here, if necessary.
	for rfpath in "$@"; do
		afpath="$PWD/${rfpath}"
		if test -r "${afpath}"; then
			cmdArgs="${cmdArgs} \"${afpath}\"";
		else
			cmdArgs="${cmdArgs} \"${rfpath}\"";
		fi
	done

	eval exec tclsh "\"/usr/share/ApE-2.0.7/AppMain.tcl\"" "${cmdArgs}"
	EOF

	dobin "${T}/ApE"
	insinto "/usr/share/${P}"
	doins -r "${WORKDIR}"/ApE\ Linux/*
	make_desktop_entry ${PN} ${PN} \
		"/usr/share/${P}/Accessory Files/Icons and images/monkey_icon.gif" \
		"Science"
}