star9029 1 rok pred
rodič
commit
55f8eae078

+ 0 - 22
packages/l/libmpeg2/patches/0.1.2/dx.patch

@@ -1,22 +0,0 @@
-diff --git a/libvo/video_out_dx.c b/libvo/video_out_dx.c
-index 36de68a..07cd524 100644
---- a/libvo/video_out_dx.c
-+++ b/libvo/video_out_dx.c
-@@ -92,7 +92,7 @@ static long FAR PASCAL event_procedure (HWND hwnd, UINT message,
-     switch (message) {
- 
-     case WM_WINDOWPOSCHANGED:
--	instance = (dx_instance_t *) GetWindowLong (hwnd, GWL_USERDATA);
-+	instance = (dx_instance_t *) GetWindowLong (hwnd, GWLP_USERDATA);
- 
- 	/* update the window position and size */
- 	point_window.x = 0;
-@@ -173,7 +173,7 @@ static int create_window (dx_instance_t * instance)
-     /* store a directx_instance pointer into the window local storage
-      * (for later use in event_handler).
-      * We need to use SetWindowLongPtr when it is available in mingw */
--    SetWindowLong (instance->window, GWL_USERDATA, (LONG) instance);
-+    SetWindowLong (instance->window, GWLP_USERDATA, (LONG) instance);
- 
-     ShowWindow (instance->window, SW_SHOW);
- 

+ 161 - 0
packages/l/libmpeg2/patches/0.5.1/msvc.patch

@@ -0,0 +1,161 @@
+diff --git a/libmpeg2/convert/rgb.c b/libmpeg2/convert/rgb.c
+index 8863b0b..e266557 100644
+--- a/libmpeg2/convert/rgb.c
++++ b/libmpeg2/convert/rgb.c
+@@ -499,7 +499,7 @@ static int rgb_internal (mpeg2convert_rgb_order_t order, unsigned int bpp,
+     int convert420 = 0;
+     int rgb_stride_min = ((bpp + 7) >> 3) * seq->width;
+ 
+-#ifdef ARCH_X86
++#if (defined(__clang__) || !defined(_MSC_VER)) && defined(ARCH_X86)
+     if (!copy && (accel & MPEG2_ACCEL_X86_MMXEXT)) {
+ 	convert420 = 0;
+ 	copy = mpeg2convert_rgb_mmxext (order, bpp, seq);
+diff --git a/libmpeg2/convert/rgb_mmx.c b/libmpeg2/convert/rgb_mmx.c
+index 912291c..c29b0ef 100644
+--- a/libmpeg2/convert/rgb_mmx.c
++++ b/libmpeg2/convert/rgb_mmx.c
+@@ -25,7 +25,7 @@
+ 
+ #include "config.h"
+ 
+-#ifdef ARCH_X86
++#if (defined(__clang__) || !defined(_MSC_VER)) && defined(ARCH_X86)
+ 
+ #include <stdio.h>
+ #include <stdlib.h>
+diff --git a/libmpeg2/cpu_accel.c b/libmpeg2/cpu_accel.c
+index 9b24610..b667b34 100644
+--- a/libmpeg2/cpu_accel.c
++++ b/libmpeg2/cpu_accel.c
+@@ -29,7 +29,7 @@
+ #include "attributes.h"
+ #include "mpeg2_internal.h"
+ 
+-#if defined(ARCH_X86) || defined(ARCH_X86_64)
++#if (defined(__clang__) || !defined(_MSC_VER)) && (defined(ARCH_X86) || defined(ARCH_X86_64))
+ static inline uint32_t arch_accel (uint32_t accel)
+ {
+     if (accel & (MPEG2_ACCEL_X86_3DNOW | MPEG2_ACCEL_X86_MMXEXT))
+@@ -253,7 +253,7 @@ static inline uint32_t arch_accel (uint32_t accel)
+ 
+ uint32_t mpeg2_detect_accel (uint32_t accel)
+ {
+-#if defined (ARCH_X86) || defined (ARCH_X86_64) || defined (ARCH_PPC) || defined (ARCH_ALPHA) || defined (ARCH_SPARC)
++#if (defined(__clang__) || !defined(_MSC_VER)) && (defined (ARCH_X86) || defined (ARCH_X86_64) || defined (ARCH_PPC) || defined (ARCH_ALPHA) || defined (ARCH_SPARC))
+     accel = arch_accel (accel);
+ #endif
+     return accel;
+diff --git a/libmpeg2/cpu_state.c b/libmpeg2/cpu_state.c
+index 2f2f64a..c005783 100644
+--- a/libmpeg2/cpu_state.c
++++ b/libmpeg2/cpu_state.c
+@@ -29,14 +29,14 @@
+ #include "mpeg2.h"
+ #include "attributes.h"
+ #include "mpeg2_internal.h"
+-#if defined(ARCH_X86) || defined(ARCH_X86_64)
++#if (defined(__clang__) || !defined(_MSC_VER)) && (defined(ARCH_X86) || defined(ARCH_X86_64))
+ #include "mmx.h"
+ #endif
+ 
+ void (* mpeg2_cpu_state_save) (cpu_state_t * state) = NULL;
+ void (* mpeg2_cpu_state_restore) (cpu_state_t * state) = NULL;
+ 
+-#if defined(ARCH_X86) || defined(ARCH_X86_64)
++#if (defined(__clang__) || !defined(_MSC_VER)) && (defined(ARCH_X86) || defined(ARCH_X86_64))
+ static void state_restore_mmx (cpu_state_t * state)
+ {
+     emms ();
+@@ -115,7 +115,7 @@ static void state_restore_altivec (cpu_state_t * state)
+ 
+ void mpeg2_cpu_state_init (uint32_t accel)
+ {
+-#if defined(ARCH_X86) || defined(ARCH_X86_64)
++#if (defined(__clang__) || !defined(_MSC_VER)) && (defined(ARCH_X86) || defined(ARCH_X86_64))
+     if (accel & MPEG2_ACCEL_X86_MMX) {
+ 	mpeg2_cpu_state_restore = state_restore_mmx;
+     }
+diff --git a/libmpeg2/idct.c b/libmpeg2/idct.c
+index 81c57e0..2e7e0c7 100644
+--- a/libmpeg2/idct.c
++++ b/libmpeg2/idct.c
+@@ -235,7 +235,7 @@ static void mpeg2_idct_add_c (const int last, int16_t * block,
+ 
+ void mpeg2_idct_init (uint32_t accel)
+ {
+-#ifdef ARCH_X86
++#if (defined(__clang__) || !defined(_MSC_VER)) && defined(ARCH_X86)
+     if (accel & MPEG2_ACCEL_X86_SSE2) {
+ 	mpeg2_idct_copy = mpeg2_idct_copy_sse2;
+ 	mpeg2_idct_add = mpeg2_idct_add_sse2;
+diff --git a/libmpeg2/idct_mmx.c b/libmpeg2/idct_mmx.c
+index 50f8f18..227ec84 100644
+--- a/libmpeg2/idct_mmx.c
++++ b/libmpeg2/idct_mmx.c
+@@ -23,7 +23,7 @@
+ 
+ #include "config.h"
+ 
+-#if defined(ARCH_X86) || defined(ARCH_X86_64)
++#if (defined(__clang__) || !defined(_MSC_VER)) && defined(ARCH_X86)
+ 
+ #include <inttypes.h>
+ 
+diff --git a/libmpeg2/motion_comp.c b/libmpeg2/motion_comp.c
+index 7aed113..7d01059 100644
+--- a/libmpeg2/motion_comp.c
++++ b/libmpeg2/motion_comp.c
+@@ -33,7 +33,7 @@ mpeg2_mc_t mpeg2_mc;
+ 
+ void mpeg2_mc_init (uint32_t accel)
+ {
+-#ifdef ARCH_X86
++#if (defined(__clang__) || !defined(_MSC_VER)) && defined(ARCH_X86)
+     if (accel & MPEG2_ACCEL_X86_MMXEXT)
+ 	mpeg2_mc = mpeg2_mc_mmxext;
+     else if (accel & MPEG2_ACCEL_X86_3DNOW)
+diff --git a/libmpeg2/motion_comp_mmx.c b/libmpeg2/motion_comp_mmx.c
+index fc265f4..292431d 100644
+--- a/libmpeg2/motion_comp_mmx.c
++++ b/libmpeg2/motion_comp_mmx.c
+@@ -23,7 +23,7 @@
+ 
+ #include "config.h"
+ 
+-#if defined(ARCH_X86) || defined(ARCH_X86_64)
++#if (defined(__clang__) || !defined(_MSC_VER)) && defined(ARCH_X86)
+ 
+ #include <inttypes.h>
+ 
+diff --git a/libvo/video_out_dx.c b/libvo/video_out_dx.c
+index 36de68a..ce61c1c 100644
+--- a/libvo/video_out_dx.c
++++ b/libvo/video_out_dx.c
+@@ -82,7 +82,7 @@ static void update_overlay (dx_instance_t * instance)
+ 				       dwFlags, &ddofx);
+ }
+ 
+-static long FAR PASCAL event_procedure (HWND hwnd, UINT message,
++static LRESULT FAR PASCAL event_procedure (HWND hwnd, UINT message,
+ 					WPARAM wParam, LPARAM lParam)
+ {
+     RECT rect_window;
+@@ -92,7 +92,7 @@ static long FAR PASCAL event_procedure (HWND hwnd, UINT message,
+     switch (message) {
+ 
+     case WM_WINDOWPOSCHANGED:
+-	instance = (dx_instance_t *) GetWindowLong (hwnd, GWL_USERDATA);
++	instance = (dx_instance_t *) GetWindowLongPtr (hwnd, GWLP_USERDATA);
+ 
+ 	/* update the window position and size */
+ 	point_window.x = 0;
+@@ -173,7 +173,7 @@ static int create_window (dx_instance_t * instance)
+     /* store a directx_instance pointer into the window local storage
+      * (for later use in event_handler).
+      * We need to use SetWindowLongPtr when it is available in mingw */
+-    SetWindowLong (instance->window, GWL_USERDATA, (LONG) instance);
++    SetWindowLongPtr (instance->window, GWLP_USERDATA, (LONG) instance);
+ 
+     ShowWindow (instance->window, SW_SHOW);
+ 

+ 186 - 0
packages/l/libmpeg2/port/config.h.in

@@ -0,0 +1,186 @@
+/* vc++/config.h - manually adapted from include/config.h.in */
+
+/* Suppress warnings relating to mismatched declarations */
+#ifdef _MSC_VER
+#pragma warning (disable:4028)
+#endif
+
+/* autodetect accelerations */
+#define ACCEL_DETECT
+
+/* alpha architecture */
+/* #undef ARCH_ALPHA */
+
+/* ppc architecture */
+/* #undef ARCH_PPC */
+
+/* sparc architecture */
+/* #undef ARCH_SPARC */
+
+/* x86 architecture */
+#if defined(_M_AMD64) || defined(_M_IX86) || defined(__i386__) || defined(__x86_64__)
+#define ARCH_X86
+#endif
+
+#ifdef __arm__
+#define ARCH_ARM
+#endif
+
+/* maximum supported data alignment */
+/* #undef ATTRIBUTE_ALIGNED_MAX */
+
+/* debug mode configuration */
+/* #undef DEBUG */
+
+/* Define to 1 if you have the <altivec.h> header file. */
+${define HAVE_ALTIVEC_H}
+
+/* Define if you have the `__builtin_expect' function. */
+${define HAVE_BUILTIN_EXPECT}
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+/* #undef HAVE_DLFCN_H */
+
+/* Define to 1 if you have the `ftime' function. */
+${define HAVE_FTIME}
+
+/* Define to 1 if you have the `gettimeofday' function. */
+${define HAVE_GETTIMEOFDAY}
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+${define HAVE_INTTYPES_H}
+
+/* Define to 1 if you have the <io.h> header file. */
+${define HAVE_IO_H}
+
+/* Define to 1 if you have the `memalign' function. */
+${define HAVE_MEMALIGN}
+
+/* Define to 1 if you have the <memory.h> header file. */
+// ${define HAVE_MEMORY_H}
+
+/* Define to 1 if you have the <stdint.h> header file. */
+// ${define HAVE_STDINT_H}
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+// ${define HAVE_STDLIB_H}
+
+/* Define to 1 if you have the <strings.h> header file. */
+// ${define HAVE_STRINGS_H}
+
+/* Define to 1 if you have the <string.h> header file. */
+${define HAVE_STRING_H}
+
+/* Define to 1 if the system has the type `struct timeval'. */
+// ${define HAVE_STRUCT_TIMEVAL}
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+// ${define HAVE_SYS_STAT_H}
+
+/* Define to 1 if you have the <sys/timeb.h> header file. */
+${define HAVE_SYS_TIMEB_H}
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+${define HAVE_SYS_TIME_H}
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+// ${define HAVE_SYS_TYPES_H}
+
+/* Define to 1 if you have the <time.h> header file. */
+${define HAVE_TIME_H}
+
+/* Define to 1 if you have the <unistd.h> header file. */
+/* #undef HAVE_UNISTD_H */
+
+/* libvo DirectX support */
+${define LIBVO_DX}
+
+/* libvo SDL support */
+${define LIBVO_SDL}
+
+/* libvo X11 support */
+${define LIBVO_X11}
+
+/* libvo Xv support */
+${define LIBVO_XV}
+
+/* mpeg2dec profiling */
+/* #undef MPEG2DEC_GPROF */
+
+/* Name of package */
+#define PACKAGE "mpeg2dec"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT ""
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME ""
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING ""
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME ""
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION ""
+
+/* Define as the return type of signal handlers (`int' or `void'). */
+#define RETSIGTYPE void
+
+/* The size of a `char', as computed by sizeof. */
+// #define SIZEOF_CHAR 1
+
+/* The size of a `int', as computed by sizeof. */
+// #define SIZEOF_INT 4
+
+/* The size of a `long', as computed by sizeof. */
+// #define SIZEOF_LONG 4
+
+/* The size of a `short', as computed by sizeof. */
+// #define SIZEOF_SHORT 2
+
+/* The size of a `void*', as computed by sizeof. */
+// #define SIZEOF_VOIDP 4
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+/* #undef TIME_WITH_SYS_TIME */
+
+/* Version number of package */
+#define VERSION "0.5.1"
+
+/* Define to 1 if your processor stores words with the most significant byte
+   first (like Motorola and SPARC, unlike Intel and VAX). */
+/* #undef WORDS_BIGENDIAN */
+
+/* Define to 1 if the X Window System is missing or not being used. */
+// #define X_DISPLAY_MISSING 1
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+/* #undef _FILE_OFFSET_BITS */
+
+/* Define for large files, on AIX-style hosts. */
+/* #undef _LARGE_FILES */
+
+/* Define to empty if `const' does not conform to ANSI C. */
+/* #undef const */
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+   calls it, or to nothing if 'inline' is not supported under any name.  */
+// #ifndef __cplusplus
+// #define inline __inline
+// #endif
+
+/* Define as `__restrict' if that's what the C compiler calls it, or to
+   nothing if it is not supported. */
+// #define restrict __restrict
+
+/* Define to `unsigned' if <sys/types.h> does not define. */
+/* #undef size_t */
+
+/* Define to empty if the keyword `volatile' does not work. Warning: valid
+   code using `volatile' can become incorrect without. Disable with care. */
+/* #undef volatile */

+ 59 - 30
packages/l/libmpeg2/port/xmake.lua

@@ -2,24 +2,75 @@ option("tools", {default = false})
 
 
 add_rules("mode.debug", "mode.release")
 add_rules("mode.debug", "mode.release")
 
 
-add_includedirs("include")
-if is_plat("windows", "mingw") or is_host("windows") then
-    add_includedirs("vc++")
-end
-
 if is_plat("windows") and has_config("tools") then
 if is_plat("windows") and has_config("tools") then
     add_requires("strings_h")
     add_requires("strings_h")
 end
 end
 
 
-if is_arch("arm.*") then
-    add_requires("nasm")
-end
+-- if is_arch("arm.*") then
+--     add_requires("nasm")
+-- end
 
 
 if is_plat("macosx") or (is_host("macosx") and is_plat("mingw")) then
 if is_plat("macosx") or (is_host("macosx") and is_plat("mingw")) then
     -- Fixes duplicate symbols
     -- Fixes duplicate symbols
     set_languages("gnu89")
     set_languages("gnu89")
 end
 end
 
 
+add_includedirs("include")
+
+set_configdir("include")
+add_configfiles("config.h.in")
+
+includes("@builtin/check")
+configvar_check_cincludes("HAVE_ALTIVEC_H", "altivec.h")
+configvar_check_cfuncs("HAVE_BUILTIN_EXPECT", "__builtin_expect")
+-- configvar_check_cincludes("HAVE_DLFCN_H", "dlfcn.h")
+configvar_check_cfuncs("HAVE_FTIME", "ftime", {includes = "time.h"})
+configvar_check_cfuncs("HAVE_GETTIMEOFDAY", "gettimeofday", {includes = "time.h"})
+configvar_check_cincludes("HAVE_INTTYPES_H", "inttypes.h")
+configvar_check_cincludes("HAVE_IO_H", "io.h")
+configvar_check_cfuncs("HAVE_MEMALIGN", "memalign", {includes = "stdlib.h"})
+-- configvar_check_cincludes("HAVE_MEMORY_H", "memory.h")
+-- configvar_check_cincludes("HAVE_STDINT_H", "stdint.h")
+-- configvar_check_cincludes("HAVE_STDLIB_H", "stdlib.h")
+-- configvar_check_cincludes("HAVE_STRINGS_H", "strings.h")
+configvar_check_cincludes("HAVE_STRING_H", "string.h")
+configvar_check_cincludes("HAVE_STRUCT_TIMEVAL", ".h")
+-- configvar_check_cincludes("HAVE_SYS_STAT_H", "sys/stat.h")
+configvar_check_cincludes("HAVE_SYS_TIMEB_H", "sys/timeb.h")
+configvar_check_cincludes("HAVE_SYS_TIME_H", "sys/time.h")
+-- configvar_check_cincludes("HAVE_SYS_TYPES_H", "sys/types.h")
+configvar_check_cincludes("HAVE_TIME_H", "time.h")
+-- configvar_check_cincludes("HAVE_UNISTD_H", "unistd.h")
+
+if is_plat("windows") then
+    set_configvar("LIBVO_DX", "1")
+end
+
+if is_plat("linux", "macosx", "bsd") then
+    set_configvar("LIBVO_X11", "1")
+    add_requires("libx11")
+    add_packages("libx11")
+end
+
+target("mpeg2")
+    set_kind("$(kind)")
+    add_files("libmpeg2/**.c", "libvo/*.c")
+
+    add_headerfiles("include/mpeg2.h", "include/mpeg2convert.h", {prefixdir = "mpeg2dec"})
+
+    if is_plat("windows", "mingw") then
+        add_syslinks("user32", "gdi32")
+    end
+
+    -- if is_arch("arm.*") then
+    --     set_toolchains("nasm")
+    --     add_files("libmpeg2/motion_comp_arm_s.S")
+    -- end
+
+    if is_plat("windows") and is_kind("shared") then
+        add_rules("utils.symbols.export_all")
+    end
+
 rule("tools")
 rule("tools")
     on_load(function (target)
     on_load(function (target)
         if not get_config("tools") then
         if not get_config("tools") then
@@ -36,28 +87,6 @@ rule("tools")
         end
         end
     end)
     end)
 
 
-target("mpeg2")
-    set_kind("shared")
-    add_files("libmpeg2/**.c", "libvo/*.c")
-    add_headerfiles("include/mpeg2.h", "include/mpeg2convert.h", {prefixdir = "mpeg2dec"})
-
-    if is_plat("windows", "mingw") then
-        add_syslinks("user32", "gdi32")
-    end
-
-    if is_arch("arm.*") then
-        set_toolchains("nasm")
-        add_files("libmpeg2/motion_comp_arm_s.S")
-    end
-
-    if is_kind("shared") then
-        if is_plat("mingw") then
-            add_shflags("-Wl,--output-def,mpeg2.def")
-        elseif is_plat("windows") then
-            add_rules("utils.symbols.export_all")
-        end
-    end
-
 target("corrupt_mpeg2")
 target("corrupt_mpeg2")
     add_rules("tools")
     add_rules("tools")
     add_files("src/corrupt_mpeg2.c")
     add_files("src/corrupt_mpeg2.c")

+ 7 - 54
packages/l/libmpeg2/xmake.lua

@@ -8,73 +8,26 @@ package("libmpeg2")
 
 
     add_versions("0.5.1", "dee22e893cb5fc2b2b6ebd60b88478ab8556cb3b93f9a0d7ce8f3b61851871d4")
     add_versions("0.5.1", "dee22e893cb5fc2b2b6ebd60b88478ab8556cb3b93f9a0d7ce8f3b61851871d4")
 
 
-    add_patches("0.5.1", "patches/0.1.2/dx.patch", "cf2474cbc42dfdcdc4241bf9eb5708a4e697e83f0ff513986b2e60281dd20b50")
+    add_patches("0.5.1", "patches/0.5.1/msvc.patch", "e71d4a9c105388a0b4a50f56a05b56cb7ce9380cc645d891f449b7655c29e26e")
 
 
     add_configs("tools", {description = "Build tools", default = false, type = "boolean"})
     add_configs("tools", {description = "Build tools", default = false, type = "boolean"})
 
 
-    if not is_host("windows") then
-        add_deps("autoconf", "automake", "libtool")
+    if is_plat("linux", "macosx", "bsd") then
+        add_deps("libx11")
     end
     end
 
 
     on_load(function (package)
     on_load(function (package)
-        if package:is_arch("arm.*") then
-            package:add("deps", "nasm")
-        end
-
-        if package:is_plat("windows") then
-            if package:has_tool("cxx", "clang", "clang_cl") then
-                if package:config("tools") then
-                    package:add("deps", "strings_h", {private = true})
-                end
-            else
-                if package:is_arch("x64") then
-                    package:add("deps", "mingw-w64")
-                else
-                    package:add("deps", "llvm-mingw")
-                end
-                package:config_set("shared", true)
-            end
+        if package:is_plat("windows") and package:config("tools") then
+            package:add("deps", "strings_h", {private = true})
         end
         end
     end)
     end)
 
 
-    on_install("!android or android@!windows", function (package)
-        if not is_host("windows")then
-            -- Generate config.h by autotools
-            local configs = {"--disable-dependency-tracking"}
-            if not package:is_debug() then
-                table.insert(configs, "--disable-debug")
-            end
-            import("package.tools.autoconf").configure(package, configs)
-        end
+    on_install(function (package)
+        os.cp(path.join(package:scriptdir(), "port", "config.h.in"), "config.h.in")
         os.cp(path.join(package:scriptdir(), "port", "xmake.lua"), "xmake.lua")
         os.cp(path.join(package:scriptdir(), "port", "xmake.lua"), "xmake.lua")
         import("package.tools.xmake").install(package, {tools = package:config("tools")})
         import("package.tools.xmake").install(package, {tools = package:config("tools")})
     end)
     end)
 
 
-    on_install("windows", function (package)
-        os.cp(path.join(package:scriptdir(), "port", "xmake.lua"), "xmake.lua")
-        if package:has_tool("cxx", "clang", "clang_cl") then
-            import("package.tools.xmake").install(package, {tools = package:config("tools")})
-        else
-            local arch_prev = package:arch()
-            local plat_prev = package:plat()
-            package:plat_set("mingw")
-            package:arch_set(os.arch())
-
-            import("package.tools.xmake").install(package, {tools = package:config("tools")})
-
-            package:plat_set(plat_prev)
-            package:arch_set(arch_prev)
-
-            if package:config("shared") then
-                import("utils.platform.gnu2mslib")
-
-                gnu2mslib("mpeg2.lib", "mpeg2.def", {plat = package:plat(), arch = package:arch()})
-                os.vcp("mpeg2.lib", package:installdir("lib"))
-                os.rm(package:installdir("lib", "libmpeg2.dll.a"))
-            end
-        end
-    end)
-
     on_test(function (package)
     on_test(function (package)
         assert(package:has_cfuncs("mpeg2_init", {includes = {"inttypes.h", "mpeg2dec/mpeg2.h"}}))
         assert(package:has_cfuncs("mpeg2_init", {includes = {"inttypes.h", "mpeg2dec/mpeg2.h"}}))
     end)
     end)