commit:     0d0a3c4df07778110309e721003fb90de4398297
Author:     Chris Mayo <aklhfex <AT> gmail <DOT> com>
AuthorDate: Thu Nov 16 19:27:12 2017 +0000
Commit:     Jonas Stein <jstein <AT> gentoo <DOT> org>
CommitDate: Thu Nov 16 22:10:20 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0d0a3c4d

app-editors/scite: Tidy ebuild

- eutils.eclass not needed
- one sed not two for gtk/makefile
- consistent sed paths and error messages
- Encoding now removed from desktop file
- ensure variable declared in src_compile is local
- dodir's in src_install not needed

Closes: https://bugs.gentoo.org/637518

Package-Manager: Portage-2.3.13, Repoman-2.3.3

 app-editors/scite/scite-4.0.2.ebuild | 43 +++++++++++++++---------------------
 1 file changed, 18 insertions(+), 25 deletions(-)

diff --git a/app-editors/scite/scite-4.0.2.ebuild 
b/app-editors/scite/scite-4.0.2.ebuild
index e8a034593e4..0134016bc35 100644
--- a/app-editors/scite/scite-4.0.2.ebuild
+++ b/app-editors/scite/scite-4.0.2.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=6
 
-inherit toolchain-funcs eutils flag-o-matic gnome2-utils xdg-utils
+inherit toolchain-funcs flag-o-matic gnome2-utils xdg-utils
 
 MY_PV=${PV//./}
 DESCRIPTION="A very powerful, highly configurable, small editor with syntax
@@ -35,25 +35,10 @@ src_prepare() {
                -e "s#^CC =\(.*\)#CC = $(tc-getCXX)#" \
                -e "s#^CCOMP =\(.*\)#CCOMP = $(tc-getCC)#" \
                -e "s#-Os##" \
-               || die "error patching /scintilla/gtk/makefile"
-
-       sed -i "${WORKDIR}/scite/gtk/makefile" \
-               -e "s#-rdynamic#-rdynamic ${LDFLAGS}#" \
-               || die "error patching /scite/gtk/makefile"
-
-       #  add the ebuild suffix as shell type for working with ebuilds
-       sed -i "${WORKDIR}/scite/src/perl.properties" \
-               -e "s#\*.sh;\*.bsh;#\*.ebuild;\*.sh;\*.bsh;#" \
-               || die "error patching /scite/src/perl.prperties"
-
-       # repair and enhance the .desktop file
-       sed -i "${WORKDIR}/scite/gtk/SciTE.desktop" \
-               -e "s/^Encoding/#Encoding/" \
-               -e "s#text/plain#text/\*;application/xhtml+xml#" \
-               -e "s#^Categories=\(.*\)#Categories=Development;#" \
-               || die "error patching /scite/gtk/SciTe.desktop"
+               || die "error patching scintilla/gtk/makefile"
 
        sed -i "${S}/makefile" \
+               -e "s#-rdynamic#-rdynamic ${LDFLAGS}#" \
                -e 's#usr/local#usr#g' \
                -e 's#/gnome/apps/Applications#/applications#' \
                -e "s#^CXXFLAGS=#CXXFLAGS=${CXXFLAGS} #" \
@@ -63,7 +48,18 @@ src_prepare() {
                -e 's#${D}##' \
                -e 's#-g root#-g 0#' \
                -e "s#-Os##" \
-               || die "error patching gtk/makefile"
+               || die "error patching scite/gtk/makefile"
+
+       # repair and enhance the .desktop file
+       sed -i "${S}/SciTE.desktop" \
+               -e "s#text/plain#text/\*;application/xhtml+xml#" \
+               -e "s#^Categories=\(.*\)#Categories=Development;#" \
+               || die "error patching scite/gtk/SciTe.desktop"
+
+       #  add the ebuild suffix as shell type for working with ebuilds
+       sed -i "${WORKDIR}/scite/src/perl.properties" \
+               -e "s#\*.sh;\*.bsh;#\*.ebuild;\*.sh;\*.bsh;#" \
+               || die "error patching scite/src/perl.properties"
 
        # it seems that pwd here is ${S}, but user patches are relative to 
${workdir}
        # Bug #576162
@@ -74,10 +70,10 @@ src_prepare() {
 
 src_compile() {
        # prepare make options
-       emake_pars="GTK3=1"
+       local emake_pars="GTK3=1"
        if ! use lua; then
                emake_pars+=" NO_LUA=1"
-       fi;
+       fi
 
        emake CC="$(tc-getCC)" LD="$(tc-getLD)" \
                        LDFLAGS="$(raw-ldflags)" AR="$(tc-getAR)" \
@@ -86,14 +82,11 @@ src_compile() {
 }
 
 src_install() {
-       dodir /usr/bin
-       dodir /usr/share/{pixmaps,applications}
-
        emake DESTDIR="${ED}" install
 
        # we have to keep this because otherwise it'll break upgrading
        mv "${ED}/usr/bin/SciTE" "${ED}/usr/bin/scite" || die
-       dosym "scite" "/usr/bin/SciTE"
+       dosym scite /usr/bin/SciTE
 
        doman ../doc/scite.1
        dodoc ../README

Reply via email to