|
@@ -5,6 +5,7 @@ package("lame")
|
|
|
|
|
|
add_urls("https://downloads.sourceforge.net/project/lame/lame/$(version)/lame-$(version).tar.gz")
|
|
|
add_versions("3.100", "ddfe36cab873794038ae2c1210557ad34857a4b6bdc515785d1da9e175b1da1e")
|
|
|
+ add_configs("shared", {description = "Build static libraries", default = false, type = "boolean", readonly = true})
|
|
|
|
|
|
add_deps("nasm")
|
|
|
|
|
@@ -23,6 +24,15 @@ package("lame")
|
|
|
import("package.tools.autoconf").install(package, configs)
|
|
|
end)
|
|
|
|
|
|
+ on_install("windows|x86", function (package)
|
|
|
+ os.cp("configMS.h", "config.h")
|
|
|
+ io.gsub("Makefile.MSVC", "nasmw", "nasm")
|
|
|
+ import("package.tools.nmake").build(package, {"-f", "Makefile.MSVC"})
|
|
|
+ os.cp("output/*.lib", package:installdir("lib"))
|
|
|
+ os.cp("output/*.exe", package:installdir("bin"))
|
|
|
+ os.cp("include/*.h", package:installdir("include/lame"))
|
|
|
+ end)
|
|
|
+
|
|
|
on_test(function (package)
|
|
|
assert(package:has_cfuncs("lame_encode_buffer", {includes = "lame/lame.h"}))
|
|
|
end)
|