summaryrefslogtreecommitdiff
path: root/dev-lang/lazarus/lazarus-0.9.20-r1.ebuild
Unidiff
Diffstat (limited to 'dev-lang/lazarus/lazarus-0.9.20-r1.ebuild') (more/less context) (ignore whitespace changes)
-rw-r--r--dev-lang/lazarus/lazarus-0.9.20-r1.ebuild77
1 files changed, 77 insertions, 0 deletions
diff --git a/dev-lang/lazarus/lazarus-0.9.20-r1.ebuild b/dev-lang/lazarus/lazarus-0.9.20-r1.ebuild
new file mode 100644
index 0000000..d8c91e4
--- a/dev/null
+++ b/dev-lang/lazarus/lazarus-0.9.20-r1.ebuild
@@ -0,0 +1,77 @@
1# Copyright 1999-2007 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/dev-lang/lazarus/lazarus-0.9.20-r1.ebuild,v 1.3 2007/04/01 11:39:48 truedfx Exp $
4
5inherit eutils
6
7FPCVER="2.0.4"
8
9SLOT="0" # Note: Slotting Lazarus needs slotting fpc, see DEPEND.
10LICENSE="GPL-2 LGPL-2.1 LGPL-2.1-linking-exception"
11KEYWORDS="~amd64 ~ppc ~x86"
12DESCRIPTION="Lazarus IDE is a feature rich visual programming environment emulating Delphi."
13HOMEPAGE="http://www.lazarus.freepascal.org/"
14IUSE=""
15SRC_URI="mirror://sourceforge/lazarus/${P}-0.tar.gz"
16
17DEPEND="~dev-lang/fpc-${FPCVER}
18 net-misc/rsync
19 >=x11-libs/gtk+-2.0"
20
21S=${WORKDIR}/${PN}
22
23pkg_setup() {
24 if ! built_with_use "dev-lang/fpc" source; then
25 eerror "You need to build dev-lang/fpc with the 'source' USE flag"
26 eerror "in order for lazarus to work properly."
27 die "lazarus needs fpc built with the 'source' USE to work."
28 fi
29}
30
31src_unpack() {
32 # check for broken fpc.cfg
33 # don't check in pkg_setup since it won't harm binpkgs
34 if grep -q '^[ ]*-Fu.*/lcl$' /etc/fpc.cfg
35 then
36 eerror "Your /etc/fpc.cfg automatically adds a LCL directory"
37 eerror "to the list of unit directories. This will break the"
38 eerror "build of lazarus."
39 die "don't set the LCL path in /etc/fpc.cfg"
40 fi
41
42 unpack ${A}
43 sed -e "s/@FPCVER@/${FPCVER}/" "${FILESDIR}"/${P}-fpcsrc.patch \
44 > "${T}"/fpcsrc.patch || die "could not sed fpcsrc patch"
45
46 cd "${S}"
47 epatch "${FILESDIR}"/${P}-lclintf.patch
48 epatch "${FILESDIR}"/${P}-lcl-handle.patch
49 epatch "${T}"/fpcsrc.patch
50}
51
52src_compile() {
53 LCL_PLATFORM=gtk2 emake -j1 || die "make failed!"
54}
55
56src_install() {
57 diropts -m0755
58 dodir /usr/share
59 # Using rsync to avoid unnecessary copies and cleaning...
60 # Note: *.o and *.ppu are needed
61 rsync -a \
62 --exclude="CVS" --exclude=".cvsignore" \
63 --exclude="*.ppw" --exclude="*.ppl" \
64 --exclude="*.ow" --exclude="*.a"\
65 --exclude="*.rst" --exclude=".#*" \
66 --exclude="*.~*" --exclude="*.bak" \
67 --exclude="*.orig" --exclude="*.rej" \
68 --exclude=".xvpics" --exclude="*.compiled" \
69 --exclude="killme*" --exclude=".gdb_hist*" \
70 "${S}" "${D}"usr/share \
71 || die "Unable to copy files!"
72
73 dosym ../share/lazarus/startlazarus /usr/bin/startlazarus
74 dosym ../lazarus/images/mainicon.xpm /usr/share/pixmaps/lazarus.xpm
75
76 make_desktop_entry startlazarus "Lazarus IDE" "lazarus.xpm" || die "Failed making desktop entry!"
77}