pkgsrc-Changes archive

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

CVS commit: pkgsrc/multimedia/mencoder



Module Name:    pkgsrc
Committed By:   wiz
Date:           Sat Feb 17 19:40:01 UTC 2024

Modified Files:
        pkgsrc/multimedia/mencoder: Makefile

Log Message:
mencoder: fix build

Apply multimedia/mplayer's change:

revision 1.113
date: 2024-01-27 03:11:04 +0100;  author: riastradh;  state: Exp;  lines: +16 -1;  commitid: YiogfS4wLLyaV1WE;
multimedia/mplayer: Fix cross-build.

This removes our local patch to pass CFLAGS to compile the the
build-time tool codec-cfg.  These CFLAGS don't work for cross-builds,
but all we really need is to make libavutil/avutil.h.  So instead of
patching the makefile, just pass BUILDLINK_CPPFLAGS through into the
HOST_CC invocation that compiles it, in native builds.

And in cross builds, sleazily pass the include path under the
localbase in the destdir, so that we don't have to pull in ffmpeg5 as
a tool dependency -- libavutil/*.h seems to work here, and may
actually be correct because it pulls in libavutil/avconfig.h and
codec-cfg might want that to describe the target system rather than
the build system.


To generate a diff of this commit:
cvs rdiff -u -r1.78 -r1.79 pkgsrc/multimedia/mencoder/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/multimedia/mencoder/Makefile
diff -u pkgsrc/multimedia/mencoder/Makefile:1.78 pkgsrc/multimedia/mencoder/Makefile:1.79
--- pkgsrc/multimedia/mencoder/Makefile:1.78    Mon Jan 22 13:17:03 2024
+++ pkgsrc/multimedia/mencoder/Makefile Sat Feb 17 19:40:01 2024
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.78 2024/01/22 13:17:03 ryoon Exp $
+# $NetBSD: Makefile,v 1.79 2024/02/17 19:40:01 wiz Exp $
 
 PKGNAME=       mencoder-${MPLAYER_VERSION}
 PKGREVISION=   3
@@ -9,6 +9,20 @@ USE_TOOLS+=    pkg-config
 
 .include "../../multimedia/mplayer-share/Makefile.common"
 
+.include "../../mk/bsd.prefs.mk"
+
+.if ${USE_CROSS_COMPILE:tl} == "yes"
+CONFIGURE_ARGS+=       --target=${MACHINE_ARCH:Q}-${OPSYS:Q}
+# Reaching into the destdir with a -I flag to NATIVE_CC is kinda
+# sleazy, but this will probably work and it saves the trouble of
+# pulling in a gigantic tool dependency.
+CONFIGURE_ARGS+=       --host-cc=${NATIVE_CC:Q}\ -I${_CROSS_DESTDIR:Q}${PREFIX:Q}/include/ffmpeg5
+#TOOL_DEPENDS+=                ffmpeg5>=0:../../multimedia/ffmpeg5
+#CONFIGURE_ARGS+=      --host-cc=${NATIVE_CC:Q}\ -I${TOOLBASE:Q}/include/ffmpeg5
+.else
+CONFIGURE_ARGS+=       --host-cc=${CC:Q}\ ${BUILDLINK_CPPFLAGS:Q}
+.endif
+
 # Fix build under Mac OS X, please see here for details:
 # http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2009-May/061515.html
 LDFLAGS.Darwin+=       -framework Carbon



Home | Main Index | Thread Index | Old Index