Quellcode durchsuchen

add happly (#1190)

* enable ffmpeg binary by default

* add happly
Hoildkv vor 3 Jahren
Ursprung
Commit
6e85159b86
2 geänderte Dateien mit 33 neuen und 10 gelöschten Zeilen
  1. 12 10
      packages/f/ffmpeg/xmake.lua
  2. 21 0
      packages/h/happly/xmake.lua

+ 12 - 10
packages/f/ffmpeg/xmake.lua

@@ -21,16 +21,16 @@ package("ffmpeg")
         add_versions("git:5.0.1", "n5.0.1")
         add_versions("git:4.0.2", "n4.0.2")
     
-        add_configs("ffprobe",          { description = "Enable ffprobe program.", default = false, type = "boolean"})
-        add_configs("ffmpeg",           { description = "Enable ffmpeg program.", default = false, type = "boolean"})
-        add_configs("ffplay",           { description = "Enable ffplay program.", default = false, type = "boolean"})
-        add_configs("zlib",             { description = "Enable zlib compression library.", default = false, type = "boolean"})
-        add_configs("lzma",             { description = "Enable liblzma compression library.", default = false, type = "boolean"})
-        add_configs("bzlib",            { description = "Enable bzlib compression library.", default = false, type = "boolean"})
-        add_configs("libx264",          { description = "Enable libx264 decoder.", default = false, type = "boolean"})
-        add_configs("libx265",          { description = "Enable libx265 decoder.", default = false, type = "boolean"})
-        add_configs("iconv",            { description = "Enable libiconv library.", default = false, type = "boolean"})
-        add_configs("hardcoded-tables", { description = "Enable hardcoded tables.", default = true, type = "boolean"})
+        add_configs("ffprobe",          {description = "Enable ffprobe program.", default = false, type = "boolean"})
+        add_configs("ffmpeg",           {description = "Enable ffmpeg program.", default = true, type = "boolean"})
+        add_configs("ffplay",           {description = "Enable ffplay program.", default = false, type = "boolean"})
+        add_configs("zlib",             {description = "Enable zlib compression library.", default = false, type = "boolean"})
+        add_configs("lzma",             {description = "Enable liblzma compression library.", default = false, type = "boolean"})
+        add_configs("bzlib",            {description = "Enable bzlib compression library.", default = false, type = "boolean"})
+        add_configs("libx264",          {description = "Enable libx264 decoder.", default = false, type = "boolean"})
+        add_configs("libx265",          {description = "Enable libx265 decoder.", default = false, type = "boolean"})
+        add_configs("iconv",            {description = "Enable libiconv library.", default = false, type = "boolean"})
+        add_configs("hardcoded-tables", {description = "Enable hardcoded tables.", default = true, type = "boolean"})
     end
 
     add_links("avfilter", "avdevice", "avformat", "avcodec", "swscale", "swresample", "avutil")
@@ -62,6 +62,7 @@ package("ffmpeg")
         os.mv("bin", package:installdir())
         os.mv("include", package:installdir())
         os.mv("lib", package:installdir())
+        package:addenv("PATH", "bin")
     end)
 
     on_install("linux", "macosx", "android@linux,macosx", function (package)
@@ -141,6 +142,7 @@ package("ffmpeg")
         else
             import("package.tools.autoconf").install(package, configs)
         end
+        package:addenv("PATH", "bin")
     end)
 
     on_test(function (package)

+ 21 - 0
packages/h/happly/xmake.lua

@@ -0,0 +1,21 @@
+package("happly")
+
+    set_kind("library", {headeronly = true})
+    set_homepage("https://github.com/nmwsharp/happly")
+    set_description("A C++ header-only parser for the PLY file format.")
+    set_license("MIT")
+
+    add_urls("https://github.com/nmwsharp/happly.git")
+    add_versions("2022.01.07", "cfa2611550bc7da65855a78af0574b65deb81766")
+
+    on_install(function (package)
+        os.cp("happly.h", package:installdir("include"))
+    end)
+
+    on_test(function (package)
+        assert(package:check_cxxsnippets({test = [[
+            void test() {
+                happly::PLYData plyIn("my_file.ply");
+            }
+        ]]}, {configs = {languages = "c++11"}, includes = "happly.h"}))
+    end)