Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 576162 - app-editors/scite add epatch_user
Summary: app-editors/scite add epatch_user
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Ervin Peters
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-01 20:59 UTC by Chris Mayo
Modified: 2017-11-17 09:17 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Mayo 2016-03-01 20:59:08 UTC
Useful for setting global properties and customising language styling.
Comment 1 Ervin Peters 2016-03-20 20:40:53 UTC
I interpret this as suggestion to invoke epatch_user at the end of src_prepare, like this:

src_prepare() {
  cd "${WORKDIR}/scintilla/gtk"
  sed -i makefile \
    -e "s#^CXXFLAGS=#CXXFLAGS=${CXXFLAGS} #" \
    -e "s#^\(CXXFLAGS=.*\)-Os#\1#" \
    -e "s#^CC =\(.*\)#CC = $(tc-getCXX)#" \
    -e "s#^CCOMP =\(.*\)#CCOMP = $(tc-getCC)#" \
    -e "s#-Os##" \
  || die "error patching makefile"

  cd "${WORKDIR}/scite/gtk"
  sed -i makefile \
    -e "s#-rdynamic#-rdynamic ${LDFLAGS}#" \
  || die "error patching makefile"

  cd "${S}"
  sed -i makefile \
    -e 's#usr/local#usr#g' \
    -e 's#/gnome/apps/Applications#/applications#' \
    -e "s#^CXXFLAGS=#CXXFLAGS=${CXXFLAGS} #" \
    -e "s#^\(CXXFLAGS=.*\)-Os#\1#" \
    -e "s#^CC =\(.*\)#CC = $(tc-getCXX)#" \
    -e "s#^CCOMP =\(.*\)#CCOMP = $(tc-getCC)#" \
    -e 's#${D}##' \
    -e 's#-g root#-g 0#' \
    -e "s#-Os##" \
    || die "error patching makefile"

    epatch_user # suggested in bug #576162
}

Alright?

I'd like to provide it with the 3.6.4 ebuild.

ervin
Comment 2 Chris Mayo 2016-05-05 19:45:42 UTC
Made sense but when I actually tried the new 3.6.5 ebuild found I couldn't get it to work because S="${WORKDIR}/${PN}/gtk" and relative to that directory the file I want to patch is ../src/python.properties.

I found that changing src_prepare to:
	cd "${WORKDIR}"
	eapply_user

worked for me. (unless there is a way to set the patch file path for sibling directories?)
Comment 3 Ervin Peters 2016-05-16 16:53:08 UTC
applied in suggested scite-3.6.5-r1 ( bug #583204 )

ervin
Comment 4 Chris Mayo 2016-07-22 19:07:46 UTC
Don't think cd "${WORKDIR}" made it into the tree with scite-3.6.5-r1.
Comment 5 Ervin Peters 2016-09-12 07:10:19 UTC
(In reply to Chris Mayo from comment #4)
> Don't think cd "${WORKDIR}" made it into the tree with scite-3.6.5-r1.

Which directory does eapply_user expect?
Comment 6 Chris Mayo 2016-09-12 19:00:31 UTC
eapply_user is operating in the current directory, $S for src_prepare.

eapply_user doesn't take any arguments leaving the use of cd, or else going back to defining $S as "${WORKDIR}/${PN}".
Comment 7 Ervin Peters 2017-11-17 09:17:26 UTC
cd "${WORKDIR}"
eapply_user

made it in the current 4.0.2 ebuild, too

${WORKDIR} as cwd makes sense, because it allows to patch scintilla too, the basic component - although one might want to patch only scite from ${WORKDIR}/scite as mentioned at the bottom here:

https://github.com/gentoo/gentoo/pull/6190

I'd like to close this bug for now as resolved.

Thanks to chris.

If there is an idea for a better solution, reopen it.

Ervin