* add popt

* improve popt

* improve popt

* improve popt

* improve popt
pull/2893/head
ruki 1 year ago committed by GitHub
parent 84749393d3
commit 1a88679c2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 25
      packages/p/popt/xmake.lua

@ -0,0 +1,25 @@
package("popt")
set_homepage("http://ftp.rpm.org/popt/")
set_description("C library for parsing command line parameters")
set_license("MIT")
add_urls("http://ftp.rpm.org/popt/releases/popt-1.x/popt-$(version).tar.gz",
"https://ftp.osuosl.org/pub/rpm/popt/releases/popt-1.x/popt-$(version).tar.gz")
add_versions("1.19", "c25a4838fc8e4c1c8aacb8bd620edb3084a3d63bf8987fdad3ca2758c63240f9")
if is_plat("macosx") then
add_deps("libintl")
add_deps("libiconv", {system = true})
end
on_install("linux", "macosx", function (package)
local configs = {}
table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no"))
table.insert(configs, package:is_debug() and "--enable-debug" or "--disable-debug")
import("package.tools.autoconf").install(package, configs)
end)
on_test(function (package)
assert(package:has_cfuncs("poptGetContext", {includes = "popt.h"}))
end)
Loading…
Cancel
Save