Allow kdemultimedia to build with the audio/flac update, and also fix some
unrelated LIB_DEPENDS and WANTLIB issues while here, to make port-lib-depends-check happy (more dependencies on x11/kde/arts3 contents, libvorbisfile, libexpat and libfontconfig): - Require FLAC.>=8, - use a sledgehammer to make configure work with the new FLAC, - make it work with the new API. ok naddy@
This commit is contained in:
parent
a01a0850ad
commit
4841b7d06b
@ -1,10 +1,10 @@
|
||||
# $OpenBSD: Makefile,v 1.51 2007/09/15 20:04:21 merdely Exp $
|
||||
# $OpenBSD: Makefile,v 1.52 2007/09/18 18:36:52 mgrimm Exp $
|
||||
|
||||
COMMENT= K Desktop Environment, multimedia applications
|
||||
CATEGORIES= x11 x11/kde
|
||||
VERSION= 3.5.7
|
||||
DISTNAME= kdemultimedia-${VERSION}
|
||||
PKGNAME= ${DISTNAME}
|
||||
PKGNAME= ${DISTNAME}p0
|
||||
MODKDE_VERSION= 3.5.7
|
||||
SHARED_LIBS += artsbuilder 1.0 # .0.0
|
||||
SHARED_LIBS += artsmidi_idl 1.0 # .0.0
|
||||
@ -36,10 +36,10 @@ SHARED_LIBS += arts_mpeglib-0.3.0 1.0 # .0.3
|
||||
|
||||
FLAVORS= debug
|
||||
LIB_DEPENDS= DCOP,kdecore.>=6,kdefakes,kdefx,kdesu,kdeui,kio,khtml,kmid,kparts,kmediaplayer,kjs,kutils,kwalletclient,kdeprint::x11/kde/libs3 \
|
||||
artsc,artskde::x11/kde/arts3 \
|
||||
artsc,artsflow,artsflow_idl,artskde,kmedia2_idl,mcop,qtmcop,soundserver_idl::x11/kde/arts3 \
|
||||
ogg::audio/libogg \
|
||||
FLAC::audio/flac \
|
||||
vorbis,vorbisenc::audio/libvorbis \
|
||||
FLAC.>=8::audio/flac \
|
||||
vorbis,vorbisenc,vorbisfile::audio/libvorbis \
|
||||
cdda_paranoia,cdda_interface::audio/cdparanoia \
|
||||
tag::audio/taglib \
|
||||
gstreamer-0.10:gstreamer-0.10.*:multimedia/gstreamer-0.10/core \
|
||||
@ -57,12 +57,10 @@ SEPARATE_BUILD=flavored
|
||||
CONFIGURE_ARGS+=--without-lame
|
||||
CONFIGURE_ENV+=aktion_has_xanim=yes
|
||||
|
||||
WANTLIB= ICE SM X11 Xext Xrender Xv Xxf86dga Xxf86vm art_lgpl_2 \
|
||||
artsflow artsflow_idl audiofile c esd glib-2.0 \
|
||||
gmodule-2.0 gthread-2.0 iconv intl jpeg kmedia2_idl m \
|
||||
mad mcop ossaudio png pthread qtmcop soundserver_idl stdc++ \
|
||||
util vorbisfile z gobject-2.0 pcreposix xml2 pcre freetype \
|
||||
idn Xau Xdmcp fam rpcsvc
|
||||
|
||||
WANTLIB= ICE SM X11 Xau Xdmcp Xext Xrender Xv Xxf86dga Xxf86vm \
|
||||
art_lgpl_2 audiofile c esd expat fam fontconfig freetype \
|
||||
glib-2.0 gmodule-2.0 gobject-2.0 gthread-2.0 iconv idn intl \
|
||||
jpeg m mad ossaudio pcre pcreposix png pthread rpcsvc stdc++ \
|
||||
util xml2 z
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,6 +1,6 @@
|
||||
$OpenBSD: patch-configure_in,v 1.26 2007/05/25 09:49:55 espie Exp $
|
||||
$OpenBSD: patch-configure_in,v 1.27 2007/09/18 18:36:53 mgrimm Exp $
|
||||
--- configure.in.orig Mon May 14 13:36:25 2007
|
||||
+++ configure.in Thu May 24 16:28:55 2007
|
||||
+++ configure.in Sun Sep 16 19:15:15 2007
|
||||
@@ -164,22 +164,22 @@ AC_DEFUN([KDE_CHECK_OGGVORBIS],
|
||||
[:], [have_oggvorbis=no])
|
||||
|
||||
@ -63,16 +63,59 @@ $OpenBSD: patch-configure_in,v 1.26 2007/05/25 09:49:55 espie Exp $
|
||||
])
|
||||
|
||||
AC_ARG_WITH(theora,
|
||||
@@ -960,7 +963,7 @@ AC_DEFUN([AC_CHECK_LIBOGGFLAC],
|
||||
KDE_CHECK_HEADER(OggFLAC/seekable_stream_decoder.h,
|
||||
@@ -937,38 +940,20 @@ AC_DEFUN([AC_CHECK_LIBFLAC],
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_C
|
||||
have_libFLAC=no
|
||||
- KDE_CHECK_HEADER(FLAC/metadata.h,
|
||||
+ KDE_CHECK_HEADER(FLAC/stream_decoder.h,
|
||||
[
|
||||
KDE_CHECK_LIB(OggFLAC,OggFLAC__seekable_stream_decoder_process_single,
|
||||
- have_libOggFLAC=yes,,[-lm -lOggFLAC -lFLAC])
|
||||
+ have_libOggFLAC=yes,,[-lm -lOggFLAC -lFLAC -logg])
|
||||
- KDE_CHECK_LIB(FLAC,FLAC__seekable_stream_decoder_process_single,
|
||||
- have_libFLAC=yes)
|
||||
+ KDE_CHECK_LIB(FLAC,FLAC__stream_decoder_init_ogg_stream,
|
||||
+ have_libFLAC=yes,,[-logg])
|
||||
|
||||
])
|
||||
if test "x$have_libOggFLAC" = "xyes"; then
|
||||
@@ -1316,6 +1319,9 @@ case "$OS_TYPE" in
|
||||
if test "x$have_libFLAC" = "xyes"; then
|
||||
- LIBFLAC="-lFLAC"
|
||||
+ LIBFLAC="-lFLAC -logg"
|
||||
AC_DEFINE(HAVE_LIBFLAC, 1,
|
||||
[Define if you have libFLAC (required for loading FLAC files)])
|
||||
- fi
|
||||
- AC_SUBST(LIBFLAC)
|
||||
- AC_LANG_RESTORE
|
||||
-])
|
||||
-
|
||||
-AC_DEFUN([AC_CHECK_LIBOGGFLAC],
|
||||
-[
|
||||
- AC_LANG_SAVE
|
||||
- AC_LANG_C
|
||||
- have_libOggFLAC=no
|
||||
- KDE_CHECK_HEADER(OggFLAC/seekable_stream_decoder.h,
|
||||
- [
|
||||
- KDE_CHECK_LIB(OggFLAC,OggFLAC__seekable_stream_decoder_process_single,
|
||||
- have_libOggFLAC=yes,,[-lm -lOggFLAC -lFLAC])
|
||||
-
|
||||
- ])
|
||||
- if test "x$have_libOggFLAC" = "xyes"; then
|
||||
- LIBOGGFLAC="-lOggFLAC"
|
||||
AC_DEFINE(HAVE_LIBOGGFLAC, 1,
|
||||
[Define if you have libOggFLAC (required for loading OggFLAC files)])
|
||||
fi
|
||||
- AC_SUBST(LIBOGGFLAC)
|
||||
+ AC_SUBST(LIBFLAC)
|
||||
AC_LANG_RESTORE
|
||||
])
|
||||
|
||||
@@ -976,7 +961,6 @@ AC_ARG_WITH(flac,AC_HELP_STRING([--with-flac],[Enable
|
||||
|
||||
if test "x$flac_test" = "xyes" ; then
|
||||
AC_CHECK_LIBFLAC
|
||||
- AC_CHECK_LIBOGGFLAC
|
||||
fi
|
||||
dnl =======================================================
|
||||
dnl FILE: ./kmid/configure.in.in
|
||||
@@ -1316,6 +1300,9 @@ case "$OS_TYPE" in
|
||||
NetBSD)
|
||||
kde_mpeglib_compiles=yes
|
||||
;;
|
||||
@ -82,7 +125,7 @@ $OpenBSD: patch-configure_in,v 1.26 2007/05/25 09:49:55 espie Exp $
|
||||
Linux)
|
||||
kde_mpeglib_compiles=yes
|
||||
;;
|
||||
@@ -1343,6 +1349,12 @@ case "$OS_TYPE" in
|
||||
@@ -1343,6 +1330,12 @@ case "$OS_TYPE" in
|
||||
AC_DEFINE(OS_Linux,1,[Define if you have linux pthread])
|
||||
;;
|
||||
|
||||
@ -95,7 +138,7 @@ $OpenBSD: patch-configure_in,v 1.26 2007/05/25 09:49:55 espie Exp $
|
||||
FreeBSD)
|
||||
OS_TYPE="BSD"
|
||||
AC_DEFINE(OS_BSD,1,[Define if you have BSD pthread])
|
||||
@@ -1386,7 +1398,7 @@ KDE_MPEGLIB_COMPILES
|
||||
@@ -1386,7 +1379,7 @@ KDE_MPEGLIB_COMPILES
|
||||
|
||||
THIS_LIB_LIBS="-lX11 -lXext -lm ${XVLIBS} ${DGALIBS} "
|
||||
THIS_LIB_LIBS="${THIS_LIB_LIBS} ${XVIDMODELIBS} ${SDLLIB} ${CDDALIBS} "
|
||||
|
@ -0,0 +1,31 @@
|
||||
$OpenBSD: patch-kioslave_audiocd_plugins_flac_encoderflac_cpp,v 1.1 2007/09/18 18:36:53 mgrimm Exp $
|
||||
--- kioslave/audiocd/plugins/flac/encoderflac.cpp.orig Sun Sep 16 21:51:43 2007
|
||||
+++ kioslave/audiocd/plugins/flac/encoderflac.cpp Sun Sep 16 22:00:43 2007
|
||||
@@ -47,7 +47,7 @@ class EncoderFLAC::Private { (public)
|
||||
unsigned long data;
|
||||
};
|
||||
|
||||
-static FLAC__StreamEncoderWriteStatus WriteCallback(const FLAC__StreamEncoder *encoder, const FLAC__byte buffer[], unsigned bytes, unsigned samples, unsigned current_frame, void *client_data)
|
||||
+static FLAC__StreamEncoderWriteStatus WriteCallback(const FLAC__StreamEncoder *encoder, const FLAC__byte buffer[], size_t bytes, unsigned samples, unsigned current_frame, void *client_data)
|
||||
{
|
||||
EncoderFLAC::Private *d = (EncoderFLAC::Private*)client_data;
|
||||
|
||||
@@ -109,9 +109,6 @@ unsigned long EncoderFLAC::size(long time_secs) const
|
||||
long EncoderFLAC::readInit(long size) {
|
||||
kdDebug(7117) << "EncoderFLAC::readInit() called"<< endl;
|
||||
d->data = 0;
|
||||
- FLAC__stream_encoder_set_write_callback(d->encoder, WriteCallback);
|
||||
- FLAC__stream_encoder_set_metadata_callback(d->encoder, MetadataCallback);
|
||||
- FLAC__stream_encoder_set_client_data(d->encoder, d);
|
||||
|
||||
// The options match approximely those of flac compression-level-3
|
||||
FLAC__stream_encoder_set_do_mid_side_stereo(d->encoder, true);
|
||||
@@ -124,7 +121,7 @@ long EncoderFLAC::readInit(long size) {
|
||||
if (size > 0)
|
||||
FLAC__stream_encoder_set_total_samples_estimate(d->encoder, size/4);
|
||||
|
||||
- FLAC__stream_encoder_init(d->encoder);
|
||||
+ FLAC__stream_encoder_init_stream(d->encoder, WriteCallback, NULL, NULL, MetadataCallback, d);
|
||||
return d->data;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user