vlfeat: Add OpenMP support and enable aarch64 builds (#23938)
This commit is contained in:
parent
b9b0d3a416
commit
61f91fefb9
@ -4,14 +4,19 @@ _realname=vlfeat
|
|||||||
pkgbase=mingw-w64-${_realname}
|
pkgbase=mingw-w64-${_realname}
|
||||||
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
|
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
|
||||||
pkgver=0.9.21
|
pkgver=0.9.21
|
||||||
pkgrel=3
|
pkgrel=4
|
||||||
pkgdesc="The VLFeat open source library implements popular computer vision algorithms specializing in image understanding and local features extraction and matching. (mingw-w64)"
|
pkgdesc="The VLFeat open source library implements popular computer vision algorithms specializing in image understanding and local features extraction and matching. (mingw-w64)"
|
||||||
arch=('any')
|
arch=('any')
|
||||||
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64')
|
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
||||||
license=(BSD)
|
|
||||||
url="https://www.vlfeat.org/"
|
url="https://www.vlfeat.org/"
|
||||||
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs")
|
msys2_repository_url="https://github.com/vlfeat/vlfeat"
|
||||||
makedepends=("${MINGW_PACKAGE_PREFIX}-cc" "groff")
|
msys2_references=(
|
||||||
|
'aur: vlfeat'
|
||||||
|
)
|
||||||
|
license=('spdx:BSD-2-Clause')
|
||||||
|
depends=("${MINGW_PACKAGE_PREFIX}-omp")
|
||||||
|
makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
|
||||||
|
"groff")
|
||||||
source=("https://www.vlfeat.org/download/${_realname}-${pkgver}.tar.gz"
|
source=("https://www.vlfeat.org/download/${_realname}-${pkgver}.tar.gz"
|
||||||
"01-vlfeat-0.9.20-1-buildsys.mingw.patch"
|
"01-vlfeat-0.9.20-1-buildsys.mingw.patch"
|
||||||
"02-Makefile-fix-arch-detection.patch"
|
"02-Makefile-fix-arch-detection.patch"
|
||||||
@ -23,20 +28,39 @@ sha256sums=('8cbf686fd008e3d119c3a0986ffd06e4c3d9448b6f4721a9cc9bb4964c82ff55'
|
|||||||
'84151ec314d5b63fee45eb91ac7c9a1181fb4361d41f40fc1707763c1ce5e55a'
|
'84151ec314d5b63fee45eb91ac7c9a1181fb4361d41f40fc1707763c1ce5e55a'
|
||||||
'afe3ff1fb934d768cf3dc7c5f498b2acc05f80d56194ca5653c1ef1bb3789f0e')
|
'afe3ff1fb934d768cf3dc7c5f498b2acc05f80d56194ca5653c1ef1bb3789f0e')
|
||||||
|
|
||||||
|
apply_patch_with_msg() {
|
||||||
|
for _patch in "$@"
|
||||||
|
do
|
||||||
|
msg2 "Applying ${_patch}"
|
||||||
|
patch -Nbp1 -i "${srcdir}/${_patch}"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
# Replace minizip with external
|
|
||||||
cd "${srcdir}"/${_realname}-${pkgver}
|
cd "${srcdir}"/${_realname}-${pkgver}
|
||||||
patch -p1 -i "${srcdir}/01-vlfeat-0.9.20-1-buildsys.mingw.patch"
|
|
||||||
patch -p1 -i "${srcdir}/02-Makefile-fix-arch-detection.patch"
|
# Replace minizip with external
|
||||||
|
apply_patch_with_msg \
|
||||||
|
01-vlfeat-0.9.20-1-buildsys.mingw.patch \
|
||||||
|
02-Makefile-fix-arch-detection.patch
|
||||||
|
|
||||||
# https://github.com/vlfeat/vlfeat/pull/200.patch
|
# https://github.com/vlfeat/vlfeat/pull/200.patch
|
||||||
patch -p1 -i "${srcdir}/03-fix-openmp-building-with-gcc.patch"
|
apply_patch_with_msg \
|
||||||
|
03-fix-openmp-building-with-gcc.patch
|
||||||
|
|
||||||
patch -p1 -i "${srcdir}/04-remove-fpic-rpath-for-clang.patch"
|
apply_patch_with_msg \
|
||||||
|
04-remove-fpic-rpath-for-clang.patch
|
||||||
}
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd "${srcdir}"/${_realname}-${pkgver}
|
cd "${srcdir}"/${_realname}-${pkgver}
|
||||||
|
|
||||||
|
if [[ ${CARCH} == aarch64 ]]; then
|
||||||
|
export DISABLE_SSE2=yes
|
||||||
|
export DISABLE_AVX=yes
|
||||||
|
fi
|
||||||
|
|
||||||
|
DISABLE_OPENMP=no \
|
||||||
make all
|
make all
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user