Add github link and update libsdl* (#1444)

* Add github link and update libsdl*

* Update xmake.lua

* Make sdl_image xmake like sdl xmake

* Make sdl_ttf xmake like sdl xmake

* Readd sdl_image compat flags

* Update xmake.lua

* Re-remove the configure file for sdl_image

* Update xmake.lua

* Update xmake.lua

* Attempt at `-DSDL2_DIR` for macos

* Update xmake.lua

* correct config parameter

* Update xmake.lua

* Update xmake.lua

* Update xmake.lua

* Update xmake.lua

* Update xmake.lua

* Update xmake.lua

Co-authored-by: ruki <waruqi@gmail.com>
pull/1446/head
SFGrenade 2 years ago committed by GitHub
parent 528e6ec927
commit d1e05c4dec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      packages/l/libsdl/xmake.lua
  2. 59
      packages/l/libsdl_image/xmake.lua
  3. 38
      packages/l/libsdl_mixer/xmake.lua
  4. 30
      packages/l/libsdl_net/xmake.lua
  5. 54
      packages/l/libsdl_ttf/xmake.lua

@ -15,6 +15,7 @@ package("libsdl")
if is_plat("windows", "mingw") then
set_urls("https://www.libsdl.org/release/SDL2-devel-$(version)-VC.zip")
add_urls("https://github.com/libsdl-org/SDL/releases/download/release-$(version)/SDL2-devel-$(version)-VC.zip")
add_versions("2.0.8", "68505e1f7c16d8538e116405411205355a029dcf2df738dbbc768b2fe95d20fd")
add_versions("2.0.12", "00c55a597cebdb9a4eb2723f2ad2387a4d7fd605e222c69b46099b15d5d8b32d")
add_versions("2.0.14", "232071cf7d40546cde9daeddd0ec30e8a13254c3431be1f60e1cdab35a968824")
@ -22,8 +23,10 @@ package("libsdl")
add_versions("2.0.18", "d4a56e2ee7c0eae2ef0d511201d3bd38c5ab255662e4b571d4d630762473bf42")
add_versions("2.0.20", "5b1512ca6c9d2427bd2147da01e5e954241f8231df12f54a7074dccde416df18")
add_versions("2.0.22", "32adc96d8b25e5671189f1f38a4fc7deb105fbb1b3ed78ffcb23f5b8f36b3922")
add_versions("2.24.0", "97c6e2d17c0baebf4c84ede27ec42e211358f3694b9f558ead3a9c542c4a004e")
else
set_urls("https://www.libsdl.org/release/SDL2-$(version).zip")
add_urls("https://github.com/libsdl-org/SDL/releases/download/release-$(version)/SDL2-$(version).zip")
add_versions("2.0.8", "e6a7c71154c3001e318ba7ed4b98582de72ff970aca05abc9f45f7cbdc9088cb")
add_versions("2.0.12", "476e84d6fcbc499cd1f4a2d3fd05a924abc165b5d0e0d53522c9604fe5a021aa")
add_versions("2.0.14", "2c1e870d74e13dfdae870600bfcb6862a5eab4ea5b915144aff8d75a0f9bf046")
@ -31,6 +34,7 @@ package("libsdl")
add_versions("2.0.18", "2d96cc82020341f7f5957c42001ad526e15fbb7056be8a74dab302483e97aa24")
add_versions("2.0.20", "cc8b16a326eb082c1f48ca30fdf471acfd2334b69bd7527e65ac58369013a1ba")
add_versions("2.0.22", "9a81ab724e6dcef96c61a4a2ebe7758e5b8bb191794650d276a20d5148fbd50c")
add_versions("2.24.0", "4b065503d45652d5f65d807fe98c757c73af2968727945b596861995bc3b69c2")
end
if is_plat("macosx") then

@ -2,14 +2,7 @@ package("libsdl_image")
set_homepage("http://www.libsdl.org/projects/SDL_image/")
set_description("Simple DirectMedia Layer image loading library")
if is_plat("windows", "mingw") then
set_urls("https://www.libsdl.org/projects/SDL_image/release/SDL2_image-devel-$(version)-VC.zip")
add_versions("2.0.5", "a180f9b75c4d3fbafe02af42c42463cc7bc488e763cfd1ec2ffb75678b4387ac")
else
set_urls("https://www.libsdl.org/projects/SDL_image/release/SDL2_image-$(version).zip")
add_versions("2.0.5", "eee0927d1e7819d57c623fe3e2b3c6761c77c474fe9bc425e8674d30ac049b1c")
end
set_license("zlib")
if is_plat("mingw") and is_subhost("msys") then
add_extsources("pacman::SDL2_image")
@ -19,18 +12,39 @@ package("libsdl_image")
add_extsources("brew::sdl2_image")
end
if is_plat("windows", "mingw") then
set_urls("https://www.libsdl.org/projects/SDL_image/release/SDL2_image-devel-$(version)-VC.zip")
add_urls("https://github.com/libsdl-org/SDL_image/releases/download/release-$(version)/SDL2_image-devel-$(version)-VC.zip")
add_versions("2.0.5", "a180f9b75c4d3fbafe02af42c42463cc7bc488e763cfd1ec2ffb75678b4387ac")
add_versions("2.6.0", "e8953ec28e689fdef7805d0dc6913b8038dc6e250fe340929e459f367e2e75fa")
add_versions("2.6.1", "b431347d039081b3ec065670d3037f106c8683f11491c45776cde7e69965a5f3")
add_versions("2.6.2", "f510a58b03ce2b74a68d4e6733c47c1931813ab1736e533ad576f4cecb3a8a4d")
else
set_urls("https://www.libsdl.org/projects/SDL_image/release/SDL2_image-$(version).zip")
add_urls("https://github.com/libsdl-org/SDL_image/releases/download/release-$(version)/SDL2_image-$(version).zip")
add_versions("2.0.5", "eee0927d1e7819d57c623fe3e2b3c6761c77c474fe9bc425e8674d30ac049b1c")
add_versions("2.6.0", "2252cdfd5be73cefaf727edc39c2ef3b7682e797acbd3126df117e925d46aaf6")
add_versions("2.6.1", "cbfea63a46715c63a1db9e41617e550749a95ffd33ef9bd5ba6e58b2bdca6ed3")
add_versions("2.6.2", "efe3c229853d0d40c35e5a34c3f532d5d9728f0abc623bc62c962bcef8754205")
end
if is_plat("macosx") then
add_frameworks("CoreFoundation", "CoreGraphics", "ImageIO", "CoreServices")
end
if is_plat("macosx", "linux") then
add_deps("automake", "autoconf")
end
add_deps("libsdl")
add_links("SDL2_image")
add_includedirs("include", "include/SDL2")
on_load("macosx", "linux", function (package)
if package:version():ge("2.6") then
package:add("deps", "cmake")
else
package:add("deps", "automake", "autoconf")
end
end)
on_install("windows", "mingw", function (package)
local arch = package:arch()
if package:is_plat("mingw") then
@ -42,22 +56,27 @@ package("libsdl_image")
end)
on_install("macosx", "linux", function (package)
local configs = {}
if package:config("shared") then
table.insert(configs, "--enable-shared=yes")
else
table.insert(configs, "--enable-shared=no")
end
if package:is_plat("linux") and package:config("pic") ~= false then
table.insert(configs, "--with-pic")
if package:version():ge("2.6") then
local configs = {"-DSDL_TEST=OFF"}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
table.insert(configs, "-DSDL_STATIC=" .. (package:config("shared") and "OFF" or "ON"))
table.insert(configs, "-DSDL_SHARED=" .. (package:config("shared") and "ON" or "OFF"))
if libsdl and not libsdl:is_system() then
table.insert(configs, "-DSDL2_DIR=" .. libsdl:installdir())
end
import("package.tools.cmake").install(package, configs)
else
local configs = {}
table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no"))
table.insert(configs, "--enable-static=" .. (package:config("shared") and "no" or "yes"))
local libsdl = package:dep("libsdl")
if libsdl and not libsdl:is_system() then
table.insert(configs, "--with-sdl-prefix=" .. libsdl:installdir())
end
io.replace("Makefile.am", "noinst_PROGRAMS = showimage", "")
io.replace("Makefile.am", "noinst_PROGRAMS = showimage.-\n", "\n")
os.rm("./configure")
import("package.tools.autoconf").install(package, configs)
end
end)
on_test(function (package)

@ -5,10 +5,18 @@ package("libsdl_mixer")
if is_plat("windows", "mingw") then
set_urls("https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-devel-$(version)-VC.zip")
add_urls("https://github.com/libsdl-org/SDL_mixer/releases/download/release-$(version)/SDL2_mixer-devel-$(version)-VC.zip")
add_versions("2.0.4", "258788438b7e0c8abb386de01d1d77efe79287d9967ec92fbb3f89175120f0b0")
add_versions("2.6.0", "b8862b95340b8990177fdb3fb1f22fe5fd089d8b2ad0a30bf7d84e0f4a6138ae")
add_versions("2.6.1", "e086e1fed423a801e0e7573af063f2f51d3bcef0c9da356ed8a62a7a7f7a0815")
add_versions("2.6.2", "7f050663ccc7911bb9c57b11e32ca79578b712490186b8645ddbbe4e7d2fe1c9")
else
set_urls("https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-$(version).zip")
add_urls("https://github.com/libsdl-org/SDL_mixer/releases/download/release-$(version)/SDL2_mixer-$(version).zip")
add_versions("2.0.4", "9affb8c7bf6fbffda0f6906bfb99c0ea50dca9b188ba9e15be90042dc03c5ded")
add_versions("2.6.0", "aca0ffc96a4bf2a56a16536a269de28e341ce38a46a25180bc1ef75e19b08a3a")
add_versions("2.6.1", "788c748c1d3a87126511e60995b03526ed4e31e2ba053dffd9dcc8abde97b950")
add_versions("2.6.2", "61549615a67e731805ca1df553e005be966a625c1d20fb085bf99edeef6e0469")
end
if is_plat("mingw") and is_subhost("msys") then
@ -25,6 +33,12 @@ package("libsdl_mixer")
add_includedirs("include", "include/SDL2")
on_load(function (package)
if package:version():ge("2.6") and package:is_plat("macosx", "linux") then
package:add("deps", "cmake")
end
end)
on_install("windows", "mingw", function (package)
local arch = package:arch()
if package:is_plat("mingw") then
@ -36,20 +50,28 @@ package("libsdl_mixer")
end)
on_install("macosx", "linux", function (package)
local configs = {}
if package:config("shared") then
table.insert(configs, "--enable-shared=yes")
else
table.insert(configs, "--enable-shared=no")
end
if package:is_plat("linux") and package:config("pic") ~= false then
table.insert(configs, "--with-pic")
if package:version():ge("2.6") then
local configs = {"-DSDL2MIXER_SAMPLES=OFF",
"-DSDL2MIXER_FLAC=OFF",
"-DSDL2MIXER_OPUS=OFF",
"-DSDL2MIXER_MOD=OFF",
"-DSDL2MIXER_MIDI=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"))
if libsdl and not libsdl:is_system() then
table.insert(configs, "-DSDL2_DIR=" .. libsdl:installdir())
end
import("package.tools.cmake").install(package, configs)
else
local configs = {}
table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no"))
table.insert(configs, "--enable-static=" .. (package:config("shared") and "no" or "yes"))
local libsdl = package:dep("libsdl")
if libsdl and not libsdl:is_system() then
table.insert(configs, "--with-sdl-prefix=" .. libsdl:installdir())
end
import("package.tools.autoconf").install(package, configs)
end
end)
on_test(function (package)

@ -5,10 +5,14 @@ package("libsdl_net")
if is_plat("windows", "mingw") then
set_urls("https://www.libsdl.org/projects/SDL_net/release/SDL2_net-devel-$(version)-VC.zip")
add_urls("https://github.com/libsdl-org/SDL_net/releases/download/release-$(version)/SDL2_net-devel-$(version)-VC.zip")
add_versions("2.0.1", "c1e423f2068adc6ff1070fa3d6a7886700200538b78fd5adc36903a5311a243e")
add_versions("2.2.0", "f364e55babb44e47b41d039a43c640aa1f76615b726855591b555321c7d870dd")
else
set_urls("https://www.libsdl.org/projects/SDL_net/release/SDL2_net-$(version).zip")
add_urls("https://github.com/libsdl-org/SDL_net/releases/download/release-$(version)/SDL2_net-$(version).zip")
add_versions("2.0.1", "52031ed9d08a5eb1eda40e9a0409248bf532dde5e8babff5780ef1925657d59f")
add_versions("2.2.0", "1eec3a9d43df019d7916a6ecce32f2a3ad5248c82c9c237948afc712399be36d")
end
if is_plat("mingw") and is_subhost("msys") then
@ -25,6 +29,12 @@ package("libsdl_net")
add_includedirs("include", "include/SDL2")
on_load(function (package)
if package:version():ge("2.2") and package:is_plat("macosx", "linux") then
package:add("deps", "cmake")
end
end)
on_install("windows", "mingw", function (package)
local arch = package:arch()
if package:is_plat("mingw") then
@ -36,20 +46,24 @@ package("libsdl_net")
end)
on_install("macosx", "linux", function (package)
local configs = {}
if package:config("shared") then
table.insert(configs, "--enable-shared=yes")
else
table.insert(configs, "--enable-shared=no")
end
if package:is_plat("linux") and package:config("pic") ~= false then
table.insert(configs, "--with-pic")
if package:version():ge("2.2") then
local configs = {"-DSDL2NET_SAMPLES=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"))
if libsdl and not libsdl:is_system() then
table.insert(configs, "-DSDL2_DIR=" .. libsdl:installdir())
end
import("package.tools.cmake").install(package, configs)
else
local configs = {}
table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no"))
table.insert(configs, "--enable-static=" .. (package:config("shared") and "no" or "yes"))
local libsdl = package:dep("libsdl")
if libsdl and not libsdl:is_system() then
table.insert(configs, "--with-sdl-prefix=" .. libsdl:installdir())
end
import("package.tools.autoconf").install(package, configs)
end
end)
on_test(function (package)

@ -2,14 +2,7 @@ package("libsdl_ttf")
set_homepage("https://www.libsdl.org/projects/SDL_ttf/")
set_description("Simple DirectMedia Layer text rendering library")
if is_plat("windows", "mingw") then
set_urls("https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-devel-$(version)-VC.zip")
add_versions("2.0.15", "aab0d81f1aa6fe654be412efc85829f2b188165dca6c90eb4b12b673f93e054b")
else
set_urls("https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-$(version).zip")
add_versions("2.0.15", "cdb72b5b1c3b27795fa128af36f369fee5d3e38a96c350855da0b81880555dbc")
end
set_license("zlib")
if is_plat("mingw") and is_subhost("msys") then
add_extsources("pacman::SDL2_ttf")
@ -19,15 +12,38 @@ package("libsdl_ttf")
add_extsources("brew::sdl2_ttf")
end
if is_plat("windows", "mingw") then
set_urls("https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-devel-$(version)-VC.zip")
add_urls("https://github.com/libsdl-org/SDL_ttf/releases/download/release-$(version)/SDL2_ttf-devel-$(version)-VC.zip")
add_versions("2.0.15", "aab0d81f1aa6fe654be412efc85829f2b188165dca6c90eb4b12b673f93e054b")
add_versions("2.0.18", "4e1404ac6095bbcd4cb133eb644a765885aa283ae45f36cfbc3cf5a77d7e1cbd")
add_versions("2.20.0", "bc206392a74d2b32f74d770a3a1e623e87c72374781c115478277ab4c722358b")
add_versions("2.20.1", "2facfa180f77bac381776376c7598ad504a84d99414418049bb106cb1705fe22")
else
set_urls("https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-$(version).zip")
add_urls("https://github.com/libsdl-org/SDL_ttf/releases/download/release-$(version)/SDL2_ttf-$(version).zip")
add_versions("2.0.15", "cdb72b5b1c3b27795fa128af36f369fee5d3e38a96c350855da0b81880555dbc")
add_versions("2.0.18", "64e6a93c7542aba1e32e1418413898dfde82be95fdd0c73ba265fbdada189b5f")
add_versions("2.20.0", "04e94fc5ecac3475ab35c1d5cf52650df691867e7e4befcc861bf982a747111a")
add_versions("2.20.1", "18d81ab399c8e39adababe8918691830ba6e0d6448e5baa141ee0ddf87ede2dc")
end
add_deps("libsdl")
if is_plat("linux", "macosx") then
add_deps("freetype")
end
add_links("SDL2_ttf")
add_includedirs("include", "include/SDL2")
on_load("macosx", "linux", function (package)
if package:version():ge("2.20") then
package:add("deps", "cmake")
else
package:add("deps", "automake", "autoconf")
end
end)
on_install("windows", "mingw", function (package)
local arch = package:arch()
if package:is_plat("mingw") then
@ -39,20 +55,24 @@ package("libsdl_ttf")
end)
on_install("macosx", "linux", function (package)
local configs = {}
if package:config("shared") then
table.insert(configs, "--enable-shared=yes")
else
table.insert(configs, "--enable-shared=no")
end
if package:is_plat("linux") and package:config("pic") ~= false then
table.insert(configs, "--with-pic")
if package:version():ge("2.20") then
local configs = {"-DSDL2TTF_SAMPLES=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"))
if libsdl and not libsdl:is_system() then
table.insert(configs, "-DSDL2_DIR=" .. libsdl:installdir())
end
import("package.tools.cmake").install(package, configs)
else
local configs = {}
table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no"))
table.insert(configs, "--enable-static=" .. (package:config("shared") and "no" or "yes"))
local libsdl = package:dep("libsdl")
if libsdl and not libsdl:is_system() then
table.insert(configs, "--with-sdl-prefix=" .. libsdl:installdir())
end
import("package.tools.autoconf").install(package, configs)
end
end)
on_test(function (package)

Loading…
Cancel
Save