summaryrefslogtreecommitdiff
path: root/app-editors/liteide/liteide-9999.ebuild
blob: 934bf7bc5ee4a31367f451ad2299a00f9873c440 (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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="5"
inherit qt4-r2 git-2

DESCRIPTION="LiteIDE is a simple, open source, cross-platform Go IDE."
HOMEPAGE="http://code.google.com/p/liteide"
EGIT_REPO_URI="https://github.com/visualfc/liteide.git"

LICENSE="LGPL-2.1"
KEYWORDS=""
SLOT="0"
IUSE="ordered"

DEPEND="dev-lang/go
	dev-qt/qtgui
	dev-qt/qtdbus
	dev-qt/qtwebkit
	dev-lang/go
	dev-qt/qtgui
	dev-qt/qtdbus
	dev-qt/qtwebkit"
RDEPEND="${DEPEND}"

S="${WORKDIR}"/"${PN}"-"${PV}"/

src_prepare() {
	qt4-r2_src_prepare
}

src_configure() {
	local conf_release
	local conf_ordered

	if use ordered ; then
		conf_ordered="CONFIG+=ordered"
		conf_release=""
		else
		conf_release="CONFIG+=release"
		conf_ordered=""
	fi

	cd "${S}"/liteidex/
	eqmake4 "${S}"/liteidex/liteidex.pro "PREFIX=${EPREFIX}/usr" "LIBDIR=/usr/$(get_libdir)" ${conf_release} ${conf_ordered}
}

src_install() {
	cd "${S}"/liteidex/
	qt4-r2_src_install DESTDIR="${D}"opt/${PN}/ INSTALL_ROOT="${D}"opt/${PN}/ || die
	
	export GOPATH=$(pwd)

	# Go Tools
	go install -ldflags "-s" -v tools/goastview
	go install -ldflags "-s" -v tools/godocview
	go install -ldflags "-s" -v tools/goexec
	go install -ldflags "-s" -v tools/goapi

	# Licence & Readme
	dodoc LICENSE.LGPL LGPL_EXCEPTION.TXT ../README.md

	# Binaries
	insinto /opt/${PN}/bin
	doins "${S}"/liteidex/${PN}/bin/*
	doins "${S}"/liteidex/bin/*

	# Plugins
	insinto /opt/${PN}/lib/${PN}/plugins/
	doins "${S}"/liteidex/${PN}/lib/${PN}/plugins/*.so

	# Documentation
	insinto /opt/${PN}/share/${PN}/
	doins -r "${S}"/liteidex/deploy/*
	doins -r "${S}"/liteidex/os_deploy/*

	# QT Libraries
	addread /usr/$(get_libdir)/qt4/
	insinto /opt/${PN}/lib/${PN}
	doins /usr/$(get_libdir)/qt4/libQtCore.so*
	doins /usr/$(get_libdir)/qt4/libQtXml.so*
	doins /usr/$(get_libdir)/qt4/libQtNetwork.so*
	doins /usr/$(get_libdir)/qt4/libQtGui.so*
	doins /usr/$(get_libdir)/qt4/libQtDBus.so*
	doins /usr/$(get_libdir)/qt4/libQtWebKit.so*

	fperms u+x /opt/${PN}/bin/liteide
	fperms u+x /opt/${PN}/bin/go*
}