blob: c764a22588af1848d75d40e5225809937f2a4651 [file] [log] [blame] [edit]
# Maintainer: Konstantin Podsvirov <konstantin@podsvirov.pro>
_realname=GeographicLib
_pkgname=geographiclib
pkgbase=mingw-w64-${_pkgname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_pkgname}")
pkgver=1.51
pkgrel=1
pkgdesc="Set of C++ classes for conversions between geographic, UTM, UPS, MGRS, geocentric, and local cartesian coordinates, for gravity, geoid height, and geomagnetic field calculations and for solving geodesic problems (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32')
url="http://geographiclib.sourceforge.io/"
license=('custom') # MIT/X11
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs")
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc"
"${MINGW_PACKAGE_PREFIX}-cmake"
"${MINGW_PACKAGE_PREFIX}-doxygen")
options=('!strip' 'staticlibs' '!buildflags')
source=(http://downloads.sourceforge.net/project/geographiclib/distrib/${_realname}-${pkgver}.tar.gz)
sha256sums=('34370949617df5105bd6961e0b91581aef758dc455fe8629eb5858516022d310')
build() {
[[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}"
mkdir -p "${srcdir}/build-${MINGW_CHOST}" && cd "${srcdir}/build-${MINGW_CHOST}"
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
${MINGW_PREFIX}/bin/cmake.exe \
-G"MSYS Makefiles" \
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
-DCMAKE_BUILD_TYPE=Release \
-DCOMMON_INSTALL_PATH=ON \
-DGEOGRAPHICLIB_DOCUMENTATION=ON \
-DGEOGRAPHICLIB_LIB_TYPE=BOTH \
../${_realname}-${pkgver}
make
}
package() {
cd "${srcdir}/build-${MINGW_CHOST}"
make DESTDIR=${pkgdir} install
install -Dm644 "${srcdir}/${_realname}-${pkgver}/LICENSE.txt" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_pkgname}/LICENSE"
}