diff --git a/srcpkgs/edb-debugger/patches/00-plugins-path.patch b/srcpkgs/edb-debugger/patches/00-plugins-path.patch new file mode 100644 index 00000000000..e2762020626 --- /dev/null +++ b/srcpkgs/edb-debugger/patches/00-plugins-path.patch @@ -0,0 +1,13 @@ +diff --git src/CMakeLists.txt src/CMakeLists.txt +index 2e453fa5..f2ac7461 100644 +--- src/CMakeLists.txt ++++ src/CMakeLists.txt +@@ -45,7 +45,7 @@ else() + set(GIT_BRANCH "Unknown") + endif() + add_definitions(-DGIT_BRANCH=${GIT_BRANCH}) +-add_definitions(-DDEFAULT_PLUGIN_PATH=${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/edb) ++add_definitions(-DDEFAULT_PLUGIN_PATH=${DEFAULT_PLUGIN_PATH}) + + include_directories( + "capstone-edb" diff --git a/srcpkgs/edb-debugger/patches/01-musl-long_long_min_max.patch b/srcpkgs/edb-debugger/patches/01-musl-long_long_min_max.patch new file mode 100644 index 00000000000..be934a07678 --- /dev/null +++ b/srcpkgs/edb-debugger/patches/01-musl-long_long_min_max.patch @@ -0,0 +1,19 @@ +diff --git src/DialogInputValue.cpp src/DialogInputValue.cpp +index aa26b4b7..0ca19575 100644 +--- src/DialogInputValue.cpp ++++ src/DialogInputValue.cpp +@@ -26,6 +26,14 @@ along with this program. If not, see . + + #include "ui_DialogInputValue.h" + ++#if !defined(__GLIBC__) ++/* These are not defined in musl libc */ ++#include ++#define LONG_LONG_MIN INT64_MIN ++#define LONG_LONG_MAX INT64_MAX ++#define ULONG_LONG_MAX UINT64_MAX ++#endif ++ + //------------------------------------------------------------------------------ + // Name: DialogInputValue + // Desc: diff --git a/srcpkgs/edb-debugger/patches/02-musl-__wall.patch b/srcpkgs/edb-debugger/patches/02-musl-__wall.patch new file mode 100644 index 00000000000..88a2af9785b --- /dev/null +++ b/srcpkgs/edb-debugger/patches/02-musl-__wall.patch @@ -0,0 +1,24 @@ +diff --git plugins/DebuggerCore/unix/linux/DebuggerCore.cpp plugins/DebuggerCore/unix/linux/DebuggerCore.cpp +index f9351aa5..b298152f 100644 +--- plugins/DebuggerCore/unix/linux/DebuggerCore.cpp ++++ plugins/DebuggerCore/unix/linux/DebuggerCore.cpp +@@ -45,6 +45,7 @@ along with this program. If not, see . + #include + #include + #include ++#include /* __WALL */ + + // doesn't always seem to be defined in the headers + +diff --git plugins/DebuggerCore/unix/linux/detect/proc-pid-mem-write.cpp plugins/DebuggerCore/unix/linux/detect/proc-pid-mem-write.cpp +index 6c64ff81..67198a59 100644 +--- plugins/DebuggerCore/unix/linux/detect/proc-pid-mem-write.cpp ++++ plugins/DebuggerCore/unix/linux/detect/proc-pid-mem-write.cpp +@@ -15,6 +15,7 @@ + #include + #include + #include ++#include /* __WALL */ + + enum Method { + Detected, diff --git a/srcpkgs/edb-debugger/patches/03-musl-__ptrace_request.patch b/srcpkgs/edb-debugger/patches/03-musl-__ptrace_request.patch new file mode 100644 index 00000000000..18bea4dccfc --- /dev/null +++ b/srcpkgs/edb-debugger/patches/03-musl-__ptrace_request.patch @@ -0,0 +1,15 @@ +diff --git plugins/DebuggerCore/unix/linux/PlatformThread.cpp plugins/DebuggerCore/unix/linux/PlatformThread.cpp +index 2ed6d704..2b963039 100644 +--- plugins/DebuggerCore/unix/linux/PlatformThread.cpp ++++ plugins/DebuggerCore/unix/linux/PlatformThread.cpp +@@ -34,6 +34,10 @@ along with this program. If not, see . + #include + #include + ++#if !defined(__GLIBC__) ++#define __ptrace_request int ++#endif ++ + // doesn't always seem to be defined in the headers + #ifndef PTRACE_GET_THREAD_AREA + #define PTRACE_GET_THREAD_AREA static_cast<__ptrace_request>(25) diff --git a/srcpkgs/edb-debugger/template b/srcpkgs/edb-debugger/template new file mode 100644 index 00000000000..bd39a0e6011 --- /dev/null +++ b/srcpkgs/edb-debugger/template @@ -0,0 +1,23 @@ +# Template file for 'edb-debugger' +pkgname=edb-debugger +version=0.9.21 +revision=1 +build_style=cmake +configure_args="-DCMAKE_INSTALL_PREFIX=/usr/ -DDEFAULT_PLUGIN_PATH=/usr/lib/edb/" +hostmakedepends='pkg-config' +makedepends="capstone-devel graphviz-devel boost-devel qt-devel" +short_desc="Cross platform x86/x86-64 debugger" +maintainer="DirectorX " +license="GPL-2" +homepage="https://github.com/eteran/edb-debugger" +distfiles="${homepage}/releases/download/${version}/${pkgname}-${version}.tgz" +checksum=2686619e1288152033d4c9c9a2568cb12841d3854bba8815c37ce77d3bd11706 + +case "${XBPS_TARGET_MACHINE}" in + arm*|aarch64*) + broken="${XBPS_TARGET_MACHINE} not supported yet" + ;; + mips*) + broken="${XBPS_TARGET_MACHINE} unsuported target" + ;; +esac