Diff lazarus-2.2.0 with a lazarus-2.2.4-r1

/usr/portage/dev-lang/lazarus/lazarus-2.2.4-r1.ebuild 2023-10-09 14:52:29.464368349 +0300
1
# Copyright 1999-2022 Gentoo Authors
1
# Copyright 1999-2023 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4 4
EAPI=8
......
9 9
# changes in FPCVER. It *does* change between minor versions of lazarus.
10 10
FPCVER="3.2.2"
11 11

  
12
DESCRIPTION="Lazarus IDE is a feature rich visual programming environment emulating Delphi"
12
DESCRIPTION="feature rich visual programming environment emulating Delphi"
13 13
HOMEPAGE="https://www.lazarus-ide.org/"
14
SRC_URI="https://sourceforge.net/projects/${PN}/files/Lazarus%20Zip%20_%20GZip/Lazarus%20${PV}/${P}-0.tar.gz"
14
SRC_URI="mirror://sourceforge/lazarus/${P}-0.tar.gz https://dev.gentoo.org/~amynka/snap/${P}-makefile.patch.bz2"
15 15

  
16 16
LICENSE="GPL-2 LGPL-2.1-with-linking-exception"
17
SLOT="0" # Note: Slotting Lazarus needs slotting fpc, see DEPEND.
17
SLOT="0/2.2" # Note: Slotting Lazarus needs slotting fpc, see DEPEND.
18 18
KEYWORDS="~amd64 ~x86"
19
IUSE="minimal"
19
IUSE="gtk2 +gui extras"
20
REQUIRED_USE="gtk2? ( gui ) extras? ( gui )"
20 21

  
21
DEPEND=">=dev-lang/fpc-${FPCVER}[source]
22
	net-misc/rsync
23
	x11-libs/gtk+:2
24
	>=sys-devel/binutils-2.19.1-r1:="
22
# Pascal ignores CFLAGS and does its own stripping. Nothing else can be done about it.
23
QA_FLAGS_IGNORED="
24
/usr/share/lazarus/startlazarus \
25
/usr/share/lazarus/lazarus \
26
/usr/share/lazarus/tools/lazres \
27
/usr/share/lazarus/tools/lrstolfm \
28
/usr/share/lazarus/tools/updatepofiles \
29
/usr/share/lazarus/tools/svn2revisioninc \
30
/usr/share/lazarus/lazbuild \
31
/usr/share/lazarus/components/chmhelp/lhelp/lhelp"
32

  
33
QA_PRESTRIPPED=${QA_FLAGS_IGNORED}
34

  
35
DEPEND="
36
	>=dev-lang/fpc-${FPCVER}[source]
37
	>=sys-devel/binutils-2.19.1-r1:=
38
	gui? (
39
	    !gtk2? ( dev-libs/libqt5pas:0/2.2 )
40
	    gtk2? ( x11-libs/gtk+:2 )
41
)"
42
BDEPEND="net-misc/rsync"
25 43
RDEPEND="${DEPEND}"
26 44

  
27 45
RESTRICT="strip" #269221
28 46

  
29 47
S="${WORKDIR}/${PN}"
30 48

  
31
PATCHES=( "${FILESDIR}"/${PN}-0.9.26-fpcsrc.patch )
49
PATCHES=(
50
	"${WORKDIR}/${P}"-makefile.patch
51
	"${FILESDIR}"/${PN}-0.9.26-fpcsrc.patch )
32 52

  
33 53
src_prepare() {
34 54
	default
......
44 64
src_compile() {
45 65
	# TODO: Change to LCL_PLATFORM=qt5?
46 66
	# bug #732758
47
	LCL_PLATFORM=gtk2 emake \
48
		$(usex minimal "" "bigide") \
49
		-j1
67
	if ( use gui ) && ( use !gtk2 ) ; then
68
		export LCL_PLATFORM=qt5
69
	fi
70
	use gtk2 && export LCL_PLATFORM=gtk2
71
	if ( use gui ) ; then
72
		emake all $(usex extras "bigide lhelp" "") -j1 || die "make failed!"
73
	else
74
		emake lazbuild -j1 || die "make failed!"
75
	fi
50 76
}
51 77

  
52 78
src_install() {
......
68 94
		"${S}" "${ED}"/usr/share \
69 95
		|| die "Unable to copy files!"
70 96

  
71
	dosym ../share/lazarus/startlazarus /usr/bin/startlazarus
72
	dosym ../share/lazarus/startlazarus /usr/bin/lazarus
97
	if ( use gui ) ; then
98
		dosym ../share/lazarus/startlazarus /usr/bin/startlazarus
99
		dosym ../share/lazarus/startlazarus /usr/bin/lazarus
100
	fi
73 101
	dosym ../share/lazarus/lazbuild /usr/bin/lazbuild
74
	use minimal || dosym ../share/lazarus/components/chmhelp/lhelp/lhelp /usr/bin/lhelp
102
	use extras && dosym ../share/lazarus/components/chmhelp/lhelp/lhelp /usr/bin/lhelp
75 103
	dosym ../lazarus/images/ide_icon48x48.png /usr/share/pixmaps/lazarus.png
76 104

  
77
	make_desktop_entry startlazarus "Lazarus IDE" "lazarus"
105
	use gui && make_desktop_entry startlazarus "Lazarus IDE" "lazarus"
78 106
}
Thank you!