author | Michael Krelin <hacker@klever.net> | 2007-04-06 14:03:06 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-04-06 14:03:06 (UTC) |
commit | cd399640d872975ce965ac65e8c681311cf7f4cc (patch) (unidiff) | |
tree | db74e87b6232fe106064de5501b42a340a630d78 /dev-lang/lazarus/lazarus-0.9.20-r1.ebuild | |
parent | 65cd37d7d8a0840a24f7a5dc2a946c594e56aa50 (diff) | |
download | misc-cd399640d872975ce965ac65e8c681311cf7f4cc.zip misc-cd399640d872975ce965ac65e8c681311cf7f4cc.tar.gz misc-cd399640d872975ce965ac65e8c681311cf7f4cc.tar.bz2 |
dev-lang/lazarus: imported from portage
Diffstat (limited to 'dev-lang/lazarus/lazarus-0.9.20-r1.ebuild') (more/less context) (show whitespace changes)
-rw-r--r-- | dev-lang/lazarus/lazarus-0.9.20-r1.ebuild | 77 |
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 | |||
5 | inherit eutils | ||
6 | |||
7 | FPCVER="2.0.4" | ||
8 | |||
9 | SLOT="0" # Note: Slotting Lazarus needs slotting fpc, see DEPEND. | ||
10 | LICENSE="GPL-2 LGPL-2.1 LGPL-2.1-linking-exception" | ||
11 | KEYWORDS="~amd64 ~ppc ~x86" | ||
12 | DESCRIPTION="Lazarus IDE is a feature rich visual programming environment emulating Delphi." | ||
13 | HOMEPAGE="http://www.lazarus.freepascal.org/" | ||
14 | IUSE="" | ||
15 | SRC_URI="mirror://sourceforge/lazarus/${P}-0.tar.gz" | ||
16 | |||
17 | DEPEND="~dev-lang/fpc-${FPCVER} | ||
18 | net-misc/rsync | ||
19 | >=x11-libs/gtk+-2.0" | ||
20 | |||
21 | S=${WORKDIR}/${PN} | ||
22 | |||
23 | pkg_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 | |||
31 | src_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 | |||
52 | src_compile() { | ||
53 | LCL_PLATFORM=gtk2 emake -j1 || die "make failed!" | ||
54 | } | ||
55 | |||
56 | src_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 | } | ||