Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 351588 - Please review remaining Prefix changes for media-video/mplayer
Summary: Please review remaining Prefix changes for media-video/mplayer
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High normal
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: prefix-gx86
  Show dependency tree
 
Reported: 2011-01-13 19:13 UTC by Fabian Groffen
Modified: 2017-11-14 12:44 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 Fabian Groffen gentoo-dev 2011-01-13 19:13:40 UTC
It seems most of mplayer's Prefix changes were already merged back to gx86 a while ago.  With the latest version the following few changes are necessary to make it work for us.  Please bless or comment on them.

@@ -253,6 +253,23 @@
        # fix path to bash executable in configure scripts
        sed -i -e "1c\#!${EPREFIX}/bin/bash" configure version.sh || die
 
+       # disable all "cleverness" of looking into hardwired paths
+       sed -i \
+               -e "s:/usr/\(local\|pkg\|openwin\|X11\(R[67]\)\?\)/:$EPREFIX/usr/:g" \
+               -e "s:/usr/lib32:$EPREFIX/usr/$(get_libname):g" \
+               -e "s:-I\(/usr/include/\(cdda\|bs2b\)\):-I${EPREFIX}\1:" \
+               -e "s:-I\(/usr/include/\(liveMedia\|groupsock\)\):-I${EPREFIX}\1:" \
+               -e "s:-I\(/usr/include/\(Basic\)\?UsageEnvironment\):-I${EPREFIX}\1:" \
+               -e "s:-I/usr/lib\(64\)\?/live:-I$EPREFIX/usr/$(get_libname)/live:g" \
+               configure || die
+
+       # Solaris issue, should be fixed for next snapshot:
+       # http://comments.gmane.org/gmane.comp.video.mplayer.user/65258
+       sed -i -e "s/_XOPEN_SOURCE 500/_XOPEN_SOURCE 600/" configure || die
+
+       [[ ${CHOST} == *-darwin8 ]] && \
+               epatch "${FILESDIR}"/${PN}-1.0_rc4_p20101219-coreaudio-darwin8.patch
+
        base_src_prepare
 }
 
@@ -542,14 +559,12 @@
        fi
 
        is-flag -O? || append-flags -O2
-       if use x86 || use x86-fbsd; then
-               use debug || append-flags -fomit-frame-pointer
-       fi
-
        # workaround bug, x86 just has too few registers, see c.f.
        # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=402950#44
-       # and 32b osx, bug 329861
-       [[ ${CHOST} == i?86-*solaris* || ${CHOST} == i?86-*darwin* ]] && append-flags -fomit-frame-pointer
+       # and 32bits OSX, bug 329861
+       if [[ ${CHOST} == i?86-* ]] ; then
+               use debug || append-flags -fomit-frame-pointer
+       fi
 
        ###########################
        # X enabled configuration #
Comment 1 Alexis Ballier gentoo-dev 2011-01-14 15:27:54 UTC
improvements go to -9999, they get to ~arch with the next snapshot

(In reply to comment #0)
> It seems most of mplayer's Prefix changes were already merged back to gx86 a
> while ago.  With the latest version the following few changes are necessary to
> make it work for us.  Please bless or comment on them.
> 
> @@ -253,6 +253,23 @@
>         # fix path to bash executable in configure scripts
>         sed -i -e "1c\#!${EPREFIX}/bin/bash" configure version.sh || die
> 
> +       # disable all "cleverness" of looking into hardwired paths
> +       sed -i \
> +               -e
> "s:/usr/\(local\|pkg\|openwin\|X11\(R[67]\)\?\)/:$EPREFIX/usr/:g" \
> +               -e "s:/usr/lib32:$EPREFIX/usr/$(get_libname):g" \
> +               -e "s:-I\(/usr/include/\(cdda\|bs2b\)\):-I${EPREFIX}\1:" \
> +               -e
> "s:-I\(/usr/include/\(liveMedia\|groupsock\)\):-I${EPREFIX}\1:" \
> +               -e
> "s:-I\(/usr/include/\(Basic\)\?UsageEnvironment\):-I${EPREFIX}\1:" \
> +               -e
> "s:-I/usr/lib\(64\)\?/live:-I$EPREFIX/usr/$(get_libname)/live:g" \
> +               configure || die
> +

I don't like that at all, isn't there a better way to do it ? Have you tried to poke upstream about this ?

> +       # Solaris issue, should be fixed for next snapshot:
> +       # http://comments.gmane.org/gmane.comp.video.mplayer.user/65258
> +       sed -i -e "s/_XOPEN_SOURCE 500/_XOPEN_SOURCE 600/" configure || die
> +
> +       [[ ${CHOST} == *-darwin8 ]] && \
> +               epatch
> "${FILESDIR}"/${PN}-1.0_rc4_p20101219-coreaudio-darwin8.patch
> +

no point for -9999, right ?

>         is-flag -O? || append-flags -O2
> -       if use x86 || use x86-fbsd; then
> -               use debug || append-flags -fomit-frame-pointer
> -       fi
> -
>         # workaround bug, x86 just has too few registers, see c.f.
>         # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=402950#44
> -       # and 32b osx, bug 329861
> -       [[ ${CHOST} == i?86-*solaris* || ${CHOST} == i?86-*darwin* ]] &&
> append-flags -fomit-frame-pointer
> +       # and 32bits OSX, bug 329861
> +       if [[ ${CHOST} == i?86-* ]] ; then
> +               use debug || append-flags -fomit-frame-pointer
> +       fi
> 

this is indeed much better, please commit it to -9999
Comment 2 Fabian Groffen gentoo-dev 2011-01-14 16:23:02 UTC
(In reply to comment #1)
> > +       # disable all "cleverness" of looking into hardwired paths
> > +       sed -i \
> > +               -e
> > "s:/usr/\(local\|pkg\|openwin\|X11\(R[67]\)\?\)/:$EPREFIX/usr/:g" \
> > +               -e "s:/usr/lib32:$EPREFIX/usr/$(get_libname):g" \
> > +               -e "s:-I\(/usr/include/\(cdda\|bs2b\)\):-I${EPREFIX}\1:" \
> > +               -e
> > "s:-I\(/usr/include/\(liveMedia\|groupsock\)\):-I${EPREFIX}\1:" \
> > +               -e
> > "s:-I\(/usr/include/\(Basic\)\?UsageEnvironment\):-I${EPREFIX}\1:" \
> > +               -e
> > "s:-I/usr/lib\(64\)\?/live:-I$EPREFIX/usr/$(get_libname)/live:g" \
> > +               configure || die
> > +
> 
> I don't like that at all, isn't there a better way to do it ? Have you tried to
> poke upstream about this ?

Well, the huge patch we had breaks on every new snapshot, and this approach just works very well.  Upstream loves to actually poke around in the filesystem based on all kinds of heuristics that break the idea of Prefix.  So I guess this is the only way to do it.  (Similar to Python upstream, which has the same ideology.)

> > +       # Solaris issue, should be fixed for next snapshot:
> > +       # http://comments.gmane.org/gmane.comp.video.mplayer.user/65258
> > +       sed -i -e "s/_XOPEN_SOURCE 500/_XOPEN_SOURCE 600/" configure || die
> > +
> > +       [[ ${CHOST} == *-darwin8 ]] && \
> > +               epatch
> > "${FILESDIR}"/${PN}-1.0_rc4_p20101219-coreaudio-darwin8.patch
> > +
> 
> no point for -9999, right ?

The first, yes, the second, no.  They don't like to support Darwin 8 any more, which I can understand, but I still do.

> >         is-flag -O? || append-flags -O2
> > -       if use x86 || use x86-fbsd; then
> > -               use debug || append-flags -fomit-frame-pointer
> > -       fi
> > -
> >         # workaround bug, x86 just has too few registers, see c.f.
> >         # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=402950#44
> > -       # and 32b osx, bug 329861
> > -       [[ ${CHOST} == i?86-*solaris* || ${CHOST} == i?86-*darwin* ]] &&
> > append-flags -fomit-frame-pointer
> > +       # and 32bits OSX, bug 329861
> > +       if [[ ${CHOST} == i?86-* ]] ; then
> > +               use debug || append-flags -fomit-frame-pointer
> > +       fi
> > 
> 
> this is indeed much better, please commit it to -9999

done
Comment 3 Alexis Ballier gentoo-dev 2013-08-02 16:56:18 UTC
@prefix: what's the status on this ? could you please post/attach the diff you need for mplayer-9999 ?
Comment 4 Fabian Groffen gentoo-dev 2017-11-14 12:44:59 UTC
we don't have mplayer in our tree any more, so this bug is no longer relevant