diff --git a/ports/libxshmfence/build.sh b/ports/libxshmfence/build.sh new file mode 100755 index 00000000..3b23fd04 --- /dev/null +++ b/ports/libxshmfence/build.sh @@ -0,0 +1,11 @@ +#!/bin/bash ../install.sh + +NAME='libxshmfence' +VERSION='1.3.3' +DOWNLOAD_URL="https://www.x.org/releases/individual/lib/libxshmfence-$VERSION.tar.xz#d4a4df096aba96fea02c029ee3a44e11a47eb7f7213c1a729be83e85ec3fde10" +CONFIG_SUB=('config.sub') +DEPENDENCIES=('xorgproto') +CONFIGURE_OPTIONS=( + '--enable-shared=yes' + '--enable-static=no' +) diff --git a/ports/libxshmfence/patches/0001-add-shared-library-support.patch b/ports/libxshmfence/patches/0001-add-shared-library-support.patch new file mode 100644 index 00000000..7fb7a4d1 --- /dev/null +++ b/ports/libxshmfence/patches/0001-add-shared-library-support.patch @@ -0,0 +1,31 @@ +diff -ruN libxshmfence-1.3.3/configure libxshmfence-1.3.3-banan_os/configure +--- libxshmfence-1.3.3/configure 2024-12-14 04:05:14.000000000 +0200 ++++ libxshmfence-1.3.3-banan_os/configure 2026-07-05 09:29:32.691762812 +0300 +@@ -6238,6 +6238,10 @@ + lt_cv_deplibs_check_method=pass_all + ;; + ++banan_os*) ++ lt_cv_deplibs_check_method=pass_all ++ ;; ++ + beos*) + lt_cv_deplibs_check_method=pass_all + ;; +@@ -11742,6 +11746,16 @@ + ;; + esac + ;; ++ ++banan_os*) ++ version_type=linux # correct to gnu/linux during the next big refactor ++ need_lib_prefix=no ++ need_version=no ++ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ++ soname_spec='$libname$release$shared_ext$major' ++ dynamic_linker="$host_os DynamicLoader.so" ++ shlibpath_var=LD_LIBRARY_PATH ++ ;; + + beos*) + library_names_spec='$libname$shared_ext' diff --git a/ports/libxshmfence/patches/0002-implement-futex.patch b/ports/libxshmfence/patches/0002-implement-futex.patch new file mode 100644 index 00000000..c050575e --- /dev/null +++ b/ports/libxshmfence/patches/0002-implement-futex.patch @@ -0,0 +1,22 @@ +diff -ruN libxshmfence-1.3.3/src/xshmfence_futex.h libxshmfence-1.3.3-banan_os/src/xshmfence_futex.h +--- libxshmfence-1.3.3/src/xshmfence_futex.h 2024-12-14 04:05:01.000000000 +0200 ++++ libxshmfence-1.3.3-banan_os/src/xshmfence_futex.h 2026-07-05 09:37:56.106400833 +0300 +@@ -45,6 +45,18 @@ + return sys_futex(addr, UMTX_OP_WAIT_UINT, value); + } + ++#elif defined(__banan_os__) ++ ++#include ++ ++static inline int futex_wake(int32_t *addr) { ++ return futex(FUTEX_WAKE, (const uint32_t*)addr, INT_MAX, nullptr); ++} ++ ++static inline int futex_wait(int32_t *addr, int32_t value) { ++ return futex(FUTEX_WAIT, (const uint32_t*)addr, value, nullptr); ++} ++ + #else + + #include