-
-
Notifications
You must be signed in to change notification settings - Fork 415
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
456 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package("gsound") | ||
|
||
set_homepage("https://wiki.gnome.org/Projects/GSound") | ||
set_description("GSound is a small library for playing system sounds.") | ||
set_license("LGPL-2.1") | ||
|
||
add_urls("https://gitlab.gnome.org/GNOME/gsound/-/archive/1.0.3/gsound-1.0.3.tar.gz") | ||
add_versions("1.0.3", "ebee33c77f43bcae87406c20e051acaff08e86f8960c35b92911e243fddc7a0b") | ||
|
||
if is_plat("linux") then | ||
add_syslinks("pthread", "dl") | ||
end | ||
|
||
on_load(function (package) | ||
package:add("deps", "glib", { configs = {shared = package:config("shared")} }) | ||
package:add("deps", "libcanberra", { configs = {shared = package:config("shared")} }) | ||
end) | ||
add_deps("meson", "ninja") | ||
|
||
on_install("linux", function (package) | ||
local configs = {"-Denable_vala=false", "-Dgtk_doc=false", "-Dintrospection=false"} | ||
table.insert(configs, "-Ddefault_library=" .. (package:config("shared") and "shared" or "static")) | ||
import("package.tools.meson").install(package, configs) | ||
end) | ||
|
||
on_test(function (package) | ||
assert(package:has_cfuncs("gsound_context_new", {includes = "gsound-context.h"})) | ||
end) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package("libcanberra") | ||
|
||
set_homepage("https://0pointer.de/lennart/projects/libcanberra/") | ||
set_description("libcanberra is an implementation of the XDG Sound Theme and Name Specifications") | ||
set_license("LGPL-2.1") | ||
|
||
add_urls("http://0pointer.de/lennart/projects/libcanberra/libcanberra-$(version).tar.xz") | ||
add_versions("0.30", "c2b671e67e0c288a69fc33dc1b6f1b534d07882c2aceed37004bf48c601afa72") | ||
|
||
add_deps("libtool", {kind = "library"}) | ||
add_deps("autoconf", "automake", "m4") | ||
add_deps("libogg", "alsa-lib") | ||
|
||
if is_plat("linux") then | ||
add_syslinks("dl") | ||
end | ||
|
||
add_links("canberra", "canberra-null", "canberra-alsa", "canberra-oss", "canberra-pulse", "canberra-multi") | ||
|
||
add_linkdirs("lib", "lib/libcanberra-0.30") | ||
|
||
add_includedirs("include") | ||
|
||
on_load(function (package) | ||
if package:config("shared") then | ||
package:add("deps", "libvorbis", {configs = {shared = true}}) | ||
else | ||
package:add("deps", "libvorbis") | ||
end | ||
end) | ||
|
||
on_install("linux", function (package) | ||
local configs = {"--disable-dependency-tracking", "--disable-lynx"} | ||
table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no")) | ||
table.insert(configs, "--enable-static=" .. (package:config("shared") and "no" or "yes")) | ||
table.insert(configs, "--with-systemdsystemunitdir=" .. package:installdir("system_servise")) | ||
table.insert(configs, "LIBS=" .. "-lltdl -ldl") | ||
import("package.tools.autoconf").install(package, configs, {packagedeps= {"libtool", "libvorbis"}}) | ||
end) | ||
|
||
on_test(function (package) | ||
assert(package:has_cfuncs("ca_context_create", {includes = "canberra.h"})) | ||
end) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
package("libssh") | ||
set_homepage("https://www.libssh2.org/") | ||
set_description("C library implementing the SSH2 protocol") | ||
set_license("BSD-3-Clause") | ||
|
||
add_urls("https://git.libssh.org/projects/libssh.git", | ||
"https://gitlab.com/libssh/libssh-mirror.git") | ||
|
||
add_urls("https://gitlab.com/libssh/libssh-mirror/-/archive/libssh-$(version)/libssh-mirror-libssh-$(version).tar.bz2", {alias = "gitlab"}) | ||
add_urls("https://www.libssh.org/files/$(version).tar.xz", { | ||
alias = "home", | ||
version = function (version) | ||
return format("%d.%d/libssh-%s", version:major(), version:minor(), version) | ||
end | ||
}) | ||
|
||
add_versions("home:0.11.1", "14b7dcc72e91e08151c58b981a7b570ab2663f630e7d2837645d5a9c612c1b79") | ||
|
||
add_versions("gitlab:0.11.1", "7d0d064b7d44420036f410d4dd3f05ad6ada61d21314d1e9d424a2e9970d1b68") | ||
|
||
add_configs("zlib", {description = "Build with zlib", default = false, type = "boolean"}) | ||
add_configs("backend", {description = "Select crypto backend.", default = (is_plat("wasm", "iphoneos") and "mbedtls" or "openssl"), type = "string", values = {"openssl", "mbedtls", "libgcrypt"}}) | ||
|
||
if is_plat("windows", "mingw") then | ||
add_syslinks("iphlpapi", "shell32") | ||
elseif is_plat("linux", "bsd") then | ||
add_syslinks("pthread") | ||
end | ||
|
||
add_deps("cmake") | ||
|
||
on_load(function (package) | ||
if package:config("zlib") then | ||
package:add("deps", "zlib") | ||
end | ||
package:add("deps", package:config("backend")) | ||
|
||
if package:is_plat("windows", "mingw") and not package:config("shared") then | ||
package:add("defines", "LIBSSH_STATIC") | ||
end | ||
end) | ||
|
||
on_install("!android", function (package) | ||
io.replace("src/CMakeLists.txt", "iphlpapi", "iphlpapi\ncrypt32", {plain = true}) | ||
|
||
local configs = { | ||
"-DWITH_EXAMPLES=OFF", | ||
"-DWITH_GSSAPI=OFF", | ||
"-DWITH_NACL=OFF", | ||
} | ||
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release")) | ||
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF")) | ||
|
||
local backend = package:config("backend") | ||
table.insert(configs, "-DWITH_ZLIB=" .. (package:config("zlib") and "ON" or "OFF")) | ||
table.insert(configs, "-DWITH_MBEDTLS=" .. (backend == "mbedtls" and "ON" or "OFF")) | ||
table.insert(configs, "-DWITH_GCRYPT=" .. (backend == "libgcrypt" and "ON" or "OFF")) | ||
|
||
local openssl = package:dep("openssl") | ||
if openssl then | ||
if not openssl:is_system() then | ||
table.insert(configs, "-DOPENSSL_ROOT_DIR=" .. openssl:installdir()) | ||
end | ||
end | ||
|
||
if package:is_plat("windows") then | ||
os.mkdir(path.join(package:buildir(), "src/pdb")) | ||
end | ||
import("package.tools.cmake").install(package, configs) | ||
|
||
if package:is_plat("windows") and package:is_debug() then | ||
local dir = package:installdir(package:config("shared") and "bin" or "lib") | ||
os.vcp(path.join(package:buildir(), "src/*.pdb"), dir) | ||
end | ||
end) | ||
|
||
on_test(function (package) | ||
assert(package:has_cfuncs("ssh_init", {includes = "libssh/libssh.h"})) | ||
end) |
Oops, something went wrong.