* add libpfm

* improve gyp-next

* update freeglut

* update gr

* improve arch
pull/1052/head
Hoildkv 3 years ago committed by GitHub
parent 42ce5c604e
commit 29b55f9776
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      packages/b/bazel/xmake.lua
  2. 2
      packages/c/chromium_zlib/port/xmake.lua
  3. 2
      packages/f/freeglut/xmake.lua
  4. 17
      packages/g/gr/xmake.lua
  5. 2
      packages/g/gyp-next/xmake.lua
  6. 8
      packages/l/libffi/port/xmake.lua
  7. 28
      packages/l/libpfm/xmake.lua
  8. 2
      packages/l/llvm-mingw/xmake.lua
  9. 2
      packages/o/opencl/xmake.lua
  10. 2
      packages/s/scotch/xmake.lua

@ -21,7 +21,7 @@ package("bazel")
add_versions("5.0.0", "4a88b8f48cac3bf6fe657332631c36b4d255628c87bd77eb3159f4eb166f5e66")
end
on_install("@windows|x64", "@macosx|x86_64,arm64", "@linux|x86_64,arm64", function (package)
on_install("@windows|x64", "@macosx", "@linux|x86_64", "@linux|arm64", function (package)
if is_host("windows") then
os.cp("../bazel-*.exe", path.join(package:installdir("bin"), "bazel.exe"))
else

@ -28,7 +28,7 @@ target("zlib")
if is_plat("cross") then
add_defines("CPU_NO_SIMD")
add_files("inflate.c")
elseif is_arch("x86", "x64", "x86_64") then
elseif is_arch("i386", "x86", "x64", "x86_64") then
add_defines("CRC32_SIMD_SSE42_PCLMUL", "DEFLATE_FILL_WINDOW_SSE2")
add_files("crc32_simd.c", "crc_folding.c", "fill_window_sse.c")
add_defines("ADLER32_SIMD_SSSE3", "INFLATE_CHUNK_SIMD_SSE2")

@ -2,11 +2,13 @@ package("freeglut")
set_homepage("http://freeglut.sourceforge.net")
set_description("A free-software/open-source alternative to the OpenGL Utility Toolkit (GLUT) library.")
set_license("MIT")
set_urls("https://github.com/dcnieho/FreeGLUT/archive/FG_$(version).zip",
{version = function (version) return (version:gsub("%.", "_")) end})
add_versions("3.0.0", "050e09f17630249a7d2787c21691e4b7d7b86957a06b3f3f34fa887b561d8e04")
add_versions("3.2.1", "501324c27a3ee809ac4a6374f63c5049c1c0d342d93fdb5db12b8c1c84760fa4")
add_versions("3.2.2", "2c913b7f698e2183d753c94440f5a0fe3785a1c564e6b73e073c2f6a1b077bf8")
add_patches("3.2.1", path.join(os.scriptdir(), "patches", "3.2.1", "gcc10.patch"), "26cf5026249c9e288080a75a1e9b40b3fa74a4048321cc93907f1476c5a6508b")

@ -10,6 +10,7 @@ package("gr")
add_versions("0.57.0", "5e62a425e60885835fa8177ab5311c131bab0bb484722866ee931e81b77a6a5a")
add_versions("0.58.0", "a8152c15613c8b8e02f57d2b19632576f133e353057d2d824e9b85c203c3aa90")
add_versions("0.62.0", "749ea7757f967720c27990a55c26774d0683dacd81169b12033e4084e0483a85")
add_versions("0.64.0", "dddbe136b7f2377d2b58bca07b1b009cd8408553adcfc9640242d985f7a49501")
end
elseif is_plat("macosx") then
if is_arch("arm64") then
@ -17,11 +18,13 @@ package("gr")
add_versions("0.57.0", "a867a9233a26f8797f13adf2b7d9324a397a84d256750db0a29f4b5032b9a47f")
add_versions("0.58.0", "3c0132bc7c26665ed812381e103091273999352a3cda8d9e664759c143387755")
add_versions("0.62.0", "9209f18b0affdaabc77e88fc027a8877a2c7c4e06c9fe44fec0da728c8882caf")
add_versions("0.64.0", "fdb3055aca4140dd8357e9c64244354a0304f1f58e1bede3901b0cba7602cad2")
else
add_urls("https://github.com/sciapp/gr/releases/download/v$(version)/gr-$(version)-Darwin-x86_64.tar.gz")
add_versions("0.57.0", "b6114420b6ffff1cc41c7a325b53fd2af90942c5d7840ff27b1217488b6fb950")
add_versions("0.58.0", "1c808852fec10badea7a5282bc867c5bcc86eda89e07bce7b2f0017a889f16cf")
add_versions("0.62.0", "e2a185691ef020bddbbb3c93046813335b04df7ca97df8b73032086aca266dce")
add_versions("0.64.0", "7e51a471092e2a0592b51a147e9cf752934b63913f1508c1b3918d4bc3ce0123")
end
elseif is_plat("linux") then
if is_arch("x86_64") then
@ -30,36 +33,44 @@ package("gr")
add_versions("0.57.0", "5f157733b750be6e8e771e008bf2dab1ee786d50efcc16deb02f6cdda9d03a54")
add_versions("0.58.0", "c72767b2880fd561508e526286b30c3fc9bfa78f432ac966eb6455d318c1374d")
add_versions("0.62.0", "b539903b16bae5d6b3db01314c39c65819306e9aa8ded15ba52a5aeb7674e776")
add_versions("0.64.0", "7d5527952f8c4b8fc9855fe376c8ebd34ea2869cf45c797ba764182652440fe6")
elseif linuxos.name() == "debian" then
add_urls("https://github.com/sciapp/gr/releases/download/v$(version)/gr-$(version)-Debian-x86_64.tar.gz")
add_versions("0.57.0", "f20e65b4b93df1409377355cefca0fda714f5b4f1bf0c2292c0bad4232ac0a41")
add_versions("0.58.0", "5fc6fe7b58193fbfac9fc32538d1078dd9ab5a606d38e3fdb2a1683b37ec2a76")
add_versions("0.62.0", "ebc6901b0a3888b7e874c761728fb503029128f0646a9bd0f93e67845467454d")
add_versions("0.64.0", "2e89f6b8c54dafdb6164f5ac05a8be1864be0841a2ed3e2987f7247b23cfc110")
elseif linuxos.name() == "archlinux" then
add_urls("https://github.com/sciapp/gr/releases/download/v$(version)/gr-$(version)-ArchLinux-x86_64.tar.gz")
add_versions("0.57.0", "3224971f16a8cc223f57ea240dea346747ea18111c91b64b38b5554f93721cf8")
add_versions("0.58.0", "f90fb2b15459d0c3075326646c31a041a61c9b84b4d4ebe015b4283a43c2fe6e")
add_versions("0.62.0", "d8c6c01de2e566fa064836ead23ce139030e7e08961f482ff55942b6fb298e4e")
add_versions("0.64.0", "0c3b3a90ab3764c38a0b9dcbe149a834f3e2db7ac983026a6d7ac54ec33115e8")
elseif linuxos.name() == "centos" then
add_urls("https://github.com/sciapp/gr/releases/download/v$(version)/gr-$(version)-CentOS-x86_64.tar.gz")
add_versions("0.57.0", "877d6066690c6dc071db1edb64e79d738fdde6d9a7d4562f33bb76d8b9324b1c")
add_versions("0.58.0", "3d403550ae440d4aac607bd61a9c4140ee98390c48ed44594eebef55308466ed")
add_versions("0.62.0", "c83cb8c6d05877c4b4a050879a82ca6482472b8ea5dea48e608ce61544c34924")
add_versions("0.64.0", "43e9628536bbf1cbcc8715925838ad595b97c52708a952a2f6973912cae33d36")
else
add_urls("https://github.com/sciapp/gr/releases/download/v$(version)/gr-$(version)-Linux-x86_64.tar.gz")
add_versions("0.57.0", "793fef6a18f8faa7bc4fbb2067691bc355a9111b5c2ae5ea41f3552d6c7064d5")
add_versions("0.58.0", "d7350611e7bd8a3ff1034b2d13fe4c10c65f99c85c994a32e6dd6da59cb7de3c")
add_versions("0.62.0", "99da04bda9520e99181dd28a175de3689d699e0bbe09495d328b715d17f874a2")
add_versions("0.64.0", "d0e19779973602e58ed81eb607a612d9b89d883423ce6d5b3c373d63e639e445")
end
elseif is_arch("x86") then
elseif is_arch("i386") then
add_urls("https://github.com/sciapp/gr/releases/download/v$(version)/gr-$(version)-Linux-i386.tar.gz")
add_versions("0.57.0", "f6ec390e1f9b2a0a83d5b7da95ebfe615aedc84075475a28c363b671353c65c5")
add_versions("0.58.0", "681dbd0fa7cea25e189d4f58e5a4b7cf002cea2b13a663df67598f95f6a548a6")
add_versions("0.62.0", "2a5bc4959c7254b24d37ee31d5a2294ecdd956730e8ec8abd8d17dde3cc91a01")
add_versions("0.64.0", "135d10bd9a7f3fad22ca58b62608f7ad2f2f7a24e3eed2b5dac26ab182787aac")
end
end
on_load("windows|x64", "macosx", "linux|x86,x86_64", function (package)
add_configs("shared", {description = "Build shared library.", default = true, type = "boolean", readonly = true})
on_load("windows|x64", "macosx", "linux|i386", "linux|x86_64", function (package)
local libs = {"GR", "GR3", "GRM", "GKS"}
local prefix = ""
if package:is_plat("windows") then
@ -72,7 +83,7 @@ package("gr")
end
end)
on_install("windows|x64", "macosx", "linux|x86,x86_64", function (package)
on_install("windows|x64", "macosx", "linux|i386", "linux|x86_64", function (package)
os.cp("*", package:installdir())
package:addenv("PATH", ".")
package:addenv("PATH", "bin")

@ -17,7 +17,7 @@ package("gyp-next")
on_test(function (package)
if is_host("windows") then
os.vrun("cmd /c \"gyp --help\"")
os.vrun("gyp.bat --help")
else
os.vrun("gyp --help")
end

@ -32,12 +32,12 @@ if is_plat("windows") then
elseif is_arch("arm64") then
targetarch = "ARM_WIN64"
end
elseif is_plat("macosx") and is_arch("x86") then
elseif is_plat("macosx") and is_arch("i386", "x86") then
targetarch = "X86_DARWIN"
elseif is_plat("bsd") and is_arch("x86") then
elseif is_plat("bsd") and is_arch("i386", "x86") then
targetarch = "X86_FREEBSD"
else
if is_arch("x86") then
if is_arch("i386", "x86") then
targetarch = "X86"
elseif is_arch("x64") then
targetarch = "X86_64"
@ -133,7 +133,7 @@ target("ffi")
if is_plat("windows") and is_arch("x86") then
add_asflags("/GZ")
end
if is_arch("x86") then
if is_arch("i386", "x86") then
add_files("src/x86/ffi.c")
add_files(is_plat("windows") and "src/x86/sysv_intel.S" or "src/x86/sysv.S")
add_includedirs("src/x86")

@ -0,0 +1,28 @@
package("libpfm")
set_homepage("http://perfmon2.sourceforge.net/")
set_description("improving performance monitoring on Linux")
set_license("MIT")
add_urls("http://sourceforge.net/projects/perfmon2/files/libpfm4/libpfm-$(version).tar.gz")
add_versions("4.11.0", "5da5f8872bde14b3634c9688d980f68bda28b510268723cc12973eedbab9fecc")
on_install("linux", function (package)
if package:config("shared") then
io.replace("lib/Makefile", "TARGETS=$(ALIBPFM)", "TARGETS=", {plain = true})
io.replace("lib/Makefile", "$(INSTALL) -m 644 $(ALIBPFM) $(DESTDIR)$(LIBDIR)", "", {plain = true})
end
local args = {}
table.insert(args, "CC=" .. package:build_getenv("cc"))
table.insert(args, "DBG=")
table.insert(args, "CONFIG_PFMLIB_DEBUG=" .. (package:debug() and "y" or "n"))
table.insert(args, "CONFIG_PFMLIB_SHARED=" .. (package:config("shared") and "y" or "n"))
table.insert(args, "CONFIG_PFMLIB_NOPYTHON=y")
table.insert(args, "PREFIX=" .. package:installdir())
os.vrunv("make", table.join({"lib"}, args))
os.vrunv("make", table.join({"install"}, args))
end)
on_test(function (package)
assert(package:has_cfuncs("pfm_initialize", {includes = "perfmon/pfmlib.h"}))
end)

@ -33,7 +33,7 @@ package("llvm-mingw")
end
end
on_install("@windows", "@linux|x86_64,arm64", function (package)
on_install("@windows", "@linux|x86_64", "@linux|arm64", function (package)
os.cp("*", package:installdir())
end)

@ -17,7 +17,7 @@ package("opencl")
if package:is_arch("x64") then
table.insert(archsuffixes, "lib64")
table.insert(archsuffixes, path.join("lib", "x64"))
elseif package:is_arch("x86") then
elseif package:is_arch("x86", "i386") then
table.insert(archsuffixes, path.join("lib", "x86"))
elseif package:is_arch("x86_64") then
table.insert(archsuffixes, "lib64")

@ -20,7 +20,7 @@ package("scotch")
local basename
if package:is_arch("x86_64") then
basename = "Make.inc/Makefile.inc.x86-64_pc_linux2"
elseif package:is_arch("x86") then
elseif package:is_arch("i386", "x86") then
basename = "Make.inc/Makefile.inc.i686_pc_linux2"
end
os.cp(basename .. (package:config("shared") and ".shlib" or ""), "Makefile.inc")

Loading…
Cancel
Save