Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/multimedia multimedia/ffmpeg4: fix USE_LANGUAGES



details:   https://anonhg.NetBSD.org/pkgsrc/rev/114c6d0c0094
branches:  trunk
changeset: 433106:114c6d0c0094
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Sun May 31 07:42:13 2020 +0000

description:
multimedia/ffmpeg4: fix USE_LANGUAGES

multimedia/ffmpeg4 does not need -std=gnu99, only ffplay4 does.

Since mk/compiler.mk is protected by a multiple-inclusion guard, any
later assignment to USE_LANGUAGES has no effect except being confusing.
The additional languages show up in "bmake show-var" but at the point of
evaluation, they had not been set yet.

This can be detected by several pkgsrc tools:

pkglint says:

WARN: ../../multimedia/ffmpeg4/Makefile.common:14: Modifying
  USE_LANGUAGES after including ../../mk/compiler.mk has no effect.

Adding a manual check to mk/compiler.mk results in:

bmake[1]: "mk/compiler.mk" line 273: warning:
  For multimedia/ffmpeg4, only languages "c" are used,
  the others in "c99" were defined too late.

Making the variable USE_LANGUAGES read-only after including
mk/compiler.mk results in:

bmake[1]: "multimedia/ffmpeg4/Makefile.common" line 14:
  Read-only USE_LANGUAGES cannot be set

(The latter two checks are not yet in the official pkgsrc tree.)

diffstat:

 multimedia/ffmpeg4/Makefile.common |  3 +--
 multimedia/ffplay4/Makefile        |  4 +++-
 2 files changed, 4 insertions(+), 3 deletions(-)

diffs (35 lines):

diff -r 4ecf990fcdb2 -r 114c6d0c0094 multimedia/ffmpeg4/Makefile.common
--- a/multimedia/ffmpeg4/Makefile.common        Sun May 31 00:00:13 2020 +0000
+++ b/multimedia/ffmpeg4/Makefile.common        Sun May 31 07:42:13 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.18 2020/05/22 07:59:29 adam Exp $
+# $NetBSD: Makefile.common,v 1.19 2020/05/31 07:42:13 rillig Exp $
 # used by multimedia/ffmpeg4/Makefile
 # used by multimedia/ffplay4/Makefile
 
@@ -11,7 +11,6 @@
 
 PATCHDIR=      ${.CURDIR}/../../multimedia/ffmpeg4/patches
 
-USE_LANGUAGES=         c99
 USE_LIBTOOL=           yes
 USE_TOOLS+=            gmake pod2man perl pkg-config
 HAS_CONFIGURE=         yes
diff -r 4ecf990fcdb2 -r 114c6d0c0094 multimedia/ffplay4/Makefile
--- a/multimedia/ffplay4/Makefile       Sun May 31 00:00:13 2020 +0000
+++ b/multimedia/ffplay4/Makefile       Sun May 31 07:42:13 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.8 2020/05/22 07:59:29 adam Exp $
+# $NetBSD: Makefile,v 1.9 2020/05/31 07:42:13 rillig Exp $
 
 PKGNAME=       ${DISTNAME:S/ffmpeg/ffplay4/}
 MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
@@ -7,6 +7,8 @@
 
 DISTINFO_FILE=         ${.CURDIR}/../ffmpeg4/distinfo
 
+USE_LANGUAGES= c99
+
 CONFIGURE_ARGS+=       --disable-ffmpeg
 CONFIGURE_ARGS+=       --disable-ffprobe
 CONFIGURE_ARGS+=       --disable-encoders



Home | Main Index | Thread Index | Old Index