From 39ee37ebfd9f792df92bc1efbfd0589aeee3318b Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath Date: Fri, 23 Aug 2024 13:59:52 +0000 Subject: [PATCH] addpkg(x11/rnote): 0.11.0 --- x11-packages/rnote/build.sh | 40 ++++++++++++++++++ x11-packages/rnote/meson.build.patch | 62 ++++++++++++++++++++++++++++ 2 files changed, 102 insertions(+) create mode 100644 x11-packages/rnote/build.sh create mode 100644 x11-packages/rnote/meson.build.patch diff --git a/x11-packages/rnote/build.sh b/x11-packages/rnote/build.sh new file mode 100644 index 00000000000000..902079072b8795 --- /dev/null +++ b/x11-packages/rnote/build.sh @@ -0,0 +1,40 @@ +TERMUX_PKG_HOMEPAGE="https://github.com/flxzt/rnote" +TERMUX_PKG_DESCRIPTION="A simple drawing application to create handwritten notes" +TERMUX_PKG_LICENSE="GPL-3.0" +TERMUX_PKG_MAINTAINER="@termux" +TERMUX_PKG_VERSION="0.11.0" +TERMUX_PKG_SRCURL="https://github.com/flxzt/rnote/archive/v${TERMUX_PKG_VERSION}/v${TERMUX_PKG_VERSION}.tar.gz" +TERMUX_PKG_SHA256=b133d4331963d3c09d3a7477f60fc4c5072471dcbf459379a593ca1724164af4 +TERMUX_PKG_AUTO_UPDATE=true +TERMUX_PKG_DEPENDS="gdk-pixbuf, gettext, glib, graphene, gtk4, hicolor-icon-theme, libadwaita, libcairo, pipewire, pango, poppler" + +termux_step_pre_configure() { + termux_setup_cmake + + local _WRAPPER_BIN="${TERMUX_PKG_BUILDDIR}/_wrapper/bin" + mkdir -p "${_WRAPPER_BIN}" + if [[ "${TERMUX_ON_DEVICE_BUILD}" == "false" ]]; then + sed "s|^export PKG_CONFIG_LIBDIR=|export PKG_CONFIG_LIBDIR=${TERMUX_PREFIX}/opt/glib/cross/lib/x86_64-linux-gnu/pkgconfig:|" \ + "${TERMUX_STANDALONE_TOOLCHAIN}/bin/pkg-config" \ + > "${_WRAPPER_BIN}/pkg-config" + chmod +x "${_WRAPPER_BIN}/pkg-config" + export PKG_CONFIG="${_WRAPPER_BIN}/pkg-config" + fi + export PATH="${_WRAPPER_BIN}:${PATH}" +} + +termux_step_post_make_install() { + ( + cd "${TERMUX_PKG_SRCDIR}" + + termux_setup_rust + + GETTEXT_SYSTEM=1 \ + GETTEXT_DIR="${TERMUX_PREFIX}" \ + cargo build \ + --jobs "${TERMUX_PKG_MAKE_PROCESSES}" \ + --target "${CARGO_TARGET_NAME}" \ + --package rnote \ + --release + ) +} diff --git a/x11-packages/rnote/meson.build.patch b/x11-packages/rnote/meson.build.patch new file mode 100644 index 00000000000000..c80507fc4d6b90 --- /dev/null +++ b/x11-packages/rnote/meson.build.patch @@ -0,0 +1,62 @@ +Disable cargo commands + +--- a/meson.build ++++ b/meson.build +@@ -1,6 +1,6 @@ + project( + 'rnote', +- ['rust', 'cpp'], ++ ['cpp'], + version: '0.11.0', + meson_version: '>= 1.0', + ) +@@ -70,7 +70,6 @@ + dependency('gio-2.0', version: '>= 2.76') + dependency('cairo', version: '>= 1.18') + +-cargo = find_program('cargo', required: true) + # cmake is needed by the "ink-stroke-modeler-rs" bindings crate to build the C++ library + find_program('cmake', required: true) + find_program('glib-compile-resources', required: true) +@@ -108,7 +107,7 @@ + subdir('crates/rnote-compose') + subdir('crates/rnote-engine') + +- ++if false + # cargo fmt check + run_target( + 'cargo-fmt-check', +@@ -157,6 +156,7 @@ + ], + env: cargo_env, + ) ++endif + + # build/install the ui + if build_ui == true +@@ -198,6 +198,7 @@ + ui_output = app_name + endif + ++if false + # ui cargo check + run_target( + 'ui-cargo-check', +@@ -251,6 +252,7 @@ + meson.project_build_root() / '@OUTPUT@', + ], + ) ++endif + + meson.add_install_script( + 'build-aux/meson_post_install.py', +@@ -263,7 +265,7 @@ + glib_compile_schemas: true, + gtk_update_icon_cache: true, + update_desktop_database: true, +- update_mime_database: true, ++ update_mime_database: false, + ) + + # Windows installer