summaryrefslogtreecommitdiff
blob: 55544248d9e49d70d7fc82057ae8723b3f37beee (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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6
PYTHON_COMPAT=( python2_7 )

inherit eutils python-single-r1 vala

DESCRIPTION="A collection of different plugins for Geany"
HOMEPAGE="https://plugins.geany.org"
SRC_URI="https://plugins.geany.org/${PN}/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="alpha amd64 arm ia64 ppc ppc64 sparc x86"

IUSE="gtk3 +autoclose +automark +commander ctags debugger +defineformat enchant git gpg gtkspell lua multiterm nls +overview python scope soup"
REQUIRED_USE="
	gtk3? ( !debugger !multiterm !python !scope )
	python? ( ${PYTHON_REQUIRED_USE} )
"

GTK_COMMON_DEPEND="
	gtk3? ( x11-libs/gtk+:3 )
	!gtk3? ( x11-libs/gtk+:2 )
"
COMMON_DEPEND="
	>=dev-util/geany-1.26[gtk3=]
	dev-libs/glib:2
	dev-libs/libxml2:2
	autoclose? ( ${GTK_COMMON_DEPEND} )
	commander? ( ${GTK_COMMON_DEPEND} )
	ctags? ( dev-util/ctags )
	debugger? ( x11-libs/vte:0 )
	defineformat? ( ${GTK_COMMON_DEPEND} )
	enchant? ( app-text/enchant )
	git? ( dev-libs/libgit2:= )
	gpg? ( app-crypt/gpgme:1= )
	gtkspell? (
		gtk3? ( app-text/gtkspell:3= )
		!gtk3? ( app-text/gtkspell:2 )
		)
	lua? ( dev-lang/lua:0= )
	multiterm? (
		$(vala_depend)
		x11-libs/gtk+:2
		>=x11-libs/vte-0.28:0
		)
	python? (
		dev-python/pygtk[${PYTHON_USEDEP}]
		${PYTHON_DEPS}
		)
	scope? ( x11-libs/vte:0 )
	soup? ( net-libs/libsoup:2.4 )
"
RDEPEND="${COMMON_DEPEND}
	scope? ( sys-devel/gdb )
"
DEPEND="${COMMON_DEPEND}
	nls? ( sys-devel/gettext )
	virtual/pkgconfig
"

pkg_setup() {
	use python && python-single-r1_pkg_setup
}

src_prepare() {
	# bundled lib buster
	rm markdown/peg-markdown/markdown_lib.c || die
	# devhelp plugin bundles devhelp

	default

	use multiterm && vala_src_prepare
}

src_configure() {
	local myeconfargs=(
		--disable-cppcheck
		--disable-extra-c-warnings
		$(use_enable !gtk3 geanydoc)
		# GeanyGenDoc requires ctpl which isn’t yet in portage
		--disable-geanygendoc
		# peg-markdown is bundled, use app-text/discount instead
		--disable-peg-markdown
		--enable-addons
		--enable-codenav
		--enable-geanyextrasel
		--enable-geanyinsertnum
		--enable-geanylatex
		--enable-geanymacro
		--enable-geanynumberedbookmarks
		--enable-geanyprj
		--enable-geanyvc
		--enable-lineoperations
		--enable-lipsum
		--enable-pairtaghighlighter
		--enable-pohelper
		--enable-pretty-printer
		--enable-projectorganizer
		--enable-sendmail
		--enable-shiftcolumn
		--enable-tableconvert
		--enable-treebrowser
		--enable-xmlsnippets
		$(use_enable autoclose)
		$(use_enable automark)
		$(use_enable commander)
		$(use_enable ctags geanyctags)
		$(use_enable debugger)
		$(use_enable defineformat)
		$(use_enable enchant spellcheck)
		$(use_enable git gitchangebar)
		$(use_enable gpg geanypg)
		$(use_enable gtkspell)
		$(use_enable multiterm)
		$(use_enable lua geanylua)
		$(use_enable nls)
		$(use_enable overview)
		$(use_enable python geanypy)
		$(use_enable scope)
		# Having updatechecker… when you’re using a package manager?
		$(use_enable soup updatechecker)
		$(use_enable soup geniuspaste)
		# Relies on obsolete and vulnerable webkit-gtk versions
		--disable-devhelp
		--disable-markdown
		--disable-webhelper
	)

	econf "${myeconfargs[@]}"
}

src_install() {
	default

	prune_libtool_files --modules

	# make installs all translations if LINGUAS is empty
	if [[ -n "${LINGUAS+x}" && -z "$LINGUAS" ]]; then
		rm -r "${D}/usr/share/locale/" || die
	fi
}