From 61cb3dadb2ec9479923d8a415e1eb677c522ea6e Mon Sep 17 00:00:00 2001 From: Juan RP Date: Fri, 25 Dec 2009 22:39:22 +0100 Subject: [PATCH] Added smpeg-0.4.4 build template. --HG-- extra : convert_revision : 7b7012b3070ed4e46fe6123cf3a2f3a219675a43 --- srcpkgs/smpeg-devel | 1 + srcpkgs/smpeg/depends | 2 + srcpkgs/smpeg/patches/smpeg-0.4.4-gcc41.patch | 41 +++++++++++++++++++ srcpkgs/smpeg/smpeg-devel.template | 19 +++++++++ srcpkgs/smpeg/template | 26 ++++++++++++ 5 files changed, 89 insertions(+) create mode 120000 srcpkgs/smpeg-devel create mode 100644 srcpkgs/smpeg/depends create mode 100644 srcpkgs/smpeg/patches/smpeg-0.4.4-gcc41.patch create mode 100644 srcpkgs/smpeg/smpeg-devel.template create mode 100644 srcpkgs/smpeg/template diff --git a/srcpkgs/smpeg-devel b/srcpkgs/smpeg-devel new file mode 120000 index 00000000000..bfaa184565e --- /dev/null +++ b/srcpkgs/smpeg-devel @@ -0,0 +1 @@ +smpeg \ No newline at end of file diff --git a/srcpkgs/smpeg/depends b/srcpkgs/smpeg/depends new file mode 100644 index 00000000000..6ea24dd5457 --- /dev/null +++ b/srcpkgs/smpeg/depends @@ -0,0 +1,2 @@ +abi_depends=">=0.4.4" +api_depends="${abi_depends}" diff --git a/srcpkgs/smpeg/patches/smpeg-0.4.4-gcc41.patch b/srcpkgs/smpeg/patches/smpeg-0.4.4-gcc41.patch new file mode 100644 index 00000000000..a8bb2f6e6fb --- /dev/null +++ b/srcpkgs/smpeg/patches/smpeg-0.4.4-gcc41.patch @@ -0,0 +1,41 @@ +Index: MPEGaudio.h +=================================================================== +RCS file: /cvs/cvsroot/smpeg/MPEGaudio.h,v +retrieving revision 1.23 +diff -u -p -r1.23 MPEGaudio.h +--- MPEGaudio.h 17 Jul 2001 19:52:24 -0000 1.23 ++++ MPEGaudio.h 6 Dec 2005 06:10:43 -0000 +@@ -151,12 +151,6 @@ private: + /* The actual MPEG audio class */ + class MPEGaudio : public MPEGerror, public MPEGaudioaction { + +- friend void Play_MPEGaudioSDL(void *udata, Uint8 *stream, int len); +- friend int Play_MPEGaudio(MPEGaudio *audio, Uint8 *stream, int len); +-#ifdef THREADED_AUDIO +- friend int Decode_MPEGaudio(void *udata); +-#endif +- + public: + MPEGaudio(MPEGstream *stream, bool initSDL = true); + virtual ~MPEGaudio(); +@@ -367,6 +361,20 @@ public: + #define N_TIMESTAMPS 5 + + double timestamp[N_TIMESTAMPS]; ++ ++ /* Functions which access MPEGaudio internals */ ++ friend void Play_MPEGaudioSDL(void *udata, Uint8 *stream, int len); ++ friend int Play_MPEGaudio(MPEGaudio *audio, Uint8 *stream, int len); ++#ifdef THREADED_AUDIO ++ friend int Decode_MPEGaudio(void *udata); ++#endif + }; + ++/* Need to duplicate the prototypes, this is not a typo :) */ ++void Play_MPEGaudioSDL(void *udata, Uint8 *stream, int len); ++int Play_MPEGaudio(MPEGaudio *audio, Uint8 *stream, int len); ++#ifdef THREADED_AUDIO ++int Decode_MPEGaudio(void *udata); ++#endif ++ + #endif /* _MPEGAUDIO_H_ */ diff --git a/srcpkgs/smpeg/smpeg-devel.template b/srcpkgs/smpeg/smpeg-devel.template new file mode 100644 index 00000000000..976937ef606 --- /dev/null +++ b/srcpkgs/smpeg/smpeg-devel.template @@ -0,0 +1,19 @@ +# Template file for 'smpeg-devel'. +# +short_desc="${short_desc} (development files)" +long_desc="${long_desc} + + This package contains files for development, headers, static libs, etc." + +Add_dependency run SDL-devel +Add_dependency run smpeg + +do_install() +{ + mkdir -p ${DESTDIR}/usr/lib + mv ${SRCPKGDESTDIR}/usr/bin ${DESTDIR}/usr + mv ${SRCPKGDESTDIR}/usr/include ${DESTDIR}/usr + mv ${SRCPKGDESTDIR}/usr/lib/*.*a ${DESTDIR}/usr/lib + mv ${SRCPKGDESTDIR}/usr/lib/*.so ${DESTDIR}/usr/lib + mv ${SRCPKGDESTDIR}/usr/share ${DESTDIR}/usr +} diff --git a/srcpkgs/smpeg/template b/srcpkgs/smpeg/template new file mode 100644 index 00000000000..07e25915801 --- /dev/null +++ b/srcpkgs/smpeg/template @@ -0,0 +1,26 @@ +# Template file for 'smpeg' +pkgname=smpeg +version=0.4.4 +distfiles="http://mirrors.dotsrc.org/lokigames/open-source/smpeg/smpeg-$version.tar.gz" +build_style=gnu_configure +configure_args="--disable-gtk-player --disable-opengl-player" +make_build_args="LDFLAGS+=-lstdc++" +short_desc="SDL MPEG Player Library" +maintainer="Juan RP " +checksum=1efa7984d0aada0c2954cd0aaef357e9d7871dadd3368dbe742ab5f260523e57 +long_desc=" + SMPEG is based on UC Berkeley's mpeg_play software MPEG decoder + and SPLAY, an MPEG audio decoder created by Woo-jae Jung." + +subpackages="$pkgname-devel" +Add_dependency run glibc +Add_dependency run SDL +Add_dependency run libstdc++ +Add_dependency build SDL-devel + +post_install() +{ + # Remove unused stuff + rm -rf ${DESTDIR}/usr/share/man + rm -f ${DESTDIR}/usr/bin/plaympeg +}