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

raylib: remove limits #14

Open
wants to merge 9 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion packages/l/libx11/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ package("libx11")
add_deps("gnu-sed")
end

on_install("macosx", "linux", "bsd", function (package)
on_install(function (package)
local configs = {"--sysconfdir=" .. package:installdir("etc"),
"--localstatedir=" .. package:installdir("var"),
"--disable-dependency-tracking",
Expand Down
56 changes: 30 additions & 26 deletions packages/r/raylib/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@ package("raylib")
set_homepage("http://www.raylib.com")
set_description("A simple and easy-to-use library to enjoy videogames programming.")

if is_plat("macosx") and is_arch("x86_64") then
add_urls("https://github.com/raysan5/raylib/releases/download/$(version).tar.gz", {version = function (version)
if version:ge("3.5.0") then
return version .. "/raylib-" .. version .. "_macos"
else
return version .. "/raylib-" .. version .. "-macOS"
end
end})
add_versions("2.5.0", "e9ebdf70ad4912dc9f3c7965dc702d5c61f2841aeae521e8dd3b0a96a9d82d58")
add_versions("3.0.0", "8244898b09887f29baa9325b5ae47c30ec0f45dc15b4f740178c65af068b3141")
add_versions("3.5.0", "9b9be75fe1b231225c91a6fcf5ed9c24cbf03c6193f917e40e4655ef27f281e2")
add_versions("3.7.0", "439dc1851dd1b7f385f4caf4f5c7191dda90add9d8d531e5e74702315e432003")
add_versions("4.0.0", "be73734815a7ef4eb3130f4a2ecaabb2059602745ae6ce1173201a74034c2ec9")
add_versions("4.2.0", "5f79c103b82c577698b01c7b2c166d0c2b51615886b7fabdc671199f0aaf4b38")
add_versions("4.5.0", "63deb87ffc32e5eb2023ba763aaea2cb5f41bd37bbc07760651efe251bd76f3d")
add_versions("5.0", "48e477d3dde2e20220572c9f93a332c48cf378fc1e1f205454b975180085565c")
else
-- if is_plat("macosx") and is_arch("x86_64") then
-- add_urls("https://github.com/raysan5/raylib/releases/download/$(version).tar.gz", {version = function (version)
-- if version:ge("3.5.0") then
-- return version .. "/raylib-" .. version .. "_macos"
-- else
-- return version .. "/raylib-" .. version .. "-macOS"
-- end
-- end})
-- add_versions("2.5.0", "e9ebdf70ad4912dc9f3c7965dc702d5c61f2841aeae521e8dd3b0a96a9d82d58")
-- add_versions("3.0.0", "8244898b09887f29baa9325b5ae47c30ec0f45dc15b4f740178c65af068b3141")
-- add_versions("3.5.0", "9b9be75fe1b231225c91a6fcf5ed9c24cbf03c6193f917e40e4655ef27f281e2")
-- add_versions("3.7.0", "439dc1851dd1b7f385f4caf4f5c7191dda90add9d8d531e5e74702315e432003")
-- add_versions("4.0.0", "be73734815a7ef4eb3130f4a2ecaabb2059602745ae6ce1173201a74034c2ec9")
-- add_versions("4.2.0", "5f79c103b82c577698b01c7b2c166d0c2b51615886b7fabdc671199f0aaf4b38")
-- add_versions("4.5.0", "63deb87ffc32e5eb2023ba763aaea2cb5f41bd37bbc07760651efe251bd76f3d")
-- add_versions("5.0", "48e477d3dde2e20220572c9f93a332c48cf378fc1e1f205454b975180085565c")
-- else
add_urls("https://github.com/raysan5/raylib/archive/$(version).tar.gz",
"https://github.com/raysan5/raylib.git")
add_versions("2.5.0", "fa947329975bdc9ea284019f0edc30ca929535dc78dcf8c19676900d67a845ac")
Expand All @@ -30,28 +30,32 @@ package("raylib")
add_versions("4.2.0", "676217604a5830cb4aa31e0ede0e4233c942e2fc5c206691bded58ebcd82a590")
add_versions("4.5.0", "163378604f2293ea5ebf3238f50c8926addde72d1a6bc8998ac2e96074ba8af8")
add_versions("5.0", "98f049b9ea2a9c40a14e4e543eeea1a7ec3090ebdcd329c4ca2cf98bc9793482")
end
-- end

if not (is_plat("macosx") and is_arch("x86_64")) then
add_deps("cmake >=3.11")
end

if is_plat("macosx") then
add_frameworks("CoreVideo", "CoreGraphics", "AppKit", "IOKit", "CoreFoundation", "Foundation")
if is_plat("macosx", "iphoneos", "linux", "cross", "wasm") then
add_deps("libx11")
end

if is_plat("macosx", "iphoneos") then
add_frameworks("CoreVideo", "CoreGraphics", "Carbon", "AppKit", "IOKit", "CoreFoundation", "Foundation")
elseif is_plat("windows", "mingw") then
add_syslinks("gdi32", "user32", "winmm", "shell32")
elseif is_plat("linux") then
add_syslinks("pthread", "dl", "m")
add_deps("libx11", "libxrandr", "libxrender", "libxinerama", "libxcursor", "libxi", "libxfixes", "libxext")
add_deps("libxrandr", "libxrender", "libxinerama", "libxcursor", "libxi", "libxfixes", "libxext")
end
add_deps("opengl", {optional = true})

on_install("macosx|x86_64", function (package)
os.cp("include/*.h", package:installdir("include"))
os.cp("lib/libraylib.a", package:installdir("lib"))
end)
-- on_install("macosx|x86_64", function (package)
-- os.cp("include/*.h", package:installdir("include"))
-- os.cp("lib/libraylib.a", package:installdir("lib"))
-- end)

on_install("windows", "linux", "macosx|arm64", "mingw", function (package)
on_install(function (package)
local configs = {"-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
Loading