From 9a05280d40266e1aab6a02964a0e45dcea5bea05 Mon Sep 17 00:00:00 2001 From: Tee KOBAYASHI Date: Sun, 1 May 2022 13:53:21 +0900 Subject: [PATCH] new package: xournalpp --- x11-packages/xournalpp/build.sh | 12 ++++ x11-packages/xournalpp/no-execinfo.patch | 73 ++++++++++++++++++++++++ 2 files changed, 85 insertions(+) create mode 100644 x11-packages/xournalpp/build.sh create mode 100644 x11-packages/xournalpp/no-execinfo.patch diff --git a/x11-packages/xournalpp/build.sh b/x11-packages/xournalpp/build.sh new file mode 100644 index 000000000..70bd0988d --- /dev/null +++ b/x11-packages/xournalpp/build.sh @@ -0,0 +1,12 @@ +TERMUX_PKG_HOMEPAGE=https://github.com/xournalpp/xournalpp +TERMUX_PKG_DESCRIPTION="A hand note taking software" +TERMUX_PKG_LICENSE="GPL-2.0" +TERMUX_PKG_LICENSE_FILE="LICENSE, copyright.txt" +TERMUX_PKG_MAINTAINER="@termux" +TERMUX_PKG_VERSION=1.1.1 +TERMUX_PKG_SRCURL=https://github.com/xournalpp/xournalpp/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz +TERMUX_PKG_SHA256=0d7fea5392758d5180eb24cc219660e997f087ae5a62d5f30515a063f81252e2 +TERMUX_PKG_DEPENDS="glib, gtk3, libc++, librsvg, libsndfile, libxml2, libzip, poppler, portaudio, zlib" +TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" +-DHELP2MAN=NO +" diff --git a/x11-packages/xournalpp/no-execinfo.patch b/x11-packages/xournalpp/no-execinfo.patch new file mode 100644 index 000000000..0105b9fc3 --- /dev/null +++ b/x11-packages/xournalpp/no-execinfo.patch @@ -0,0 +1,73 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -88,7 +88,7 @@ + set(xournalpp_LDFLAGS ${xournalpp_LDFLAGS} "-mwindows") + # Need ImageMagick to generate icons on Windows + find_package(ImageMagick REQUIRED COMPONENTS convert) +-else () ++elseif (FALSE) + find_package(Backtrace REQUIRED) + add_includes_ldflags("${Backtrace_LIBRARIES}" "${Backtrace_INCLUDE_DIRS}") + endif () +--- a/src/util/CrashHandlerUnix.h ++++ b/src/util/CrashHandlerUnix.h +@@ -11,7 +11,9 @@ + + #include // std::ofstream + ++#ifndef __ANDROID__ + #include ++#endif + + #include "PathUtil.h" + +@@ -66,7 +68,11 @@ + size_t size; + + // get void*'s for all entries on the stack ++#ifndef __ANDROID__ + size = backtrace(array, 100); ++#else ++ size = 0; ++#endif + + time_t curtime = time(0); + char stime[128]; +@@ -83,7 +89,11 @@ + fp << FORMAT_STR("Error: signal {1}") % sig; + fp << "\n"; + ++#ifndef __ANDROID__ + messages = backtrace_symbols(array, size); ++#else ++ messages = NULL; ++#endif + + for (size_t i = 0; i < size; i++) { + fp << FORMAT_STR("[bt]: ({1}) {2}") % i % messages[i]; +--- a/src/util/Stacktrace.cpp ++++ b/src/util/Stacktrace.cpp +@@ -8,7 +8,9 @@ + #include + #else + ++#ifndef __ANDROID__ + #include ++#endif + #include + #endif + +@@ -76,8 +78,13 @@ + std::array trace{}; + std::array buff{}; + ++#ifndef __ANDROID__ + int trace_size = backtrace(trace.data(), trace.size()); + char** messages = backtrace_symbols(trace.data(), trace_size); ++#else ++ int trace_size = 0; ++ char** messages = NULL; ++#endif + + std::string exeName = getExePath(); +