1 |
commit: 265b3743f96bba9b983f75f28c089247c1e5e47b |
2 |
Author: Horea Christian <horea.christ <AT> yandex <DOT> com> |
3 |
AuthorDate: Sat Sep 22 13:22:55 2018 +0000 |
4 |
Commit: Amy Liffey <amynka <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Sep 23 15:24:32 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=265b3743 |
7 |
|
8 |
dev-lang/lazarus: improved configuration file management |
9 |
|
10 |
Closes: https://github.com/gentoo/gentoo/pull/9945 |
11 |
Signed-off-by: Amy Liffey <amynka <AT> gentoo.org> |
12 |
Signed-off-by: Horea Christian <horea.christ <AT> gmail.com> |
13 |
|
14 |
Package-Manager: Portage-2.3.49, Repoman-2.3.10 |
15 |
|
16 |
dev-lang/lazarus/lazarus-1.8.4-r2.ebuild | 106 +++++++++++++++++++++++++++++++ |
17 |
1 file changed, 106 insertions(+) |
18 |
|
19 |
diff --git a/dev-lang/lazarus/lazarus-1.8.4-r2.ebuild b/dev-lang/lazarus/lazarus-1.8.4-r2.ebuild |
20 |
new file mode 100644 |
21 |
index 00000000000..6f45f4efce0 |
22 |
--- /dev/null |
23 |
+++ b/dev-lang/lazarus/lazarus-1.8.4-r2.ebuild |
24 |
@@ -0,0 +1,106 @@ |
25 |
+# Copyright 1999-2018 Gentoo Foundation |
26 |
+# Distributed under the terms of the GNU General Public License v2 |
27 |
+ |
28 |
+EAPI=6 |
29 |
+ |
30 |
+inherit desktop |
31 |
+ |
32 |
+FPCVER="3.0.4" |
33 |
+PYTHON_HASH="586eec1a5ea609ef9df2bf586be06825d9fbd50f" |
34 |
+ |
35 |
+DESCRIPTION="Lazarus IDE is a feature rich visual programming environment emulating Delphi" |
36 |
+HOMEPAGE="https://www.lazarus-ide.org/" |
37 |
+SRC_URI=" |
38 |
+ python? ( https://github.com/Alexey-T/Python-for-Lazarus/archive/${PYTHON_HASH}.tar.gz ->\ |
39 |
+ ${P}-python.tar.gz ) |
40 |
+ https://sourceforge.net/projects/${PN}/files/Lazarus%20Zip%20_%20GZip/Lazarus%20${PV}/${P}.tar.gz" |
41 |
+ |
42 |
+LICENSE="GPL-2 LGPL-2.1-with-linking-exception" |
43 |
+SLOT="0" # Note: Slotting Lazarus needs slotting fpc, see DEPEND. |
44 |
+KEYWORDS="~amd64 ~x86" |
45 |
+IUSE="minimal python" |
46 |
+ |
47 |
+DEPEND=">=dev-lang/fpc-${FPCVER}[source] |
48 |
+ net-misc/rsync |
49 |
+ x11-libs/gtk+:2 |
50 |
+ >=sys-devel/binutils-2.19.1-r1:=" |
51 |
+RDEPEND="${DEPEND}" |
52 |
+ |
53 |
+RESTRICT="strip" #269221 |
54 |
+ |
55 |
+S="${WORKDIR}/${PN}" |
56 |
+ |
57 |
+PATCHES=( "${FILESDIR}"/${PN}-0.9.26-fpcsrc.patch ) |
58 |
+ |
59 |
+src_prepare() { |
60 |
+ default |
61 |
+ # Use default configuration (minus stripping) unless specifically requested otherwise |
62 |
+ if ! test ${PPC_CONFIG_PATH+set} ; then |
63 |
+ local FPCVER=$(fpc -iV) |
64 |
+ export PPC_CONFIG_PATH="${WORKDIR}" |
65 |
+ sed -e 's/^FPBIN=/#&/' /usr/lib/fpc/${FPCVER}/samplecfg | |
66 |
+ sh -s /usr/lib/fpc/${FPCVER} "${PPC_CONFIG_PATH}" || die |
67 |
+ fi |
68 |
+ sed -i \ |
69 |
+ -e "s;SecondaryConfigPath:='/etc/lazarus';SecondaryConfigPath:=ExpandFileNameUTF8('~/.lazarus');g" \ |
70 |
+ -e "s;PrimaryConfigPath:=ExpandFileNameUTF8('~/.lazarus');PrimaryConfigPath:='/etc/lazarus';g" \ |
71 |
+ ide/include/unix/lazbaseconf.inc \ |
72 |
+ || die |
73 |
+} |
74 |
+ |
75 |
+src_compile() { |
76 |
+ LCL_PLATFORM=gtk2 emake \ |
77 |
+ $(usex minimal "" "bigide") \ |
78 |
+ -j1 |
79 |
+ if use python; then |
80 |
+ addpredict ide/exttools.pas |
81 |
+ ./lazbuild -B --lazarusdir="." --pcp="../lazarus-package-config" --build-ide= \ |
82 |
+ --add-package ../Python-for-Lazarus-${PYTHON_HASH}/python4lazarus/python4lazarus_package.lpk \ |
83 |
+ || die |
84 |
+ sed -i -e "s:${WORKDIR}/Python-for-Lazarus-${PYTHON_HASH}:/etc/lazarus:g" \ |
85 |
+ ../lazarus-package-config/packagefiles.xml \ |
86 |
+ ../lazarus-package-config/idemake.cfg \ |
87 |
+ ../Python-for-Lazarus-${PYTHON_HASH}/python4lazarus/lib/x86_64-linux/python4lazarus_package.compiled \ |
88 |
+ || die |
89 |
+ sed -i -e "s:${WORKDIR}/lazarus-package-config:/etc/lazarus:g" \ |
90 |
+ ../lazarus-package-config/idemake.cfg \ |
91 |
+ || die |
92 |
+ fi |
93 |
+} |
94 |
+ |
95 |
+src_install() { |
96 |
+ diropts -m0755 |
97 |
+ dodir /usr/share |
98 |
+ # Using rsync to avoid unnecessary copies and cleaning... |
99 |
+ # Note: *.o and *.ppu are needed |
100 |
+ rsync -a \ |
101 |
+ --exclude="CVS" --exclude=".cvsignore" \ |
102 |
+ --exclude="*.ppw" --exclude="*.ppl" \ |
103 |
+ --exclude="*.ow" --exclude="*.a"\ |
104 |
+ --exclude="*.rst" --exclude=".#*" \ |
105 |
+ --exclude="*.~*" --exclude="*.bak" \ |
106 |
+ --exclude="*.orig" --exclude="*.rej" \ |
107 |
+ --exclude=".xvpics" --exclude="*.compiled" \ |
108 |
+ --exclude="killme*" --exclude=".gdb_hist*" \ |
109 |
+ --exclude="debian" --exclude="COPYING*" \ |
110 |
+ --exclude="*.app" \ |
111 |
+ "${S}" "${ED%/}"/usr/share \ |
112 |
+ || die "Unable to copy files!" |
113 |
+ |
114 |
+ dosym ../share/lazarus/startlazarus /usr/bin/startlazarus |
115 |
+ dosym ../share/lazarus/startlazarus /usr/bin/lazarus |
116 |
+ dosym ../share/lazarus/lazbuild /usr/bin/lazbuild |
117 |
+ use minimal || dosym ../share/lazarus/components/chmhelp/lhelp/lhelp /usr/bin/lhelp |
118 |
+ dosym ../lazarus/images/ide_icon48x48.png /usr/share/pixmaps/lazarus.png |
119 |
+ |
120 |
+ if use python; then |
121 |
+ diropts -m0755 |
122 |
+ dodir /etc/lazarus |
123 |
+ cp -rf ../lazarus-package-config/* \ |
124 |
+ "${ED%/}"/etc/lazarus || die |
125 |
+ cp -rf ../Python-for-Lazarus-${PYTHON_HASH}/python4lazarus \ |
126 |
+ "${ED%/}"/etc/lazarus || die |
127 |
+ fi |
128 |
+ |
129 |
+ make_desktop_entry startlazarus "Lazarus IDE" "lazarus" |
130 |
+} |