dev-qt/qtxml: stable 5.14.2 for ppc, bug #719732
[gentoo.git] / dev-lang / lazarus / lazarus-1.0.12.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 inherit eutils
7
8 RESTRICT="strip" #269221
9
10 FPCVER="2.6.0"
11
12 SLOT="0" # Note: Slotting Lazarus needs slotting fpc, see DEPEND.
13 LICENSE="GPL-2 LGPL-2.1-with-linking-exception"
14 KEYWORDS="amd64 x86"
15 DESCRIPTION="Lazarus IDE is a feature rich visual programming environment emulating Delphi"
16 HOMEPAGE="https://www.lazarus-ide.org/"
17 IUSE="minimal"
18 SRC_URI="https://downloads.sourceforge.net/project/${PN}/Lazarus%20Zip%20_%20GZip/Lazarus%20${PV}/${PN}-${PV}-0.tar.gz"
19
20 DEPEND=">=dev-lang/fpc-${FPCVER}[source]
21         net-misc/rsync
22         x11-libs/gtk+:2"
23 RDEPEND="${DEPEND}
24         !=gnome-base/librsvg-2.16.1"
25 DEPEND="${DEPEND}
26         >=sys-devel/binutils-2.19.1-r1"
27
28 S=${WORKDIR}/${PN}
29
30 src_prepare() {
31         epatch "${FILESDIR}"/${PN}-0.9.26-fpcsrc.patch
32
33         # Use default configuration (minus stripping) unless specifically requested otherwise
34         if ! test ${PPC_CONFIG_PATH+set} ; then
35                 local FPCVER=$(fpc -iV)
36                 export PPC_CONFIG_PATH="${WORKDIR}"
37                 sed -e 's/^FPBIN=/#&/' /usr/lib/fpc/${FPCVER}/samplecfg |
38                         sh -s /usr/lib/fpc/${FPCVER} "${PPC_CONFIG_PATH}" || die
39                 #sed -i -e '/^-Xs/d' "${PPC_CONFIG_PATH}"/fpc.cfg || die
40         fi
41 }
42
43 src_compile() {
44         LCL_PLATFORM=gtk2 emake \
45                 $(usex minimal "" "bigide") \
46                 -j1
47 }
48
49 src_install() {
50         diropts -m0755
51         dodir /usr/share
52         # Using rsync to avoid unnecessary copies and cleaning...
53         # Note: *.o and *.ppu are needed
54         rsync -a \
55                 --exclude="CVS"     --exclude=".cvsignore" \
56                 --exclude="*.ppw"   --exclude="*.ppl" \
57                 --exclude="*.ow"    --exclude="*.a"\
58                 --exclude="*.rst"   --exclude=".#*" \
59                 --exclude="*.~*"    --exclude="*.bak" \
60                 --exclude="*.orig"  --exclude="*.rej" \
61                 --exclude=".xvpics" --exclude="*.compiled" \
62                 --exclude="killme*" --exclude=".gdb_hist*" \
63                 --exclude="debian"  --exclude="COPYING*" \
64                 --exclude="*.app" \
65                 "${S}" "${ED%/}"/usr/share \
66         || die "Unable to copy files!"
67
68         dosym ../share/lazarus/startlazarus /usr/bin/startlazarus
69         dosym ../share/lazarus/startlazarus /usr/bin/lazarus
70         dosym ../share/lazarus/lazbuild /usr/bin/lazbuild
71         use minimal || dosym ../share/lazarus/components/chmhelp/lhelp/lhelp /usr/bin/lhelp
72         dosym ../lazarus/images/ide_icon48x48.png /usr/share/pixmaps/lazarus.png
73
74         make_desktop_entry startlazarus "Lazarus IDE" "lazarus" || die "Failed making desktop entry!"
75 }