From 816503d0c5051e291b1c9d153597bec2c0d90e3e Mon Sep 17 00:00:00 2001 From: amdmi3 Date: Fri, 12 Jul 2013 15:01:45 +0000 Subject: - Trim Makefile headers - Drop ABI versions from LIB_DEPENDS - OptionsNG - Pet portlint - Switch to dynamic plist where useful - Canonicalize patch names - Fix DOS line endings in patch files --- .../patch-plugins__src-accel-perlin__noise__drv.c | 63 ++++++++++++++++++++ .../patch-plugins__src-accel-wings__pick__drv.c | 67 ++++++++++++++++++++++ .../patch-plugins__src_accel_perlin__noise__drv.c | 63 -------------------- .../patch-plugins__src_accel_wings__pick__drv.c | 67 ---------------------- 4 files changed, 130 insertions(+), 130 deletions(-) create mode 100644 graphics/wings/files/patch-plugins__src-accel-perlin__noise__drv.c create mode 100644 graphics/wings/files/patch-plugins__src-accel-wings__pick__drv.c delete mode 100644 graphics/wings/files/patch-plugins__src_accel_perlin__noise__drv.c delete mode 100644 graphics/wings/files/patch-plugins__src_accel_wings__pick__drv.c (limited to 'graphics/wings') diff --git a/graphics/wings/files/patch-plugins__src-accel-perlin__noise__drv.c b/graphics/wings/files/patch-plugins__src-accel-perlin__noise__drv.c new file mode 100644 index 000000000000..46e5922224b7 --- /dev/null +++ b/graphics/wings/files/patch-plugins__src-accel-perlin__noise__drv.c @@ -0,0 +1,63 @@ + +$FreeBSD$ + +--- plugins_src/accel/perlin_noise_drv.c.orig ++++ plugins_src/accel/perlin_noise_drv.c +@@ -22,6 +22,11 @@ + #include + #include + ++#if ERL_DRV_EXTENDED_MAJOR_VERSION < 2 ++typedef int ErlDrvSizeT; ++typedef int ErlDrvSSizeT; ++#endif ++ + #define PNOISE3 3 + #define SNOISE1 4 + #define SNOISE2 5 +@@ -57,9 +62,9 @@ + */ + static ErlDrvData perlin_noise_start(ErlDrvPort port, char *buff); + static void perlin_noise_stop(ErlDrvData handle); +-static int control(ErlDrvData handle, unsigned int command, +- char* buff, int count, +- char** res, int res_size); ++static ErlDrvSSizeT control(ErlDrvData handle, unsigned int command, ++ char* buff, ErlDrvSizeT count, ++ char** res, ErlDrvSizeT res_size); + + /* + * Internal routines +@@ -82,7 +87,18 @@ + NULL, /* void * that is not used (BC) */ + control, /* F_PTR control, port_control callback */ + NULL, /* F_PTR timeout, driver_set_timer callback */ +- NULL /* F_PTR outputv, reserved */ ++ NULL, /* F_PTR outputv, reserved */ ++ NULL, ++ NULL, ++ NULL, ++ NULL, ++ ERL_DRV_EXTENDED_MARKER, ++ ERL_DRV_EXTENDED_MAJOR_VERSION, ++ ERL_DRV_EXTENDED_MINOR_VERSION, ++ 0, ++ NULL, ++ NULL, ++ NULL + }; + + /* +@@ -114,9 +130,9 @@ + + } + +-static int control(ErlDrvData handle, unsigned int command, +- char* buff, int count, +- char** res, int res_size) ++static ErlDrvSSizeT control(ErlDrvData handle, unsigned int command, ++ char* buff, ErlDrvSizeT count, ++ char** res, ErlDrvSizeT res_size) + { + ErlDrvBinary* bin; + diff --git a/graphics/wings/files/patch-plugins__src-accel-wings__pick__drv.c b/graphics/wings/files/patch-plugins__src-accel-wings__pick__drv.c new file mode 100644 index 000000000000..853f7e98bcb7 --- /dev/null +++ b/graphics/wings/files/patch-plugins__src-accel-wings__pick__drv.c @@ -0,0 +1,67 @@ + +$FreeBSD$ + +--- plugins_src/accel/wings_pick_drv.c.orig ++++ plugins_src/accel/wings_pick_drv.c +@@ -20,14 +20,19 @@ + #endif + #include + ++#if ERL_DRV_EXTENDED_MAJOR_VERSION < 2 ++typedef int ErlDrvSizeT; ++typedef int ErlDrvSSizeT; ++#endif ++ + /* + * Interface routines. + */ + static ErlDrvData wings_file_start(ErlDrvPort port, char *buff); + static void wings_file_stop(ErlDrvData handle); +-static int control(ErlDrvData handle, unsigned int command, +- char* buff, int count, +- char** res, int res_size); ++static ErlDrvSSizeT control(ErlDrvData handle, unsigned int command, ++ char* buff, ErlDrvSizeT count, ++ char** res, ErlDrvSizeT res_size); + static void outputv(ErlDrvData drv_data, ErlIOVec* ev); + + /* +@@ -47,7 +52,18 @@ + NULL, /* void * that is not used (BC) */ + control, /* F_PTR control, port_control callback */ + NULL, /* F_PTR timeout, driver_set_timer callback */ +- outputv /* F_PTR outputv, reserved */ ++ outputv, /* F_PTR outputv, reserved */ ++ NULL, ++ NULL, ++ NULL, ++ NULL, ++ ERL_DRV_EXTENDED_MARKER, ++ ERL_DRV_EXTENDED_MAJOR_VERSION, ++ ERL_DRV_EXTENDED_MINOR_VERSION, ++ 0, ++ NULL, ++ NULL, ++ NULL + }; + + struct vertex_struct { +@@ -107,14 +123,14 @@ + * Handle commands. + */ + +-static int ++static ErlDrvSSizeT + control(ErlDrvData handle, unsigned int command, +- char* buf, int count, +- char** res, int res_size) ++ char* buf, ErlDrvSizeT count, ++ char** res, ErlDrvSizeT res_size) + { + switch (command) { + case 0: { /* Define matrix */ +- memcpy((void *) m, (void *) buf, count); ++ memcpy((void *) m, (void *) buf, (size_t) count); + #if 0 + { + int i, j; diff --git a/graphics/wings/files/patch-plugins__src_accel_perlin__noise__drv.c b/graphics/wings/files/patch-plugins__src_accel_perlin__noise__drv.c deleted file mode 100644 index 46e5922224b7..000000000000 --- a/graphics/wings/files/patch-plugins__src_accel_perlin__noise__drv.c +++ /dev/null @@ -1,63 +0,0 @@ - -$FreeBSD$ - ---- plugins_src/accel/perlin_noise_drv.c.orig -+++ plugins_src/accel/perlin_noise_drv.c -@@ -22,6 +22,11 @@ - #include - #include - -+#if ERL_DRV_EXTENDED_MAJOR_VERSION < 2 -+typedef int ErlDrvSizeT; -+typedef int ErlDrvSSizeT; -+#endif -+ - #define PNOISE3 3 - #define SNOISE1 4 - #define SNOISE2 5 -@@ -57,9 +62,9 @@ - */ - static ErlDrvData perlin_noise_start(ErlDrvPort port, char *buff); - static void perlin_noise_stop(ErlDrvData handle); --static int control(ErlDrvData handle, unsigned int command, -- char* buff, int count, -- char** res, int res_size); -+static ErlDrvSSizeT control(ErlDrvData handle, unsigned int command, -+ char* buff, ErlDrvSizeT count, -+ char** res, ErlDrvSizeT res_size); - - /* - * Internal routines -@@ -82,7 +87,18 @@ - NULL, /* void * that is not used (BC) */ - control, /* F_PTR control, port_control callback */ - NULL, /* F_PTR timeout, driver_set_timer callback */ -- NULL /* F_PTR outputv, reserved */ -+ NULL, /* F_PTR outputv, reserved */ -+ NULL, -+ NULL, -+ NULL, -+ NULL, -+ ERL_DRV_EXTENDED_MARKER, -+ ERL_DRV_EXTENDED_MAJOR_VERSION, -+ ERL_DRV_EXTENDED_MINOR_VERSION, -+ 0, -+ NULL, -+ NULL, -+ NULL - }; - - /* -@@ -114,9 +130,9 @@ - - } - --static int control(ErlDrvData handle, unsigned int command, -- char* buff, int count, -- char** res, int res_size) -+static ErlDrvSSizeT control(ErlDrvData handle, unsigned int command, -+ char* buff, ErlDrvSizeT count, -+ char** res, ErlDrvSizeT res_size) - { - ErlDrvBinary* bin; - diff --git a/graphics/wings/files/patch-plugins__src_accel_wings__pick__drv.c b/graphics/wings/files/patch-plugins__src_accel_wings__pick__drv.c deleted file mode 100644 index 853f7e98bcb7..000000000000 --- a/graphics/wings/files/patch-plugins__src_accel_wings__pick__drv.c +++ /dev/null @@ -1,67 +0,0 @@ - -$FreeBSD$ - ---- plugins_src/accel/wings_pick_drv.c.orig -+++ plugins_src/accel/wings_pick_drv.c -@@ -20,14 +20,19 @@ - #endif - #include - -+#if ERL_DRV_EXTENDED_MAJOR_VERSION < 2 -+typedef int ErlDrvSizeT; -+typedef int ErlDrvSSizeT; -+#endif -+ - /* - * Interface routines. - */ - static ErlDrvData wings_file_start(ErlDrvPort port, char *buff); - static void wings_file_stop(ErlDrvData handle); --static int control(ErlDrvData handle, unsigned int command, -- char* buff, int count, -- char** res, int res_size); -+static ErlDrvSSizeT control(ErlDrvData handle, unsigned int command, -+ char* buff, ErlDrvSizeT count, -+ char** res, ErlDrvSizeT res_size); - static void outputv(ErlDrvData drv_data, ErlIOVec* ev); - - /* -@@ -47,7 +52,18 @@ - NULL, /* void * that is not used (BC) */ - control, /* F_PTR control, port_control callback */ - NULL, /* F_PTR timeout, driver_set_timer callback */ -- outputv /* F_PTR outputv, reserved */ -+ outputv, /* F_PTR outputv, reserved */ -+ NULL, -+ NULL, -+ NULL, -+ NULL, -+ ERL_DRV_EXTENDED_MARKER, -+ ERL_DRV_EXTENDED_MAJOR_VERSION, -+ ERL_DRV_EXTENDED_MINOR_VERSION, -+ 0, -+ NULL, -+ NULL, -+ NULL - }; - - struct vertex_struct { -@@ -107,14 +123,14 @@ - * Handle commands. - */ - --static int -+static ErlDrvSSizeT - control(ErlDrvData handle, unsigned int command, -- char* buf, int count, -- char** res, int res_size) -+ char* buf, ErlDrvSizeT count, -+ char** res, ErlDrvSizeT res_size) - { - switch (command) { - case 0: { /* Define matrix */ -- memcpy((void *) m, (void *) buf, count); -+ memcpy((void *) m, (void *) buf, (size_t) count); - #if 0 - { - int i, j; -- cgit