popt: add v1.19; fix url and homepage (#46936)

This commit is contained in:
Wouter Deconinck 2024-10-13 04:03:56 -05:00 committed by GitHub
parent 389b1824e9
commit d4d7d5830d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -9,17 +9,24 @@
class Popt(AutotoolsPackage):
"""The popt library parses command line options."""
homepage = "https://launchpad.net/popt"
url = "https://launchpad.net/popt/head/1.16/+download/popt-1.16.tar.gz"
homepage = "https://github.com/rpm-software-management/popt"
url = "https://ftp.osuosl.org/pub/rpm/popt/releases/popt-1.x/popt-1.19.tar.gz"
license("MIT")
version("1.19", sha256="c25a4838fc8e4c1c8aacb8bd620edb3084a3d63bf8987fdad3ca2758c63240f9")
version("1.16", sha256="e728ed296fe9f069a0e005003c3d6b2dde3d9cad453422a10d6558616d304cc8")
depends_on("c", type="build") # generated
depends_on("c", type="build")
depends_on("iconv")
def url_for_version(self, version):
if self.spec.satisfies("@1.18:"):
return f"https://ftp.osuosl.org/pub/rpm/popt/releases/popt-{version.up_to(1)}.x/popt-{version}.tar.gz"
else:
return f"https://launchpad.net/popt/head/{version}/+download/popt-{version}.tar.gz"
def patch(self):
# Remove flags not recognized by the NVIDIA compilers
if self.spec.satisfies("%nvhpc@:20.11"):