update rules
Some checks failed
PikaOS Package Build & Release (amd64-v3) / build (push) Failing after 2m11s

This commit is contained in:
Ward from fusion-voyager-3 2024-09-15 21:20:51 +03:00
parent 1e6c42e4f2
commit 6448fcfd7c
3 changed files with 88 additions and 46 deletions

View File

@ -1 +1 @@
9 10

13
debian/control vendored
View File

@ -279,6 +279,19 @@ Multi-Arch: same
Description: transitional dummy package Description: transitional dummy package
This is a transitional dummy package, it can be safely removed. This is a transitional dummy package, it can be safely removed.
Package: mesa-teflon-delegate-git
Section: libs
Architecture: arm64
Depends:
${shlibs:Depends},
${misc:Depends},
Pre-Depends: ${misc:Pre-Depends}
Multi-Arch: same
Description: Mesa TensorFlow Lite external delegate
TensorFlow Lite delegate which can make use of NPUs to accelerate ML
inference. It is implemented in the form of a external delegate, a shared
library which the TensorFlow Lite runtime can load at startup.
Package: libegl1-mesa-git-dev Package: libegl1-mesa-git-dev
Section: libdevel Section: libdevel
Architecture: any Architecture: any

109
debian/rules vendored
View File

@ -14,46 +14,56 @@ DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
# for finding the correct llvm-config when meson doesn't know about it yet # for finding the correct llvm-config when meson doesn't know about it yet
LLVM_VERSION = 18 LLVM_VERSION = 18
RUST_VERSION = 1.80
export PATH:=/usr/lib/llvm-$(LLVM_VERSION)/bin/:$(PATH) export PATH:=/usr/lib/llvm-$(LLVM_VERSION)/bin/:$(PATH)
export PATH:=/usr/lib/rust-$(RUST_VERSION)/bin/:$(PATH)
ifneq (,$(filter $(DEB_HOST_ARCH), amd64)) ifneq (,$(filter $(DEB_HOST_ARCH), amd64))
export DEB_BUILD_MAINT_OPTIONS=optimize=+lto export DEB_BUILD_MAINT_OPTIONS=optimize=+lto
else else
export DEB_BUILD_MAINT_OPTIONS=optimize=-lto export DEB_BUILD_MAINT_OPTIONS=optimize=-lto
endif endif
export MESON_PACKAGE_CACHE_DIR=/usr/share/cargo/registry/
ifeq (,$(filter $(DEB_HOST_ARCH), armhf ppc64el sh3 sh4)) DEB_CFLAGS_MAINT_APPEND := -Wall
buildflags = \ DEB_CXXFLAGS_MAINT_APPEND := -Wall
$(shell DEB_CFLAGS_MAINT_APPEND=-Wall DEB_CXXFLAGS_MAINT_APPEND=-Wall dpkg-buildflags --export=configure) ifneq (,$(filter $(DEB_HOST_ARCH), armhf))
else
ifneq (,$(filter $(DEB_HOST_ARCH), armhf))
# Workaround for a variant of LP: #725126 # Workaround for a variant of LP: #725126
buildflags = \ DEB_CFLAGS_MAINT_APPEND += -fno-optimize-sibling-calls
$(shell DEB_CFLAGS_MAINT_APPEND="-Wall -fno-optimize-sibling-calls" DEB_CXXFLAGS_MAINT_APPEND="-Wall -fno-optimize-sibling-calls" dpkg-buildflags --export=configure) DEB_CXXFLAGS_MAINT_APPEND += -fno-optimize-sibling-calls
else else ifneq (,$(filter $(DEB_HOST_ARCH), m68k))
# This library has huge jump tables: Debian #1067207
DEB_CFLAGS_MAINT_APPEND += -mlong-jump-table-offsets
DEB_CXXFLAGS_MAINT_APPEND += -mlong-jump-table-offsets
else ifneq (,$(filter $(DEB_HOST_ARCH), sh4))
# Workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83143 # Workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83143
buildflags = \ DEB_CFLAGS_MAINT_APPEND += -freorder-blocks-algorithm=simple
$(shell DEB_CFLAGS_MAINT_APPEND="-Wall -O1" DEB_CXXFLAGS_MAINT_APPEND="-Wall -O1" dpkg-buildflags --export=configure) DEB_CXXFLAGS_MAINT_APPEND += -freorder-blocks-algorithm=simple
endif
endif endif
buildflags = $(shell \
DEB_CFLAGS_MAINT_APPEND='$(DEB_CFLAGS_MAINT_APPEND)' \
DEB_CXXFLAGS_MAINT_APPEND='$(DEB_CXXFLAGS_MAINT_APPEND)' \
dpkg-buildflags --export=configure)
EGL_PLATFORMS = x11 EGL_PLATFORMS = x11
GALLIUM_DRIVERS = swrast GALLIUM_DRIVERS =
VULKAN_DRIVERS = VULKAN_DRIVERS =
VULKAN_LAYERS = VULKAN_LAYERS =
confflags_DRI3 = -Ddri3=disabled
confflags_OSMESA = -Dosmesa=true confflags_OSMESA = -Dosmesa=true
confflags_SSE2 = -Dsse2=true confflags_SSE2 = -Dsse2=true
confflags_TEFLON = -Dteflon=false
LLVM_ARCHS = amd64 arm64 armel armhf i386 loong64 powerpc ppc64 ppc64el riscv64 s390x sparc64 x32 LLVM_ARCHS = amd64 arm64 armel armhf i386 loong64 mips64el powerpc ppc64 ppc64el riscv64 s390x sparc64 x32
RUSTICL_ARCHS = amd64 arm64 armel armhf loong64 powerpc ppc64 ppc64el riscv64 s390x x32 RUSTICL_ARCHS = amd64 arm64 armel armhf loong64 mips64el powerpc ppc64 ppc64el riscv64 s390x x32
NVK_ARCHS = amd64 arm64 armhf ppc64 riscv64 x32
VALGRIND_ARCHS = amd64 arm64 armhf i386 mips64el powerpc ppc64 ppc64el s390x VALGRIND_ARCHS = amd64 arm64 armhf i386 mips64el powerpc ppc64 ppc64el s390x
WINE_ARCHS = amd64 arm64 armel armhf i386 WINE_ARCHS = amd64 arm64 armel armhf i386
WSL_ARCHS = amd64 arm64 WSL_ARCHS = amd64 arm64
# hurd doesn't do direct rendering # hurd doesn't do direct rendering
ifeq ($(DEB_HOST_ARCH_OS), hurd) ifeq ($(DEB_HOST_ARCH_OS), hurd)
GALLIUM_DRIVERS += softpipe
confflags_DIRECT_RENDERING = -Dglx-direct=false confflags_DIRECT_RENDERING = -Dglx-direct=false
confflags_GBM = -Dgbm=disabled confflags_GBM = -Dgbm=disabled
else else
@ -64,7 +74,6 @@ else
GALLIUM_DRIVERS += nouveau r300 r600 virgl GALLIUM_DRIVERS += nouveau r300 r600 virgl
confflags_DIRECT_RENDERING = -Dglx-direct=true confflags_DIRECT_RENDERING = -Dglx-direct=true
confflags_DRI3 = -Ddri3=enabled
confflags_GBM = -Dgbm=enabled confflags_GBM = -Dgbm=enabled
confflags_GALLIUM += -Dgallium-extra-hud=true confflags_GALLIUM += -Dgallium-extra-hud=true
confflags_GALLIUM += -Dgallium-vdpau=enabled confflags_GALLIUM += -Dgallium-vdpau=enabled
@ -73,8 +82,8 @@ else
# Freedreno requires arm in addition # Freedreno requires arm in addition
ifneq (,$(filter arm arm64,$(DEB_HOST_ARCH_CPU))) ifneq (,$(filter arm arm64,$(DEB_HOST_ARCH_CPU)))
GALLIUM_DRIVERS += freedreno GALLIUM_DRIVERS += freedreno
# broken # XXX - broken
# GALLIUM_DRIVERS += asahi #GALLIUM_DRIVERS += asahi
endif endif
# etnaviv, tegra, vc4 and v3d kernel support are only available on armhf and arm64 # etnaviv, tegra, vc4 and v3d kernel support are only available on armhf and arm64
@ -109,30 +118,17 @@ else
VULKAN_DRIVERS += microsoft-experimental VULKAN_DRIVERS += microsoft-experimental
endif endif
# nvk:
# ifneq ($(DEB_DISTRIBUTION), jammy)
# ifeq (,$(filter $(DEB_HOST_ARCH), i386))
# VULKAN_DRIVERS += nouveau
# endif
# endif
# LLVM is required for building r300g, radeonsi and llvmpipe drivers. # LLVM is required for building r300g, radeonsi and llvmpipe drivers.
# It's also required for building OpenCL support. # It's also required for building OpenCL support.
ifneq (,$(filter $(DEB_HOST_ARCH), $(LLVM_ARCHS))) ifneq (,$(filter $(DEB_HOST_ARCH), $(LLVM_ARCHS)))
GALLIUM_DRIVERS += radeonsi zink GALLIUM_DRIVERS += radeonsi zink llvmpipe
# Only enable amd on riscv64, swrast needs CPU JIT support which doesn't work properly yet
ifneq (,$(filter $(DEB_HOST_ARCH), riscv64))
VULKAN_DRIVERS += amd
confflags_GALLIUM += -Ddraw-use-llvm=false
else
# drop virtio from armel, it doesn't build # drop virtio from armel, it doesn't build
ifneq (,$(filter $(DEB_HOST_ARCH), armel)) ifneq (,$(filter $(DEB_HOST_ARCH), armel))
VULKAN_DRIVERS += amd swrast VULKAN_DRIVERS += amd swrast
else else
VULKAN_DRIVERS += amd swrast virtio VULKAN_DRIVERS += amd swrast virtio
endif endif
endif
VULKAN_LAYERS += device-select intel-nullhw overlay VULKAN_LAYERS += device-select intel-nullhw overlay
confflags_GALLIUM += -Dllvm=enabled confflags_GALLIUM += -Dllvm=enabled
@ -140,7 +136,15 @@ else
# Build rusticl for archs where rustc is available # Build rusticl for archs where rustc is available
ifneq (,$(filter $(DEB_HOST_ARCH), $(RUSTICL_ARCHS))) ifneq (,$(filter $(DEB_HOST_ARCH), $(RUSTICL_ARCHS)))
ifneq ($(DEB_DISTRIBUTION), xxx)
confflags_GALLIUM += -Dgallium-rusticl=true confflags_GALLIUM += -Dgallium-rusticl=true
else
confflags_GALLIUM += -Dgallium-rusticl=false
endif
endif
ifneq (,$(filter $(DEB_HOST_ARCH), $(NVK_ARCHS)))
VULKAN_DRIVERS += nouveau
endif endif
# nine makes sense only on archs that build wine # nine makes sense only on archs that build wine
@ -148,6 +152,7 @@ else
confflags_GALLIUM += -Dgallium-nine=true confflags_GALLIUM += -Dgallium-nine=true
endif endif
else else
GALLIUM_DRIVERS += softpipe
confflags_GALLIUM += -Dllvm=disabled confflags_GALLIUM += -Dllvm=disabled
endif endif
@ -155,6 +160,11 @@ else
confflags_GALLIUM += -Dgallium-va=enabled confflags_GALLIUM += -Dgallium-va=enabled
confflags_GALLIUM += -Dvideo-codecs="all" confflags_GALLIUM += -Dvideo-codecs="all"
endif endif
# Teflon only supports arm64
ifneq (,$(filter $(DEB_HOST_ARCH), arm64))
confflags_TEFLON = -Dteflon=true
endif
endif endif
#ifeq ($(DEB_HOST_ARCH), i386) #ifeq ($(DEB_HOST_ARCH), i386)
@ -182,34 +192,49 @@ confflags += \
-Dplatforms="[$(EGL_PLATFORMS_LIST)]" \ -Dplatforms="[$(EGL_PLATFORMS_LIST)]" \
-Dvulkan-drivers="[$(VULKAN_DRIVERS_LIST)]" \ -Dvulkan-drivers="[$(VULKAN_DRIVERS_LIST)]" \
-Dvulkan-layers="[$(VULKAN_LAYERS_LIST)]" \ -Dvulkan-layers="[$(VULKAN_LAYERS_LIST)]" \
-Dglvnd=true \ -Dglvnd=enabled \
-Dshared-glapi=enabled \ -Dshared-glapi=enabled \
-Dgallium-omx=disabled \
-Db_ndebug=true \ -Db_ndebug=true \
-Dbuild-tests=true \ -Dbuild-tests=true \
-Dtools=drm-shim \ -Dtools=drm-shim \
$(confflags_DIRECT_RENDERING) \ $(confflags_DIRECT_RENDERING) \
$(confflags_GBM) \ $(confflags_GBM) \
$(confflags_DRI3) \
$(confflags_GALLIUM) \ $(confflags_GALLIUM) \
$(confflags_GLES) \ $(confflags_GLES) \
$(confflags_OSMESA) \ $(confflags_OSMESA) \
$(confflags_SSE2) \ $(confflags_SSE2) \
$(confflags_VALGRIND) $(confflags_VALGRIND) \
$(confflags_TEFLON)
rewrite_wrap_files:
cp -r subprojects subprojects-save
for crate in paste proc-macro2 quote syn unicode-ident; \
do \
export crate_namever=`basename $$MESON_PACKAGE_CACHE_DIR/$$crate-*`; \
sed -e"/source.*/d" -e"s,$${crate}-.*,$${crate_namever}," -i subprojects/$${crate}.wrap; \
done
touch subprojects/rewrite
override_dh_clean: regen_control override_dh_clean: regen_control
sed -i 's/-.*//' VERSION dpkg-parsechangelog | awk '/^Version:/ {print $$2}' | sed 's/-.*//;s/~/-/' > VERSION
rm -rf .pc rm -rf .pc
rm -rf build rm -rf build
rm -rf configure bin/config.guess bin/config.sub config.h.in rm -rf configure bin/config.guess bin/config.sub config.h.in
rm -rf $$(find -name Makefile.in) rm -rf $$(find -name Makefile.in)
rm -rf bin/install-sh bin/ltmain.sh rm -rf bin/install-sh bin/ltmain.sh
rm -rf src/intel/vulkan/grl/parser.out
rm -rf src/intel/vulkan/grl/parsetab.py
for file in debian/*.links.in; do rm -f $${file%%.in}; done for file in debian/*.links.in; do rm -f $${file%%.in}; done
find -name '*.pyc' -delete find -name '*.pyc' -delete
find -name '__pycache__' -delete find -name '__pycache__' -delete
if [ -f subprojects/rewrite ]; then \
rm -rf subprojects; \
mv subprojects-save subprojects; \
fi
dh_clean dh_clean
override_dh_auto_configure: override_dh_auto_configure: rewrite_wrap_files
dpkg-parsechangelog | awk '/^Version:/ {print $$2}' > VERSION dpkg-parsechangelog | awk '/^Version:/ {print $$2}' > VERSION
$(buildflags) dh_auto_configure -- \ $(buildflags) dh_auto_configure -- \
$(confflags) $(confflags)
@ -236,14 +261,16 @@ override_dh_installchangelogs:
override_dh_install: override_dh_install:
# purge .la files # purge .la files
find debian/tmp/ -name '*.la' -exec rm '{}' ';' find debian/tmp/ -name '*.la' -exec rm '{}' ';'
# nvk:
find debian/tmp/usr/bin -name 'mme_*_sim_hw_test' -exec rm '{}' ';'
# Get rid of some files which aren't installed. Do not # Get rid of some files which aren't installed. Do not
# use -f to ensure we notice disappearing files: # use -f to ensure we notice disappearing files:
rm debian/tmp/usr/lib/*/libglapi.so rm debian/tmp/usr/lib/*/libglapi.so
rm debian/tmp/usr/lib/*/libEGL_mesa.so rm debian/tmp/usr/lib/*/libEGL_mesa.so
rm debian/tmp/usr/lib/*/libGLX_mesa.so rm debian/tmp/usr/lib/*/libGLX_mesa.so
ifneq (,$(filter $(DEB_HOST_ARCH), $(NVK_ARCHS)))
rm debian/tmp/usr/bin/mme_fermi_sim_hw_test
rm debian/tmp/usr/bin/mme_tu104_sim_hw_test
endif
# use -f here though # use -f here though
rm -f debian/tmp/usr/lib/*/libgrl.a rm -f debian/tmp/usr/lib/*/libgrl.a
@ -309,8 +336,10 @@ gentarball:
regen_control: regen_control:
sed -e"s,@LLVM_VERSION@,$(LLVM_VERSION),g" \ sed -e"s,@LLVM_VERSION@,$(LLVM_VERSION),g" \
-e"s,@RUST_VERSION@,$(RUST_VERSION),g" \
-e"s,@LLVM_ARCHS@,$(LLVM_ARCHS),g" \ -e"s,@LLVM_ARCHS@,$(LLVM_ARCHS),g" \
-e"s,@RUSTICL_ARCHS@,$(RUSTICL_ARCHS),g" \ -e"s,@RUSTICL_ARCHS@,$(RUSTICL_ARCHS),g" \
-e"s,@NVK_ARCHS@,$(NVK_ARCHS),g" \
-e"s,@VALGRIND_ARCHS@,$(VALGRIND_ARCHS),g" \ -e"s,@VALGRIND_ARCHS@,$(VALGRIND_ARCHS),g" \
-e"s,@WINE_ARCHS@,$(WINE_ARCHS),g" \ -e"s,@WINE_ARCHS@,$(WINE_ARCHS),g" \
debian/control.in > debian/control debian/control.in > debian/control