aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia/ffmpeg/Makefile
diff options
context:
space:
mode:
authormezz <mezz@FreeBSD.org>2007-08-26 05:47:44 +0800
committermezz <mezz@FreeBSD.org>2007-08-26 05:47:44 +0800
commit961b219672febd501577f61f7890e97e497dcb5f (patch)
treea14339dfdd99f4f9483c48928a57d04df30e311e /multimedia/ffmpeg/Makefile
parentecbc6763abd9b428cec44bed3edd5d4b13efa75d (diff)
downloadfreebsd-ports-gnome-961b219672febd501577f61f7890e97e497dcb5f.tar.gz
freebsd-ports-gnome-961b219672febd501577f61f7890e97e497dcb5f.tar.zst
freebsd-ports-gnome-961b219672febd501577f61f7890e97e497dcb5f.zip
-Fix the CFLAGS/LDFLAGS.
-Fix the build if it has no -O* or/and has -O0 by force replace to -O2. PR: ports/115076 Submitted by: Tatsuki Makino <tatsuki_makino@hotmail.com>
Diffstat (limited to 'multimedia/ffmpeg/Makefile')
-rw-r--r--multimedia/ffmpeg/Makefile10
1 files changed, 6 insertions, 4 deletions
diff --git a/multimedia/ffmpeg/Makefile b/multimedia/ffmpeg/Makefile
index 3e572d889edb..5815b09fea52 100644
--- a/multimedia/ffmpeg/Makefile
+++ b/multimedia/ffmpeg/Makefile
@@ -29,8 +29,8 @@ CONFIGURE_ARGS+=--cc="${CC}" --prefix="${PREFIX}" \
--enable-memalign-hack \
--enable-shared \
--enable-pp \
- --extra-cflags="${CFLAGS} -I${LOCALBASE}/include" \
- --extra-ldflags="-L${LOCALBASE}/lib" \
+ --extra-cflags="${FFMPEG_CFLAGS} -I${LOCALBASE}/include" \
+ --extra-ldflags="-L${LOCALBASE}/lib ${FFMPEG_LDFLAGS}" \
--extra-libs="${PTHREAD_LIBS}" \
--enable-gpl \
--enable-pthreads
@@ -63,7 +63,9 @@ MAN1+= ffmpeg.1 ffserver.1
.endif
.ifdef(WITH_OPTIMIZED_CFLAGS)
-FFMPEG_CFLAGS+= -O3 -ffast-math -fomit-frame-pointer
+CFLAGS:= ${CFLAGS:N-O*} -O3 -ffast-math -fomit-frame-pointer
+.else
+CFLAGS:= ${CFLAGS:N-O0} -O2
.endif
## a52
@@ -72,7 +74,7 @@ LIB_DEPENDS+= a52.0:${PORTSDIR}/audio/liba52
CONFIGURE_ARGS+= --enable-liba52 \
--enable-liba52bin
-FFMPEG_LDFLAGS+= -la52
+FFMPEG_LDFLAGS+= -la52
.else
CONFIGURE_ARGS+= --disable-liba52
.endif