summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5a2f1e591e1009552b4a2fffcdf7486b5ee0ea62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Maintainer: dreieck
# Contributor: Jaroslav Lichtblau <svetlemodry@archlinux.org>
# Contributor: Mateusz Herych <heniekk@gmail.com>
# Contributor: dibblethewrecker <dibblethewrecker.at.jiwe.dot.org>
# Contributor: William Rea <sillywilly@gmail.com>

_pkgname=libproj4
pkgname="${_pkgname}-projcompathack"
pkgver=4.9.3
pkgrel=1
pkgdesc='Cartographic Projections library, libraries only. Legacy version 4.x. Hack to be compatible with newer proj. Might not work fully, there to fulfill dependency for other legacy packages like perl-geo-proj4.'
arch=(
  'i686'
  'x86_64'
)
url="https://proj.org/"
license=('MIT')
depends=(
  'curl'
  'glibc'
  'libtiff'
  'sqlite'
)
makedepends=(
  'cmake'
  'gmock'
  'gtest'
)
provides=(
  "${_pkgname}=${pkgver}"
)
conflicts=(
  "${_pkgname}"
  'proj4'
)
source=(
  "https://download.osgeo.org/proj/proj-${pkgver}.tar.gz"
)
sha256sums=(
  '6984542fea333488de5c82eea58d699e4aff4b359200a9971537cd7e047185f7'
)

build() {
  cd "${srcdir}"

  cmake \
    -S "proj-${pkgver}" \
    -B build \
    -DBUILD_CS2CS=OFF \
    -DBUILD_GEOD=OFF \
    -DBUILD_LIBPROJ_SHARED=ON \
    -DBUILD_NAD2BIN=OFF \
    -DBUILD_PROJ=OFF \
    -DBUILD_TESTING=ON \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX='/usr' \
    -DJNI_SUPPORT=OFF \
    -DPROJ4_TESTS=ON \
    -DSELFTEST=OFF \
    -DUSE_THREAD=ON \
    -DUSE_EXTERNAL_GTEST=ON
  cmake --build build
}

# check(){
#   cd "${srcdir}"
# 
#   ctest --test-dir build
# }

package() {
  cd "${srcdir}"

  DESTDIR="${pkgdir}" cmake --install build

  rm -Rfv "${pkgdir}/usr"/{include/geodesic.h,lib/libproj.so,share/{man/man1,proj/{CH,GL27,nad.lst,nad27,nad83,other.extra,world}}}

  install -D -v -m644 "proj-${pkgver}/COPYING" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
  for _docfile in AUTHORS ChangeLog NEWS README; do
    install -D -v -m644 "proj-${pkgver}/${_docfile}" "${pkgdir}/usr/share/doc/${pkgname}/${_docfile}"
  done
}