packages: opal/opal.spec, opal/opal-celt.patch (NEW) - rel 6; fix celt build

arekm arekm at pld-linux.org
Mon Apr 26 08:48:22 CEST 2010


Author: arekm                        Date: Mon Apr 26 06:48:22 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- rel 6; fix celt build

---- Files affected:
packages/opal:
   opal.spec (1.54 -> 1.55) , opal-celt.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/opal/opal.spec
diff -u packages/opal/opal.spec:1.54 packages/opal/opal.spec:1.55
--- packages/opal/opal.spec:1.54	Sun Apr 25 22:31:31 2010
+++ packages/opal/opal.spec	Mon Apr 26 08:48:17 2010
@@ -17,7 +17,7 @@
 Summary(pl.UTF-8):	Biblioteka Open Phone Abstraction Library (aka OpenH323 v2)
 Name:		opal
 Version:	3.6.6
-Release:	5
+Release:	6
 License:	MPL
 Group:		Libraries
 Source0:	http://ftp.gnome.org/pub/gnome/sources/opal/3.6/%{name}-%{version}.tar.bz2
@@ -27,9 +27,11 @@
 Patch1:		%{name}-mak_files.patch
 Patch2:		%{name}-ac.patch
 Patch3:		%{name}-build.patch
+Patch4:		%{name}-celt.patch
 URL:		http://www.openh323.org/
 BuildRequires:	autoconf
 BuildRequires:	automake
+BuildRequires:	celt-devel
 BuildRequires:	expat-devel
 BuildRequires:	libstdc++-devel
 BuildRequires:	pkgconfig
@@ -96,6 +98,7 @@
 #patch1 -p1
 #%patch2 -p1
 %patch3 -p1
+%patch4 -p1
 
 %build
 PWLIBDIR=%{_prefix}; export PWLIBDIR
@@ -103,6 +106,10 @@
 OPAL_BUILD="yes"; export OPAL_BUILD
 %{__aclocal}
 %{__autoconf}
+cd plugins
+%{__aclocal}                                                                                                                                                 
+%{__autoconf}
+cd ..
 # Run  grep '^OPAL_.*=' configure.ac|grep 'yes\|no'  to check current defaults
 %configure \
 %if %{with sip_fax_only}
@@ -181,6 +188,7 @@
 %dir %{_libdir}/opal-%{version}/codecs/audio
 %dir %{_libdir}/opal-%{version}/codecs/video
 %dir %{_libdir}/opal-%{version}/lid
+%attr(755,root,root) %{_libdir}/opal-%{version}/codecs/audio/celtcodec_pwplugin.so
 %attr(755,root,root) %{_libdir}/opal-%{version}/codecs/audio/g722_audio_pwplugin.so
 %attr(755,root,root) %{_libdir}/opal-%{version}/codecs/audio/g726_audio_pwplugin.so
 %attr(755,root,root) %{_libdir}/opal-%{version}/codecs/audio/gsm0610_audio_pwplugin.so
@@ -216,6 +224,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.55  2010/04/26 06:48:17  arekm
+- rel 6; fix celt build
+
 Revision 1.54  2010/04/25 20:31:31  arekm
 - release 5
 

================================================================
Index: packages/opal/opal-celt.patch
diff -u /dev/null packages/opal/opal-celt.patch:1.1
--- /dev/null	Mon Apr 26 08:48:22 2010
+++ packages/opal/opal-celt.patch	Mon Apr 26 08:48:17 2010
@@ -0,0 +1,103 @@
+--- a/plugins/audio/celt/celtcodec.c
++++ b/plugins/audio/celt/celtcodec.c
+@@ -52,7 +52,12 @@ static int init_mode(CELTContext *celt, const struct PluginCodec_Definition * co
+ {
+   int error = 0;
+ 
+-  celt->mode = celt_mode_create(codec->sampleRate, 1, codec->parm.audio.samplesPerFrame, &error);
++  celt->mode = celt_mode_create(codec->sampleRate,
++#if !defined(HAVE_CELT_0_7_0_OR_LATER)
++				1,
++#endif
++				codec->parm.audio.samplesPerFrame,
++				&error);
+   if (celt->mode == NULL) {
+     return FALSE;
+   }
+@@ -65,6 +70,9 @@ static int init_mode(CELTContext *celt, const struct PluginCodec_Definition * co
+ 
+ static void * celt_create_encoder(const struct PluginCodec_Definition * codec)
+ {
++#if defined(HAVE_CELT_0_7_0_OR_LATER)
++  int error = 0;
++#endif
+   CELTContext * celt = malloc(sizeof(CELTContext));
+   if (celt == NULL)
+     return NULL;
+@@ -73,8 +81,12 @@ static void * celt_create_encoder(const struct PluginCodec_Definition * codec)
+     free(celt);
+     return NULL;
+   }
+- 	
++
++#if defined(HAVE_CELT_0_7_0_OR_LATER)
++  celt->encoder_state = celt_encoder_create(celt->mode, 1, &error);
++#else
+   celt->encoder_state = celt_encoder_create(celt->mode);
++#endif
+   if (celt->encoder_state == NULL ) {
+     celt_mode_destroy(celt->mode);
+     free(celt);
+@@ -87,6 +99,9 @@ static void * celt_create_encoder(const struct PluginCodec_Definition * codec)
+ 
+ static void * celt_create_decoder(const struct PluginCodec_Definition * codec)
+ {
++#if defined(HAVE_CELT_0_7_0_OR_LATER)
++  int error = 0;
++#endif
+   CELTContext * celt = malloc(sizeof(CELTContext));
+   if (celt == NULL)
+     return NULL;
+@@ -96,7 +111,11 @@ static void * celt_create_decoder(const struct PluginCodec_Definition * codec)
+     return NULL;
+   }
+ 
++#if defined(HAVE_CELT_0_7_0_OR_LATER)
++  celt->decoder_state = celt_decoder_create(celt->mode, 1, &error);
++#else
+   celt->decoder_state = celt_decoder_create(celt->mode);
++#endif
+   if (celt->decoder_state == NULL ) {
+     celt_mode_destroy(celt->mode);
+     free(celt);
+@@ -142,7 +161,9 @@ static int celt_codec_encoder(const struct PluginCodec_Definition * codec,
+   if (*toLen < celt->bytes_per_packet)
+     return FALSE;
+ 
+-#ifdef HAVE_CELT_0_5_0_OR_LATER
++#if defined(HAVE_CELT_0_7_0_OR_LATER)
++  byteCount = celt_encode(celt->encoder_state, (celt_int16 *)fromPtr, NULL, (char *)toPtr, celt->bytes_per_packet);
++#elif defined(HAVE_CELT_0_5_0_OR_LATER)
+   byteCount = celt_encode(celt->encoder_state, (celt_int16_t *)fromPtr, NULL, (char *)toPtr, celt->bytes_per_packet);
+ #else
+   byteCount = celt_encode(celt->encoder_state, (celt_int16_t *)fromPtr, (char *)toPtr, celt->bytes_per_packet);
+--- a/plugins/configure.ac
++++ b/plugins/configure.ac
+@@ -313,9 +313,12 @@
+                    AC_SUBST(CELT_LIBS)
+                    AC_DEFINE([HAVE_CELT], [1], [celt])
+                    HAVE_CELT=yes
+-                   PKG_CHECK_EXISTS([celt >= 0.5.0],
+-                                     [
+-                                      AC_DEFINE([HAVE_CELT_0_5_0_OR_LATER], [1], [celt 0.5.0 or later found])
++                   PKG_CHECK_EXISTS([celt >= 0.7.0], [
++                                      AC_DEFINE([HAVE_CELT_0_7_0_OR_LATER], [1], [celt 0.7.0 or later found])
++                                     ],
++                                     [PKG_CHECK_EXISTS([celt >= 0.5.0], [
++                                                   AC_DEFINE([HAVE_CELT_0_5_0_OR_LATER], [1], [celt 0.5.0 or later found])
++                                     ])
+                    ])
+                   ],
+                   [
+--- a/plugins/plugin-config.h.in	2010-02-14 16:07:28.000000000 +0100
++++ b/plugins/plugin-config.h.in	2010-02-14 16:07:42.000000000 +0100
+@@ -15,6 +15,9 @@
+ /* celt 0.5.0 or later found */
+ #undef HAVE_CELT_0_5_0_OR_LATER
+ 
++/* celt 0.7.0 or later found */
++#undef HAVE_CELT_0_7_0_OR_LATER
++
+ /* Define to 1 if you have the <dlfcn.h> header file. */
+ #undef HAVE_DLFCN_H
+ 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/opal/opal.spec?r1=1.54&r2=1.55&f=u



More information about the pld-cvs-commit mailing list