diff options
author | Lukas Rusak <lorusak@gmail.com> | 2020-10-08 13:51:45 -0700 |
---|---|---|
committer | Lukas Rusak <lorusak@gmail.com> | 2020-10-17 10:24:07 -0700 |
commit | dce453c8a0747cfb940a74279eb91b4580e61966 (patch) | |
tree | fc4f19d10532c56fdfab9f6443dfb97c9b46b4b2 /tools | |
parent | f68475a8d5ffcf20095d01e5cb768966ae198a3d (diff) |
tools/depends: allow building GLES lib for x11 and wayland
Diffstat (limited to 'tools')
-rw-r--r-- | tools/depends/Makefile.include.in | 1 | ||||
-rw-r--r-- | tools/depends/configure.ac | 2 | ||||
-rw-r--r-- | tools/depends/native/Makefile | 8 | ||||
-rw-r--r-- | tools/depends/native/python3/Makefile | 2 | ||||
-rw-r--r-- | tools/depends/target/Makefile | 43 | ||||
-rw-r--r-- | tools/depends/target/libva/Makefile | 5 | ||||
-rw-r--r-- | tools/depends/target/mesa/Makefile | 5 | ||||
-rw-r--r-- | tools/depends/target/wayland-protocols/Makefile | 1 | ||||
-rw-r--r-- | tools/depends/target/wayland/Makefile | 7 |
9 files changed, 39 insertions, 35 deletions
diff --git a/tools/depends/Makefile.include.in b/tools/depends/Makefile.include.in index 06daf98e3a..f4d051c292 100644 --- a/tools/depends/Makefile.include.in +++ b/tools/depends/Makefile.include.in @@ -23,6 +23,7 @@ CROSS_COMPILING=@cross_compiling@ ARCH_DEFINES=@ARCH_DEFINES@ NATIVE_ARCH_DEFINES=@NATIVE_ARCH_DEFINES@ TARGET_PLATFORM=@target_platform@ +RENDER_SYSTEM=@app_rendersystem@ AAPT=@AAPT@ DX=@DX@ ZIPALIGN=@ZIPALIGN@ diff --git a/tools/depends/configure.ac b/tools/depends/configure.ac index 5bd7049c3f..cbc57e56c7 100644 --- a/tools/depends/configure.ac +++ b/tools/depends/configure.ac @@ -432,7 +432,7 @@ case $host in esac case $use_platform in - gbm|wayland) + gbm|wayland|x11) if test "$platform_os" != "linux"; then AC_MSG_ERROR([$use_platform is only supported on the Linux platform]) fi diff --git a/tools/depends/native/Makefile b/tools/depends/native/Makefile index e5aff1f9df..70f1008290 100644 --- a/tools/depends/native/Makefile +++ b/tools/depends/native/Makefile @@ -18,13 +18,13 @@ ifeq ($(OS),darwin_embedded) NATIVE += dpkg xz tar ldid endif -ifeq ($(TARGET_PLATFORM),wayland) +ifeq ($(OS),linux) NATIVE += expat wayland-scanner waylandpp-scanner EXPAT = expat -endif -ifeq ($(TARGET_PLATFORM),gbm) - NATIVE += MarkupSafe Mako + ifeq ($(RENDER_SYSTEM),gles) + NATIVE += MarkupSafe Mako + endif endif .PHONY: $(NATIVE) native diff --git a/tools/depends/native/python3/Makefile b/tools/depends/native/python3/Makefile index 86931e4087..df62a04e44 100644 --- a/tools/depends/native/python3/Makefile +++ b/tools/depends/native/python3/Makefile @@ -12,7 +12,7 @@ HOSTPYTHONDIR=$(CWD)/$(PLATFORM)/hostpython BASE_URL=https://www.python.org/ftp/python/$(VERSION) CONFIGURE=./configure --prefix=$(NATIVEPREFIX) --disable-shared --disable-framework --without-pymalloc --with-system-ffi -ifeq ($(TARGET_PLATFORM),wayland) +ifeq ($(OS),linux) CONFIGURE += --with-system-expat endif diff --git a/tools/depends/target/Makefile b/tools/depends/target/Makefile index 6f6d32f2d6..8b3e476e74 100644 --- a/tools/depends/target/Makefile +++ b/tools/depends/target/Makefile @@ -61,24 +61,24 @@ endif WAYLANDPP_DEPS= ALSA_LIB= ifeq ($(OS),linux) - DEPENDS += dbus libuuid alsa-lib + DEPENDS += dbus libuuid alsa-lib libdrm libxkbcommon libinput libudev libevdev mtdev wayland waylandpp wayland-protocols linux-system-x11-libs ALSA_LIB = alsa-lib LIBUUID = libuuid - ifeq ($(TARGET_PLATFORM),gbm) - DEPENDS += libxkbcommon libinput libudev libevdev mtdev libdrm mesa - ifeq ($(CPU),x86_64) - DEPENDS += libva - LIBVA = libva - endif + ifeq ($(RENDER_SYSTEM),gl) + DEPENDS += linux-system-gl-libs else - DEPENDS += linux-system-libs - WAYLANDPP_DEPS += linux-system-libs + DEPENDS += mesa endif -endif -ifeq ($(TARGET_PLATFORM),wayland) - DEPENDS += wayland waylandpp wayland-protocols + MESA_DEPS += wayland-protocols wayland linux-system-x11-libs + + ifeq ($(CPU),x86_64) + LIBVA_DEPS += wayland linux-system-x11-libs + + DEPENDS += libva + LIBVA = libva + endif endif .PHONY: $(DEPENDS) @@ -122,8 +122,8 @@ dav1d: meson-cross-file fribidi: meson-cross-file libspdlog: libfmt libdrm: meson-cross-file -mesa: libdrm meson-cross-file -libva: libdrm +mesa: libdrm meson-cross-file $(MESA_DEPS) +libva: libdrm $(LIBVA_DEPS) .installed-$(PLATFORM): $(DEPENDS) touch $@ @@ -148,9 +148,7 @@ test-dependencies: distclean:: for d in $(DEPENDS); do $(MAKE) -C $$d distclean; done -linux-system-libs-egl: - [ -f $(PREFIX)/lib/pkgconfig/egl.pc ] || ln -sf /usr/lib/$(HOST)/pkgconfig/egl.pc $(PREFIX)/lib/pkgconfig/egl.pc - [ -f $(PREFIX)/lib/pkgconfig/wayland-egl.pc ] || ln -sf /usr/lib/$(HOST)/pkgconfig/wayland-egl.pc $(PREFIX)/lib/pkgconfig/wayland-egl.pc +linux-system-x11-libs: [ -f $(PREFIX)/lib/pkgconfig/damageproto.pc ] || ln -sf /usr/share/pkgconfig/damageproto.pc $(PREFIX)/lib/pkgconfig/damageproto.pc [ -f $(PREFIX)/lib/pkgconfig/fixesproto.pc ] || ln -sf /usr/share/pkgconfig/fixesproto.pc $(PREFIX)/lib/pkgconfig/fixesproto.pc [ -f $(PREFIX)/lib/pkgconfig/x11-xcb.pc ] || ln -sf /usr/lib/$(HOST)/pkgconfig/x11-xcb.pc $(PREFIX)/lib/pkgconfig/x11-xcb.pc @@ -168,8 +166,6 @@ linux-system-libs-egl: [ -f $(PREFIX)/lib/pkgconfig/xfixes.pc ] || ln -sf /usr/lib/$(HOST)/pkgconfig/xfixes.pc $(PREFIX)/lib/pkgconfig/xfixes.pc [ -f $(PREFIX)/lib/pkgconfig/xshmfence.pc ] || ln -sf /usr/lib/$(HOST)/pkgconfig/xshmfence.pc $(PREFIX)/lib/pkgconfig/xshmfence.pc [ -f $(PREFIX)/lib/pkgconfig/xxf86vm.pc ] || ln -sf /usr/lib/$(HOST)/pkgconfig/xxf86vm.pc $(PREFIX)/lib/pkgconfig/xxf86vm.pc - -linux-system-libs: linux-system-libs-egl [ -f $(PREFIX)/lib/pkgconfig/x11.pc ] || ln -sf /usr/lib/$(HOST)/pkgconfig/x11.pc $(PREFIX)/lib/pkgconfig/x11.pc [ -f $(PREFIX)/lib/pkgconfig/xproto.pc ] || ln -sf /usr/share/pkgconfig/xproto.pc $(PREFIX)/lib/pkgconfig/xproto.pc [ -f $(PREFIX)/lib/pkgconfig/kbproto.pc ] || ln -sf /usr/share/pkgconfig/kbproto.pc $(PREFIX)/lib/pkgconfig/kbproto.pc @@ -187,9 +183,12 @@ linux-system-libs: linux-system-libs-egl [ -f $(PREFIX)/lib/pkgconfig/ice.pc ] || ln -sf /usr/lib/$(HOST)/pkgconfig/ice.pc $(PREFIX)/lib/pkgconfig/ice.pc [ -f $(PREFIX)/lib/pkgconfig/sm.pc ] || ln -sf /usr/lib/$(HOST)/pkgconfig/sm.pc $(PREFIX)/lib/pkgconfig/sm.pc [ -f $(PREFIX)/lib/pkgconfig/xmu.pc ] || ln -sf /usr/lib/$(HOST)/pkgconfig/xmu.pc $(PREFIX)/lib/pkgconfig/xmu.pc - [ -f $(PREFIX)/lib/pkgconfig/libdrm.pc ] || ln -sf /usr/lib/$(HOST)/pkgconfig/libdrm.pc $(PREFIX)/lib/pkgconfig/libdrm.pc - [ -f $(PREFIX)/lib/pkgconfig/xkbcommon.pc ] || ln -sf /usr/lib/$(HOST)/pkgconfig/xkbcommon.pc $(PREFIX)/lib/pkgconfig/xkbcommon.pc - [ -f $(PREFIX)/lib/pkgconfig/libva.pc ] || ln -sf /usr/lib/$(HOST)/pkgconfig/libva.pc $(PREFIX)/lib/pkgconfig/libva.pc + +linux-system-gl-libs: + [ -f $(PREFIX)/lib/pkgconfig/egl.pc ] || ln -sf /usr/lib/$(HOST)/pkgconfig/egl.pc $(PREFIX)/lib/pkgconfig/egl.pc + [ -f $(PREFIX)/lib/pkgconfig/wayland-egl.pc ] || ln -sf /usr/lib/$(HOST)/pkgconfig/wayland-egl.pc $(PREFIX)/lib/pkgconfig/wayland-egl.pc + [ -f $(PREFIX)/lib/pkgconfig/gl.pc ] || ln -sf /usr/lib/$(HOST)/pkgconfig/gl.pc $(PREFIX)/lib/pkgconfig/gl.pc + [ -f $(PREFIX)/lib/pkgconfig/glu.pc ] || ln -sf /usr/lib/$(HOST)/pkgconfig/glu.pc $(PREFIX)/lib/pkgconfig/glu.pc $(PREFIX)/share/cross-file.meson: PREFIX="$(PREFIX)" \ diff --git a/tools/depends/target/libva/Makefile b/tools/depends/target/libva/Makefile index dd1f586297..35ceb66e18 100644 --- a/tools/depends/target/libva/Makefile +++ b/tools/depends/target/libva/Makefile @@ -18,10 +18,7 @@ CONFIGURE = $(NATIVEPREFIX)/bin/python3 $(NATIVEPREFIX)/bin/meson \ --buildtype=$(MESON_BUILD_TYPE) \ -Ddisable_drm=false \ -Denable_docs=false \ - -Denable_va_messaging=true \ - -Dwith_x11=no \ - -Dwith_glx=no \ - -Dwith_wayland=no + -Denable_va_messaging=true ifeq ($(CROSS_COMPILING), yes) CONFIGURE += --cross-file $(PREFIX)/share/cross-file.meson diff --git a/tools/depends/target/mesa/Makefile b/tools/depends/target/mesa/Makefile index c9d3b72b81..e8738e46e2 100644 --- a/tools/depends/target/mesa/Makefile +++ b/tools/depends/target/mesa/Makefile @@ -15,6 +15,7 @@ ifeq ($(CPU), x86_64) MESA_GALLIUM_DRIVERS=iris else ifeq ($(CPU), arm) MESA_GALLIUM_DRIVERS=kmsro,vc4 + MESA_EXTRA=-Dplatforms=wayland,drm endif # configuration settings @@ -41,7 +42,6 @@ CONFIGURE = $(NATIVEPREFIX)/bin/python3 $(NATIVEPREFIX)/bin/meson \ -Dbuild-tests=false \ -Dselinux=false \ -Dosmesa=none \ - -Dplatforms="drm" \ -Ddri3=false \ -Dglx=disabled \ -Dglvnd=false \ @@ -50,7 +50,8 @@ CONFIGURE = $(NATIVEPREFIX)/bin/python3 $(NATIVEPREFIX)/bin/meson \ -Dgallium-va=false \ -Dgallium-xa=false \ -Dgles1=false \ - -Dgles2=true + -Dgles2=true \ + $(MESA_EXTRA) ifeq ($(CROSS_COMPILING), yes) CONFIGURE += --cross-file $(PREFIX)/share/cross-file.meson diff --git a/tools/depends/target/wayland-protocols/Makefile b/tools/depends/target/wayland-protocols/Makefile index 340eb41a74..ea70b1b946 100644 --- a/tools/depends/target/wayland-protocols/Makefile +++ b/tools/depends/target/wayland-protocols/Makefile @@ -40,6 +40,7 @@ endif .installed-$(PLATFORM): $(PLATFORM) $(MAKE) -C $(PLATFORM) install + ln -sf $(PREFIX)/share/pkgconfig/wayland-protocols.pc $(PREFIX)/lib/pkgconfig/wayland-protocols.pc touch $@ clean: diff --git a/tools/depends/target/wayland/Makefile b/tools/depends/target/wayland/Makefile index 49de928782..ffc8ee5fd1 100644 --- a/tools/depends/target/wayland/Makefile +++ b/tools/depends/target/wayland/Makefile @@ -3,7 +3,7 @@ DEPS=../../Makefile.include Makefile # lib name, version LIBNAME=wayland -VERSION=1.13.0 +VERSION=1.17.0 SOURCE=$(LIBNAME)-$(VERSION) ARCHIVE=$(SOURCE).tar.xz @@ -27,6 +27,11 @@ $(LIBDYLIB): $(PLATFORM) .installed-$(PLATFORM): $(LIBDYLIB) $(MAKE) -C $(PLATFORM) install + + # remove the target wayland scanner from the sysroot. We only want to use the native one + rm -f $(PREFIX)/bin/wayland-scanner + rm -f $(PREFIX)/lib/pkgconfig/wayland-scanner.pc + ln -sf $(NATIVEPREFIX)/lib/pkgconfig/wayland-scanner.pc $(PREFIX)/lib/pkgconfig/wayland-scanner.pc touch $@ clean: |