This allows audio/celt to build on alpha (gcc3).

ok?

Index: patches/patch-configure
===================================================================
RCS file: patches/patch-configure
diff -N patches/patch-configure
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-configure     23 Aug 2011 19:29:14 -0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+-Wextra is not supported by gcc < 4.
+
+--- configure.orig     Tue Aug 23 19:02:06 2011
++++ configure  Tue Aug 23 19:02:21 2011
+@@ -11787,7 +11787,7 @@ CFLAGS="$saved_CFLAGS $SYMBOL_VISIBILITY"
+ 
+ 
+ if test $ac_cv_c_compiler_gnu = yes ; then
+-        CFLAGS="$CFLAGS -W -Wstrict-prototypes -Wall -Wextra -Wcast-align 
-Wnested-externs -Wshadow -Wno-parentheses -Wno-unused-parameter 
-Wno-sign-compare"
++        CFLAGS="$CFLAGS -W -Wstrict-prototypes -Wall -Wcast-align 
-Wnested-externs -Wshadow -Wno-parentheses -Wno-unused-parameter 
-Wno-sign-compare"
+ fi
+ 
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lrintf" >&5
Index: patches/patch-libcelt_celt_c
===================================================================
RCS file: /cvs/ports/audio/celt/patches/patch-libcelt_celt_c,v
retrieving revision 1.3
diff -u -p -r1.3 patch-libcelt_celt_c
--- patches/patch-libcelt_celt_c        5 Apr 2011 14:17:55 -0000       1.3
+++ patches/patch-libcelt_celt_c        23 Aug 2011 19:29:14 -0000
@@ -1,9 +1,22 @@
 $OpenBSD: patch-libcelt_celt_c,v 1.3 2011/04/05 14:17:55 dcoppa Exp $
 
+Allow building with gcc3.
+
 Missing commas (from upstream git)
 
 --- libcelt/celt.c.orig        Tue Dec 21 03:14:48 2010
-+++ libcelt/celt.c     Thu Dec 30 14:11:11 2010
++++ libcelt/celt.c     Tue Aug 23 20:59:10 2011
+@@ -316,8 +316,8 @@ static void compute_mdcts(const CELTMode *mode, int sh
+ /** Compute the IMDCT and apply window for all sub-frames and 
+     all channels in a frame */
+ static void compute_inv_mdcts(const CELTMode *mode, int shortBlocks, celt_sig 
*X,
+-      celt_sig * restrict out_mem[],
+-      celt_sig * restrict overlap_mem[], int _C, int LM)
++      celt_sig * restrict * out_mem,
++      celt_sig * restrict * overlap_mem, int _C, int LM)
+ {
+    int c;
+    const int C = CHANNELS(_C);
 @@ -428,9 +428,9 @@ static void comb_filter(celt_word32 *y, celt_word32 *x
  
  static const signed char tf_select_table[4][8] = {
Index: patches/patch-libcelt_pitch_c
===================================================================
RCS file: patches/patch-libcelt_pitch_c
diff -N patches/patch-libcelt_pitch_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-libcelt_pitch_c       23 Aug 2011 19:29:14 -0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+Allow building with gcc3.
+
+--- libcelt/pitch.c.orig       Tue Aug 23 21:01:27 2011
++++ libcelt/pitch.c    Tue Aug 23 21:01:45 2011
+@@ -98,7 +98,7 @@ static void find_best_pitch(celt_word32 *xcorr, celt_w
+ }
+ 
+ #include "plc.h"
+-void pitch_downsample(celt_sig * restrict x[], celt_word16 * restrict x_lp, 
int len, int end, int _C, celt_sig * restrict xmem, celt_word16 * restrict 
filt_mem)
++void pitch_downsample(celt_sig * restrict * x, celt_word16 * restrict x_lp, 
int len, int end, int _C, celt_sig * restrict xmem, celt_word16 * restrict 
filt_mem)
+ {
+    int i;
+    celt_word32 ac[5];
Index: patches/patch-libcelt_pitch_h
===================================================================
RCS file: patches/patch-libcelt_pitch_h
diff -N patches/patch-libcelt_pitch_h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-libcelt_pitch_h       23 Aug 2011 19:29:14 -0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+Allow building with gcc3.
+
+--- libcelt/pitch.h.orig       Tue Aug 23 20:57:39 2011
++++ libcelt/pitch.h    Tue Aug 23 20:57:55 2011
+@@ -41,7 +41,7 @@
+ 
+ #include "modes.h"
+ 
+-void pitch_downsample(celt_sig * restrict x[], celt_word16 * restrict x_lp, 
int len, int end, int _C, celt_sig * restrict xmem, celt_word16 * restrict 
filt_mem);
++void pitch_downsample(celt_sig * restrict * x, celt_word16 * restrict x_lp, 
int len, int end, int _C, celt_sig * restrict xmem, celt_word16 * restrict 
filt_mem);
+ 
+ void pitch_search(const CELTMode *m, const celt_word16 * restrict x_lp, 
celt_word16 * restrict y,
+                   int len, int max_pitch, int *pitch, celt_sig *xmem, int M);
-- 
Christian "naddy" Weisgerber                          [email protected]

Reply via email to