Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addpkg(x11/rnote): 0.11.0 #21218

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions x11-packages/rnote/build.sh
Original file line number Diff line number Diff line change
@@ -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
)
}
62 changes: 62 additions & 0 deletions x11-packages/rnote/meson.build.patch
Original file line number Diff line number Diff line change
@@ -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
Loading