ports/181964: [patch] multimedia/gstreamer-ffmpeg, multimedia/gstreamer1-libav: make sure libavcodec builds MD code
Jan Beich
jbeich at tormail.org
Mon Sep 9 14:00:00 UTC 2013
>Number: 181964
>Category: ports
>Synopsis: [patch] multimedia/gstreamer-ffmpeg, multimedia/gstreamer1-libav: make sure libavcodec builds MD code
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Sep 09 14:00:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: Jan Beich
>Release: FreeBSD 10.0-CURRENT amd64
>Organization:
>Environment:
http://forums.freebsd.org/showthread.php?t=40629
gst-ffmpeg or gst-libav fail to play any file because some symbols are
not present - http://pastebin.com/gRVPWUUK
also, ports/148200 hints the same issue happens on powerpc64 as well
>Description:
During a port build some variables not defined in MAKE_ENV/MAKE_ARGS
are leaked to do-build target via .MAKEFLAGS rule in bsd.port.mk.
According to make(1) man page variable assignments in MAKEFLAGS are
treated as those on command line which means they override assignments
in Makefiles.
Unfortunately, this breaks building arch-specific code for libavcodec
as ARCH in config.mak is no longer honored.
>How-To-Repeat:
$ cat Makefile
ARCH != uname -p
.ifndef NOPRECIOUSMAKEVARS
.MAKEFLAGS: ARCH="${ARCH}"
.endif
all:
@cd ${.CURDIR}/foo; gmake
$ cat foo/Makefile
ARCH = x86
all:
@echo ARCH=${ARCH}
$ fmake
ARCH=amd64
$ fmake NOPRECIOUSMAKEVARS=
ARCH=x86
>Fix:
Define NOPRECIOUSMAKEVARS, rename the variable like multimedia/ffmpeg
or use --with-system-ffmpeg (e.g. ports/181519).
--- rename_gst0.diff begins here ---
--- gst-libs/ext/libav/common.mak~
+++ gst-libs/ext/libav/common.mak
@@ -71,8 +71,8 @@ HOSTPROGS := $(addprefix $(SUBDIR),$(add
DEP_LIBS := $(foreach NAME,$(FFLIBS),lib$(NAME)/$($(CONFIG_SHARED:yes=S)LIBNAME))
-ALLHEADERS := $(subst $(SRC_DIR)/,$(SUBDIR),$(wildcard $(SRC_DIR)/*.h $(SRC_DIR)/$(ARCH)/*.h))
-SKIPHEADERS += $(addprefix $(ARCH)/,$(ARCH_HEADERS))
+ALLHEADERS := $(subst $(SRC_DIR)/,$(SUBDIR),$(wildcard $(SRC_DIR)/*.h $(SRC_DIR)/$(LIBAV_ARCH)/*.h))
+SKIPHEADERS += $(addprefix $(LIBAV_ARCH)/,$(ARCH_HEADERS))
SKIPHEADERS := $(addprefix $(SUBDIR),$(SKIPHEADERS-) $(SKIPHEADERS))
checkheaders: $(filter-out $(SKIPHEADERS:.h=.ho),$(ALLHEADERS:.h=.ho))
--- gst-libs/ext/libav/configure~
+++ gst-libs/ext/libav/configure
@@ -1631,7 +1631,7 @@ nogas=":"
nm_opts='-g'
# machine
-arch_default=$(uname -m)
+arch_default=$(uname -p)
cpu="generic"
# OS
@@ -3260,7 +3260,7 @@ MANDIR=\$(DESTDIR)$mandir
SRC_PATH="$source_path"
SRC_PATH_BARE=$source_path
CC_IDENT=$cc_ident
-ARCH=$arch
+LIBAV_ARCH=$arch
CC=$cc
AS=$as
LD=$ld
--- gst-libs/ext/libav/libavcodec/Makefile~
+++ gst-libs/ext/libav/libavcodec/Makefile
@@ -651,14 +651,14 @@ OBJS-$(CONFIG_MLIB) +
# well.
OBJS-$(!CONFIG_SMALL) += inverse.o
--include $(SUBDIR)$(ARCH)/Makefile
+-include $(SUBDIR)$(LIBAV_ARCH)/Makefile
SKIPHEADERS += %_tablegen.h \
%_tables.h \
aac_tablegen_decl.h \
fft-internal.h \
tableprint.h \
- $(ARCH)/vp56_arith.h
+ $(LIBAV_ARCH)/vp56_arith.h
SKIPHEADERS-$(CONFIG_DXVA2) += dxva2.h dxva2_internal.h
SKIPHEADERS-$(CONFIG_LIBDIRAC) += libdirac.h
SKIPHEADERS-$(CONFIG_LIBSCHROEDINGER) += libschroedinger.h
--- gst-libs/ext/libav/libavfilter/Makefile~
+++ gst-libs/ext/libav/libavfilter/Makefile
@@ -60,7 +60,7 @@ OBJS-$(CONFIG_NULLSRC_FILTER)
OBJS-$(CONFIG_NULLSINK_FILTER) += vsink_nullsink.o
--include $(SUBDIR)$(ARCH)/Makefile
+-include $(SUBDIR)$(LIBAV_ARCH)/Makefile
DIRS = x86
--- rename_gst0.diff ends here ---
--- rename_gst1.diff begins here ---
--- gst-libs/ext/libav/common.mak~
+++ gst-libs/ext/libav/common.mak
@@ -25,8 +25,8 @@ TOOLS := $(TOOLS:%=tools/%$(EXESUF))
DEP_LIBS := $(foreach NAME,$(FFLIBS),lib$(NAME)/$($(CONFIG_SHARED:yes=S)LIBNAME))
-ALLHEADERS := $(subst $(SRC_DIR)/,$(SUBDIR),$(wildcard $(SRC_DIR)/*.h $(SRC_DIR)/$(ARCH)/*.h))
-SKIPHEADERS += $(ARCH_HEADERS:%=$(ARCH)/%) $(SKIPHEADERS-)
+ALLHEADERS := $(subst $(SRC_DIR)/,$(SUBDIR),$(wildcard $(SRC_DIR)/*.h $(SRC_DIR)/$(LIBAV_ARCH)/*.h))
+SKIPHEADERS += $(ARCH_HEADERS:%=$(LIBAV_ARCH)/%) $(SKIPHEADERS-)
SKIPHEADERS := $(SKIPHEADERS:%=$(SUBDIR)%)
checkheaders: $(filter-out $(SKIPHEADERS:.h=.ho),$(ALLHEADERS:.h=.ho))
--- gst-libs/ext/libav/configure~
+++ gst-libs/ext/libav/configure
@@ -1666,7 +1666,7 @@ nm_opts='-g'
nogas=":"
# machine
-arch_default=$(uname -m)
+arch_default=$(uname -p)
cpu="generic"
# OS
@@ -3288,7 +3288,7 @@ DATADIR=\$(DESTDIR)$datadir
MANDIR=\$(DESTDIR)$mandir
SRC_PATH=$source_path
CC_IDENT=$cc_ident
-ARCH=$arch
+LIBAV_ARCH=$arch
CC=$cc
AS=$as
LD=$ld
--- gst-libs/ext/libav/libavcodec/Makefile~
+++ gst-libs/ext/libav/libavcodec/Makefile
@@ -668,14 +668,14 @@ OBJS-$(CONFIG_MLIB) +
# well.
OBJS-$(!CONFIG_SMALL) += inverse.o
--include $(SRC_PATH)/$(SUBDIR)$(ARCH)/Makefile
+-include $(SRC_PATH)/$(SUBDIR)$(LIBAV_ARCH)/Makefile
SKIPHEADERS += %_tablegen.h \
%_tables.h \
aac_tablegen_decl.h \
fft-internal.h \
tableprint.h \
- $(ARCH)/vp56_arith.h
+ $(LIBAV_ARCH)/vp56_arith.h
SKIPHEADERS-$(CONFIG_DXVA2) += dxva2.h dxva2_internal.h
SKIPHEADERS-$(CONFIG_LIBDIRAC) += libdirac.h
SKIPHEADERS-$(CONFIG_LIBSCHROEDINGER) += libschroedinger.h
--- gst-libs/ext/libav/libavfilter/Makefile~
+++ gst-libs/ext/libav/libavfilter/Makefile
@@ -69,7 +69,7 @@ OBJS-$(CONFIG_TESTSRC_FILTER)
OBJS-$(CONFIG_NULLSINK_FILTER) += vsink_nullsink.o
--include $(SRC_PATH)/$(SUBDIR)$(ARCH)/Makefile
+-include $(SRC_PATH)/$(SUBDIR)$(LIBAV_ARCH)/Makefile
DIRS = x86
--- rename_gst1.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list