dev-util/sccache: fix licenses
[gentoo.git] / dev-util / codeblocks / codeblocks-9999.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 WX_GTK_VER="3.0-gtk3"
7
8 inherit autotools subversion wxwidgets xdg-utils
9
10 DESCRIPTION="The open source, cross platform, free C, C++ and Fortran IDE"
11 HOMEPAGE="http://www.codeblocks.org/"
12 LICENSE="GPL-3"
13 SLOT="0"
14 KEYWORDS=""
15 SRC_URI=""
16 ESVN_REPO_URI="svn://svn.code.sf.net/p/${PN}/code/trunk"
17 ESVN_FETCH_CMD="svn checkout --ignore-externals"
18
19 IUSE="contrib debug pch"
20
21 BDEPEND="virtual/pkgconfig"
22
23 RDEPEND="app-arch/zip
24         >=dev-libs/tinyxml-2.6.2-r3
25         >=dev-util/astyle-3.1-r2:0/3.1
26         x11-libs/wxGTK:${WX_GTK_VER}[X]
27         contrib? (
28                 app-admin/gamin
29                 app-text/hunspell
30                 dev-libs/boost:=
31         )"
32
33 DEPEND="${RDEPEND}"
34
35 PATCHES=( "${FILESDIR}"/codeblocks-17.12-nodebug.diff )
36
37 src_prepare() {
38         default
39         # Let's make the autorevision work.
40         subversion_wc_info
41         CB_LCD=$(LC_ALL=C svn info "${ESVN_WC_PATH}" | grep "^Last Changed Date:" | cut -d" " -f4,5)
42         echo "m4_define([SVN_REV], ${ESVN_WC_REVISION})" > revision.m4
43         echo "m4_define([SVN_DATE], ${CB_LCD})" >> revision.m4
44         eautoreconf
45 }
46
47 src_configure() {
48         setup-wxwidgets
49
50         econf \
51                 --disable-static \
52                 $(use_enable debug) \
53                 $(use_enable pch) \
54                 $(use_with contrib contrib-plugins all)
55 }
56
57 pkg_postinst() {
58         elog "The Symbols Browser is disabled due to it causing crashes."
59         elog "For more information see https://sourceforge.net/p/codeblocks/tickets/225/"
60
61         xdg_desktop_database_update
62         xdg_icon_cache_update
63         xdg_mimeinfo_database_update
64 }
65
66 pkg_postrm() {
67         xdg_desktop_database_update
68         xdg_icon_cache_update
69         xdg_mimeinfo_database_update
70 }