Thu Aug 12 15:28:46 2010 UTC ()
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.


(tsutsui)
diff -r1.44 -r1.45 pkgsrc/multimedia/mplayer-share/Makefile.common

cvs diff -r1.44 -r1.45 pkgsrc/multimedia/mplayer-share/Makefile.common (expand / switch to unified diff)

--- pkgsrc/multimedia/mplayer-share/Makefile.common 2010/01/03 23:42:44 1.44
+++ pkgsrc/multimedia/mplayer-share/Makefile.common 2010/08/12 15:28:46 1.45
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile.common,v 1.44 2010/01/03 23:42:44 ahoka Exp $ 1# $NetBSD: Makefile.common,v 1.45 2010/08/12 15:28:46 tsutsui Exp $
2# used by multimedia/gmplayer/Makefile 2# used by multimedia/gmplayer/Makefile
3# used by multimedia/mencoder/Makefile 3# used by multimedia/mencoder/Makefile
4# used by multimedia/mplayer/Makefile 4# used by multimedia/mplayer/Makefile
5 5
6MPLAYER_SNAPSHOT_DATE= 2009-10-17 6MPLAYER_SNAPSHOT_DATE= 2009-10-17
7MPLAYER_VERSION= 1.0rc${MPLAYER_SNAPSHOT_DATE:S/-//g} 7MPLAYER_VERSION= 1.0rc${MPLAYER_SNAPSHOT_DATE:S/-//g}
8 8
9DISTNAME= mplayer-${MPLAYER_SNAPSHOT_DATE:S/-//g} 9DISTNAME= mplayer-${MPLAYER_SNAPSHOT_DATE:S/-//g}
10CATEGORIES?= multimedia 10CATEGORIES?= multimedia
11 11
12MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=commondistfiles/} 12MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=commondistfiles/}
13MASTER_SITES+= http://mx1.nygren.pp.se/misc/ 13MASTER_SITES+= http://mx1.nygren.pp.se/misc/
14 14
@@ -51,14 +51,29 @@ ONLY_FOR_COMPILER= gcc @@ -51,14 +51,29 @@ ONLY_FOR_COMPILER= gcc
51 51
52# The configure script attempts to test-execute compiled programs in /tmp, 52# The configure script attempts to test-execute compiled programs in /tmp,
53# but that directory may be mounted as noexec; work this around by setting 53# but that directory may be mounted as noexec; work this around by setting
54# TMPDIR to ${WRKDIR} 54# TMPDIR to ${WRKDIR}
55CONFIGURE_ENV+= TMPDIR=${WRKDIR:Q} 55CONFIGURE_ENV+= TMPDIR=${WRKDIR:Q}
56 56
57.include "../../mk/bsd.prefs.mk" 57.include "../../mk/bsd.prefs.mk"
58 58
59# The configure script misdetects endianness on mipseb 59# The configure script misdetects endianness on mipseb
60.if ${OPSYS} == "NetBSD" && ${MACHINE_ARCH} == "mipseb" 60.if ${OPSYS} == "NetBSD" && ${MACHINE_ARCH} == "mipseb"
61CONFIGURE_ARGS+= --enable-big-endian 61CONFIGURE_ARGS+= --enable-big-endian
62.endif 62.endif
63 63
 64.if !empty(MACHINE_PLATFORM:MNetBSD-*-arm)
 65# Avoid crash with system include file:
 66pre-patch:
 67 mv ${WRKSRC}/libavutil/arm/bswap.h ${WRKSRC}/libavutil/arm/avbswap.h
 68
 69SUBST_CLASSES+= arm_bswap
 70SUBST_STAGE.arm_bswap= pre-configure
 71SUBST_FILES.arm_bswap= libavutil/bswap.h
 72SUBST_SED.arm_bswap= -e s,\"arm/bswap.h\",\"arm/avbswap.h\",g
 73SUBST_MESSAGE.arm_bswap= Fixing "arm/bswap.h" conflict in libavutil
 74
 75# autodetect code enables these options on NetBSD/arm but it should not
 76CONFIGURE_ARGS+= --disable-armv5te --disable-armv6 --disable-armv6t2
 77.endif
 78
64.include "../../multimedia/mplayer-share/options.mk" 79.include "../../multimedia/mplayer-share/options.mk"