Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 8442 - consed would be cool
Summary: consed would be cool
Status: RESOLVED WONTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All All
: High enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-09-26 21:44 UTC by SpanKY
Modified: 2011-10-30 22:38 UTC (History)
3 users (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 SpanKY gentoo-dev 2002-09-26 21:44:40 UTC
a kind of conditional sed would be nice to have ...

every once in a while ill have an ebuild that i want to use sed in to fix some 
makefile or config file ...
there are aspects i want to change everytime, other aspects i want to change 
only sometimes ...

EXAMPLE:
cvsup has hardcoded paths to /usr/local and has optional support for X and 
opengl gui frontends

CURRENT CODE:
seduse() { [ -z "`use ${1}`" ] && echo "${2}" || echo ":" }
src_compile() {
sed -e "s:/usr/local:${EZM3_INSTALL}:" \
    -e "s:touch:ranlib:" \
    -e "s:`seduse X 'import_X11():dont_import_X11()'`:" \
    -e "s:`seduse opengl 'import_OpenGL():dont_import_OpenGL()'`:" \
                COMMON.old > COMMON
}

FUTURE CODE:
src_compile() {
consed -e "s:/usr/local:${EZM3_INSTALL}:" \
       -e "s:touch:ranlib:" \
       X?      ( -e "s:import_X11():dont_import_X11():" ) \
       opengl? ( -e "s:import_OpenGL():dont_import_OpenGL():" ) \
                COMMON.old > COMMON
}
Comment 1 SpanKY gentoo-dev 2004-03-05 06:28:18 UTC
in all the ebuilds ive written/modified ive seen this needed like twice ... i.e. it isnt a useful idea