FLAC recently gained PPC optimizations that only work with Apple's

assembler.  Since they cause the FLAC build to fail on AIX and NetBSD,
only enable the optimizations if the OPSYS is Darwin.

There is also a misplaced #endif in lpc.h that causes the build to
fail on all platforms if assembler optimizations are disabled.  This
is fixed by patch-af.

Thanks to Michael <macallan18@earthlink.net> for troubleshooting!
This commit is contained in:
ben 2004-10-18 14:23:29 +00:00
parent a03716aa2a
commit 8cb5a03640
3 changed files with 30 additions and 2 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.27 2004/10/14 18:07:10 minskim Exp $
# $NetBSD: Makefile,v 1.28 2004/10/18 14:23:29 ben Exp $
DISTNAME= flac-1.1.1
PKGREVISION= 1
@ -25,6 +25,13 @@ CONFIGURE_ENV+= ac_cv_path_XMMS_CONFIG="no"
BUILD_DEPENDS+= nasm>=0.98:../../devel/nasm
.endif
.if !empty(MACHINE_PLATFORM:M*-*-ppc)
.if ${OPSYS} != "Darwin"
CONFIGURE_ARGS+= --disable-asm-optimizations
CONFIGURE_ARGS+= --disable-altivec
.endif
.endif
# This version of flac doesn't build with SunPro yet.
NOT_FOR_COMPILER= sunpro

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.6 2004/10/01 13:17:50 adam Exp $
$NetBSD: distinfo,v 1.7 2004/10/18 14:23:29 ben Exp $
SHA1 (flac-1.1.1.tar.gz) = 97832e5acad2f20867aafc30f219e47d26b853ac
Size (flac-1.1.1.tar.gz) = 1467204 bytes
@ -6,3 +6,4 @@ SHA1 (patch-aa) = 8389e42e3a90877af795d8e401c438de98ddcc8f
SHA1 (patch-ab) = abf4df5033956d9c4214064660f82a82619cb3fd
SHA1 (patch-ac) = 4da64f547cc44cc48a0fb0a761ce7654aa32704a
SHA1 (patch-ae) = a9ea14a0d0f05c0b49db08e8e62c46589e2b0f2e
SHA1 (patch-af) = b679103dcd19573bc340426573b027e97c725f8b

View file

@ -0,0 +1,20 @@
$NetBSD: patch-af,v 1.1 2004/10/18 14:23:29 ben Exp $
--- src/libFLAC/include/private/lpc.h.orig Tue Jul 27 12:13:25 2004
+++ src/libFLAC/include/private/lpc.h
@@ -61,6 +61,7 @@ void FLAC__lpc_compute_autocorrelation_a
void FLAC__lpc_compute_autocorrelation_asm_ia32_3dnow(const FLAC__real data[], unsigned data_len, unsigned lag, FLAC__real autoc[]);
#endif
#endif
+#endif
/*
* FLAC__lpc_compute_lp_coefficients()
@@ -154,7 +155,6 @@ void FLAC__lpc_restore_signal_asm_ia32_m
#elif defined FLAC__CPU_PPC
void FLAC__lpc_restore_signal_asm_ppc_altivec_16(const FLAC__int32 residual[], unsigned data_len, const FLAC__int32 qlp_coeff[], unsigned order, int lp_quantization, FLAC__int32 data[]);
void FLAC__lpc_restore_signal_asm_ppc_altivec_16_order8(const FLAC__int32 residual[], unsigned data_len, const FLAC__int32 qlp_coeff[], unsigned order, int lp_quantization, FLAC__int32 data[]);
-#endif
#endif
#endif