2015-08-04 20:04:32 +02:00
# Maintainer: Martchus <martchus@gmx.net>
2016-03-25 21:43:59 +01:00
# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where
# you also find the URL of a binary repository.
2015-06-24 23:12:08 +02:00
_name = geocoordinatecalculator
2015-12-02 02:20:30 +01:00
_reponame = geocoordinatecalculator
2015-06-24 23:12:08 +02:00
pkgname = mingw-w64-geocoordinatecalculator
2019-08-25 13:13:57 +02:00
pkgver = 1.1.3
2019-08-25 13:31:24 +02:00
pkgrel = 2
2015-06-24 23:12:08 +02:00
arch = ( 'any' )
2016-09-11 23:37:58 +02:00
pkgdesc = 'Tool for basic calculations with geo coordinates such as format conversions and calculation of distance, bearing, mid point, destination and more (mingw-w64)'
2015-06-24 23:12:08 +02:00
license = ( 'GPL' )
depends = ( 'mingw-w64-crt' 'mingw-w64-c++utilities' )
2020-10-04 01:04:01 +02:00
makedepends = ( 'mingw-w64-gcc' 'mingw-w64-cmake' 'ninja' )
2015-12-02 02:20:30 +01:00
url = " https://github.com/Martchus/ ${ _reponame } "
2016-10-03 14:23:34 +02:00
source = ( " ${ _name } - ${ pkgver } .tar.gz::https://github.com/Martchus/ ${ _reponame } /archive/v ${ pkgver } .tar.gz " )
2019-08-25 13:13:57 +02:00
sha256sums = ( 'b37762f53fd6393d7e80490cb1b47305588319cdd286da947eb306acce80ad73' )
2015-12-06 19:17:57 +01:00
options = ( !buildflags staticlibs !strip !emptydirs)
2019-08-25 13:31:24 +02:00
_architectures = ( 'i686-w64-mingw32' 'x86_64-w64-mingw32' )
_configurations = ( )
[ [ $NO_SHARED_LIBS ] ] || _configurations += ( 'shared' )
[ [ $NO_STATIC_LIBS ] ] || _configurations += ( 'static' )
2015-06-24 23:12:08 +02:00
build( ) {
2015-12-24 16:50:30 +01:00
cd " $srcdir / ${ PROJECT_DIR_NAME :- $_reponame - $pkgver } "
2019-05-04 16:29:53 +02:00
declare -A _config_flags = (
[ shared] = '
-DBUILD_SHARED_LIBS:BOOL= ON
'
[ static] = '
-DBUILD_SHARED_LIBS:BOOL= OFF
-DCMAKE_FIND_LIBRARY_SUFFIXES:STRING= .a; .lib
-DSTATIC_LINKAGE:BOOL= ON
-DSTATIC_LIBRARY_LINKAGE:BOOL= ON
-DGEOCOORDINATECALCULATOR_CONFIGURATION_TARGET_SUFFIX:STRING= static
'
)
for _arch in " ${ _architectures [@] } " ; do
for _cfg in " ${ _configurations [@] } " ; do
msg2 " ${ _arch } - ${ _cfg } "
mkdir -p " build- ${ _arch } - ${ _cfg } " && pushd " build- ${ _arch } - ${ _cfg } "
${ _arch } -cmake \
2020-10-04 01:04:01 +02:00
-G Ninja \
2019-05-04 16:29:53 +02:00
-DCMAKE_BUILD_TYPE:STRING= 'Release' \
-DCMAKE_INSTALL_PREFIX= " /usr/ ${ _arch } " \
-DCONFIGURATION_NAME:STRING= " ${ _cfg } " \
-DCONFIGURATION_PACKAGE_SUFFIX:STRING= " - ${ _cfg } " \
2020-10-04 01:04:01 +02:00
-DENABLE_TARGETS_FOR_MINGW64_CROSS_PACKAGING:BOOL= ON \
2019-05-04 16:29:53 +02:00
${ _config_flags [ $_cfg ] } \
../
2020-10-04 01:04:01 +02:00
ninja
2019-05-04 16:29:53 +02:00
popd
done
2015-12-24 16:50:30 +01:00
done
2015-06-24 23:12:08 +02:00
}
package( ) {
2015-12-24 16:50:30 +01:00
cd " $srcdir / ${ PROJECT_DIR_NAME :- $_reponame - $pkgver } "
2019-05-04 16:29:53 +02:00
for _arch in " ${ _architectures [@] } " ; do
for _cfg in " ${ _configurations [@] } " ; do
msg2 " ${ _arch } - ${ _cfg } "
pushd " build- ${ _arch } - ${ _cfg } "
2020-10-04 01:04:01 +02:00
DESTDIR = " ${ pkgdir } " ninja install-mingw-w64-strip
2019-05-04 16:29:53 +02:00
popd
done
2015-12-24 16:50:30 +01:00
done
2015-06-24 23:12:08 +02:00
}