Skip to content

Commit

Permalink
test ci
Browse files Browse the repository at this point in the history
  • Loading branch information
luadebug committed Jan 3, 2025
1 parent 3748064 commit d18e48e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/l/libmysofa/patches/v1.3.2/fix-build.patch
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ index d1e76f5..5fb4b55 100644
#endif

-#if defined(__linux__) || defined(__CYGWIN__)
+#if defined(__linux__) || defined(__CYGWIN__) || defined(__illumos__) || defined(__GNU__) || defined(__linux) || defined(linux) || defined(__gnu_linux__) || defined(__UBUNTU__)
+#if defined(__linux__) || defined(__CYGWIN__) || defined(__illumos__) || defined(__GNU__) || defined(__linux) || defined(linux) || defined(__gnu_linux__)

# include <endian.h>

Expand Down
14 changes: 13 additions & 1 deletion packages/l/libmysofa/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package("libmysofa")

add_versions("v1.3.2", "6c5224562895977e87698a64cb7031361803d136057bba35ed4979b69ab4ba76")

add_patches("v1.3.2", "patches/v1.3.2/fix-build.patch", "890ba9fdbba755499eae72e8f8e3f0dabd39eaa4edc4330c61c4b15efa0e30a1")
add_patches("v1.3.2", "patches/v1.3.2/fix-build.patch", "a28aed4c5e766081ff90a7aed74c58b77927432a80385f6aad9f3278cde6bb59")

add_deps("cmake", "zlib")

Expand All @@ -21,6 +21,18 @@ package("libmysofa")
if package:is_plat("wasm", "cross") then
io.replace("src/CMakeLists.txt", [[find_library(MATH m)]], [[set(MATH "")]], {plain = true})
end
if is_host("windows") and package:is_plat("wasm") then
io.replace("src/hrtf/portable_endian.h", [[elif defined(__WINDOWS__)]], [[elif 1]], {plain = true})
end
if is_host("linux") and package:is_plat("wasm") then
io.replace("src/hrtf/portable_endian.h", [[if defined(__linux__)]], [[if 1]], {plain = true})
end
if is_host("bsd") and package:is_plat("wasm") then
io.replace("src/hrtf/portable_endian.h", [[defined(__FreeBSD__)]], [[1]], {plain = true})
end
if is_host("macosx") and package:is_plat("wasm") then
io.replace("src/hrtf/portable_endian.h", [[elif defined(__APPLE__)]], [[elif 1]], {plain = true})
end
os.rm("windows/third-party/zlib-1.2.11")
os.rm("share/default.sofa")
os.cp("share/MIT_KEMAR_normal_pinna.sofa", "share/default.sofa")
Expand Down

0 comments on commit d18e48e

Please sign in to comment.