diff options
author | Chris Mayo <aklhfex@gmail.com> | 2017-11-16 19:27:12 +0000 |
---|---|---|
committer | Jonas Stein <jstein@gentoo.org> | 2017-11-16 23:10:20 +0100 |
commit | 0d0a3c4df07778110309e721003fb90de4398297 (patch) | |
tree | 284cc4fe9a08734848cfa583cf1df28a9d3fe3bd /app-editors/scite | |
parent | dev-db/mariadb: stable 10.0.33 for ppc64, bug #637580 (diff) | |
download | gentoo-0d0a3c4df07778110309e721003fb90de4398297.tar.gz gentoo-0d0a3c4df07778110309e721003fb90de4398297.tar.bz2 gentoo-0d0a3c4df07778110309e721003fb90de4398297.zip |
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
Diffstat (limited to 'app-editors/scite')
-rw-r--r-- | app-editors/scite/scite-4.0.2.ebuild | 43 |
1 files 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 e8a034593e4b..0134016bc35c 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 |