libyuv: make shared object

- Adjust port to Genode expected layout
- Make shared library
- Adjust dependent infrastructure to change

issue #4196
This commit is contained in:
Sebastian Sumpf 2021-05-25 11:01:55 +02:00 committed by Christian Helmuth
parent ff128df131
commit 9165c7601d
20 changed files with 27 additions and 52 deletions

View File

@ -1 +1 @@
INC_DIR += $(call select_from_ports,libyuv)/libyuv/include
INC_DIR += $(call select_from_ports,libyuv)/include

View File

@ -1,8 +1,11 @@
YUV_DIR = $(call select_from_ports,libyuv)/libyuv
SHARED_LIB = yes
YUV_PORT = $(call select_from_ports,libyuv)
YUV_DIR = $(YUV_PORT)/src/lib/libyuv
LIBS = libc stdcxx jpeg
INC_DIR += $(YUV_DIR)/include
INC_DIR += $(YUV_PORT)/include
SRC_CC = $(notdir $(wildcard $(YUV_DIR)/source/*.cc))

View File

@ -1 +1 @@
55b2eba298081feccdcc7400c309842be9c24f93
01cdd9be97364d27b8d6aa7aafc18ba0f2eb4c3f

View File

@ -3,8 +3,13 @@ VERSION := git
DOWNLOADS := libyuv.git
URL(libyuv) := https://chromium.googlesource.com/libyuv/libyuv
DIR(libyuv) := libyuv
DIR(libyuv) := src/lib/libyuv
REV(libyuv) := 8c8d907d29255ae0630f414e0e09ee9cca8f4bfc
PATCHES := src/lib/libyuv/constraints.patch
DIRS := include include/libyuv
DIR_CONTENT(include) := src/lib/libyuv/include/libyuv.h
DIR_CONTENT(include/libyuv) := src/lib/libyuv/include/libyuv/*.h
PATCHES := src/lib/libyuv/constraints.patch
PATCH_OPT := -d src/lib/libyuv -p1

View File

@ -5,6 +5,7 @@ _/src/init
_/src/posix
_/src/zlib
_/src/libiconv
_/src/libyuv
_/src/stdcxx
_/src/vfs
_/src/jpeg

View File

@ -26,6 +26,7 @@
<rom label="libc.lib.so"/>
<rom label="libm.lib.so"/>
<rom label="libiconv.lib.so"/>
<rom label="libyuv.lib.so"/>
<rom label="qemu-usb.lib.so"/>
<rom label="stdcxx.lib.so"/>
<rom label="vfs.lib.so"/>

View File

@ -6,6 +6,7 @@ _/src/init
_/src/posix
_/src/zlib
_/src/libiconv
_/src/libyuv
_/src/stdcxx
_/src/vfs
_/src/jpeg

View File

@ -25,6 +25,7 @@
<rom label="libc.lib.so"/>
<rom label="libm.lib.so"/>
<rom label="libiconv.lib.so"/>
<rom label="libyuv.lib.so"/>
<rom label="qemu-usb.lib.so"/>
<rom label="stdcxx.lib.so"/>
<rom label="vfs.lib.so"/>

View File

@ -4,6 +4,7 @@ _/src/init
_/src/posix
_/src/zlib
_/src/libiconv
_/src/libyuv
_/src/stdcxx
_/src/vfs
_/src/jpeg

View File

@ -80,6 +80,7 @@
<rom label="libc.lib.so"/>
<rom label="libm.lib.so"/>
<rom label="libiconv.lib.so"/>
<rom label="libyuv.lib.so"/>
<rom label="qemu-usb.lib.so"/>
<rom label="stdcxx.lib.so"/>
<rom label="vfs.lib.so"/>

View File

@ -50,10 +50,6 @@ MIRROR_FROM_LIBPORTS := lib/mk/libc-mem.mk \
lib/mk/spec/x86_64/qemu-usb.mk \
include/qemu \
src/lib/qemu-usb \
lib/import/import-libyuv.mk \
lib/mk/libyuv.inc \
lib/mk/spec/x86_32/libyuv.mk \
lib/mk/spec/x86_64/libyuv.mk
content: $(MIRROR_FROM_LIBPORTS)
@ -71,16 +67,6 @@ $(MIRROR_FROM_QEMU_USB_PORT_DIR):
mkdir -p $(dir $@)
cp -r $(QEMU_USB_PORT_DIR)/$@ $(dir $@)
LIBYUV_PORT_DIR := $(call port_dir,$(GENODE_DIR)/repos/libports/ports/libyuv)
MIRROR_FROM_LIBYUV_PORT_DIR := libyuv
content: $(MIRROR_FROM_LIBYUV_PORT_DIR)
$(MIRROR_FROM_LIBYUV_PORT_DIR):
mkdir -p $(dir $@)
cp -r $(LIBYUV_PORT_DIR)/$@ $(dir $@)
MIRROR_FROM_OS := src/drivers/ps2/scan_code_set_1.h \
include/pointer/shape_report.h \

View File

@ -19,4 +19,4 @@ usb_session
vfs
nitpicker_gfx
blit
jpeg
libyuv

View File

@ -51,10 +51,6 @@ MIRROR_FROM_LIBPORTS := lib/mk/libc-mem.mk \
lib/mk/spec/x86_64/qemu-usb.mk \
include/qemu \
src/lib/qemu-usb \
lib/import/import-libyuv.mk \
lib/mk/libyuv.inc \
lib/mk/spec/x86_32/libyuv.mk \
lib/mk/spec/x86_64/libyuv.mk
content: $(MIRROR_FROM_LIBPORTS)
@ -72,16 +68,6 @@ $(MIRROR_FROM_QEMU_USB_PORT_DIR):
mkdir -p $(dir $@)
cp -r $(QEMU_USB_PORT_DIR)/$@ $(dir $@)
LIBYUV_PORT_DIR := $(call port_dir,$(GENODE_DIR)/repos/libports/ports/libyuv)
MIRROR_FROM_LIBYUV_PORT_DIR := libyuv
content: $(MIRROR_FROM_LIBYUV_PORT_DIR)
$(MIRROR_FROM_LIBYUV_PORT_DIR):
mkdir -p $(dir $@)
cp -r $(LIBYUV_PORT_DIR)/$@ $(dir $@)
MIRROR_FROM_OS := src/drivers/ps2/scan_code_set_1.h \
include/pointer/shape_report.h \

View File

@ -19,4 +19,4 @@ vfs
vm_session
nitpicker_gfx
blit
jpeg
libyuv

View File

@ -31,16 +31,12 @@ src/virtualbox6_sdk:
MIRROR_FROM_LIBPORTS := \
include/qemu \
lib/import/import-libyuv.mk \
lib/import/import-qemu-usb_include.mk \
lib/mk/libc-common.inc \
lib/mk/libc-mem.mk \
lib/mk/libyuv.inc \
lib/mk/qemu-usb.inc \
lib/mk/qemu-usb_include.mk \
lib/mk/spec/x86_32/libyuv.mk \
lib/mk/spec/x86_32/qemu-usb.mk \
lib/mk/spec/x86_64/libyuv.mk \
lib/mk/spec/x86_64/qemu-usb.mk \
src/lib/libc/internal/init.h \
src/lib/libc/internal/mem_alloc.h \
@ -69,16 +65,6 @@ $(MIRROR_FROM_QEMU_USB_PORT_DIR):
mkdir -p $(dir $@)
cp -r $(QEMU_USB_PORT_DIR)/$@ $(dir $@)
LIBYUV_PORT_DIR := $(call port_dir,$(GENODE_DIR)/repos/libports/ports/libyuv)
MIRROR_FROM_LIBYUV_PORT_DIR := libyuv
content: $(MIRROR_FROM_LIBYUV_PORT_DIR)
$(MIRROR_FROM_LIBYUV_PORT_DIR):
mkdir -p $(dir $@)
cp -r $(LIBYUV_PORT_DIR)/$@ $(dir $@)
MIRROR_FROM_OS := src/drivers/ps2/scan_code_set_1.h \
include/pointer/shape_report.h \

View File

@ -15,4 +15,4 @@ timer_session
usb_session
vfs
vm_session
jpeg
libyuv

View File

@ -266,6 +266,7 @@ set boot_modules {
ld.lib.so libc.lib.so libm.lib.so
libiconv.lib.so stdcxx.lib.so
qemu-usb.lib.so
libyuv.lib.so jpeg.lib.so
}
append boot_modules " [usb_host_drv_binary] "

View File

@ -295,6 +295,7 @@ lappend_if [expr $use_gui] boot_modules report_rom
append boot_modules {
libiconv.lib.so
qemu-usb.lib.so
libyuv.lib.so
}
append_if [expr $use_net] boot_modules { ipxe_nic_drv }

View File

@ -281,7 +281,7 @@ close $fd
set boot_modules {
rtc_drv
virtualbox6 libc.lib.so vfs.lib.so libm.lib.so libiconv.lib.so stdcxx.lib.so
qemu-usb.lib.so
qemu-usb.lib.so libyuv.lib.so jpeg.lib.so
fb_drv.config test.iso virtualbox6.vbox
}

View File

@ -405,6 +405,7 @@ install_config $config
append boot_modules {
ahci_drv
qemu-usb.lib.so
libyuv.lib.so
}
lappend_if [expr $use_serial] boot_modules log_terminal