Skip to content
Open
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
18 changes: 18 additions & 0 deletions 0001-Look-for-shared-check-library.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ef0c3ae38c16..afd19a9f8ef8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -239,10 +239,10 @@ if(BUILD_TESTING AND (NOT CMAKE_CROSSCOMPILING OR HAVE_WINE))
if(check_FOUND)
set(HAVE_CHECK 1)
set(CHECK_LIBRARIES check)
- if(TARGET Check::check)
- set(CHECK_TARGET Check::check)
+ if(TARGET Check::checkShared)
+ set(CHECK_TARGET Check::checkShared)
else()
- set(CHECK_TARGET check)
+ set(CHECK_TARGET checkShared)
endif()
get_target_property(CHECK_INCLUDE_DIRS ${CHECK_TARGET} INTERFACE_INCLUDE_DIRECTORIES)
# Get library location to extract directory
13 changes: 0 additions & 13 deletions 0001-Use-version-number-for-libtool-ABI-versioning.patch

This file was deleted.

45 changes: 27 additions & 18 deletions PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,49 @@
# Contributor: Antonio Rojas <arojas@archlinux.org>

pkgname=libfyaml
pkgver=0.9.3
pkgver=0.9.6
pkgrel=1
pkgdesc='Fully feature complete YAML parser and emitter'
arch=(x86_64 aarch64 riscv64 loongarch64)
url='https://pantoniou.github.io/libfyaml/'
license=(MIT)
depends=(musl)
makedepends=(git linux-headers)
checkdepends=(check)
provides=(libfyaml.so)
# 0001: Downstream, upstream Makefile.am passes invalid argument to libtool for
# ABI versioning, breaking build with slibtool.
# Reference: https://github.com/pantoniou/libfyaml/issues/148
# 0001: Downstream, look for shared target Check::checkShared instead of the
# static Check::check during configuration, since eweOS doesn't ship the
# static version.
source=("git+https://github.com/pantoniou/libfyaml#tag=v$pkgver"
0001-Use-version-number-for-libtool-ABI-versioning.patch)
sha256sums=('ff9f7b7defe589dda095a4796fdeb098bbd3886242bc573a6ed5b65014f4e7b0'
'e55cafd16ddc700b217fcc0baa32b8a0b56f5445dd38f63aea44688694fb2611')
"git+https://github.com/yaml/yaml-test-suite"
"git+https://github.com/nst/JSONTestSuite"
0001-Look-for-shared-check-library.patch)
sha256sums=('6e3066fc231e83fe7899c3ccd8ed8931cb46461ffb25e73fcab89a35affaeccd'
'SKIP'
'SKIP'
'2c902bb72243928f2978fe14e4809608a485d3306afe0b3e6ead406442ec63b3')

prepare() {
_patch_ $pkgname

cd $pkgname
autoreconf -fiv
}

build() {
cd $pkgname
./configure \
--prefix=/usr \
--without-libclang
make
cmake -S $pkgname -B build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_SHARED_LIBS=ON \
-DENABLE_LIBCLANG=OFF \
-DBUILD_TESTING=ON \
-DTESTSUITEURL="$srcdir/yaml-test-suite" \
-DJSONTESTSUITEURL="$srcdir/JSONTestSuite"
cmake --build build
}

check() {
ctest --test-dir build -j"$JOBS" --verbose
}

package() {
cd $pkgname
make DESTDIR="$pkgdir" install
_install_license_ LICENSE
DESTDIR="$pkgdir" cmake --install build
_install_license_ $pkgname/LICENSE
}