commit 2de2579a96ee294516ae5a407eadd08a56ed6ab1 Author: EnumDev Date: Sat Aug 2 18:49:19 2025 +0300 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3e58e5f --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +# Exclude bpm archives +*.bpm \ No newline at end of file diff --git a/check-version.sh b/check-version.sh new file mode 100644 index 0000000..e33c1bd --- /dev/null +++ b/check-version.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Git repository +REPO="https://git.sr.ht/~exec64/imv" + +# Get tag name using 'git ls-remote' +TAG_NAME=$(git ls-remote --exit-code --refs --tags --sort='v:refname' "$REPO" | tail -1 | cut -d'/' -f3) + +# Trim 'v' character in TAG_NAME variable +VERSION=$(echo "$TAG_NAME" | tr -d 'v') + +echo "$VERSION" diff --git a/pkg.info b/pkg.info new file mode 100644 index 0000000..2b4f79e --- /dev/null +++ b/pkg.info @@ -0,0 +1,9 @@ +name: imv +description: X11 and Wayland image viewer intended for use with tiling window managers +version: 4.5.0 +url: https://sr.ht/~exec64/imv/ +license: MIT +architecture: any +depends: ["glu","libjxl","librsvg","libxkbcommon","pango"] +make_depends: ["asciidoc","cmake","cmocka","meson"] +type: source diff --git a/source-files/imv-4.5.0-Link-to-the-common-ICU-library.patch b/source-files/imv-4.5.0-Link-to-the-common-ICU-library.patch new file mode 100644 index 0000000..2050348 --- /dev/null +++ b/source-files/imv-4.5.0-Link-to-the-common-ICU-library.patch @@ -0,0 +1,27 @@ +From 859c3fd09c1b8c30998b03da9002e7f00b6670cc Mon Sep 17 00:00:00 2001 +From: Aleksei Bavshin +Date: Wed, 22 Jan 2025 00:50:53 -0800 +Subject: [PATCH imv] Link to the common ICU library + +Both the utext and the ubrk APIs are parts of the common library, so +icu-uc should be the right dependency to use. +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index ea3a653..9fa1b15 100644 +--- a/meson.build ++++ b/meson.build +@@ -42,7 +42,7 @@ endif + + _unicode = get_option('unicode') + if _unicode == 'icu' +- unicode_lib = dependency('icu-io') ++ unicode_lib = dependency('icu-uc') + add_project_arguments('-DIMV_USE_ICU', language: 'c') + elif _unicode == 'grapheme' + unicode_lib = cc.find_library('grapheme') +-- +2.48.1 + diff --git a/source.sh b/source.sh new file mode 100644 index 0000000..0cdd7f7 --- /dev/null +++ b/source.sh @@ -0,0 +1,46 @@ +# This is the source.sh script. It is executed by BPM in a temporary directory when compiling a source package +# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE +# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT + +DOWNLOAD="https://git.sr.ht/~exec64/imv/archive/v${BPM_PKG_VERSION}.tar.gz" +FILENAME="${DOWNLOAD##*/}" + +# The prepare function is executed in the root of the temp directory +# This function is used for downloading files and putting them into the correct location +prepare() { + wget "$DOWNLOAD" + tar -xvf "$FILENAME" --strip-components=1 -C "$BPM_SOURCE" + + # Apply icu 76.1 patch + cd "$BPM_SOURCE" + patch -Np1 -i ../imv-4.5.0-Link-to-the-common-ICU-library.patch +} + +# The build function is executed in the source directory +# This function is used to compile the source code +build() { + mkdir build + cd build + + meson setup --prefix=/usr + meson compile +} + +# The check function is executed in the source directory +# This function is used to run tests to verify the package has been compiled correctly +check() { + cd build + + meson test +} + +# The package function is executed in the source directory +# This function is used to move the compiled files into the output directory +package() { + cd build + + meson install --destdir="$BPM_OUTPUT" + + # Install package license + install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/imv/LICENSE +}