1 |
commit: 0d0a3c4df07778110309e721003fb90de4398297 |
2 |
Author: Chris Mayo <aklhfex <AT> gmail <DOT> com> |
3 |
AuthorDate: Thu Nov 16 19:27:12 2017 +0000 |
4 |
Commit: Jonas Stein <jstein <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Nov 16 22:10:20 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0d0a3c4d |
7 |
|
8 |
app-editors/scite: Tidy ebuild |
9 |
|
10 |
- eutils.eclass not needed |
11 |
- one sed not two for gtk/makefile |
12 |
- consistent sed paths and error messages |
13 |
- Encoding now removed from desktop file |
14 |
- ensure variable declared in src_compile is local |
15 |
- dodir's in src_install not needed |
16 |
|
17 |
Closes: https://bugs.gentoo.org/637518 |
18 |
|
19 |
Package-Manager: Portage-2.3.13, Repoman-2.3.3 |
20 |
|
21 |
app-editors/scite/scite-4.0.2.ebuild | 43 +++++++++++++++--------------------- |
22 |
1 file changed, 18 insertions(+), 25 deletions(-) |
23 |
|
24 |
diff --git a/app-editors/scite/scite-4.0.2.ebuild b/app-editors/scite/scite-4.0.2.ebuild |
25 |
index e8a034593e4..0134016bc35 100644 |
26 |
--- a/app-editors/scite/scite-4.0.2.ebuild |
27 |
+++ b/app-editors/scite/scite-4.0.2.ebuild |
28 |
@@ -3,7 +3,7 @@ |
29 |
|
30 |
EAPI=6 |
31 |
|
32 |
-inherit toolchain-funcs eutils flag-o-matic gnome2-utils xdg-utils |
33 |
+inherit toolchain-funcs flag-o-matic gnome2-utils xdg-utils |
34 |
|
35 |
MY_PV=${PV//./} |
36 |
DESCRIPTION="A very powerful, highly configurable, small editor with syntax |
37 |
@@ -35,25 +35,10 @@ src_prepare() { |
38 |
-e "s#^CC =\(.*\)#CC = $(tc-getCXX)#" \ |
39 |
-e "s#^CCOMP =\(.*\)#CCOMP = $(tc-getCC)#" \ |
40 |
-e "s#-Os##" \ |
41 |
- || die "error patching /scintilla/gtk/makefile" |
42 |
- |
43 |
- sed -i "${WORKDIR}/scite/gtk/makefile" \ |
44 |
- -e "s#-rdynamic#-rdynamic ${LDFLAGS}#" \ |
45 |
- || die "error patching /scite/gtk/makefile" |
46 |
- |
47 |
- # add the ebuild suffix as shell type for working with ebuilds |
48 |
- sed -i "${WORKDIR}/scite/src/perl.properties" \ |
49 |
- -e "s#\*.sh;\*.bsh;#\*.ebuild;\*.sh;\*.bsh;#" \ |
50 |
- || die "error patching /scite/src/perl.prperties" |
51 |
- |
52 |
- # repair and enhance the .desktop file |
53 |
- sed -i "${WORKDIR}/scite/gtk/SciTE.desktop" \ |
54 |
- -e "s/^Encoding/#Encoding/" \ |
55 |
- -e "s#text/plain#text/\*;application/xhtml+xml#" \ |
56 |
- -e "s#^Categories=\(.*\)#Categories=Development;#" \ |
57 |
- || die "error patching /scite/gtk/SciTe.desktop" |
58 |
+ || die "error patching scintilla/gtk/makefile" |
59 |
|
60 |
sed -i "${S}/makefile" \ |
61 |
+ -e "s#-rdynamic#-rdynamic ${LDFLAGS}#" \ |
62 |
-e 's#usr/local#usr#g' \ |
63 |
-e 's#/gnome/apps/Applications#/applications#' \ |
64 |
-e "s#^CXXFLAGS=#CXXFLAGS=${CXXFLAGS} #" \ |
65 |
@@ -63,7 +48,18 @@ src_prepare() { |
66 |
-e 's#${D}##' \ |
67 |
-e 's#-g root#-g 0#' \ |
68 |
-e "s#-Os##" \ |
69 |
- || die "error patching gtk/makefile" |
70 |
+ || die "error patching scite/gtk/makefile" |
71 |
+ |
72 |
+ # repair and enhance the .desktop file |
73 |
+ sed -i "${S}/SciTE.desktop" \ |
74 |
+ -e "s#text/plain#text/\*;application/xhtml+xml#" \ |
75 |
+ -e "s#^Categories=\(.*\)#Categories=Development;#" \ |
76 |
+ || die "error patching scite/gtk/SciTe.desktop" |
77 |
+ |
78 |
+ # add the ebuild suffix as shell type for working with ebuilds |
79 |
+ sed -i "${WORKDIR}/scite/src/perl.properties" \ |
80 |
+ -e "s#\*.sh;\*.bsh;#\*.ebuild;\*.sh;\*.bsh;#" \ |
81 |
+ || die "error patching scite/src/perl.properties" |
82 |
|
83 |
# it seems that pwd here is ${S}, but user patches are relative to ${workdir} |
84 |
# Bug #576162 |
85 |
@@ -74,10 +70,10 @@ src_prepare() { |
86 |
|
87 |
src_compile() { |
88 |
# prepare make options |
89 |
- emake_pars="GTK3=1" |
90 |
+ local emake_pars="GTK3=1" |
91 |
if ! use lua; then |
92 |
emake_pars+=" NO_LUA=1" |
93 |
- fi; |
94 |
+ fi |
95 |
|
96 |
emake CC="$(tc-getCC)" LD="$(tc-getLD)" \ |
97 |
LDFLAGS="$(raw-ldflags)" AR="$(tc-getAR)" \ |
98 |
@@ -86,14 +82,11 @@ src_compile() { |
99 |
} |
100 |
|
101 |
src_install() { |
102 |
- dodir /usr/bin |
103 |
- dodir /usr/share/{pixmaps,applications} |
104 |
- |
105 |
emake DESTDIR="${ED}" install |
106 |
|
107 |
# we have to keep this because otherwise it'll break upgrading |
108 |
mv "${ED}/usr/bin/SciTE" "${ED}/usr/bin/scite" || die |
109 |
- dosym "scite" "/usr/bin/SciTE" |
110 |
+ dosym scite /usr/bin/SciTE |
111 |
|
112 |
doman ../doc/scite.1 |
113 |
dodoc ../README |