From 091adeea8f815351934bd254aae19749bef8ad92 Mon Sep 17 00:00:00 2001 From: Stefan Fiedler Date: Mon, 4 Dec 2006 11:16:26 +0000 Subject: [PATCH] Stefan Fiedler: mplayer: don't use custom CFLAGS/CPPFLAGS/LDFLAGS; build gui if gtk+ or gtk+12 are installed; use extraconfopt instead of confopt; remove --with-extraincdir=/usr/include/libpng as configure can auto-detect this [2006112215004820952] (https://www.rocklinux.net/submaster) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@8088 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- package/jimmy/mplayer/mplayer.conf | 51 ++++++++++-------------------- 1 file changed, 17 insertions(+), 34 deletions(-) diff --git a/package/jimmy/mplayer/mplayer.conf b/package/jimmy/mplayer/mplayer.conf index af681f332..36707b6db 100644 --- a/package/jimmy/mplayer/mplayer.conf +++ b/package/jimmy/mplayer/mplayer.conf @@ -1,3 +1,4 @@ +#!/bin/bash # --- ROCK-COPYRIGHT-NOTE-BEGIN --- # # This copyright note is auto-generated by ./scripts/Create-CopyPatch. @@ -20,27 +21,12 @@ # # --- ROCK-COPYRIGHT-NOTE-END --- -prefer_program () -{ - local P - for P ; do - type -p "$P" >/dev/null && { echo "$P" ; break ; } - done - return -} - -preferred_gcc="`prefer_program gcc-34 gcc-33 gcc-32 gcc-2`" - -if [ -n "$preferred_gcc" ] ; then - CC="$preferred_gcc" ; HOST_CC="$preferred_gcc" - var_append confopt ' ' "--cc=\"$preferred_gcc\" --host-cc=\"$preferred_gcc\"" -elif [ "${ROCKCFG_DEFAULT_CC:3:1}" -gt "3" ] ; then - # only gcc 2.95 and gcc 3.x are officially supported - var_append confopt " " "--disable-gcc-checking" -fi +# mplayer configure detects the best FLAGS itself; using custom FLAGS is not +# supported by the authors. +configprefix='CFLAGS= CPPFLAGS= LDFLAGS=' mplayer_postmake() { - if pkginstalled gtk+12 ; then + if pkginstalled gtk+12 || pkginstalled gtk+ ; then echo "extracting the standard GUI ..." mkdir -p $datadir/$pkg/Skin tar $taropt $archdir/standard-1.9.tar.bz2 -C $datadir/$pkg/Skin @@ -80,39 +66,36 @@ sysconfdir="$sysconfdir/mplayer" confopt="--prefix=$root/$prefix --confdir=$sysconfdir" var_append confopt " " "--enable-linux-devfs --enable-menu \ ---with-extraincdir=/usr/include/libpng \ --enable-fbdev --enable-largefiles" if [ $arch = x86 -a "$ROCKCFG_X86_BITS" = "32" ] ; then - var_append confopt " " "--with-win32libdir=$root/$prefix/lib/win32" + var_append extraconfopt " " "--with-win32libdir=$root/$prefix/lib/win32" fi if test "$ROCKCFG_PKG_MPLAYER_RUN_CPUDETECT" != 0 ; then - var_append confopt " " "--enable-runtime-cpudetection" + var_append extraconfopt " " "--enable-runtime-cpudetection" fi if test "$ROCKCFG_PKG_MPLAYER_BLINKENLIGHTS" != 0 ; then - var_append confopt " " "--enable-bl" + var_append extraconfopt " " "--enable-bl" fi # this is b0rken with 2.6.10. -var_append confopt " " "--disable-svga" +var_append extraconfopt " " "--disable-svga" -pkginstalled rtsp && var_append confopt " " "--enable-live --with-livelibdir=$libdir/live" -pkginstalled xmms && var_append confopt " " "--enable-xmms" -pkginstalled gtk+12 && var_append confopt " " "--enable-gui" +pkginstalled rtsp && var_append extraconfopt " " "--enable-live --with-livelibdir=$libdir/live" +pkginstalled xmms && var_append extraconfopt " " "--enable-xmms" +if pkginstalled gtk+12 || pkginstalled gtk+ ; then + var_append extraconfopt " " "--enable-gui" +fi test "$ROCKCFG_DISABLE_NLS" = 0 || var_append confopt " " "--disable-i18n" if pkginstalled directfb ; then - var_append confopt ' ' '--enable-directfb' - var_append CFLAGS ' ' "-I$root/usr/include/directfb" + var_append extraconfopt ' ' '--enable-directfb' + var_append extraconfopt ' ' '--with-extraincdir=/usr/include/directfb' fi -var_append confopt " " "--enable-tv-v4l2 --enable-tv-v4l1" - -# mplayer fails to build with -Os -var_remove GCC_WRAPPER_INSERT " " "-Os" -var_append GCC_WRAPPER_INSERT " " "-O4" +var_append extraconfopt " " "--enable-tv-v4l2 --enable-tv-v4l1" hook_add postmake 5 mplayer_postmake