Diff codeblocks-20.03-r6 with a codeblocks-9999

/usr/portage/dev-util/codeblocks/codeblocks-9999.ebuild 2025-02-03 17:39:32.914667227 +0300
1
# Copyright 1999-2024 Gentoo Authors
1
# Copyright 1999-2025 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4 4
EAPI=8
5 5

  
6
WX_GTK_VER="3.0-gtk3"
6
WX_GTK_VER="3.2-gtk3"
7 7

  
8
inherit autotools flag-o-matic wxwidgets xdg
8
inherit autotools flag-o-matic multiprocessing subversion wxwidgets xdg
9 9

  
10 10
DESCRIPTION="The open source, cross platform, free C, C++ and Fortran IDE"
11 11
HOMEPAGE="https://www.codeblocks.org/"
12
SRC_URI="https://downloads.sourceforge.net/${PN}/${P}.tar.xz
13
	https://dev.gentoo.org/~leio/distfiles/${P}-fortran.tar.xz
14
	https://dev.gentoo.org/~leio/distfiles/${P}-fortran-update-v1.7.tar.xz
15
	https://dev.gentoo.org/~leio/distfiles/${P}-fortran-update-v1.8.tar.xz
16
	https://dev.gentoo.org/~leio/distfiles/${P}-codecompletion-symbolbrowser-update.tar.xz
17
"
18

  
19 12
LICENSE="GPL-3"
20 13
SLOT="0"
21
KEYWORDS="amd64 ~ppc x86"
22

  
23
# USE="fortran" enables FortranProject plugin (updated to v1.8 2021-05-29 [r230])
24
# that is delivered with Code::Blocks 20.03 source code.
25
# https://sourceforge.net/projects/fortranproject
26
# https://cbfortran.sourceforge.io
14
ESVN_REPO_URI="svn://svn.code.sf.net/p/${PN}/code/trunk"
15
ESVN_FETCH_CMD="svn checkout --ignore-externals"
16
ESVN_UPDATE_CMD="svn update --ignore-externals"
27 17

  
28
IUSE="contrib debug fortran"
18
IUSE="contrib debug"
29 19

  
30 20
BDEPEND="virtual/pkgconfig"
31 21

  
32 22
RDEPEND="app-arch/zip
33 23
	dev-libs/glib:2
34 24
	>=dev-libs/tinyxml-2.6.2-r3
35
	>=dev-util/astyle-3.1-r2:0/3.1
25
	>=dev-util/astyle-3.1-r2:0=
36 26
	x11-libs/gtk+:3
37 27
	x11-libs/wxGTK:${WX_GTK_VER}[X]
38 28
	contrib? (
39
		app-admin/gamin
40 29
		app-arch/bzip2
41 30
		app-text/hunspell:=
42 31
		dev-libs/boost:=
43
		dev-libs/libgamin
44 32
		media-libs/fontconfig
45 33
		sys-libs/zlib
46 34
	)"
47 35

  
48
DEPEND="${RDEPEND}
49
	x11-base/xorg-proto"
36
DEPEND="
37
	${RDEPEND}
38
	x11-base/xorg-proto
39
"
50 40

  
51
PATCHES=(
52
	"${FILESDIR}"/${P}-env.patch
53
	"${WORKDIR}"/patches/
54
	)
41
PATCHES=( "${FILESDIR}/${P}-nodebug.diff" )
55 42

  
56 43
src_prepare() {
57 44
	default
58
	# Force to use bundled Squirrel-3.1 (patched version is used by upstream) due to it's API was changed
59
	sed -i '/PKG_CHECK_MODULES(\[SQUIRREL\]/c\HAVE_SQUIRREL=no' configure.ac || die # Bug 884601
45
	# Let's make the autorevision work.
46
	subversion_wc_info
47
	CB_LCD=$(LC_ALL=C svn info "${ESVN_WC_PATH}" | grep "^Last Changed Date:" | cut -d" " -f4,5)
48
	echo "m4_define([SVN_REV], ${ESVN_WC_REVISION})" > revision.m4
49
	echo "m4_define([SVN_DATE], ${CB_LCD})" >> revision.m4
60 50
	eautoreconf
61 51
}
62 52

  
63 53
src_configure() {
64 54
	# Bug 858338
65 55
	append-flags -fno-strict-aliasing
56
	# Upstream issue: https://sourceforge.net/p/codeblocks/tickets/1512
57
	append-cxxflags -std=c++17
66 58

  
67 59
	setup-wxwidgets
68 60

  
69
	# USE="contrib -fortran" setup:
70
	use fortran || CONF_WITH_LST=$(use_with contrib contrib-plugins all,-FortranProject)
71
	# USE="contrib fortran" setup:
72
	use fortran && CONF_WITH_LST=$(use_with contrib contrib-plugins all)
73
	# USE="-contrib fortran" setup:
74
	use contrib || CONF_WITH_LST=$(use_with fortran contrib-plugins FortranProject)
75

  
76 61
	local myeconfargs=(
77 62
		--disable-pch
78
		$(use_with contrib boost-libdir "${ESYSROOT}/usr/$(get_libdir)")
63
		--disable-static
79 64
		$(use_enable debug)
80
		${CONF_WITH_LST}
65
		$(use_with contrib boost-libdir "${ESYSROOT}/usr/$(get_libdir)")
66
		$(use_with contrib contrib-plugins all)
81 67
	)
82 68

  
83 69
	econf "${myeconfargs[@]}"
84 70
}
85 71

  
72
src_compile() {
73
	if use contrib; then
74
		if (( $(get_makeopts_jobs) > 8 )); then
75
			emake -j8  # Bug 930819
76
		else
77
			emake
78
		fi
79
	else
80
		emake
81
	fi
82
}
83

  
86 84
src_install() {
87 85
	default
88 86
	find "${ED}" -type f -name '*.la' -delete || die
Thank you!