proton: Add gst-libav and ffmpeg to build.

Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
This commit is contained in:
Derek Lesho 2021-12-20 17:34:26 -05:00 committed by Arkadiusz Hiler
parent 710257adb4
commit be0bdb7fb9
5 changed files with 80 additions and 1 deletions

6
.gitmodules vendored
View File

@ -43,3 +43,9 @@
[submodule "Vulkan-Loader"] [submodule "Vulkan-Loader"]
path = Vulkan-Loader path = Vulkan-Loader
url = https://github.com/KhronosGroup/Vulkan-Loader url = https://github.com/KhronosGroup/Vulkan-Loader
[submodule "gst-libav"]
path = gst-libav
url = https://github.com/GStreamer/gst-libav
[submodule "ffmpeg"]
path = ffmpeg
url = https://github.com/FFmpeg/FFmpeg

View File

@ -53,6 +53,7 @@ include $(SRC)/make/rules-common.mk
include $(SRC)/make/rules-meson.mk include $(SRC)/make/rules-meson.mk
include $(SRC)/make/rules-cmake.mk include $(SRC)/make/rules-cmake.mk
include $(SRC)/make/rules-autoconf.mk include $(SRC)/make/rules-autoconf.mk
include $(SRC)/make/rules-configure.mk
include $(SRC)/make/rules-winemaker.mk include $(SRC)/make/rules-winemaker.mk
include $(SRC)/make/rules-cargo.mk include $(SRC)/make/rules-cargo.mk
@ -351,7 +352,7 @@ $(DIST_FONTS): fonts
ALL_TARGETS += dist ALL_TARGETS += dist
GOAL_TARGETS += dist GOAL_TARGETS += dist
dist_prefix: wine gst_good dist_prefix: wine gst_good gst_libav
find $(DST_LIBDIR32)/wine -type f -execdir chmod a-w '{}' '+' find $(DST_LIBDIR32)/wine -type f -execdir chmod a-w '{}' '+'
find $(DST_LIBDIR64)/wine -type f -execdir chmod a-w '{}' '+' find $(DST_LIBDIR64)/wine -type f -execdir chmod a-w '{}' '+'
rm -rf $(abspath $(DIST_PREFIX)) rm -rf $(abspath $(DIST_PREFIX))
@ -491,6 +492,37 @@ $(eval $(call rules-source,gst_good,$(SRCDIR)/gst-plugins-good))
$(eval $(call rules-meson,gst_good,32)) $(eval $(call rules-meson,gst_good,32))
$(eval $(call rules-meson,gst_good,64)) $(eval $(call rules-meson,gst_good,64))
##
## FFmpeg
##
FFMPEG_CONFIGURE_ARGS := \
--enable-shared \
--disable-static \
--disable-everything \
--disable-programs \
--disable-doc \
$(eval $(call rules-source,ffmpeg,$(SRCDIR)/ffmpeg))
$(eval $(call rules-configure,ffmpeg,32))
$(eval $(call rules-configure,ffmpeg,64))
## Only use ffmpeg to build gst-libav; we don't ship it.
$(OBJ)/.ffmpeg-dist32:
touch $@
$(OBJ)/.ffmpeg-dist64:
touch $@
##
## gst-libav
##
GST_LIBAV_DEPENDS = gst_orc gstreamer gst_base ffmpeg
$(eval $(call rules-source,gst_libav,$(SRCDIR)/gst-libav))
$(eval $(call rules-meson,gst_libav,32))
$(eval $(call rules-meson,gst_libav,64))
## ##
## Vulkan-Headers ## Vulkan-Headers

1
ffmpeg Submodule

@ -0,0 +1 @@
Subproject commit a77521cd5d27e955b16e8097eecefc779ffdcb6d

1
gst-libav Submodule

@ -0,0 +1 @@
Subproject commit e896aabe3c3d278510fb567712c4a55ed0eae075

39
make/rules-configure.mk Normal file
View File

@ -0,0 +1,39 @@
# parameters:
# $(1): lowercase package name
# $(2): uppercase package name
# $(3): 32/64, build type
# $(4): CROSS/<empty>, cross compile
#
define create-rules-configure
$(call create-rules-common,$(1),$(2),$(3),$(4))
ifeq ($(CONTAINER),1)
$$(OBJ)/.$(1)-configure$(3):
@echo ":: configuring $(3)bit $(1)..." >&2
cd "$$($(2)_OBJ$(3))" && env $$($(2)_ENV$(3)) \
$$($(2)_SRC)/configure $(--quiet?) \
--cross-prefix=$$(TARGET_$(3))- \
--arch=$(CONFIGURE_ARCH$(3)) \
--target-os=linux \
--prefix="$$($(2)_DST$(3))" \
--libdir="$$($(2)_DST$(3))/lib$(subst 32,,$(3))" \
$$($(2)_CONFIGURE_ARGS) \
$$($(2)_CONFIGURE_ARGS$(3))
touch $$@
$$(OBJ)/.$(1)-build$(3):
@echo ":: building $(3)bit $(1)..." >&2
cd "$$($(2)_OBJ$(3))" && env $$($(2)_ENV$(3)) \
$$(MAKE)
cd "$$($(2)_OBJ$(3))" && env $$($(2)_ENV$(3)) \
$$(MAKE) install
touch $$@
endif
endef
CONFIGURE_ARCH32 = x86
CONFIGURE_ARCH64 = x86_64
rules-configure = $(call create-rules-configure,$(1),$(call toupper,$(1)),$(2),$(3))