spatialindex: update to 2.0.0

This commit is contained in:
مهدي شينون (Mehdi Chinoune)
2024-06-25 04:35:51 +01:00
parent f46ffa3f27
commit c399bd7a00
3 changed files with 51 additions and 45 deletions

View File

@@ -1,28 +0,0 @@
diff -Nur spatialindex-1.9.3-orig/CMakeLists.txt spatialindex-1.9.3/CMakeLists.txt
--- spatialindex-1.9.3-orig/CMakeLists.txt 2019-10-24 03:48:36.000000000 +0200
+++ spatialindex-1.9.3/CMakeLists.txt 2021-11-20 11:53:07.613151300 +0100
@@ -139,7 +139,7 @@
# installation path settings
#------------------------------------------------------------------------------
-if(WIN32)
+if(MSVC)
set(DEFAULT_LIB_SUBDIR lib)
set(DEFAULT_DATA_SUBDIR .)
set(DEFAULT_INCLUDE_SUBDIR include)
diff -Nur spatialindex-1.9.3-orig/src/CMakeLists.txt spatialindex-1.9.3/src/CMakeLists.txt
--- spatialindex-1.9.3-orig/src/CMakeLists.txt 2019-10-24 03:48:36.000000000 +0200
+++ spatialindex-1.9.3/src/CMakeLists.txt 2021-11-20 11:49:20.341117300 +0100
@@ -205,8 +205,10 @@
SOVERSION "${SIDX_LIB_SOVERSION}" )
if(WIN32)
- target_compile_options(${SIDX_LIB_NAME} PRIVATE "/wd4068")
- target_compile_options(${SIDX_C_LIB_NAME} PRIVATE "/wd4068")
+ if (MSVC)
+ target_compile_options(${SIDX_LIB_NAME} PRIVATE "/wd4068")
+ target_compile_options(${SIDX_C_LIB_NAME} PRIVATE "/wd4068")
+ endif()
target_compile_definitions(${SIDX_C_LIB_NAME} PRIVATE "-DSIDX_DLL_EXPORT=1")
target_compile_definitions(${SIDX_LIB_NAME} PRIVATE "-DSIDX_DLL_EXPORT=1")

View File

@@ -0,0 +1,11 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -116,7 +116,7 @@
#------------------------------------------------------------------------------
# pkg-config support
#------------------------------------------------------------------------------
-if(NOT WIN32)
+if(NOT MSVC)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/src/libspatialindex.pc.in
${CMAKE_CURRENT_BINARY_DIR}/libspatialindex.pc

View File

@@ -1,44 +1,60 @@
# Maintainer: No one
_realname=spatialindex
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=1.9.3
pkgrel=2
pkgver=2.0.0
pkgrel=1
pkgdesc="Extensible framework that supports robust spatial indexing methods and sophisticated spatial queries (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
url='https://libspatialindex.github.io/'
license=('MIT')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
url='https://libspatialindex.github.io'
msys2_repository_url="https://github.com/libspatialindex/libspatialindex"
msys2_references=(
'archlinux: spatialindex'
)
license=('spdx:MIT')
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs")
makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-cmake"
"${MINGW_PACKAGE_PREFIX}-ninja")
source=("https://github.com/libspatialindex/libspatialindex/releases/download/1.9.3/${_realname}-src-${pkgver}.tar.gz"
"0001-mingw-fixes.patch")
sha256sums=('47d8779e32477b330e46b62fb7e62cb812caee5d8e684c35cb635a42a749f3fc'
'c3085acc0d5c738af8a5ea75449b9be1797bd1f51e3569405fc1c400f121c033')
source=("${msys2_repository_url}/releases/download/${pkgver}/${_realname}-src-${pkgver}.tar.bz2"
"001-install-pkgconf.patch")
sha256sums=('949e3fdcad406a63075811ab1b11afcc4afddc035fbc69a3acfc8b655b82e9a5'
'd2da9b682a973bf90f28782be80ddda093a51cd1b03833fe01618b6329548315')
apply_patch_with_msg() {
for _patch in "$@"
do
msg2 "Applying ${_patch}"
patch -Nbp1 -i "${srcdir}/${_patch}"
done
}
prepare() {
cd "${srcdir}"/${_realname}-src-${pkgver}
patch -Np1 -i "${srcdir}"/0001-mingw-fixes.patch
apply_patch_with_msg \
001-install-pkgconf.patch
}
build() {
mkdir -p "${srcdir}"/build-${MSYSTEM} && cd "${srcdir}"/build-${MSYSTEM}
declare -a extra_config
declare -a _extra_config
if check_option "debug" "n"; then
extra_config+=("-DCMAKE_BUILD_TYPE=Release")
_extra_config+=("-DCMAKE_BUILD_TYPE=Release")
else
extra_config+=("-DCMAKE_BUILD_TYPE=Debug")
_extra_config+=("-DCMAKE_BUILD_TYPE=Debug")
fi
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
${MINGW_PREFIX}/bin/cmake.exe \
-GNinja \
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
"${extra_config[@]}" \
"${_extra_config[@]}" \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_DLL_NAME_WITH_SOVERSION=ON \
-DBUILD_TESTING=OFF \
../${_realname}-src-${pkgver}
${MINGW_PREFIX}/bin/cmake.exe --build .
@@ -47,7 +63,13 @@ build() {
check() {
cd "${srcdir}"/build-${MSYSTEM}
${MINGW_PREFIX}/bin/cmake --build . --target test
${MINGW_PREFIX}/bin/cmake \
-DBUILD_TESTING=ON \
-DPython3_EXECUTABLE=${MINGW_PREFIX}/bin/python \
../${_realname}-src-${pkgver}
${MINGW_PREFIX}/bin/cmake --build .
${MINGW_PREFIX}/bin/ctest
}
package() {
@@ -55,5 +77,6 @@ package() {
DESTDIR="${pkgdir}" ${MINGW_PREFIX}/bin/cmake.exe --install .
install -Dm644 ${srcdir}/${_realname}-src-${pkgver}/COPYING ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING
install -Dm644 "${srcdir}"/${_realname}-src-${pkgver}/COPYING \
"${pkgdir}"${MINGW_PREFIX}/share/licenses/${_realname}/COPYING
}