Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 27535 - SDLcam-0.7.3 gcc 3.3 compile fix
Summary: SDLcam-0.7.3 gcc 3.3 compile fix
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: SpanKY
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-29 07:17 UTC by Thomas Weidner
Modified: 2003-09-09 21:38 UTC (History)
0 users

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 Thomas Weidner 2003-08-29 07:17:47 UTC
Hi,

i noticed that SDLcam uses multi line string literals and so gcc 3.3 won't
compile it any more. i fixed the ebuild bye adding the following code (applysed
is a utility function dosed _seems_ to do something different,is there sth. like
applysed in portage? if not,why?):

applysed() {
    local e="$1"
    shift
    local tmpfile=`mktemp`
    for x in "$@"; do
        if [ -w "$x" ]; then
            cp -f "$x" "$tmpfile"
            sed -e "$e" "$tmpfile" > "$x"
        fi
    done
    rm -f "$tmpfile"
}

src_unpack() {
    unpack ${A}
    #gcc 3.3 compile fix
    applysed '36,81 s/$/\\n\\/' ${S}/filter/Absdiff.c
}
Comment 1 SpanKY gentoo-dev 2003-08-29 08:07:46 UTC
a patch would be better imo than sed ... 
Comment 2 Thomas Weidner 2003-08-29 08:22:36 UTC
sed needs less space and i was more in the mood to do some bash and sed stuff ;-)
Comment 3 Mr. Bones. (RETIRED) gentoo-dev 2003-08-29 14:24:13 UTC
if you're going to use sed, skip the whole mktemp mess and use sed -i
Comment 4 SpanKY gentoo-dev 2003-09-09 21:38:23 UTC
i grabbed the current c file from cvs and made a patch from that

fixed in cvs, thanks for your sed ;)