From 80660eb1e007804a5dadc0d7560c7029abed38e8 Mon Sep 17 00:00:00 2001 From: EnumDev Date: Thu, 18 Sep 2025 12:15:25 +0300 Subject: [PATCH] Update package version to 2.15.0 --- check-version.sh | 15 +++++++++++++++ pkg.info | 6 +++--- source.sh | 21 +++++++++++++-------- 3 files changed, 31 insertions(+), 11 deletions(-) create mode 100644 check-version.sh diff --git a/check-version.sh b/check-version.sh new file mode 100644 index 0000000..a95fe81 --- /dev/null +++ b/check-version.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# Gitlab repository +REPO="GNOME/libxml2" + +# Replace slash with URL encoded representation +REPO=$(echo "$REPO" | sed 's|/|%2F|g') + +# Get tag name using Gitlab Rest API +TAG_NAME=$(curl -s -L https://gitlab.gnome.org/api/v4/projects/"$REPO"/releases/permalink/latest | jq -r '.tag_name') + +# Trim 'v' character in TAG_NAME variable +VERSION=$(echo "$TAG_NAME" | tr -d 'v') + +echo "$VERSION" diff --git a/pkg.info b/pkg.info index c9aa01a..4e29254 100644 --- a/pkg.info +++ b/pkg.info @@ -1,10 +1,10 @@ name: libxml2 description: XML C parser and toolkit -version: 2.12.5 -revision: 2 +version: 2.15.0 url: https://gitlab.gnome.org/GNOME/libxml2 license: MIT architecture: any depends: ["bash","glibc","icu","ncurses","readline","xz-utils","zlib"] -make_depends: ["python3"] +optional_depends: ["python3"] +make_depends: ["doxygen","meson","python3"] type: source diff --git a/source.sh b/source.sh index 33f8594..47d1ce1 100644 --- a/source.sh +++ b/source.sh @@ -2,7 +2,7 @@ # 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://download.gnome.org/sources/libxml2/${BPM_PKG_VERSION%.*}/libxml2-${BPM_PKG_VERSION}.tar.xz" +DOWNLOAD="https://gitlab.gnome.org/GNOME/libxml2/-/archive/v${BPM_PKG_VERSION}/libxml2-v${BPM_PKG_VERSION}.tar.gz" FILENAME="${DOWNLOAD##*/}" # The prepare function is executed in the root of the temp directory @@ -15,20 +15,25 @@ prepare() { # The build function is executed in the source directory # This function is used to compile the source code build() { - ./configure --prefix=/usr \ - --sysconfdir=/etc \ - --disable-static \ - --with-history \ - --with-icu - make + PYTHON=/usr/bin/python3 meson setup --prefix=/usr -Dreadline=enabled -Dpython=enabled -Dicu=enabled -Dlegacy=enabled -Ddocs=enabled build + meson compile -C build +} + +# 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() { + meson test -C build --print-errorlogs } # The package function is executed in the source directory # This function is used to move the compiled files into the output directory package() { - make DESTDIR="$BPM_OUTPUT" install + meson install -C build --destdir="$BPM_OUTPUT" + + # Prevent packages from unnecessarily linking to ICU rm -vf "$BPM_OUTPUT"/usr/lib/libxml2.la sed '/libs=/s/xml2.*/xml2"/' -i "$BPM_OUTPUT"/usr/bin/xml2-config + # Install package license install -Dm644 Copyright "$BPM_OUTPUT"/usr/share/licenses/libxml2/Copyright }