update some packages (#328)

* update some packages

* make xmake.lua inside folder port
pull/331/head
Hoildkv 4 years ago committed by GitHub
parent e9e979610a
commit cc87d52ef4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      .github/workflows/fedora.yml
  2. 3
      packages/b/boost/xmake.lua
  3. 3
      packages/f/freetype/xmake.lua
  4. 53
      packages/g/glew/port/xmake.lua
  5. 87
      packages/g/glew/xmake.lua
  6. 1
      packages/l/libx11/xmake.lua
  7. 12
      packages/o/openexr/xmake.lua
  8. 19
      packages/o/openvdb/xmake.lua
  9. 1
      packages/x/xorgproto/xmake.lua

@ -20,6 +20,7 @@ jobs:
- name: Installation
run: |
uname -a
dnf -y install mesa-libGL-devel mesa-libGLU-devel
dnf -y install @development-tools @rpm-development-tools
dnf -y install copr-cli make gcc-c++
dnf -y upgrade git

@ -138,6 +138,9 @@ package("boost")
table.insert(argv, "cxxflags=-stdlib=libc++")
table.insert(argv, "linkflags=-stdlib=libc++")
end
if package:config("pic") ~= false then
table.insert(argv, "cxxflags=-fPIC")
end
end
for _, libname in ipairs(libnames) do
if package:config(libname) then

@ -36,7 +36,8 @@ package("freetype")
on_install("windows", function (package)
os.cp("include", package:installdir())
os.cp(is_arch("x64") and "win64/*" or "win32/*", package:installdir("lib"))
os.cp(is_arch("x64") and "win64/*.lib" or "win32/*.lib", package:installdir("lib"))
os.cp(is_arch("x64") and "win64/*.dll" or "win32/*.dll", package:installdir("bin"))
end)
on_install("linux", "macosx", function (package)

@ -0,0 +1,53 @@
add_rules("mode.debug", "mode.release")
if is_plat("linux") then
add_requires("libx11", "xorgproto")
end
target("glew")
set_kind("$(kind)")
if is_plat("windows") or is_plat("mingw") then
set_basename("glew32")
add_syslinks("glu32", "opengl32")
elseif is_plat("macosx") then
add_frameworks("OpenGL")
elseif is_plat("linux") then
add_syslinks("GLU", "GL")
end
add_defines("GLEW_NO_GLU")
if is_plat("windows") then
if get_config("kind") == "shared" then
add_defines("GLEW_BUILD")
else
add_defines("GLEW_STATIC", {public = true})
end
end
add_files("src/glew.c")
add_includedirs("include", {public = true})
add_headerfiles("include/(GL/*.h)")
target("glewinfo")
set_kind("binary")
add_deps("glew")
if is_plat("windows") or is_plat("mingw") then
add_syslinks("user32", "gdi32", "glu32", "opengl32")
elseif is_plat("macosx") then
add_frameworks("OpenGL")
elseif is_plat("linux") then
add_syslinks("GLU", "GL")
add_packages("libx11", "xorgproto")
end
add_files("src/glewinfo.c")
target("visualinfo")
set_kind("binary")
add_deps("glew")
if is_plat("windows") or is_plat("mingw") then
add_syslinks("user32", "gdi32", "glu32", "opengl32")
elseif is_plat("macosx") then
add_frameworks("OpenGL")
elseif is_plat("linux") then
add_syslinks("GLU", "GL")
add_packages("libx11", "xorgproto")
end
add_files("src/visualinfo.c")

@ -3,86 +3,33 @@ package("glew")
set_homepage("http://glew.sourceforge.net/")
set_description("A cross-platform open-source C/C++ extension loading library.")
if is_plat("windows") then
set_urls("https://github.com/nigels-com/glew/releases/download/glew-$(version)/glew-$(version)-win32.zip")
add_versions("2.1.0", "80cfc88fd295426b49001a9dc521da793f8547ac10aebfc8bdc91ddc06c5566c")
else
set_urls("https://github.com/nigels-com/glew/releases/download/glew-$(version)/glew-$(version).zip")
add_versions("2.1.0", "2700383d4de2455f06114fbaf872684f15529d4bdc5cdea69b5fb0e9aa7763f1")
end
add_configs("build_utils", {description = "Build utility binaries", default = false, type = "boolean"})
set_urls("https://github.com/nigels-com/glew/releases/download/glew-$(version)/glew-$(version).zip")
add_versions("2.1.0", "2700383d4de2455f06114fbaf872684f15529d4bdc5cdea69b5fb0e9aa7763f1")
add_versions("2.2.0", "a9046a913774395a095edcc0b0ac2d81c3aacca61787b39839b941e9be14e0d4")
if is_plat("windows", "mingw") then
if is_plat("windows") or is_plat("mingw") then
add_syslinks("glu32", "opengl32")
else
add_links("GLEW")
if is_plat("linux") then
add_deps("libx11", "xorgproto")
add_syslinks("GLU", "GL")
elseif is_plat("macosx") then
add_frameworks("OpenGL")
end
end
on_load(function (package)
package:add("defines", "GLEW_BUILD")
if package:is_plat("windows") then
package:add("links", package:config("shared") and "glew32" or "glew32s")
end
end)
if is_plat("mingw") then
add_deps("cmake")
elseif is_plat("linux") then
add_syslinks("GLU", "GL")
add_deps("libx11", "xorgproto")
end
on_install("windows", function (package)
os.cp("include", package:installdir())
if is_arch("x64") then
os.cp("bin/Release/x64/*.dll", package:installdir("bin"))
os.cp("lib/Release/x64/*.lib", package:installdir("lib"))
else
os.cp("bin/Release/Win32/*.dll", package:installdir("bin"))
os.cp("lib/Release/Win32/*.lib", package:installdir("lib"))
end
if package:config("shared") then
package:addenv("PATH", "bin")
end
end)
on_install("linux", "macosx", function (package)
local configs = {"glew.lib." .. (package:config("shared") and "shared" or "static")}
local cflags = {}
for _, dep in ipairs(package:orderdeps()) do
local fetchinfo = dep:fetch()
if fetchinfo then
for _, includedir in ipairs(fetchinfo.includedirs) do
table.insert(cflags, "-I" .. includedir)
end
end
end
if package:config("shared") then
table.insert(cflags, "-fPIC")
end
if #cflags > 0 then
table.insert(configs, "CFLAGS.EXTRA=" .. table.concat(cflags, " "))
on_load("windows", "mingw@windows", function (package)
if not package:config("shared") then
package:add("defines", "GLEW_STATIC")
end
import("package.tools.make").build(package, configs)
os.cp("lib", package:installdir())
os.cp("include", package:installdir())
end)
on_install("mingw", function (package)
os.cd("build/cmake")
on_install("linux", "macosx", "mingw@windows", "windows", function (package)
local configs = {}
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
table.insert(configs, "-DBUILD_UTILS=" .. (package:config("build_utils") and "ON" or "OFF"))
import("package.tools.cmake").install(package, configs, {buildir = "build"})
configs.mode = package:debug() and "debug" or "release"
if package:config("shared") then
os.cp("build/install/bin", package:installdir())
package:addenv("PATH", "bin")
configs.kind = "shared"
elseif package:is_plat("linux") and package:config("pic") ~= false then
configs.cxflags = "-fPIC"
end
os.cp(path.join(package:scriptdir(), "port", "xmake.lua"), "xmake.lua")
import("package.tools.xmake").install(package, configs)
end)
on_test(function (package)

@ -5,6 +5,7 @@ package("libx11")
set_urls("https://www.x.org/archive/individual/lib/libX11-$(version).tar.bz2")
add_versions("1.6.9", "9cc7e8d000d6193fa5af580d50d689380b8287052270f5bb26a5fb6b58b2bed1")
add_versions("1.7.0", "36c8f93b6595437c8cfbc9f08618bcb3041cbd303e140a0013f88e4c2977cb54")
if is_plat("macosx", "linux") then
add_deps("pkg-config", "util-macros", "xtrans", "libxcb", "xorgproto")

@ -5,14 +5,20 @@ package("openexr")
add_urls("https://github.com/AcademySoftwareFoundation/openexr/archive/v$(version).tar.gz",
"https://github.com/AcademySoftwareFoundation/openexr.git")
add_versions("2.5.3", "6a6525e6e3907715c6a55887716d7e42d09b54d2457323fcee35a0376960bebf")
add_versions("2.5.5", "59e98361cb31456a9634378d0f653a2b9554b8900f233450f2396ff495ea76b3")
add_deps("cmake")
add_deps("zlib")
add_configs("build_both", {description = "Build both static library and shared library.", default = false, type = "boolean"})
on_load("windows", function (package)
if package:config("shared") then
package:add("defines", "OPENEXR_DLL")
end
end)
on_install("macosx", "linux", "windows", "mingw@windows", "mingw@msys", function (package)
local configs = {"-DBUILD_TESTING=OFF", "-DINSTALL_OPENEXR_EXAMPLES=OFF", "-DINSTALL_OPENEXR_DOCS=OFF", "-DOPENEXR_BUILD_UTILS=ON"}
if package:config("build_both") then
@ -26,9 +32,7 @@ package("openexr")
end
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
table.insert(configs, "-DPYILMBASE_ENABLE=" .. "OFF")
import("package.tools.cmake").install(package, configs, {buildir = "build"})
os.cp("build/install/bin", package:installdir())
package:addenv("PATH", "bin")
import("package.tools.cmake").install(package, configs)
end)
on_test(function (package)

@ -5,8 +5,8 @@ package("openvdb")
add_urls("https://github.com/AcademySoftwareFoundation/openvdb/archive/v$(version).tar.gz",
"https://github.com/AcademySoftwareFoundation/openvdb.git")
add_versions("7.1.0", "0c3588c1ca6e647610738654ec2c6aaf41a203fd797f609fbeab1c9f7c3dc116")
add_versions("8.0.1", "a6845da7c604d2c72e4141c898930ac8a2375521e535f696c2cd92bebbe43c4f")
add_deps("cmake")
add_deps("boost", {system = false, configs = {regex = true, system = true, iostreams = true}})
@ -19,7 +19,7 @@ package("openvdb")
add_configs("render", {description = "Command line binary for ray-tracing OpenVDB grids.", default = false, type = "boolean"})
add_configs("view", {description = "Command line binary for displaying OpenVDB grids in a GL viewport.", default = false, type = "boolean"})
on_load(function (package)
on_load("macosx", "linux", "windows", function (package)
if package:config("with_houdini") == "" then
package:add("deps", "zlib")
package:add("deps", "blosc ~1.5.0", {configs = {shared = package:is_plat("linux")}})
@ -32,15 +32,13 @@ package("openvdb")
package:add("deps", "glew")
package:add("deps", "glfw")
end
if not package:config("shared") then
package:add("defines", "OPENVDB_STATICLIB")
end
end)
on_install("macosx", "linux", "windows", function (package)
local configs = {"-DOPENVDB_BUILD_DOCS=OFF", "-DUSE_PKGCONFIG=OFF", "-DBoost_USE_STATIC_LIBS=ON", "-DUSE_CCACHE=OFF"}
if package:is_plat("windows") then
table.insert(configs, "-DBoost_USE_STATIC_RUNTIME=ON")
else
table.insert(configs, "-DBoost_USE_STATIC_RUNTIME=OFF")
end
if package:config("shared") then
table.insert(configs, "-DOPENVDB_CORE_SHARED=ON")
table.insert(configs, "-DOPENVDB_CORE_STATIC=OFF")
@ -49,6 +47,9 @@ package("openvdb")
table.insert(configs, "-DOPENVDB_CORE_STATIC=ON")
end
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
if package:is_plat("windows") then
table.insert(configs, "-DBoost_USE_STATIC_RUNTIME=" .. (package:config("vs_runtime"):startswith("MT") and "ON" or "OFF"))
end
table.insert(configs, "-DOPENVDB_BUILD_VDB_LOD=" .. (package:config("lod") and "ON" or "OFF"))
table.insert(configs, "-DOPENVDB_BUILD_VDB_PRINT=" .. (package:config("print") and "ON" or "OFF"))
table.insert(configs, "-DOPENVDB_BUILD_VDB_RENDER=" .. (package:config("render") and "ON" or "OFF"))
@ -66,9 +67,7 @@ package("openvdb")
table.insert(configs, "-DUSE_BLOSC=ON")
table.insert(configs, "-DUSE_EXR=ON")
end
import("package.tools.cmake").install(package, configs, {buildir = "build"})
os.cp("build/install/bin", package:installdir())
package:addenv("PATH", "bin")
import("package.tools.cmake").install(package, configs)
end)
on_test(function (package)

@ -5,6 +5,7 @@ package("xorgproto")
set_urls("https://xorg.freedesktop.org/archive/individual/proto/xorgproto-$(version).tar.bz2")
add_versions("2019.2", "46ecd0156c561d41e8aa87ce79340910cdf38373b759e737fcbba5df508e7b8e")
add_versions("2021.3", "4c732b14fc7c7db64306374d9e8386d6172edbb93f587614df1938b9d9b9d737")
if is_plat("macosx", "linux") then
add_deps("pkg-config", "util-macros")

Loading…
Cancel
Save