Fix build failure and make mplayer work properly on NetBSD/arm:

- workaround name conflict with system header <arm/bswap.h> in libavutils
   by subst.mk replacement
 - explicitly disable armv5te, armv6, and armv6t2 options that are enabled
   by autodetect code in configure but cause illegal instruction errors
   on StrongARM and XScale machines

Tested on NetBSD/hpcarm (WS011SH) and NetBSD/shark (Funai's DNARD) 5.99.38.
This commit is contained in:
tsutsui 2010-08-12 15:28:46 +00:00
parent 9b32e95ef7
commit 6c9238ebd7

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile.common,v 1.44 2010/01/03 23:42:44 ahoka Exp $
# $NetBSD: Makefile.common,v 1.45 2010/08/12 15:28:46 tsutsui Exp $
# used by multimedia/gmplayer/Makefile
# used by multimedia/mencoder/Makefile
# used by multimedia/mplayer/Makefile
@ -61,4 +61,19 @@ CONFIGURE_ENV+= TMPDIR=${WRKDIR:Q}
CONFIGURE_ARGS+= --enable-big-endian
.endif
.if !empty(MACHINE_PLATFORM:MNetBSD-*-arm)
# Avoid crash with system include file:
pre-patch:
mv ${WRKSRC}/libavutil/arm/bswap.h ${WRKSRC}/libavutil/arm/avbswap.h
SUBST_CLASSES+= arm_bswap
SUBST_STAGE.arm_bswap= pre-configure
SUBST_FILES.arm_bswap= libavutil/bswap.h
SUBST_SED.arm_bswap= -e s,\"arm/bswap.h\",\"arm/avbswap.h\",g
SUBST_MESSAGE.arm_bswap= Fixing "arm/bswap.h" conflict in libavutil
# autodetect code enables these options on NetBSD/arm but it should not
CONFIGURE_ARGS+= --disable-armv5te --disable-armv6 --disable-armv6t2
.endif
.include "../../multimedia/mplayer-share/options.mk"