summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/libspatialite/package.py
blob: 1865bb1f7e682203b87aceff75aa8ac7f1ae0812 (plain) (blame)
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
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

import os

from spack.package import *


class Libspatialite(AutotoolsPackage):
    """SpatiaLite is an open source library intended to extend the
    SQLite core to support fully fledged Spatial SQL capabilities."""

    homepage = "https://www.gaia-gis.it"
    url = "https://www.gaia-gis.it/gaia-sins/libspatialite-sources/libspatialite-4.3.0a.tar.gz"
    manual_download = True

    license("MPL-1.1")

    version("5.0.1", sha256="eecbc94311c78012d059ebc0fae86ea5ef6eecb13303e6e82b3753c1b3409e98")
    version("5.0.0", sha256="7b7fd70243f5a0b175696d87c46dde0ace030eacc27f39241c24bac5dfac6dac")
    # Must download manually from:
    #     https://www.gaia-gis.it/fossil/libspatialite/info/c7f67038bf06d98d
    # For instructions on the file:// below..
    #     https://github.com/spack/spack/issues/2489
    version(
        "5.0.0.2.c7f67038bf",
        sha256="f8100f71b769c7db066c6f938af6b00e920e4b90ac14c00a4f3ed7171565caab",
        url="file://%s/SpatiaLite-c7f67038bf.tar.gz" % os.getcwd(),
    )

    version(
        "5.0.0-beta0", sha256="caacf5378a5cfab9b8e98bb361e2b592e714e21f5c152b795df80d0ab1da1c42"
    )
    version("4.3.0a", sha256="88900030a4762904a7880273f292e5e8ca6b15b7c6c3fb88ffa9e67ee8a5a499")
    version("3.0.1", sha256="4983d6584069fd5ff0cfcccccee1015088dab2db177c0dc7050ce8306b68f8e6")

    depends_on("pkgconfig", type="build")
    depends_on("sqlite+rtree")
    depends_on("proj@:5", when="@:4")
    # PROJ.6 is OK w/ newer versions
    # https://www.gaia-gis.it/fossil/libspatialite/wiki?name=PROJ.6
    depends_on("proj")
    depends_on("geos")
    depends_on("freexl")
    depends_on("iconv")
    depends_on("libxml2")
    depends_on("minizip", when="@5.0.0:")
    depends_on("librttopo", when="@5.0.1:")