60-libxrandr.sh 929 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #!/bin/bash
  2. SCRIPT_REPO="https://gitlab.freedesktop.org/xorg/lib/libxrandr.git"
  3. SCRIPT_COMMIT="8bf72e84e3cf0106532c5c7b8b30154ce48c70e0"
  4. ffbuild_enabled() {
  5. [[ $TARGET != linux* ]] && return -1
  6. return 0
  7. }
  8. ffbuild_dockerbuild() {
  9. autoreconf -i
  10. local myconf=(
  11. --prefix="$FFBUILD_PREFIX"
  12. --enable-shared
  13. --disable-static
  14. --with-pic
  15. )
  16. if [[ $TARGET == linuxarm64 ]]; then
  17. myconf+=(
  18. --disable-malloc0returnsnull
  19. )
  20. fi
  21. if [[ $TARGET == linux* ]]; then
  22. myconf+=(
  23. --host="$FFBUILD_TOOLCHAIN"
  24. )
  25. else
  26. echo "Unknown target"
  27. return -1
  28. fi
  29. export CFLAGS="$RAW_CFLAGS"
  30. export LDFLAFS="$RAW_LDFLAGS"
  31. ./configure "${myconf[@]}"
  32. make -j$(nproc)
  33. make install
  34. gen-implib "$FFBUILD_PREFIX"/lib/{libXrandr.so.2,libXrandr.a}
  35. rm "$FFBUILD_PREFIX"/lib/libXrandr{.so*,.la}
  36. }