|
@@ -1,5 +1,4 @@
|
|
|
package("libflac")
|
|
|
-
|
|
|
set_homepage("https://xiph.org/flac")
|
|
|
set_description("Free Lossless Audio Codec")
|
|
|
set_license("BSD")
|
|
@@ -7,7 +6,9 @@ package("libflac")
|
|
|
set_urls("https://github.com/xiph/flac/archive/$(version).tar.gz",
|
|
|
"https://github.com/xiph/flac.git")
|
|
|
|
|
|
+ add_versions("1.4.2", "8e8e0406fb9e1d177bb4ba8cfed3ca3935d37144eac8f0219a03e8c1ed5cc18e")
|
|
|
add_versions("1.3.3", "668cdeab898a7dd43cf84739f7e1f3ed6b35ece2ef9968a5c7079fe9adfe1689")
|
|
|
+ add_patches("1.4.2", path.join(os.scriptdir(), "patches", "1.4.2", "cmake.patch"), "0a99382d5d7bd33078572b6cc3af08ee7e5e3618c80754a5fdc400bd69f4e470")
|
|
|
add_patches("1.3.3", path.join(os.scriptdir(), "patches", "1.3.3", "cmake.patch"), "49baa40ab70d63e74cfc3f0cc2f13824545a618ceaeffdd51d3333d90b37fd32")
|
|
|
|
|
|
if is_plat("mingw") and is_subhost("msys") then
|
|
@@ -42,6 +43,7 @@ package("libflac")
|
|
|
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")
|
|
|
+ table.insert(configs, "-DINSTALL_MANPAGES=OFF")
|
|
|
|
|
|
-- fix, undefined reference to `__memset_chk'
|
|
|
-- @see https://github.com/msys2/MINGW-packages/issues/5803
|
|
@@ -53,7 +55,8 @@ package("libflac")
|
|
|
local libogg = package:dep("libogg"):fetch()
|
|
|
if libogg then
|
|
|
local links = table.concat(table.wrap(libogg.links), " ")
|
|
|
- io.replace("CMakeLists.txt", "find_package(OGG REQUIRED)", "", {plain = true})
|
|
|
+ io.replace("CMakeLists.txt", "find_package(OGG REQUIRED)", "", {plain = true}) -- v1.3.3
|
|
|
+ io.replace("CMakeLists.txt", "find_package(Ogg REQUIRED)", "", {plain = true}) -- v1.3.4+
|
|
|
io.replace("src/libFLAC/CMakeLists.txt",
|
|
|
[[
|
|
|
if(TARGET Ogg::ogg)
|