Hide trampoline symbols, lazy-load vaapi as well
This commit is contained in:
parent
60c5fd666d
commit
c6b1f3a439
19 changed files with 60 additions and 10 deletions
|
@ -33,7 +33,8 @@ RUN \
|
||||||
-delete && \
|
-delete && \
|
||||||
mkdir /opt/ffbuild
|
mkdir /opt/ffbuild
|
||||||
|
|
||||||
RUN git clone --filter=blob:none --depth=1 https://github.com/yugr/Implib.so /opt/implib
|
RUN git clone --filter=blob:none --depth=1 https://github.com/yugr/Implib.so /opt/implib && \
|
||||||
|
sed -i '/^.*\.globl.*/a \ \ .hidden $sym' /opt/implib/arch/*/trampoline.S.tpl
|
||||||
|
|
||||||
ADD toolchain.cmake /toolchain.cmake
|
ADD toolchain.cmake /toolchain.cmake
|
||||||
ADD cross.meson /cross.meson
|
ADD cross.meson /cross.meson
|
||||||
|
|
|
@ -38,4 +38,5 @@ ffbuild_dockerbuild() {
|
||||||
make install
|
make install
|
||||||
|
|
||||||
gen-implib "$FFBUILD_PREFIX"/lib/{libXau.so.6,libXau.a}
|
gen-implib "$FFBUILD_PREFIX"/lib/{libXau.so.6,libXau.a}
|
||||||
|
rm "$FFBUILD_PREFIX"/lib/libXau{.so*,.la}
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,6 +40,7 @@ ffbuild_dockerbuild() {
|
||||||
|
|
||||||
for LIBNAME in "$FFBUILD_PREFIX"/lib/libxcb*.so.?; do
|
for LIBNAME in "$FFBUILD_PREFIX"/lib/libxcb*.so.?; do
|
||||||
gen-implib "$LIBNAME" "${LIBNAME%%.*}.a"
|
gen-implib "$LIBNAME" "${LIBNAME%%.*}.a"
|
||||||
|
rm "${LIBNAME%%.*}"{.so*,.la}
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,4 +47,5 @@ ffbuild_dockerbuild() {
|
||||||
|
|
||||||
gen-implib "$FFBUILD_PREFIX"/lib/{libX11-xcb.so.1,libX11-xcb.a}
|
gen-implib "$FFBUILD_PREFIX"/lib/{libX11-xcb.so.1,libX11-xcb.a}
|
||||||
gen-implib "$FFBUILD_PREFIX"/lib/{libX11.so.6,libX11.a}
|
gen-implib "$FFBUILD_PREFIX"/lib/{libX11.so.6,libX11.a}
|
||||||
|
rm "$FFBUILD_PREFIX"/lib/libX11{,-xcb}{.so*,.la}
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,4 +42,5 @@ ffbuild_dockerbuild() {
|
||||||
make install
|
make install
|
||||||
|
|
||||||
gen-implib "$FFBUILD_PREFIX"/lib/{libXext.so.6,libXext.a}
|
gen-implib "$FFBUILD_PREFIX"/lib/{libXext.so.6,libXext.a}
|
||||||
|
rm "$FFBUILD_PREFIX"/lib/libXext{.so*,.la}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,4 +38,5 @@ ffbuild_dockerbuild() {
|
||||||
make install
|
make install
|
||||||
|
|
||||||
gen-implib "$FFBUILD_PREFIX"/lib/{libXfixes.so.3,libXfixes.a}
|
gen-implib "$FFBUILD_PREFIX"/lib/{libXfixes.so.3,libXfixes.a}
|
||||||
|
rm "$FFBUILD_PREFIX"/lib/libXfixes{.so*,.la}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,4 +38,5 @@ ffbuild_dockerbuild() {
|
||||||
make install
|
make install
|
||||||
|
|
||||||
gen-implib "$FFBUILD_PREFIX"/lib/{libXi.so.6,libXi.a}
|
gen-implib "$FFBUILD_PREFIX"/lib/{libXi.so.6,libXi.a}
|
||||||
|
rm "$FFBUILD_PREFIX"/lib/libXi{.so*,.la}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,4 +38,5 @@ ffbuild_dockerbuild() {
|
||||||
make install
|
make install
|
||||||
|
|
||||||
gen-implib "$FFBUILD_PREFIX"/lib/{libXinerama.so.1,libXinerama.a}
|
gen-implib "$FFBUILD_PREFIX"/lib/{libXinerama.so.1,libXinerama.a}
|
||||||
|
rm "$FFBUILD_PREFIX"/lib/libXinerama{.so*,.la}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,4 +38,5 @@ ffbuild_dockerbuild() {
|
||||||
make install
|
make install
|
||||||
|
|
||||||
gen-implib "$FFBUILD_PREFIX"/lib/{libXrender.so.1,libXrender.a}
|
gen-implib "$FFBUILD_PREFIX"/lib/{libXrender.so.1,libXrender.a}
|
||||||
|
rm "$FFBUILD_PREFIX"/lib/libXrender{.so*,.la}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,4 +38,5 @@ ffbuild_dockerbuild() {
|
||||||
make install
|
make install
|
||||||
|
|
||||||
gen-implib "$FFBUILD_PREFIX"/lib/{libXss.so.1,libXss.a}
|
gen-implib "$FFBUILD_PREFIX"/lib/{libXss.so.1,libXss.a}
|
||||||
|
rm "$FFBUILD_PREFIX"/lib/libXss{.so*,.la}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,4 +38,5 @@ ffbuild_dockerbuild() {
|
||||||
make install
|
make install
|
||||||
|
|
||||||
gen-implib "$FFBUILD_PREFIX"/lib/{libXxf86vm.so.1,libXxf86vm.a}
|
gen-implib "$FFBUILD_PREFIX"/lib/{libXxf86vm.so.1,libXxf86vm.a}
|
||||||
|
rm "$FFBUILD_PREFIX"/lib/libXxf86vm{.so*,.la}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,8 +34,9 @@ ffbuild_dockerbuild() {
|
||||||
export LDFLAFS="$RAW_LDFLAGS"
|
export LDFLAFS="$RAW_LDFLAGS"
|
||||||
|
|
||||||
./configure "${myconf[@]}"
|
./configure "${myconf[@]}"
|
||||||
make -j$(nproc) VERBOSE=1
|
make -j$(nproc)
|
||||||
make install
|
make install
|
||||||
|
|
||||||
gen-implib "$FFBUILD_PREFIX"/lib/{libXcursor.so.1,libXcursor.a}
|
gen-implib "$FFBUILD_PREFIX"/lib/{libXcursor.so.1,libXcursor.a}
|
||||||
|
rm "$FFBUILD_PREFIX"/lib/libXcursor{.so*,.la}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,4 +38,5 @@ ffbuild_dockerbuild() {
|
||||||
make install
|
make install
|
||||||
|
|
||||||
gen-implib "$FFBUILD_PREFIX"/lib/{libXrandr.so.2,libXrandr.a}
|
gen-implib "$FFBUILD_PREFIX"/lib/{libXrandr.so.2,libXrandr.a}
|
||||||
|
rm "$FFBUILD_PREFIX"/lib/libXrandr{.so*,.la}
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,6 +40,7 @@ ffbuild_dockerbuild() {
|
||||||
make install
|
make install
|
||||||
|
|
||||||
gen-implib "$FFBUILD_PREFIX"/lib/{libXv.so.1,libXv.a}
|
gen-implib "$FFBUILD_PREFIX"/lib/{libXv.so.1,libXv.a}
|
||||||
|
rm "$FFBUILD_PREFIX"/lib/libXv{.so*,.la}
|
||||||
}
|
}
|
||||||
|
|
||||||
ffbuild_configure() {
|
ffbuild_configure() {
|
||||||
|
|
|
@ -11,7 +11,8 @@ ffbuild_dockerlayer() {
|
||||||
}
|
}
|
||||||
|
|
||||||
ffbuild_dockerbuild() {
|
ffbuild_dockerbuild() {
|
||||||
rm "$FFBUILD_PREFIX"/lib/lib*.so*
|
rm "$FFBUILD_PREFIX"/lib/lib*.so* || true
|
||||||
|
rm "$FFBUILD_PREFIX"/lib/*.la || true
|
||||||
}
|
}
|
||||||
|
|
||||||
ffbuild_libs() {
|
ffbuild_libs() {
|
||||||
|
|
|
@ -16,8 +16,8 @@ ffbuild_dockerbuild() {
|
||||||
|
|
||||||
local myconf=(
|
local myconf=(
|
||||||
--prefix="$FFBUILD_PREFIX"
|
--prefix="$FFBUILD_PREFIX"
|
||||||
--disable-shared
|
--enable-shared
|
||||||
--enable-static
|
--disable-static
|
||||||
--with-pic
|
--with-pic
|
||||||
--with-zlib
|
--with-zlib
|
||||||
)
|
)
|
||||||
|
@ -31,7 +31,15 @@ ffbuild_dockerbuild() {
|
||||||
return -1
|
return -1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
export CFLAGS="$RAW_CFLAGS"
|
||||||
|
export LDFLAFS="$RAW_LDFLAGS"
|
||||||
|
|
||||||
./configure "${myconf[@]}"
|
./configure "${myconf[@]}"
|
||||||
make -j$(nproc)
|
make -j$(nproc)
|
||||||
make install
|
make install
|
||||||
|
|
||||||
|
gen-implib "$FFBUILD_PREFIX"/lib/{libpciaccess.so.0,libpciaccess.a}
|
||||||
|
rm "$FFBUILD_PREFIX"/lib/libpciaccess{.so*,.la}
|
||||||
|
|
||||||
|
echo "Libs: -ldl" >> "$FFBUILD_PREFIX"/lib/pkgconfig/pciaccess.pc
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ ffbuild_dockerbuild() {
|
||||||
|
|
||||||
local myconf=(
|
local myconf=(
|
||||||
--prefix="$FFBUILD_PREFIX"
|
--prefix="$FFBUILD_PREFIX"
|
||||||
-Ddefault_library=static
|
-Ddefault_library=shared
|
||||||
-Dlibkms=false
|
-Dlibkms=false
|
||||||
-Dudev=false
|
-Dudev=false
|
||||||
-Dcairo-tests=false
|
-Dcairo-tests=false
|
||||||
|
@ -40,9 +40,17 @@ ffbuild_dockerbuild() {
|
||||||
return -1
|
return -1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
export CFLAGS="$RAW_CFLAGS"
|
||||||
|
export LDFLAFS="$RAW_LDFLAGS"
|
||||||
|
|
||||||
meson "${myconf[@]}" ..
|
meson "${myconf[@]}" ..
|
||||||
ninja -j$(nproc)
|
ninja -j$(nproc)
|
||||||
ninja install
|
ninja install
|
||||||
|
|
||||||
|
gen-implib "$FFBUILD_PREFIX"/lib/{libdrm.so.2,libdrm.a}
|
||||||
|
rm "$FFBUILD_PREFIX"/lib/libdrm*.so*
|
||||||
|
|
||||||
|
echo "Libs: -ldl" >> "$FFBUILD_PREFIX"/lib/pkgconfig/libdrm.pc
|
||||||
}
|
}
|
||||||
|
|
||||||
ffbuild_configure() {
|
ffbuild_configure() {
|
||||||
|
|
|
@ -16,8 +16,8 @@ ffbuild_dockerbuild() {
|
||||||
|
|
||||||
local myconf=(
|
local myconf=(
|
||||||
--prefix="$FFBUILD_PREFIX"
|
--prefix="$FFBUILD_PREFIX"
|
||||||
--disable-shared
|
--enable-shared
|
||||||
--enable-static
|
--disable-static
|
||||||
--with-pic
|
--with-pic
|
||||||
--disable-docs
|
--disable-docs
|
||||||
--enable-drm
|
--enable-drm
|
||||||
|
@ -37,11 +37,19 @@ ffbuild_dockerbuild() {
|
||||||
return -1
|
return -1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
export CFLAGS="$RAW_CFLAGS"
|
||||||
|
export LDFLAFS="$RAW_LDFLAGS"
|
||||||
|
|
||||||
./configure "${myconf[@]}"
|
./configure "${myconf[@]}"
|
||||||
make -j$(nproc)
|
make -j$(nproc) VERBOSE=1
|
||||||
make install
|
make install
|
||||||
|
|
||||||
echo "Libs.private: -ldl" >> "$FFBUILD_PREFIX"/lib/pkgconfig/libva.pc
|
gen-implib "$FFBUILD_PREFIX"/lib/{libva.so.2,libva.a}
|
||||||
|
gen-implib "$FFBUILD_PREFIX"/lib/{libva-drm.so.2,libva-drm.a}
|
||||||
|
gen-implib "$FFBUILD_PREFIX"/lib/{libva-x11.so.2,libva-x11.a}
|
||||||
|
rm "$FFBUILD_PREFIX"/lib/libva{,-drm,-x11}{.so*,.la}
|
||||||
|
|
||||||
|
echo "Libs: -ldl" >> "$FFBUILD_PREFIX"/lib/pkgconfig/libva.pc
|
||||||
}
|
}
|
||||||
|
|
||||||
ffbuild_configure() {
|
ffbuild_configure() {
|
||||||
|
|
11
scripts.d/50-vaapi/99-finalize.sh
Executable file
11
scripts.d/50-vaapi/99-finalize.sh
Executable file
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
ffbuild_enabled() {
|
||||||
|
[[ $TARGET != linux* ]] && return -1
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
ffbuild_dockerbuild() {
|
||||||
|
rm "$FFBUILD_PREFIX"/lib/lib*.so* || true
|
||||||
|
rm "$FFBUILD_PREFIX"/lib/*.la || true
|
||||||
|
}
|
Loading…
Reference in a new issue