liblangtag: Enable aarch64 builds (#24003)

This commit is contained in:
Hernan Martinez 2025-04-16 23:30:40 -06:00 committed by GitHub
parent 816579619a
commit 6262508762
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 32 additions and 6 deletions

View File

@ -0,0 +1,13 @@
diff -bur liblangtag-0.6.7-o/liblangtag/lt-macros.h liblangtag-0.6.7/liblangtag/lt-macros.h
--- liblangtag-0.6.7-o/liblangtag/lt-macros.h 2025-04-16 22:56:11.121608100 -0600
+++ liblangtag-0.6.7/liblangtag/lt-macros.h 2025-04-16 22:58:07.409723000 -0600
@@ -320,6 +320,9 @@
#elif defined (__alpha__) && !defined(__osf__) && defined (__GNUC__) && __GNUC__ >= 2
# define LT_BREAKPOINT() \
LT_STMT_START {__asm__ __volatile__ ("bpt");} LT_STMT_END
+#elif defined (__aarch64__)
+# define LT_BREAKPOINT() \
+ LT_STMT_START {__asm__ volatile(".inst 0xd4200000");} LT_STMT_END
#else
#include <signal.h>
# define LT_BREAKPOINT() \

View File

@ -4,10 +4,10 @@ _realname=liblangtag
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=0.6.7
pkgrel=1
pkgrel=2
pkgdesc="An interface library to access tags for identifying languages. (mingw-w64)"
arch=('any')
mingw_arch=('ucrt64' 'clang64')
mingw_arch=('ucrt64' 'clang64' 'clangarm64')
url='https://bitbucket.org/tagoh/liblangtag'
msys2_references=(
'archlinux: liblangtag'
@ -25,15 +25,28 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
optdepends=("${MINGW_PACKAGE_PREFIX}-gobject-introspection-runtime: use with liblangtag-gobject")
source=("https://bitbucket.org/tagoh/liblangtag/downloads/${_realname}-${pkgver}.tar.bz2"
"001-fix-build-on-mingw.patch"
"002-update-ax-pthread-m4.patch")
"002-update-ax-pthread-m4.patch"
"003-aarch64.patch")
sha256sums=('5ed6bcd4ae3f3c05c912e62f216cd1a44123846147f729a49fb5668da51e030e'
'ec43e6829c2e76ea8194f053d8bd38d3db6617df8c7bee79437df8d00dea9bed'
'45a06e3c70cb374f50e180570b8e9bf484fdfba5caa4f0eee65ed60d63421c01')
'45a06e3c70cb374f50e180570b8e9bf484fdfba5caa4f0eee65ed60d63421c01'
'4c4f7c6c12a3c3d4381f1f029d57ab1d54043f89d0c7ba18dba146157ad9ff29')
apply_patch_with_msg() {
for _patch in "$@"
do
msg2 "Applying ${_patch}"
patch -Nbp1 -i "${srcdir}/${_patch}"
done
}
prepare() {
cd "${_realname}-${pkgver}"
patch -p1 -i "${srcdir}"/001-fix-build-on-mingw.patch
patch -p1 -i "${srcdir}"/002-update-ax-pthread-m4.patch
apply_patch_with_msg \
001-fix-build-on-mingw.patch \
002-update-ax-pthread-m4.patch \
003-aarch64.patch
autoreconf -fiv
}