Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update libgd to latest commit #2944

Merged
merged 2 commits into from
Dec 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions packages/l/libgd/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ package("libgd")
set_description("GD is an open source code library for the dynamic creation of images by programmers.")

add_urls("https://github.com/libgd/libgd/archive/refs/tags/gd-$(version).tar.gz")
add_urls("https://github.com/libgd/libgd.git", {alias = "github"})

add_versions("2.3.2", "dcc22244d775f469bee21dce1ea42552adbb72ba0cc423f9fa6a64601b3a1893")
add_versions("github:2023.12.04", "58d25665be1c146e7284f253fa679e8256afa6cb")

add_patches("2.3.2", path.join(os.scriptdir(), "patches", "2.3.2", "build.patch"), "87ae73df7ce126f8b31e1988aae3ecf0638eeb1c0a085689bd82045704c8171c")

Expand All @@ -21,19 +24,19 @@ package("libgd")
end

add_deps("cmake", "zlib")
on_load("windows", "linux", "macosx", function (package)
on_load("windows", "linux", "macosx", "mingw", function (package)
for conf, dep in pairs(configdeps) do
if package:config(conf) then
package:add("deps", dep)
end
end
if package:is_plat("windows") and not package:config("shared") then
if package:is_plat("windows", "mingw") and not package:config("shared") then
package:add("defines", "BGDWIN32")
package:add("defines", "NONDLL")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

没必要冗余加两边

end
end)

on_install("windows", "linux", "macosx", function (package)
on_install("windows", "linux", "macosx", "mingw", function (package)
local configs = {"-DBUILD_TEST=OFF", "-DBUILD_PROGRAMS=OFF", "-DBUILD_DOCS=OFF", "-DBUILD_EXAMPLES=OFF"}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
Expand Down