package An official xmake package repository https://xrepo.xmake.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
1.2 KiB

4 years ago
package("libogg")
set_homepage("https://www.xiph.org/ogg/")
set_description("Ogg Bitstream Library")
4 years ago
set_urls("https://gitlab.xiph.org/xiph/ogg/-/archive/$(version)/ogg-$(version).tar.gz",
4 years ago
"https://gitlab.xiph.org/xiph/ogg.git")
4 years ago
add_versions("v1.3.4", "62cc64b9fd3cf57bde3a9033e94534ba34313d2bb9698029f623121a4e47bb9b")
add_patches("v1.3.4", path.join(os.scriptdir(), "patches", "1.3.4", "macos_fix.patch"), "e12c41ad71206777f399c1048914e5e5a2fe44e18d0d50ebe9bedbfbe0624c35")
4 years ago
add_deps("cmake")
if is_plat("cross") and is_subhost("windows") then
add_deps("make")
end
on_install("windows", "macosx", "linux", "mingw", "iphoneos", "android", "cross", function (package)
local configs = {"-DBUILD_TESTING=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"))
table.insert(configs, "-DCMAKE_POSITION_INDEPENDENT_CODE=ON")
4 years ago
import("package.tools.cmake").install(package, configs)
4 years ago
end)
on_test(function (package)
assert(package:has_cfuncs("ogg_sync_init", {includes = {"stdint.h", "ogg/ogg.h"}}))
end)