Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
swfdec git ebuild
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
Need4Speed
Guru
Guru


Joined: 06 Jun 2004
Posts: 497

PostPosted: Sat May 31, 2008 2:53 am    Post subject: swfdec git ebuild Reply with quote

I wanted to check out the latest sfwdec, so I hacked together these ebuilds. They're my first attempt at writing an ebuild so they're pretty ugly but they work (at least for me). Thought I'd share them so that anyone can try or critique them.

sfwdec-9999.ebuild:
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit autotools git flag-o-matic

DESCRIPTION="Macromedia Flash decoding library"
HOMEPAGE="http://swfdec.freedesktop.org"
EGIT_REPO_URI="git://anongit.freedesktop.org/git/swfdec/swfdec"

LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"

IUSE="alsa debug doc gstreamer gtk pulseaudio"

RESTRICT="test"

RDEPEND=">=dev-libs/glib-2.14
   >=dev-libs/liboil-0.3.6
   >=x11-libs/pango-1.16
   >=x11-libs/cairo-1.2
   alsa? ( >=media-libs/alsa-lib-1.0.12 )
   gstreamer? ( >=media-libs/gstreamer-0.10.11 )
   gtk? (
      >=x11-libs/gtk+-2.8.0
      >=net-libs/libsoup-2.4
      )
   pulseaudio? ( media-sound/pulseaudio )"

DEPEND="${RDEPEND}
   dev-util/pkgconfig"

pkg_setup() {
   if use !gtk ; then
      ewarn "swfdec will be built without swfdec-gtk convenience"
      ewarn "library, which is needed by swfdec-mozilla and"
      ewarn "swfdec-gnome. Please add 'gtk' to your USE flags"
      ewarn "unless you really know what you are doing."
   fi
}

src_compile() {
   cd ${S}
   AT_M4DIR="${S}"/m4 eautoreconf

   local myaudio
   local myconf

   #--with-audio=[auto/alsa/pulseaudio/none]
   myaudio="none"
   use pulseaudio && myaudio="pa"
   use alsa && myaudio="alsa"
   myconf=" --with-audio=$myaudio"

   # Don't stop on warnings
   append-flags "-Wno-error"
   
   econf \
      $(use_enable doc gtk-doc) \
      $(use_enable gstreamer) \
      $(use_enable gtk) \
      $(use_enable debug vivified) \
      ${myconf} || die "configure failed"

   emake || die "emake failed"
}

src_install() {
   emake install DESTDIR="${D}" || die "emake install failed"
   dodoc AUTHORS ChangeLog README
}

swfdec-mozilla-9999.ebuild:
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit autotools git flag-o-matic

DESCRIPTION="Swfdec-mozilla is a decoder/renderer netscape style plugin for Macromedia Flash animations."
HOMEPAGE="http://swfdec.freedesktop.org/"
EGIT_REPO_URI="git://anongit.freedesktop.org/git/swfdec/swfdec-mozilla"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE="xulrunner"

DEPEND=">=media-libs/swfdec-0.5.1
   xulrunner? ( net-libs/xulrunner )
   !xulrunner? ( || ( www-client/mozilla-firefox www-client/seamonkey ) )"
RDEPEND=""

pkg_setup() {
   if ! built_with_use media-libs/swfdec gtk ; then
      einfo "You must build swfdec with the gtk USE flag to build"
      einfo "swfdec-gtk, which is required by ${PN}"
      die "Please re-emerge media-libs/swfdec with the gtk USE flag"
   fi
}

src_compile () {
   cd "${S}"

   AT_M4DIR="${S}"/m4 eautoreconf

   # Don't stop on warnings
   append-flags "-Wno-error"

   econf --with-plugin-dir="/usr/$(get_libdir)/nsbrowser/plugins" \
      || die "configure failed"
   emake || die "emake failed"
}

src_install() {
   emake DESTDIR=${D} install || die
}


Last edited by Need4Speed on Fri Jun 13, 2008 3:04 pm; edited 1 time in total
Back to top
View user's profile Send private message
razer
l33t
l33t


Joined: 08 Oct 2004
Posts: 893
Location: Paris - France

PostPosted: Tue Jun 03, 2008 12:48 pm    Post subject: Reply with quote

Seems to work perfectly for me, at least merging...
Great and usefull stuff, thanks a lot
It'll great to have that on a layman overlay now !
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum