diff options
author | Johann Gaebler <43016598+jgaeb@users.noreply.github.com> | 2023-09-06 18:19:14 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-06 15:19:14 -0700 |
commit | e2edb45d2cf87d114c407f94d52a8005551e8250 (patch) | |
tree | 1057d8fd382f2f55564cee51ee5e23d01a03ad4a /var | |
parent | b2a95fb4b7f84a997f4abdee574e43cbb7c3150e (diff) | |
download | spack-e2edb45d2cf87d114c407f94d52a8005551e8250.tar.gz spack-e2edb45d2cf87d114c407f94d52a8005551e8250.tar.bz2 spack-e2edb45d2cf87d114c407f94d52a8005551e8250.tar.xz spack-e2edb45d2cf87d114c407f94d52a8005551e8250.zip |
Add libpostal Package (#39758)
* Add libpostal.
* Add back Spack license.
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/libpostal/package.py | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/libpostal/package.py b/var/spack/repos/builtin/packages/libpostal/package.py new file mode 100644 index 0000000000..449ab126c3 --- /dev/null +++ b/var/spack/repos/builtin/packages/libpostal/package.py @@ -0,0 +1,44 @@ +# Copyright 2013-2023 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) + +from spack.package import * + + +class Libpostal(AutotoolsPackage): + """A C library for parsing/normalizing street addresses around the world. + Powered by statistical NLP and open geo data.""" + + homepage = "https://github.com/openvenues/libpostal" + url = "https://github.com/openvenues/libpostal/archive/refs/tags/v1.1.tar.gz" + + maintainers("jgaeb") + + version("1.1", sha256="8cc473a05126895f183f2578ca234428d8b58ab6fadf550deaacd3bd0ae46032") + version("1.0.0", sha256="3035af7e15b2894069753975d953fa15a86d968103913dbf8ce4b8aa26231644") + version("0.3.4", sha256="8b3b95660c5b5d4fe48045b9acb000d1a0eb19d58d0c2d2041e78d9a96d88716") + version("0.3.3", sha256="dc73de37d7f7b96f329fd213dcbac540f2ae92fbef9c079fd64fbc8daeb87b01") + version("0.3.2", sha256="9a1590eadf4ebe84979113b71059410413adf239b2999d22d11fe8778945f2c1") + version("0.3.1", sha256="68c51a5fdae41e1cac474742789ba5a46a38e307a0a2450cb2d3e33b4f17cf4d") + version("0.3", sha256="28c19e21bab13425a76aa65a8435f4b3909611056c2ff439c39b4e57b2a70150") + + depends_on("autoconf", type="build") + depends_on("automake", type="build") + depends_on("libtool", type="build") + depends_on("m4", type="build") + depends_on("curl", type="build") + depends_on("pkg-config", type="build") + + def autoreconf(self, spec, prefix): + which("sh")("bootstrap.sh") + + def configure_args(self): + args = ["--datadir={0}".format(self.prefix.share)] + + # Check if the target is Apple's ARM-based M1 chip. + arch = self.spec.architecture + if arch.platform == "darwin" and arch.target == "m1": + args.append("--disable-sse2") + + return args |