|
@@ -11,7 +11,6 @@ package("gdal")
|
|
add_deps("cmake")
|
|
add_deps("cmake")
|
|
add_configs("apps", {description = "Build GDAL applications.", default = false, type = "boolean"})
|
|
add_configs("apps", {description = "Build GDAL applications.", default = false, type = "boolean"})
|
|
add_configs("curl", {description = "Use CURL.", default = false, type = "boolean"})
|
|
add_configs("curl", {description = "Use CURL.", default = false, type = "boolean"})
|
|
- add_configs("curl_static", {description = "Use static build of CURL.", default = false, type = "boolean"})
|
|
|
|
add_configs("geos", {description = "Use GEOS.", default = false, type = "boolean"})
|
|
add_configs("geos", {description = "Use GEOS.", default = false, type = "boolean"})
|
|
add_configs("gif", {description = "Use GIF.", default = false, type = "boolean"})
|
|
add_configs("gif", {description = "Use GIF.", default = false, type = "boolean"})
|
|
add_configs("iconv", {description = "Use Iconv.", default = false, type = "boolean"})
|
|
add_configs("iconv", {description = "Use Iconv.", default = false, type = "boolean"})
|
|
@@ -31,7 +30,6 @@ package("gdal")
|
|
|
|
|
|
local configdeps = {
|
|
local configdeps = {
|
|
curl = "libcurl",
|
|
curl = "libcurl",
|
|
- curl_static = "libcurl",
|
|
|
|
geos = "geos",
|
|
geos = "geos",
|
|
gif = "giflib",
|
|
gif = "giflib",
|
|
iconv = "libiconv",
|
|
iconv = "libiconv",
|
|
@@ -45,11 +43,7 @@ package("gdal")
|
|
|
|
|
|
for name, dep in pairs(configdeps) do
|
|
for name, dep in pairs(configdeps) do
|
|
if package:config(name) then
|
|
if package:config(name) then
|
|
- if name:match('^(.*)_static$') then
|
|
|
|
- package:add("deps", dep, {configs = {shared = false}})
|
|
|
|
- else
|
|
|
|
- package:add("deps", dep)
|
|
|
|
- end
|
|
|
|
|
|
+ package:add("deps", dep)
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end)
|
|
end)
|
|
@@ -65,11 +59,11 @@ package("gdal")
|
|
table.insert(configs, "-DBUILD_APPS=" .. (package:config("apps") and "ON" or "OFF"))
|
|
table.insert(configs, "-DBUILD_APPS=" .. (package:config("apps") and "ON" or "OFF"))
|
|
|
|
|
|
local packagedeps = {"proj"}
|
|
local packagedeps = {"proj"}
|
|
- if package:config("curl") or package:config("curl_static") then
|
|
|
|
|
|
+ if package:config("curl") then
|
|
table.insert(packagedeps, "libcurl")
|
|
table.insert(packagedeps, "libcurl")
|
|
table.insert(configs, "-DGDAL_USE_CURL=ON")
|
|
table.insert(configs, "-DGDAL_USE_CURL=ON")
|
|
|
|
|
|
- if package:config("curl_static") then
|
|
|
|
|
|
+ if not package:dep("libcurl"):config("shared") then
|
|
table.insert(configs, "-DCURL_USE_STATIC_LIBS=ON")
|
|
table.insert(configs, "-DCURL_USE_STATIC_LIBS=ON")
|
|
end
|
|
end
|
|
end
|
|
end
|