summaryrefslogtreecommitdiff
path: root/multimedia/ffmpeg/Makefile.common
diff options
context:
space:
mode:
Diffstat (limited to 'multimedia/ffmpeg/Makefile.common')
-rw-r--r--multimedia/ffmpeg/Makefile.common26
1 files changed, 24 insertions, 2 deletions
diff --git a/multimedia/ffmpeg/Makefile.common b/multimedia/ffmpeg/Makefile.common
index 80845a2a662..03f41bafb12 100644
--- a/multimedia/ffmpeg/Makefile.common
+++ b/multimedia/ffmpeg/Makefile.common
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.4 2009/10/30 12:40:27 ahoka Exp $
+# $NetBSD: Makefile.common,v 1.5 2010/03/14 23:07:30 tron Exp $
# used by multimedia/ffplay/Makefile
DISTNAME= ffmpeg-${DISTVERSION:S/-//g}
@@ -13,12 +13,27 @@ WRKSRC= ${WRKDIR}/ffmpeg-export-${DISTVERSION}
PATCHDIR= ${.CURDIR}/../../multimedia/ffmpeg/patches
HAS_CONFIGURE= YES
+USE_LANGUAGES+= c99
USE_LIBTOOL= YES
USE_TOOLS+= gmake texi2html pod2man
+.include "../../mk/compiler.mk"
+
+.if ${OPSYS} == "SunOS" && empty(CC_VERSION:Mgcc*)
+SUBST_CLASSES+= sunwspro
+SUBST_MESSAGE.sunwspro= Fixing compiler options for SunStudio C compiler.
+SUBST_STAGE.sunwspro= post-configure
+SUBST_FILES.sunwspro= config.mak
+SUBST_SED.sunwspro= -e "s/-O /-KPIC -DPIC /"
+SUBST_SED.sunwspro+= -e "s/-O3/-xO2/g"
+SUBST_SED.sunwspro+= -e "s/-std=c99/-xc99=all/"
+SUBST_SED.sunwspro+= -e "s/-Wl,-rpath-link,/-L /g"
+.endif
+
BUILD_DEPENDS+= yasm>=0.7.2:../../devel/yasm
REPLACE_PERL+= doc/texi2pod.pl
+REPLACE_SH+= configure version.sh
SUBST_CLASSES+= conf
SUBST_STAGE.conf= post-patch
@@ -40,10 +55,17 @@ CONFIGURE_ARGS+= --mandir=${PREFIX}/${PKGMANDIR} \
--disable-debug \
--disable-stripping \
--enable-shared \
- --enable-runtime-cpudetect \
--enable-pthreads \
--enable-gpl
+.if ${OPSYS} == "SunOS"
+CONFIGURE_ARGS+= --disable-amd3dnow --disable-amd3dnowext
+CONFIGURE_ARGS+= --disable-mmx --disable-mmx2
+CONFIGURE_ARGS+= --disable-sse --disable-ssse3
+.else
+CONFIGURE_ARGS+= --enable-runtime-cpudetect
+.endif
+
# No posix_memalign() in NetBSD 4.0 and earlier
#
.if !empty(MACHINE_PLATFORM:MNetBSD-[1-4].*-*)