diff options
Diffstat (limited to 'source/l')
30 files changed, 627 insertions, 1172 deletions
diff --git a/source/l/gtk+3/9a693c7228a88b76a007aed41b101d89d084cf9b.diff b/source/l/gtk+3/9a693c7228a88b76a007aed41b101d89d084cf9b.diff new file mode 100644 index 00000000..b9efbf6f --- /dev/null +++ b/source/l/gtk+3/9a693c7228a88b76a007aed41b101d89d084cf9b.diff @@ -0,0 +1,583 @@ +diff --git a/configure.ac b/configure.ac +index 62c17b2b8472ee8552405e26f4b1a13307619009..a26b03d3c3e1ece50fa171cfc4af316315da2edd 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -61,7 +61,7 @@ m4_define([cairo_required_version], [1.14.0]) + m4_define([gdk_pixbuf_required_version], [2.30.0]) + m4_define([introspection_required_version], [1.39.0]) + m4_define([wayland_required_version], [1.14.91]) +-m4_define([wayland_protocols_required_version], [1.14]) ++m4_define([wayland_protocols_required_version], [1.17]) + m4_define([epoxy_required_version], [1.4]) + m4_define([cloudproviders_required_version], [0.2.5]) + m4_define([sysprof_required_version], [3.33.2]) +diff --git a/gdk/wayland/Makefile.am b/gdk/wayland/Makefile.am +index 31f12251b30b175e353888c6ce4fb315fa34ce13..6595013d3f00314c42d4a530ecfeba39d1c5d477 100644 +--- a/gdk/wayland/Makefile.am ++++ b/gdk/wayland/Makefile.am +@@ -40,7 +40,9 @@ BUILT_SOURCES = \ + server-decoration-client-protocol.h \ + server-decoration-protocol.c \ + gtk-shell-client-protocol.h \ +- gtk-shell-protocol.c ++ gtk-shell-protocol.c \ ++ primary-selection-unstable-v1-client-protocol.h \ ++ primary-selection-unstable-v1-protocol.c + + nodist_libgdk_wayland_la_SOURCES = \ + $(BUILT_SOURCES) +diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c +index 7d81eaff3b40e3775e1c21637773145f56acb7bc..c5b273eb908d727751dafc22d710f10a20d16a79 100644 +--- a/gdk/wayland/gdkdevice-wayland.c ++++ b/gdk/wayland/gdkdevice-wayland.c +@@ -237,7 +237,8 @@ struct _GdkWaylandSeat + uint32_t keyboard_time; + uint32_t keyboard_key_serial; + +- struct gtk_primary_selection_device *primary_data_device; ++ struct gtk_primary_selection_device *gtk_primary_data_device; ++ struct zwp_primary_selection_device_v1 *zwp_primary_data_device_v1; + struct wl_data_device *data_device; + GdkDragContext *drop_context; + +@@ -1308,23 +1309,43 @@ static const struct wl_data_device_listener data_device_listener = { + }; + + static void +-primary_selection_data_offer (void *data, +- struct gtk_primary_selection_device *gtk_primary_selection_device, +- struct gtk_primary_selection_offer *gtk_primary_offer) ++primary_selection_data_offer (void *data, ++ gpointer primary_selection_device, ++ gpointer primary_offer) + { + GdkWaylandSeat *seat = data; + + GDK_NOTE (EVENTS, + g_message ("primary selection offer, device %p, data offer %p", +- gtk_primary_selection_device, gtk_primary_offer)); ++ primary_selection_device, primary_offer)); + +- gdk_wayland_selection_ensure_primary_offer (seat->display, gtk_primary_offer); ++ gdk_wayland_selection_ensure_primary_offer (seat->display, primary_offer); + } + + static void +-primary_selection_selection (void *data, +- struct gtk_primary_selection_device *gtk_primary_selection_device, +- struct gtk_primary_selection_offer *gtk_primary_offer) ++gtk_primary_selection_data_offer (void *data, ++ struct gtk_primary_selection_device *primary_selection_device, ++ struct gtk_primary_selection_offer *primary_offer) ++{ ++ primary_selection_data_offer (data, ++ (gpointer) primary_selection_device, ++ (gpointer) primary_offer); ++} ++ ++static void ++zwp_primary_selection_v1_data_offer (void *data, ++ struct zwp_primary_selection_device_v1 *primary_selection_device, ++ struct zwp_primary_selection_offer_v1 *primary_offer) ++{ ++ primary_selection_data_offer (data, ++ (gpointer) primary_selection_device, ++ (gpointer) primary_offer); ++} ++ ++static void ++primary_selection_selection (void *data, ++ gpointer primary_selection_device, ++ gpointer primary_offer) + { + GdkWaylandSeat *seat = data; + GdkAtom selection; +@@ -1334,16 +1355,41 @@ primary_selection_selection (void *data, + + GDK_NOTE (EVENTS, + g_message ("primary selection selection, device %p, data offer %p", +- gtk_primary_selection_device, gtk_primary_offer)); ++ primary_selection_device, primary_offer)); + + selection = gdk_atom_intern_static_string ("PRIMARY"); +- gdk_wayland_selection_set_offer (seat->display, selection, gtk_primary_offer); ++ gdk_wayland_selection_set_offer (seat->display, selection, primary_offer); + emit_selection_owner_change (seat->keyboard_focus, selection); + } + +-static const struct gtk_primary_selection_device_listener primary_selection_device_listener = { +- primary_selection_data_offer, +- primary_selection_selection, ++static void ++gtk_primary_selection_selection (void *data, ++ struct gtk_primary_selection_device *primary_selection_device, ++ struct gtk_primary_selection_offer *primary_offer) ++{ ++ primary_selection_selection (data, ++ (gpointer) primary_selection_device, ++ (gpointer) primary_offer); ++} ++ ++static void ++zwp_primary_selection_v1_selection (void *data, ++ struct zwp_primary_selection_device_v1 *primary_selection_device, ++ struct zwp_primary_selection_offer_v1 *primary_offer) ++{ ++ primary_selection_selection (data, ++ (gpointer) primary_selection_device, ++ (gpointer) primary_offer); ++} ++ ++static const struct gtk_primary_selection_device_listener gtk_primary_device_listener = { ++ gtk_primary_selection_data_offer, ++ gtk_primary_selection_selection, ++}; ++ ++static const struct zwp_primary_selection_device_v1_listener zwp_primary_device_v1_listener = { ++ zwp_primary_selection_v1_data_offer, ++ zwp_primary_selection_v1_selection, + }; + + static GdkDevice * get_scroll_device (GdkWaylandSeat *seat, +@@ -5078,13 +5124,23 @@ _gdk_wayland_device_manager_add_seat (GdkDeviceManager *device_manager, + wl_seat_add_listener (seat->wl_seat, &seat_listener, seat); + wl_seat_set_user_data (seat->wl_seat, seat); + +- if (display_wayland->primary_selection_manager) ++ if (display_wayland->zwp_primary_selection_manager_v1) + { +- seat->primary_data_device = +- gtk_primary_selection_device_manager_get_device (display_wayland->primary_selection_manager, ++ seat->zwp_primary_data_device_v1 = ++ zwp_primary_selection_device_manager_v1_get_device (display_wayland->zwp_primary_selection_manager_v1, ++ seat->wl_seat); ++ zwp_primary_selection_device_v1_add_listener (seat->zwp_primary_data_device_v1, ++ &zwp_primary_device_v1_listener, ++ seat); ++ } ++ else if (display_wayland->gtk_primary_selection_manager) ++ { ++ seat->gtk_primary_data_device = ++ gtk_primary_selection_device_manager_get_device (display_wayland->gtk_primary_selection_manager, + seat->wl_seat); +- gtk_primary_selection_device_add_listener (seat->primary_data_device, +- &primary_selection_device_listener, seat); ++ gtk_primary_selection_device_add_listener (seat->gtk_primary_data_device, ++ >k_primary_device_listener, ++ seat); + } + + seat->data_device = +@@ -5355,8 +5411,8 @@ gdk_wayland_seat_set_selection (GdkSeat *seat, + } + + void +-gdk_wayland_seat_set_primary (GdkSeat *seat, +- struct gtk_primary_selection_source *source) ++gdk_wayland_seat_set_primary (GdkSeat *seat, ++ gpointer source) + { + GdkWaylandSeat *wayland_seat = GDK_WAYLAND_SEAT (seat); + GdkWaylandDisplay *display_wayland; +@@ -5366,8 +5422,16 @@ gdk_wayland_seat_set_primary (GdkSeat *seat, + { + display_wayland = GDK_WAYLAND_DISPLAY (gdk_seat_get_display (seat)); + serial = _gdk_wayland_display_get_serial (display_wayland); +- gtk_primary_selection_device_set_selection (wayland_seat->primary_data_device, +- source, serial); ++ if (wayland_seat->zwp_primary_data_device_v1) ++ { ++ zwp_primary_selection_device_v1_set_selection (wayland_seat->zwp_primary_data_device_v1, ++ source, serial); ++ } ++ else if (wayland_seat->gtk_primary_data_device) ++ { ++ gtk_primary_selection_device_set_selection (wayland_seat->gtk_primary_data_device, ++ source, serial); ++ } + } + } + +diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c +index d4503c256236ae942bde999c964fbf1d85abdf29..dfb8d3069a36ddb72340815cd2e809596416ccaf 100644 +--- a/gdk/wayland/gdkdisplay-wayland.c ++++ b/gdk/wayland/gdkdisplay-wayland.c +@@ -476,10 +476,16 @@ gdk_registry_handle_global (void *data, + } + else if (strcmp (interface, "gtk_primary_selection_device_manager") == 0) + { +- display_wayland->primary_selection_manager = ++ display_wayland->gtk_primary_selection_manager = + wl_registry_bind(display_wayland->wl_registry, id, + >k_primary_selection_device_manager_interface, 1); + } ++ else if (strcmp (interface, "zwp_primary_selection_device_manager_v1") == 0) ++ { ++ display_wayland->zwp_primary_selection_manager_v1 = ++ wl_registry_bind(display_wayland->wl_registry, id, ++ &zwp_primary_selection_device_manager_v1_interface, 1); ++ } + else if (strcmp (interface, "zwp_tablet_manager_v2") == 0) + { + display_wayland->tablet_manager = +diff --git a/gdk/wayland/gdkdisplay-wayland.h b/gdk/wayland/gdkdisplay-wayland.h +index 1e4a9860f61c71466bdb58e288abcb83129fc63d..62696300d15531d0ca212428c8eb3325fe10eb96 100644 +--- a/gdk/wayland/gdkdisplay-wayland.h ++++ b/gdk/wayland/gdkdisplay-wayland.h +@@ -35,6 +35,7 @@ + #include <gdk/wayland/keyboard-shortcuts-inhibit-unstable-v1-client-protocol.h> + #include <gdk/wayland/server-decoration-client-protocol.h> + #include <gdk/wayland/xdg-output-unstable-v1-client-protocol.h> ++#include <gdk/wayland/primary-selection-unstable-v1-client-protocol.h> + + #include <glib.h> + #include <gdk/gdkkeys.h> +@@ -88,7 +89,8 @@ struct _GdkWaylandDisplay + struct wl_data_device_manager *data_device_manager; + struct wl_subcompositor *subcompositor; + struct zwp_pointer_gestures_v1 *pointer_gestures; +- struct gtk_primary_selection_device_manager *primary_selection_manager; ++ struct gtk_primary_selection_device_manager *gtk_primary_selection_manager; ++ struct zwp_primary_selection_device_manager_v1 *zwp_primary_selection_manager_v1; + struct zwp_tablet_manager_v2 *tablet_manager; + struct zxdg_exporter_v1 *xdg_exporter; + struct zxdg_importer_v1 *xdg_importer; +diff --git a/gdk/wayland/gdkprivate-wayland.h b/gdk/wayland/gdkprivate-wayland.h +index fc8e9fe2800b129a9ac0432ee85511633eb407f5..4a921b3b9965085b580cbb736f280cfae60efb86 100644 +--- a/gdk/wayland/gdkprivate-wayland.h ++++ b/gdk/wayland/gdkprivate-wayland.h +@@ -191,8 +191,8 @@ struct wl_data_device * gdk_wayland_device_get_data_device (GdkDevice *gdk_devic + void gdk_wayland_seat_set_selection (GdkSeat *seat, + struct wl_data_source *source); + +-void gdk_wayland_seat_set_primary (GdkSeat *seat, +- struct gtk_primary_selection_source *source); ++void gdk_wayland_seat_set_primary (GdkSeat *seat, ++ gpointer source); + + GdkDragContext * gdk_wayland_device_get_drop_context (GdkDevice *gdk_device); + +@@ -249,8 +249,8 @@ void gdk_wayland_selection_free (GdkWaylandSelection *selection); + + void gdk_wayland_selection_ensure_offer (GdkDisplay *display, + struct wl_data_offer *wl_offer); +-void gdk_wayland_selection_ensure_primary_offer (GdkDisplay *display, +- struct gtk_primary_selection_offer *wp_offer); ++void gdk_wayland_selection_ensure_primary_offer (GdkDisplay *display, ++ gpointer wp_offer); + + void gdk_wayland_selection_set_offer (GdkDisplay *display, + GdkAtom selection, +diff --git a/gdk/wayland/gdkselection-wayland.c b/gdk/wayland/gdkselection-wayland.c +index 0dd3aa9ebfd4dbd80666fcd1c122f67fb2d44569..f85f595616a51168be49b3dd92612ccd6d325fa7 100644 +--- a/gdk/wayland/gdkselection-wayland.c ++++ b/gdk/wayland/gdkselection-wayland.c +@@ -104,7 +104,7 @@ struct _GdkWaylandSelection + GArray *source_targets; + GdkAtom requested_target; + +- struct gtk_primary_selection_source *primary_source; ++ gpointer primary_source; + GdkWindow *primary_owner; + + struct wl_data_source *clipboard_source; +@@ -434,6 +434,18 @@ gdk_wayland_selection_new (void) + return selection; + } + ++static void ++primary_selection_source_destroy (gpointer primary_source) ++{ ++ GdkDisplay *display = gdk_display_get_default (); ++ GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (display); ++ ++ if (display_wayland->zwp_primary_selection_manager_v1) ++ zwp_primary_selection_source_v1_destroy (primary_source); ++ else if (display_wayland->gtk_primary_selection_manager) ++ gtk_primary_selection_source_destroy (primary_source); ++} ++ + void + gdk_wayland_selection_free (GdkWaylandSelection *selection) + { +@@ -448,7 +460,7 @@ gdk_wayland_selection_free (GdkWaylandSelection *selection) + g_ptr_array_unref (selection->stored_selections); + + if (selection->primary_source) +- gtk_primary_selection_source_destroy (selection->primary_source); ++ primary_selection_source_destroy (selection->primary_source); + if (selection->clipboard_source) + wl_data_source_destroy (selection->clipboard_source); + if (selection->dnd_source) +@@ -546,27 +558,47 @@ static const struct wl_data_offer_listener data_offer_listener = { + }; + + static void +-primary_offer_offer (void *data, +- struct gtk_primary_selection_offer *gtk_offer, +- const char *type) ++primary_offer_offer (void *data, ++ gpointer offer, ++ const char *type) + { + GdkWaylandSelection *selection = data; + DataOfferData *info; + GdkAtom atom = gdk_atom_intern (type, FALSE); + +- info = g_hash_table_lookup (selection->offers, gtk_offer); ++ info = g_hash_table_lookup (selection->offers, offer); + + if (!info || g_list_find (info->targets, atom)) + return; + + GDK_NOTE (EVENTS, +- g_message ("primary offer offer, offer %p, type = %s", gtk_offer, type)); ++ g_message ("primary offer offer, offer %p, type = %s", offer, type)); + + info->targets = g_list_prepend (info->targets, atom); + } + +-static const struct gtk_primary_selection_offer_listener primary_offer_listener = { +- primary_offer_offer, ++static void ++gtk_primary_offer_offer (void *data, ++ struct gtk_primary_selection_offer *offer, ++ const char *type) ++{ ++ primary_offer_offer (data, (gpointer) offer, type); ++} ++ ++static void ++zwp_primary_offer_v1_offer (void *data, ++ struct zwp_primary_selection_offer_v1 *offer, ++ const char *type) ++{ ++ primary_offer_offer (data, (gpointer) offer, type); ++} ++ ++static const struct gtk_primary_selection_offer_listener gtk_primary_offer_listener = { ++ gtk_primary_offer_offer, ++}; ++ ++static const struct zwp_primary_selection_offer_v1_listener zwp_primary_offer_listener_v1 = { ++ zwp_primary_offer_v1_offer, + }; + + SelectionData * +@@ -604,9 +636,10 @@ gdk_wayland_selection_ensure_offer (GdkDisplay *display, + } + + void +-gdk_wayland_selection_ensure_primary_offer (GdkDisplay *display, +- struct gtk_primary_selection_offer *gtk_offer) ++gdk_wayland_selection_ensure_primary_offer (GdkDisplay *display, ++ gpointer gtk_offer) + { ++ GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (display); + GdkWaylandSelection *selection = gdk_wayland_display_get_selection (display); + DataOfferData *info; + +@@ -614,12 +647,24 @@ gdk_wayland_selection_ensure_primary_offer (GdkDisplay * + + if (!info) + { +- info = data_offer_data_new (gtk_offer, +- (GDestroyNotify) gtk_primary_selection_offer_destroy); +- g_hash_table_insert (selection->offers, gtk_offer, info); +- gtk_primary_selection_offer_add_listener (gtk_offer, +- &primary_offer_listener, +- selection); ++ if (display_wayland->zwp_primary_selection_manager_v1) ++ { ++ info = data_offer_data_new (gtk_offer, ++ (GDestroyNotify) zwp_primary_selection_offer_v1_destroy); ++ g_hash_table_insert (selection->offers, gtk_offer, info); ++ zwp_primary_selection_offer_v1_add_listener (gtk_offer, ++ &zwp_primary_offer_listener_v1, ++ selection); ++ } ++ else if (display_wayland->gtk_primary_selection_manager) ++ { ++ info = data_offer_data_new (gtk_offer, ++ (GDestroyNotify) gtk_primary_selection_offer_destroy); ++ g_hash_table_insert (selection->offers, gtk_offer, info); ++ gtk_primary_selection_offer_add_listener (gtk_offer, ++ >k_primary_offer_listener, ++ selection); ++ } + } + } + +@@ -1138,10 +1183,10 @@ static const struct wl_data_source_listener data_source_listener = { + }; + + static void +-primary_source_send (void *data, +- struct gtk_primary_selection_source *source, +- const char *mime_type, +- int32_t fd) ++primary_source_send (void *data, ++ gpointer source, ++ const char *mime_type, ++ int32_t fd) + { + GdkWaylandSelection *wayland_selection = data; + +@@ -1163,8 +1208,26 @@ primary_source_send (void *data, + } + + static void +-primary_source_cancelled (void *data, +- struct gtk_primary_selection_source *source) ++gtk_primary_source_send (void *data, ++ struct gtk_primary_selection_source *source, ++ const char *mime_type, ++ int32_t fd) ++{ ++ primary_source_send (data, (gpointer) source, mime_type, fd); ++} ++ ++static void ++zwp_primary_source_v1_send (void *data, ++ struct zwp_primary_selection_source_v1 *source, ++ const char *mime_type, ++ int32_t fd) ++{ ++ primary_source_send (data, (gpointer) source, mime_type, fd); ++} ++ ++static void ++primary_source_cancelled (void *data, ++ gpointer source) + { + GdkDisplay *display; + GdkAtom atom; +@@ -1180,9 +1243,28 @@ primary_source_cancelled (void *data, + gdk_wayland_selection_unset_data_source (display, atom); + } + +-static const struct gtk_primary_selection_source_listener primary_source_listener = { +- primary_source_send, +- primary_source_cancelled, ++static void ++gtk_primary_source_cancelled (void *data, ++ struct gtk_primary_selection_source *source) ++{ ++ primary_source_cancelled (data, source); ++} ++ ++static void ++zwp_primary_source_v1_cancelled (void *data, ++ struct zwp_primary_selection_source_v1 *source) ++{ ++ primary_source_cancelled (data, source); ++} ++ ++static const struct gtk_primary_selection_source_listener gtk_primary_source_listener = { ++ gtk_primary_source_send, ++ gtk_primary_source_cancelled, ++}; ++ ++static const struct zwp_primary_selection_source_v1_listener zwp_primary_source_v1_listener = { ++ zwp_primary_source_v1_send, ++ zwp_primary_source_v1_cancelled, + }; + + struct wl_data_source * +@@ -1204,11 +1286,11 @@ gdk_wayland_selection_get_data_source (GdkWindow *owner, + { + if (wayland_selection->primary_source && + (!owner || owner == wayland_selection->primary_owner)) +- return (gpointer) wayland_selection->primary_source; ++ return wayland_selection->primary_source; + + if (wayland_selection->primary_source) + { +- gtk_primary_selection_source_destroy (wayland_selection->primary_source); ++ primary_selection_source_destroy (wayland_selection->primary_source); + wayland_selection->primary_source = NULL; + } + } +@@ -1234,11 +1316,18 @@ gdk_wayland_selection_get_data_source (GdkWindow *owner, + + if (selection == atoms[ATOM_PRIMARY]) + { +- if (display_wayland->primary_selection_manager) ++ if (display_wayland->zwp_primary_selection_manager_v1) ++ { ++ source = zwp_primary_selection_device_manager_v1_create_source (display_wayland->zwp_primary_selection_manager_v1); ++ zwp_primary_selection_source_v1_add_listener (source, ++ &zwp_primary_source_v1_listener, ++ wayland_selection); ++ } ++ else if (display_wayland->gtk_primary_selection_manager) + { +- source = gtk_primary_selection_device_manager_create_source (display_wayland->primary_selection_manager); ++ source = gtk_primary_selection_device_manager_create_source (display_wayland->gtk_primary_selection_manager); + gtk_primary_selection_source_add_listener (source, +- &primary_source_listener, ++ >k_primary_source_listener, + wayland_selection); + } + } +@@ -1278,7 +1367,7 @@ gdk_wayland_selection_unset_data_source (GdkDisplay *display, + { + if (wayland_selection->primary_source) + { +- gtk_primary_selection_source_destroy (wayland_selection->primary_source); ++ primary_selection_source_destroy (wayland_selection->primary_source); + wayland_selection->primary_source = NULL; + } + } +@@ -1449,6 +1538,7 @@ _gdk_wayland_display_convert_selection (GdkDisplay *display, + GdkAtom target, + guint32 time) + { ++ GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (display); + GdkWaylandSelection *wayland_selection = gdk_wayland_display_get_selection (display); + const SelectionData *selection_data; + SelectionBuffer *buffer_data; +@@ -1514,9 +1604,16 @@ _gdk_wayland_display_convert_selection (GdkDisplay *display, + g_unix_open_pipe (pipe_fd, FD_CLOEXEC, NULL); + + if (selection == atoms[ATOM_PRIMARY]) +- gtk_primary_selection_offer_receive (offer, mimetype, pipe_fd[1]); ++ { ++ if (display_wayland->zwp_primary_selection_manager_v1) ++ zwp_primary_selection_offer_v1_receive (offer, mimetype, pipe_fd[1]); ++ else if (display_wayland->gtk_primary_selection_manager) ++ gtk_primary_selection_offer_receive (offer, mimetype, pipe_fd[1]); ++ } + else +- wl_data_offer_receive (offer, mimetype, pipe_fd[1]); ++ { ++ wl_data_offer_receive (offer, mimetype, pipe_fd[1]); ++ } + + stream = g_unix_input_stream_new (pipe_fd[0], TRUE); + close (pipe_fd[1]); +diff --git a/gdk/wayland/meson.build b/gdk/wayland/meson.build +index 8f6b7faf31ca379cd602ae437b7864308b1bffd6..e66afd7f95bfc6e39cd200eedf55813862213664 100644 +--- a/gdk/wayland/meson.build ++++ b/gdk/wayland/meson.build +@@ -56,6 +56,7 @@ proto_sources = [ + ['keyboard-shortcuts-inhibit', 'unstable', 'v1', ], + ['server-decoration', 'private' ], + ['xdg-output', 'unstable', 'v1', ], ++ ['primary-selection', 'unstable', 'v1', ], + ] + + gdk_wayland_gen_headers = [] +diff --git a/meson.build b/meson.build +index a3a7545ae103a88fc73cffe917c79848018f1a61..9c80fafc0314aed310018bc1f8851bc00e85f68a 100644 +--- a/meson.build ++++ b/meson.build +@@ -30,7 +30,7 @@ atk_req = '>= 2.15.1' + cairo_req = '>= 1.14.0' + gdk_pixbuf_req = '>= 2.30.0' + introspection_req = '>= 1.39.0' +-wayland_proto_req = '>= 1.14' ++wayland_proto_req = '>= 1.17' + wayland_req = '>= 1.14.91' + epoxy_req = '>= 1.4' + cloudproviders_req = '>= 0.2.5' diff --git a/source/l/gtk+3/gtk+3.SlackBuild b/source/l/gtk+3/gtk+3.SlackBuild index 377b619a..4e44e2ca 100755 --- a/source/l/gtk+3/gtk+3.SlackBuild +++ b/source/l/gtk+3/gtk+3.SlackBuild @@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=gtk+3 VERSION=${VERSION:-$(echo gtk+-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "} @@ -82,6 +82,9 @@ find . \ # the configure process doesn't try to call it: zcat $CWD/gtk.fix.missing.version-check.py.diff.gz | patch -p1 --verbose || exit 1 +# Fix middle button paste between GTK+ and KDE apps on Wayland: +zcat $CWD/9a693c7228a88b76a007aed41b101d89d084cf9b.diff.gz | patch -p1 --verbose || exit 1 + # Configure, build, and install: export CFLAGS="$SLKCFLAGS -DG_ENABLE_DEBUG -DG_DISABLE_CAST_CHECKS" export CXXFLAGS="$SLKCFLAGS -DG_ENABLE_DEBUG -DG_DISABLE_CAST_CHECKS" diff --git a/source/l/gtksourceview3/gtksourceview3.SlackBuild b/source/l/gtksourceview3/gtksourceview3.SlackBuild index 77ad0fff..0e631657 100755 --- a/source/l/gtksourceview3/gtksourceview3.SlackBuild +++ b/source/l/gtksourceview3/gtksourceview3.SlackBuild @@ -26,7 +26,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=gtksourceview3 SRCNAM=gtksourceview VERSION=${VERSION:-$(echo $SRCNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then @@ -95,16 +95,15 @@ CXXFLAGS="$SLKCFLAGS" \ --sysconfdir=/etc \ --localstatedir=/var \ --mandir=/usr/man \ - --docdir=/usr/doc/$PRGNAM-$VERSION \ + --docdir=/usr/doc/$PKGNAM-$VERSION \ --enable-glade-catalog \ --build=$ARCH-slackware-linux - -# At the end of build process, the uninstalled gtksourceview.pc is -# used. Let's make sure pkg-config can find it. -PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$TMP/$PRGNAM-$VERSION make $NUMJOBS || \ -PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$TMP/$PRGNAM-$VERSION make || exit 1 +make $NUMJOBS || make || exit 1 make install DESTDIR=$PKG || exit 1 +# Don't ship .la files: +rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la + # Strip binaries: find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null diff --git a/source/l/gtksourceview3/gtksourceview3.url b/source/l/gtksourceview3/gtksourceview3.url deleted file mode 100644 index ba7dc6cb..00000000 --- a/source/l/gtksourceview3/gtksourceview3.url +++ /dev/null @@ -1 +0,0 @@ -https://ftp.gnome.org/pub/GNOME/sources/gtksourceview/3.24/gtksourceview-3.24.11.tar.xz diff --git a/source/l/libwmf/fixup-GDK_PIXBUF_DIR-in-configure-ac.patch b/source/l/libwmf/fixup-GDK_PIXBUF_DIR-in-configure-ac.patch deleted file mode 100644 index 35cd563e..00000000 --- a/source/l/libwmf/fixup-GDK_PIXBUF_DIR-in-configure-ac.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nur libwmf-0.2.8.4.orig/configure.ac libwmf-0.2.8.4/configure.ac ---- libwmf-0.2.8.4.orig/configure.ac 2005-07-27 15:48:39.000000000 -0500 -+++ libwmf-0.2.8.4/configure.ac 2019-12-28 22:35:15.470031981 -0600 -@@ -745,7 +745,7 @@ - if test $LIBWMF_BUILDSTYLE != lite; then - PKG_CHECK_MODULES(GDK_PIXBUF,gdk-pixbuf-2.0 >= 2.1.2,[ - GTK_VERSION=`$PKG_CONFIG --variable=gtk_binary_version gtk+-2.0` -- GDK_PIXBUF_DIR="gtk-2.0/$GTK_VERSION/loaders" -+ GDK_PIXBUF_DIR="gdk-pixbuf-2.0/$GTK_VERSION/loaders" - wmf_gdk_pixbuf=yes - ],[ wmf_gdk_pixbuf=no - ]) diff --git a/source/l/libwmf/fontmap b/source/l/libwmf/fontmap new file mode 100644 index 00000000..5c805538 --- /dev/null +++ b/source/l/libwmf/fontmap @@ -0,0 +1,16 @@ +<?xml version="1.0"?> +<fontmap> + <font format="type1" metrics="/usr/share/libwmf/fonts/n019003l.afm" glyphs="/usr/share/libwmf/fonts/n019003l.pfb" name="Helvetica" fullname="Helvetica Regular" familyname="Helvetica" weight="Regular" version="0.1"/> + <font format="type1" metrics="/usr/share/libwmf/fonts/n019004l.afm" glyphs="/usr/share/libwmf/fonts/n019004l.pfb" name="Helvetica-Bold" fullname="Helvetica Bold" familyname="Helvetica" weight="Bold" version="0.1"/> + <font format="type1" metrics="/usr/share/libwmf/fonts/n019023l.afm" glyphs="/usr/share/libwmf/fonts/n019023l.pfb" name="Helvetica-Oblique" fullname="Helvetica Regular Italic" familyname="Helvetica" weight="Regular" version="0.1"/> + <font format="type1" metrics="/usr/share/libwmf/fonts/n019024l.afm" glyphs="/usr/share/libwmf/fonts/n019024l.pfb" name="Helvetica-BoldOblique" fullname="Helvetica Bold Italic" familyname="Helvetica" weight="Bold" version="0.1"/> + <font format="type1" metrics="/usr/share/libwmf/fonts/n021003l.afm" glyphs="/usr/share/libwmf/fonts/n021003l.pfb" name="Times-Roman" fullname="Times Regular" familyname="Times" weight="Regular" version="0.1"/> + <font format="type1" metrics="/usr/share/libwmf/fonts/n021004l.afm" glyphs="/usr/share/libwmf/fonts/n021004l.pfb" name="Times-Bold" fullname="Times Medium" familyname="Times" weight="Bold" version="0.1"/> + <font format="type1" metrics="/usr/share/libwmf/fonts/n021023l.afm" glyphs="/usr/share/libwmf/fonts/n021023l.pfb" name="Times-Italic" fullname="Times Regular Italic" familyname="Times" weight="Regular" version="0.1"/> + <font format="type1" metrics="/usr/share/libwmf/fonts/n021024l.afm" glyphs="/usr/share/libwmf/fonts/n021024l.pfb" name="Times-BoldItalic" fullname="Times Medium Italic" familyname="Times" weight="Bold" version="0.1"/> + <font format="type1" metrics="/usr/share/libwmf/fonts/n022003l.afm" glyphs="/usr/share/libwmf/fonts/n022003l.pfb" name="Courier" fullname="Courier Regular" familyname="Courier" weight="Regular" version="0.1"/> + <font format="type1" metrics="/usr/share/libwmf/fonts/n022004l.afm" glyphs="/usr/share/libwmf/fonts/n022004l.pfb" name="Courier-Bold" fullname="Courier Bold" familyname="Courier" weight="Bold" version="0.1"/> + <font format="type1" metrics="/usr/share/libwmf/fonts/n022023l.afm" glyphs="/usr/share/libwmf/fonts/n022023l.pfb" name="Courier-Oblique" fullname="Courier Regular Oblique" familyname="Courier" weight="Regular" version="0.1"/> + <font format="type1" metrics="/usr/share/libwmf/fonts/n022024l.afm" glyphs="/usr/share/libwmf/fonts/n022024l.pfb" name="Courier-BoldOblique" fullname="Courier Bold Oblique" familyname="Courier" weight="Bold" version="0.1"/> + <font format="type1" metrics="/usr/share/libwmf/fonts/s050000l.afm" glyphs="/usr/share/libwmf/fonts/s050000l.pfb" name="Symbol" fullname="Symbol" familyname="Symbol" weight="Regular" version="0.1"/> +</fontmap> diff --git a/source/l/libwmf/libwmf-0.2.8.4-CVE-2004-0941.patch b/source/l/libwmf/libwmf-0.2.8.4-CVE-2004-0941.patch deleted file mode 100644 index 581e4e09..00000000 --- a/source/l/libwmf/libwmf-0.2.8.4-CVE-2004-0941.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- libwmf-0.2.8.4/src/extra/gd/gd_png.c 2004-11-11 14:02:37.407589824 -0500 -+++ libwmf-0.2.8.4/src/extra/gd/gd_png.c 2004-11-11 14:04:29.672522960 -0500 -@@ -188,6 +188,14 @@ - - png_get_IHDR (png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, - &interlace_type, NULL, NULL); -+ if (overflow2(sizeof (int), width)) -+ { -+ return NULL; -+ } -+ if (overflow2(sizeof (int) * width, height)) -+ { -+ return NULL; -+ } - if ((color_type == PNG_COLOR_TYPE_RGB) || - (color_type == PNG_COLOR_TYPE_RGB_ALPHA)) - { diff --git a/source/l/libwmf/libwmf-0.2.8.4-CVE-2006-3376.patch b/source/l/libwmf/libwmf-0.2.8.4-CVE-2006-3376.patch deleted file mode 100644 index 507fe662..00000000 --- a/source/l/libwmf/libwmf-0.2.8.4-CVE-2006-3376.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- libwmf-0.2.8.4.orig/src/player.c 2002-12-10 19:30:26.000000000 +0000 -+++ libwmf-0.2.8.4/src/player.c 2006-07-12 15:12:52.000000000 +0100 -@@ -42,6 +42,7 @@ - #include "player/defaults.h" /* Provides: default settings */ - #include "player/record.h" /* Provides: parameter mechanism */ - #include "player/meta.h" /* Provides: record interpreters */ -+#include <stdint.h> - - /** - * @internal -@@ -132,8 +134,14 @@ - } - } - --/* P->Parameters = (unsigned char*) wmf_malloc (API,(MAX_REC_SIZE(API)-3) * 2 * sizeof (unsigned char)); -- */ P->Parameters = (unsigned char*) wmf_malloc (API,(MAX_REC_SIZE(API) ) * 2 * sizeof (unsigned char)); -+ if (MAX_REC_SIZE(API) > UINT32_MAX / 2) -+ { -+ API->err = wmf_E_InsMem; -+ WMF_DEBUG (API,"bailing..."); -+ return (API->err); -+ } -+ -+ P->Parameters = (unsigned char*) wmf_malloc (API,(MAX_REC_SIZE(API) ) * 2 * sizeof (unsigned char)); - - if (ERR (API)) - { WMF_DEBUG (API,"bailing..."); diff --git a/source/l/libwmf/libwmf-0.2.8.4-CVE-2007-0455.patch b/source/l/libwmf/libwmf-0.2.8.4-CVE-2007-0455.patch deleted file mode 100644 index 0cc5abc7..00000000 --- a/source/l/libwmf/libwmf-0.2.8.4-CVE-2007-0455.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- libwmf-0.2.8.4/src/extra/gd/gdft.c 2010-12-06 11:18:26.000000000 +0000 -+++ libwmf-0.2.8.4/src/extra/gd/gdft.c 2010-12-06 11:21:09.000000000 +0000 -@@ -811,7 +811,7 @@ - { - ch = c & 0xFF; /* don't extend sign */ - } -- next++; -+ if (*next) next++; - } - else - { diff --git a/source/l/libwmf/libwmf-0.2.8.4-CVE-2007-2756.patch b/source/l/libwmf/libwmf-0.2.8.4-CVE-2007-2756.patch deleted file mode 100644 index eba8fac2..00000000 --- a/source/l/libwmf/libwmf-0.2.8.4-CVE-2007-2756.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- libwmf-0.2.8.4/src/extra/gd/gd_png.c 1 Apr 2007 20:41:01 -0000 1.21.2.1 -+++ libwmf-0.2.8.4/src/extra/gd/gd_png.c 16 May 2007 19:06:11 -0000 -@@ -78,8 +78,11 @@ - gdPngReadData (png_structp png_ptr, - png_bytep data, png_size_t length) - { -- gdGetBuf (data, length, (gdIOCtx *) -- png_get_io_ptr (png_ptr)); -+ int check; -+ check = gdGetBuf (data, length, (gdIOCtx *) png_get_io_ptr (png_ptr)); -+ if (check != length) { -+ png_error(png_ptr, "Read Error: truncated data"); -+ } - } - - static void diff --git a/source/l/libwmf/libwmf-0.2.8.4-CVE-2007-3472.patch b/source/l/libwmf/libwmf-0.2.8.4-CVE-2007-3472.patch deleted file mode 100644 index ac1ead5a..00000000 --- a/source/l/libwmf/libwmf-0.2.8.4-CVE-2007-3472.patch +++ /dev/null @@ -1,61 +0,0 @@ ---- libwmf-0.2.8.4/src/extra/gd/gd.c -+++ libwmf-0.2.8.4/src/extra/gd/gd.c -@@ -106,6 +106,18 @@ - gdImagePtr im; - unsigned long cpa_size; - -+ if (overflow2(sx, sy)) { -+ return NULL; -+ } -+ -+ if (overflow2(sizeof (int *), sy)) { -+ return NULL; -+ } -+ -+ if (overflow2(sizeof(int), sx)) { -+ return NULL; -+ } -+ - im = (gdImage *) gdMalloc (sizeof (gdImage)); - if (im == 0) return 0; - memset (im, 0, sizeof (gdImage)); ---- libwmf-0.2.8.4/src/extra/gd/gdhelpers.c 2010-12-06 11:47:31.000000000 +0000 -+++ libwmf-0.2.8.4/src/extra/gd/gdhelpers.c 2010-12-06 11:48:04.000000000 +0000 -@@ -2,6 +2,7 @@ - #include "gdhelpers.h" - #include <stdlib.h> - #include <string.h> -+#include <limits.h> - - /* TBB: gd_strtok_r is not portable; provide an implementation */ - -@@ -94,3 +95,18 @@ - { - free (ptr); - } -+ -+int overflow2(int a, int b) -+{ -+ if(a < 0 || b < 0) { -+ fprintf(stderr, "gd warning: one parameter to a memory allocation multiplication is negative, failing operation gracefully\n"); -+ return 1; -+ } -+ if(b == 0) -+ return 0; -+ if(a > INT_MAX / b) { -+ fprintf(stderr, "gd warning: product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully\n"); -+ return 1; -+ } -+ return 0; -+} ---- libwmf-0.2.8.4/src/extra/gd/gdhelpers.h 2010-12-06 11:47:17.000000000 +0000 -+++ libwmf-0.2.8.4/src/extra/gd/gdhelpers.h 2010-12-06 11:48:36.000000000 +0000 -@@ -15,6 +15,8 @@ - void *gdMalloc(size_t size); - void *gdRealloc(void *ptr, size_t size); - -+int overflow2(int a, int b); -+ - #pragma GCC visibility pop - - #endif /* GDHELPERS_H */ diff --git a/source/l/libwmf/libwmf-0.2.8.4-CVE-2007-3473.patch b/source/l/libwmf/libwmf-0.2.8.4-CVE-2007-3473.patch deleted file mode 100644 index 59018996..00000000 --- a/source/l/libwmf/libwmf-0.2.8.4-CVE-2007-3473.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- libwmf-0.2.8.4/src/extra/gd/gd.c -+++ libwmf-0.2.8.4/src/extra/gd/gd.c -@@ -2483,6 +2483,10 @@ BGD_DECLARE(gdImagePtr) gdImageCreateFromXbm (FILE * fd) - } - bytes = (w * h / 8) + 1; - im = gdImageCreate (w, h); -+ if (!im) { -+ return 0; -+ } -+ - gdImageColorAllocate (im, 255, 255, 255); - gdImageColorAllocate (im, 0, 0, 0); - x = 0; diff --git a/source/l/libwmf/libwmf-0.2.8.4-CVE-2007-3477.patch b/source/l/libwmf/libwmf-0.2.8.4-CVE-2007-3477.patch deleted file mode 100644 index 81ac0385..00000000 --- a/source/l/libwmf/libwmf-0.2.8.4-CVE-2007-3477.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- libwmf-0.2.8.4/src/extra/gd/gd.c -+++ libwmf-0.2.8.4/src/extra/gd/gd.c -@@ -1335,10 +1335,31 @@ - int w2, h2; - w2 = w / 2; - h2 = h / 2; -- while (e < s) -- { -- e += 360; -- } -+ -+ if ((s % 360) == (e % 360)) { -+ s = 0; e = 360; -+ } else { -+ if (s > 360) { -+ s = s % 360; -+ } -+ -+ if (e > 360) { -+ e = e % 360; -+ } -+ -+ while (s < 0) { -+ s += 360; -+ } -+ -+ while (e < s) { -+ e += 360; -+ } -+ -+ if (s == e) { -+ s = 0; e = 360; -+ } -+ } -+ - for (i = s; (i <= e); i++) - { - int x, y; diff --git a/source/l/libwmf/libwmf-0.2.8.4-CVE-2009-3546.patch b/source/l/libwmf/libwmf-0.2.8.4-CVE-2009-3546.patch deleted file mode 100644 index d718976a..00000000 --- a/source/l/libwmf/libwmf-0.2.8.4-CVE-2009-3546.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- libwmf-0.2.8.4/src/extra/gd/gd_gd.c 2010-12-06 14:56:06.000000000 +0000 -+++ libwmf-0.2.8.4/src/extra/gd/gd_gd.c 2010-12-06 14:57:04.000000000 +0000 -@@ -42,6 +42,10 @@ - { - goto fail1; - } -+ if (&im->colorsTotal > gdMaxColors) -+ { -+ goto fail1; -+ } - } - /* Int to accommodate truecolor single-color transparency */ - if (!gdGetInt (&im->transparent, in)) diff --git a/source/l/libwmf/libwmf-0.2.8.4-CVE-2015-0848+CVE-2015-4588.patch b/source/l/libwmf/libwmf-0.2.8.4-CVE-2015-0848+CVE-2015-4588.patch deleted file mode 100644 index e8ba8db1..00000000 --- a/source/l/libwmf/libwmf-0.2.8.4-CVE-2015-0848+CVE-2015-4588.patch +++ /dev/null @@ -1,118 +0,0 @@ ---- libwmf-0.2.8.4/src/ipa/ipa/bmp.h 2015-06-08 14:46:24.591876404 +0100 -+++ libwmf-0.2.8.4/src/ipa/ipa/bmp.h 2015-06-08 14:46:35.345993247 +0100 -@@ -859,7 +859,7 @@ - % - % - */ --static void DecodeImage (wmfAPI* API,wmfBMP* bmp,BMPSource* src,unsigned int compression,unsigned char* pixels) -+static int DecodeImage (wmfAPI* API,wmfBMP* bmp,BMPSource* src,unsigned int compression,unsigned char* pixels) - { int byte; - int count; - int i; -@@ -870,12 +870,14 @@ - U32 u; - - unsigned char* q; -+ unsigned char* end; - - for (u = 0; u < ((U32) bmp->width * (U32) bmp->height); u++) pixels[u] = 0; - - byte = 0; - x = 0; - q = pixels; -+ end = pixels + bmp->width * bmp->height; - - for (y = 0; y < bmp->height; ) - { count = ReadBlobByte (src); -@@ -884,7 +886,10 @@ - { /* Encoded mode. */ - byte = ReadBlobByte (src); - for (i = 0; i < count; i++) -- { if (compression == 1) -+ { -+ if (q == end) -+ return 0; -+ if (compression == 1) - { (*(q++)) = (unsigned char) byte; - } - else -@@ -896,13 +901,15 @@ - else - { /* Escape mode. */ - count = ReadBlobByte (src); -- if (count == 0x01) return; -+ if (count == 0x01) return 1; - switch (count) - { - case 0x00: - { /* End of line. */ - x = 0; - y++; -+ if (y >= bmp->height) -+ return 0; - q = pixels + y * bmp->width; - break; - } -@@ -910,13 +917,20 @@ - { /* Delta mode. */ - x += ReadBlobByte (src); - y += ReadBlobByte (src); -+ if (y >= bmp->height) -+ return 0; -+ if (x >= bmp->width) -+ return 0; - q = pixels + y * bmp->width + x; - break; - } - default: - { /* Absolute mode. */ - for (i = 0; i < count; i++) -- { if (compression == 1) -+ { -+ if (q == end) -+ return 0; -+ if (compression == 1) - { (*(q++)) = ReadBlobByte (src); - } - else -@@ -943,7 +957,7 @@ - byte = ReadBlobByte (src); /* end of line */ - byte = ReadBlobByte (src); - -- return; -+ return 1; - } - - /* -@@ -1143,8 +1157,18 @@ - } - } - else -- { /* Convert run-length encoded raster pixels. */ -- DecodeImage (API,bmp,src,(unsigned int) bmp_info.compression,data->image); -+ { -+ if (bmp_info.bits_per_pixel == 8) /* Convert run-length encoded raster pixels. */ -+ { -+ if (!DecodeImage (API,bmp,src,(unsigned int) bmp_info.compression,data->image)) -+ { WMF_ERROR (API,"corrupt bmp"); -+ API->err = wmf_E_BadFormat; -+ } -+ } -+ else -+ { WMF_ERROR (API,"Unexpected pixel depth"); -+ API->err = wmf_E_BadFormat; -+ } - } - - if (ERR (API)) ---- libwmf-0.2.8.4/src/ipa/ipa.h 2015-06-08 14:46:24.590876393 +0100 -+++ libwmf-0.2.8.4/src/ipa/ipa.h 2015-06-08 14:46:35.345993247 +0100 -@@ -48,7 +48,7 @@ - static unsigned short ReadBlobLSBShort (BMPSource*); - static unsigned long ReadBlobLSBLong (BMPSource*); - static long TellBlob (BMPSource*); --static void DecodeImage (wmfAPI*,wmfBMP*,BMPSource*,unsigned int,unsigned char*); -+static int DecodeImage (wmfAPI*,wmfBMP*,BMPSource*,unsigned int,unsigned char*); - static void ReadBMPImage (wmfAPI*,wmfBMP*,BMPSource*); - static int ExtractColor (wmfAPI*,wmfBMP*,wmfRGB*,unsigned int,unsigned int); - static void SetColor (wmfAPI*,wmfBMP*,wmfRGB*,unsigned char,unsigned int,unsigned int); diff --git a/source/l/libwmf/libwmf-0.2.8.4-CVE-2015-4695.patch b/source/l/libwmf/libwmf-0.2.8.4-CVE-2015-4695.patch deleted file mode 100644 index b6d499da..00000000 --- a/source/l/libwmf/libwmf-0.2.8.4-CVE-2015-4695.patch +++ /dev/null @@ -1,56 +0,0 @@ ---- libwmf-0.2.8.4/src/player/meta.h -+++ libwmf-0.2.8.4/src/player/meta.h -@@ -1565,7 +1565,7 @@ static int meta_rgn_create (wmfAPI* API, - objects = P->objects; - - i = 0; -- while (objects[i].type && (i < NUM_OBJECTS (API))) i++; -+ while ((i < NUM_OBJECTS (API)) && objects[i].type) i++; - - if (i == NUM_OBJECTS (API)) - { WMF_ERROR (API,"Object out of range!"); -@@ -2142,7 +2142,7 @@ static int meta_dib_brush (wmfAPI* API,w - objects = P->objects; - - i = 0; -- while (objects[i].type && (i < NUM_OBJECTS (API))) i++; -+ while ((i < NUM_OBJECTS (API)) && objects[i].type) i++; - - if (i == NUM_OBJECTS (API)) - { WMF_ERROR (API,"Object out of range!"); -@@ -3067,7 +3067,7 @@ static int meta_pen_create (wmfAPI* API, - objects = P->objects; - - i = 0; -- while (objects[i].type && (i < NUM_OBJECTS (API))) i++; -+ while ((i < NUM_OBJECTS (API)) && objects[i].type) i++; - - if (i == NUM_OBJECTS (API)) - { WMF_ERROR (API,"Object out of range!"); -@@ -3181,7 +3181,7 @@ static int meta_brush_create (wmfAPI* AP - objects = P->objects; - - i = 0; -- while (objects[i].type && (i < NUM_OBJECTS (API))) i++; -+ while ((i < NUM_OBJECTS (API)) && objects[i].type) i++; - - if (i == NUM_OBJECTS (API)) - { WMF_ERROR (API,"Object out of range!"); -@@ -3288,7 +3288,7 @@ static int meta_font_create (wmfAPI* API - objects = P->objects; - - i = 0; -- while (objects[i].type && (i < NUM_OBJECTS (API))) i++; -+ while ((i < NUM_OBJECTS (API)) && objects[i].type) i++; - - if (i == NUM_OBJECTS (API)) - { WMF_ERROR (API,"Object out of range!"); -@@ -3396,7 +3396,7 @@ static int meta_palette_create (wmfAPI* - objects = P->objects; - - i = 0; -- while (objects[i].type && (i < NUM_OBJECTS (API))) i++; -+ while ((i < NUM_OBJECTS (API)) && objects[i].type) i++; - - if (i == NUM_OBJECTS (API)) - { WMF_ERROR (API,"Object out of range!"); diff --git a/source/l/libwmf/libwmf-0.2.8.4-CVE-2015-4696.patch b/source/l/libwmf/libwmf-0.2.8.4-CVE-2015-4696.patch deleted file mode 100644 index 33128412..00000000 --- a/source/l/libwmf/libwmf-0.2.8.4-CVE-2015-4696.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- libwmf-0.2.8.4/src/player/meta.h -+++ libwmf-0.2.8.4/src/player/meta.h -@@ -2585,6 +2585,8 @@ - polyrect.BR[i] = clip->rects[i].BR; - } - -+ if (FR->region_clip) FR->region_clip (API,&polyrect); -+ - wmf_free (API,polyrect.TL); - wmf_free (API,polyrect.BR); - } -@@ -2593,9 +2595,10 @@ - polyrect.BR = 0; - - polyrect.count = 0; -+ -+ if (FR->region_clip) FR->region_clip (API,&polyrect); - } - -- if (FR->region_clip) FR->region_clip (API,&polyrect); - - return (changed); - } diff --git a/source/l/libwmf/libwmf-0.2.8.4-CVE-2016-10167.patch b/source/l/libwmf/libwmf-0.2.8.4-CVE-2016-10167.patch deleted file mode 100644 index 5e281974..00000000 --- a/source/l/libwmf/libwmf-0.2.8.4-CVE-2016-10167.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- libwmf-0.2.8.4/src/extra/gd/gd_gd2.c -+++ libwmf-0.2.8.4/src/extra/gd/gd_gd2.c -@@ -362,10 +362,9 @@ - { - if (!gdGetInt (&im->tpixels[y][x], in)) - { -- /*printf("EOF while reading\n"); */ -- /*gdImageDestroy(im); */ -- /*return 0; */ -- im->tpixels[y][x] = 0; -+ fprintf(stderr, "gd2: EOF while reading\n"); -+ gdImageDestroy(im); -+ return NULL; - } - } - else -@@ -373,10 +372,9 @@ - int ch; - if (!gdGetByte (&ch, in)) - { -- /*printf("EOF while reading\n"); */ -- /*gdImageDestroy(im); */ -- /*return 0; */ -- ch = 0; -+ fprintf(stderr, "gd2: EOF while reading\n"); -+ gdImageDestroy(im); -+ return NULL; - } - im->pixels[y][x] = ch; - } diff --git a/source/l/libwmf/libwmf-0.2.8.4-CVE-2016-10168.patch b/source/l/libwmf/libwmf-0.2.8.4-CVE-2016-10168.patch deleted file mode 100644 index f08b1f1e..00000000 --- a/source/l/libwmf/libwmf-0.2.8.4-CVE-2016-10168.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- libwmf-0.2.8.4/src/extra/gd/gd_gd2.c -+++ libwmf-0.2.8.4/src/extra/gd/gd_gd2.c -@@ -145,6 +145,11 @@ - - if ((*fmt) == GD2_FMT_COMPRESSED) - { -+ if (*ncx <= 0 || *ncy <= 0 || *ncx > INT_MAX / *ncy) { -+ GD2_DBG(printf ("Illegal chunk counts: %d * %d\n", *ncx, *ncy)); -+ goto fail1; -+ } -+ - nc = (*ncx) * (*ncy); - GD2_DBG (printf ("Reading %d chunk index entries\n", nc)); - sidx = sizeof (t_chunk_info) * nc; diff --git a/source/l/libwmf/libwmf-0.2.8.4-CVE-2016-9011.patch b/source/l/libwmf/libwmf-0.2.8.4-CVE-2016-9011.patch deleted file mode 100644 index c6bd017c..00000000 --- a/source/l/libwmf/libwmf-0.2.8.4-CVE-2016-9011.patch +++ /dev/null @@ -1,36 +0,0 @@ ---- libwmf-0.2.8.4/src/player.c -+++ libwmf-0.2.8.4/src/player.c -@@ -139,8 +139,31 @@ - WMF_DEBUG (API,"bailing..."); - return (API->err); - } -- -- P->Parameters = (unsigned char*) wmf_malloc (API,(MAX_REC_SIZE(API) ) * 2 * sizeof (unsigned char)); -+ -+ U32 nMaxRecordSize = (MAX_REC_SIZE(API) ) * 2 * sizeof (unsigned char); -+ if (nMaxRecordSize) -+ { -+ //before allocating memory do a sanity check on size by seeking -+ //to claimed end to see if its possible. We're constrained here -+ //by the api and existing implementations to not simply seeking -+ //to SEEK_END. So use what we have to skip to the last byte and -+ //try and read it. -+ const long nPos = WMF_TELL (API); -+ WMF_SEEK (API, nPos + nMaxRecordSize - 1); -+ if (ERR (API)) -+ { WMF_DEBUG (API,"bailing..."); -+ return (API->err); -+ } -+ int byte = WMF_READ (API); -+ if (byte == (-1)) -+ { WMF_ERROR (API,"Unexpected EOF!"); -+ API->err = wmf_E_EOF; -+ return (API->err); -+ } -+ WMF_SEEK (API, nPos); -+ } -+ -+ P->Parameters = (unsigned char*) wmf_malloc (API, nMaxRecordSize); - - if (ERR (API)) - { WMF_DEBUG (API,"bailing..."); diff --git a/source/l/libwmf/libwmf-0.2.8.4-CVE-2016-9317.patch b/source/l/libwmf/libwmf-0.2.8.4-CVE-2016-9317.patch deleted file mode 100644 index cf57734e..00000000 --- a/source/l/libwmf/libwmf-0.2.8.4-CVE-2016-9317.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- libwmf-0.2.8.4/src/extra/gd/gd.c -+++ libwmf-0.2.8.4/src/extra/gd/gd.c -@@ -65,6 +65,18 @@ - { - int i; - gdImagePtr im; -+ -+ if (overflow2(sx, sy)) { -+ return NULL; -+ } -+ -+ if (overflow2(sizeof (unsigned char *), sy)) { -+ return NULL; -+ } -+ if (overflow2(sizeof (unsigned char), sx)) { -+ return NULL; -+ } -+ - im = (gdImage *) gdMalloc (sizeof (gdImage)); - memset (im, 0, sizeof (gdImage)); - /* Row-major ever since gd 1.3 */ diff --git a/source/l/libwmf/libwmf-0.2.8.4-CVE-2017-6362.patch b/source/l/libwmf/libwmf-0.2.8.4-CVE-2017-6362.patch deleted file mode 100644 index 2ad180d9..00000000 --- a/source/l/libwmf/libwmf-0.2.8.4-CVE-2017-6362.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- libwmf-0.2.8.4/src/extra/gd/gd_png.c -+++ libwmf-0.2.8.4/src/extra/gd/gd_png.c -@@ -435,17 +435,6 @@ - out->free (out); - } - --void * --gdImagePngPtr (gdImagePtr im, int *size) --{ -- void *rv; -- gdIOCtx *out = gdNewDynamicCtx (2048, NULL); -- gdImagePngCtx (im, out); -- rv = gdDPExtractData (out, size); -- out->free (out); -- return rv; --} -- - /* This routine is based in part on code from Dale Lutz (Safe Software Inc.) - * and in part on demo code from Chapter 15 of "PNG: The Definitive Guide" - * (http://www.cdrom.com/pub/png/pngbook.html). ---- libwmf-0.2.8.4/src/extra/gd/gd.h -+++ libwmf-0.2.8.4/src/extra/gd/gd.h -@@ -373,9 +373,6 @@ - void gdImageGd2(gdImagePtr im, FILE *out, int cs, int fmt); - - /* Best to free this memory with gdFree(), not free() */ --void* gdImagePngPtr(gdImagePtr im, int *size); -- --/* Best to free this memory with gdFree(), not free() */ - void* gdImageGdPtr(gdImagePtr im, int *size); - - /* Best to free this memory with gdFree(), not free() */ diff --git a/source/l/libwmf/libwmf-0.2.8.4-fallbackfont.patch b/source/l/libwmf/libwmf-0.2.8.4-fallbackfont.patch deleted file mode 100644 index 83383138..00000000 --- a/source/l/libwmf/libwmf-0.2.8.4-fallbackfont.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff -ru libwmf-0.2.8.4.orig/src/font.c libwmf-0.2.8.4/src/font.c ---- libwmf-0.2.8.4.orig/src/font.c 2005-07-27 21:35:06.000000000 +0100 -+++ libwmf-0.2.8.4/src/font.c 2006-01-03 12:53:38.000000000 +0000 -@@ -1429,11 +1429,9 @@ - if (GS->len == 0) return (0); - - name = font->lfFaceName; -- if (name == 0) -- { WMF_DEBUG (API,"No font name?"); -- API->err = wmf_E_Glitch; -- return (0); -- } -+ -+ if (name == 0 || name[0] == 0) -+ name = "Times"; - - /* Find first white-space character or eol - */ diff --git a/source/l/libwmf/libwmf-0.2.8.4-pixbufloaderdir.patch b/source/l/libwmf/libwmf-0.2.8.4-pixbufloaderdir.patch deleted file mode 100644 index a0357858..00000000 --- a/source/l/libwmf/libwmf-0.2.8.4-pixbufloaderdir.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up libwmf-0.2.8.4/configure.in.pixbufloaderdir libwmf-0.2.8.4/configure.in ---- libwmf-0.2.8.4/configure.in.pixbufloaderdir 2010-06-28 23:35:06.227167269 -0400 -+++ libwmf-0.2.8.4/configure.in 2010-06-28 23:36:00.948420306 -0400 -@@ -741,8 +741,8 @@ - - if test $LIBWMF_BUILDSTYLE != lite; then - PKG_CHECK_MODULES(GDK_PIXBUF,gdk-pixbuf-2.0 >= 2.1.2,[ -- GTK_VERSION=`$PKG_CONFIG --variable=gtk_binary_version gtk+-2.0` -- GDK_PIXBUF_DIR="gtk-2.0/$GTK_VERSION/loaders" -+ GDK_PIXBUF_VERSION=`$PKG_CONFIG --variable=gdk_pixbuf_binary_version gdk-pixbuf-2.0` -+ GDK_PIXBUF_DIR="gdk-pixbuf-2.0/$GDK_PIXBUF_VERSION/loaders" - wmf_gdk_pixbuf=yes - ],[ wmf_gdk_pixbuf=no - ]) diff --git a/source/l/libwmf/libwmf-0.2.8.4-reducesymbols.patch b/source/l/libwmf/libwmf-0.2.8.4-reducesymbols.patch deleted file mode 100644 index 45d82b32..00000000 --- a/source/l/libwmf/libwmf-0.2.8.4-reducesymbols.patch +++ /dev/null @@ -1,520 +0,0 @@ -diff -ru libwmf-0.2.8.4/src/extra/gd/gd.c libwmf-0.2.8.4.symbols/src/extra/gd/gd.c ---- libwmf-0.2.8.4/src/extra/gd/gd.c 2005-07-27 21:35:05.000000000 +0100 -+++ libwmf-0.2.8.4.symbols/src/extra/gd/gd.c 2006-11-16 12:27:05.000000000 +0000 -@@ -249,6 +249,7 @@ - } - HWBType; - -+#if 0 - static HWBType * - RGB_to_HWB (RGBType RGB, HWBType * HWB) - { -@@ -308,7 +309,6 @@ - return diff; - } - --#if 0 - /* - * This is not actually used, but is here for completeness, in case someone wants to - * use the HWB stuff for anything else... -@@ -355,6 +355,7 @@ - } - #endif - -+#if 0 - int - gdImageColorClosestHWB (gdImagePtr im, int r, int g, int b) - { -@@ -384,6 +385,7 @@ - } - return ct; - } -+#endif - - int - gdImageColorExact (gdImagePtr im, int r, int g, int b) -@@ -677,7 +679,7 @@ - } - } - --int -+static int - gdImageGetTrueColorPixel (gdImagePtr im, int x, int y) - { - int p = gdImageGetPixel (im, x, y); -@@ -1286,11 +1288,11 @@ - return len; - } - --#ifndef HAVE_LSQRT -+#if 0 - /* If you don't have a nice square root function for longs, you can use - ** this hack - */ --long -+static long - lsqrt (long n) - { - long result = (long) sqrt ((double) n); -@@ -2250,7 +2252,7 @@ - } - } - --int gdCompareInt (const void *a, const void *b); -+static int gdCompareInt (const void *a, const void *b); - - /* THANKS to Kirsten Schulz for the polygon fixes! */ - -diff -ru libwmf-0.2.8.4/src/extra/gd/gdcache.h libwmf-0.2.8.4.symbols/src/extra/gd/gdcache.h ---- libwmf-0.2.8.4/src/extra/gd/gdcache.h 2001-08-21 15:40:33.000000000 +0100 -+++ libwmf-0.2.8.4.symbols/src/extra/gd/gdcache.h 2006-11-16 12:13:40.000000000 +0000 -@@ -41,6 +41,9 @@ - /*********************************************************/ - - /* #include <malloc.h> */ -+ -+#pragma GCC visibility push(hidden) -+ - #ifndef NULL - #define NULL (void *)0 - #endif -@@ -81,3 +84,5 @@ - - void * - gdCacheGet( gdCache_head_t *head, void *keydata ); -+ -+#pragma GCC visibility pop -diff -ru libwmf-0.2.8.4/src/extra/gd/gd_clip.h libwmf-0.2.8.4.symbols/src/extra/gd/gd_clip.h ---- libwmf-0.2.8.4/src/extra/gd/gd_clip.h 2001-03-28 10:37:30.000000000 +0100 -+++ libwmf-0.2.8.4.symbols/src/extra/gd/gd_clip.h 2006-11-16 12:11:49.000000000 +0000 -@@ -1,6 +1,8 @@ - #ifndef GD_CLIP_H - #define GD_CLIP_H 1 - -+#pragma GCC visibility push(hidden) -+ - #ifdef __cplusplus - extern "C" { - #endif -@@ -23,4 +25,6 @@ - } - #endif - -+#pragma GCC visibility pop -+ - #endif /* GD_CLIP_H */ -diff -ru libwmf-0.2.8.4/src/extra/gd/gdfontg.h libwmf-0.2.8.4.symbols/src/extra/gd/gdfontg.h ---- libwmf-0.2.8.4/src/extra/gd/gdfontg.h 2001-03-28 10:37:30.000000000 +0100 -+++ libwmf-0.2.8.4.symbols/src/extra/gd/gdfontg.h 2006-11-16 12:12:03.000000000 +0000 -@@ -2,6 +2,8 @@ - #ifndef _GDFONTG_H_ - #define _GDFONTG_H_ 1 - -+#pragma GCC visibility push(hidden) -+ - #ifdef __cplusplus - extern "C" { - #endif -@@ -25,5 +27,7 @@ - } - #endif - -+#pragma GCC visibility pop -+ - #endif - -diff -ru libwmf-0.2.8.4/src/extra/gd/gdfontl.h libwmf-0.2.8.4.symbols/src/extra/gd/gdfontl.h ---- libwmf-0.2.8.4/src/extra/gd/gdfontl.h 2001-03-28 10:37:30.000000000 +0100 -+++ libwmf-0.2.8.4.symbols/src/extra/gd/gdfontl.h 2006-11-16 12:12:11.000000000 +0000 -@@ -2,6 +2,8 @@ - #ifndef _GDFONTL_H_ - #define _GDFONTL_H_ 1 - -+#pragma GCC visibility push(hidden) -+ - #ifdef __cplusplus - extern "C" { - #endif -@@ -26,5 +28,7 @@ - } - #endif - -+#pragma GCC visibility pop -+ - #endif - -diff -ru libwmf-0.2.8.4/src/extra/gd/gdfontmb.h libwmf-0.2.8.4.symbols/src/extra/gd/gdfontmb.h ---- libwmf-0.2.8.4/src/extra/gd/gdfontmb.h 2001-03-28 10:37:30.000000000 +0100 -+++ libwmf-0.2.8.4.symbols/src/extra/gd/gdfontmb.h 2006-11-16 12:12:19.000000000 +0000 -@@ -2,6 +2,8 @@ - #ifndef _GDFONTMB_H_ - #define _GDFONTMB_H_ 1 - -+#pragma GCC visibility push(hidden) -+ - #ifdef __cplusplus - extern "C" { - #endif -@@ -24,5 +26,7 @@ - } - #endif - -+#pragma GCC visibility pop -+ - #endif - -diff -ru libwmf-0.2.8.4/src/extra/gd/gdfonts.h libwmf-0.2.8.4.symbols/src/extra/gd/gdfonts.h ---- libwmf-0.2.8.4/src/extra/gd/gdfonts.h 2001-03-28 10:37:30.000000000 +0100 -+++ libwmf-0.2.8.4.symbols/src/extra/gd/gdfonts.h 2006-11-16 12:12:28.000000000 +0000 -@@ -2,6 +2,8 @@ - #ifndef _GDFONTS_H_ - #define _GDFONTS_H_ 1 - -+#pragma GCC visibility push(hidden) -+ - #ifdef __cplusplus - extern "C" { - #endif -@@ -24,5 +26,7 @@ - } - #endif - -+#pragma GCC visibility pop -+ - #endif - -diff -ru libwmf-0.2.8.4/src/extra/gd/gdfontt.h libwmf-0.2.8.4.symbols/src/extra/gd/gdfontt.h ---- libwmf-0.2.8.4/src/extra/gd/gdfontt.h 2001-03-28 10:37:30.000000000 +0100 -+++ libwmf-0.2.8.4.symbols/src/extra/gd/gdfontt.h 2006-11-16 12:12:36.000000000 +0000 -@@ -2,6 +2,8 @@ - #ifndef _GDFONTT_H_ - #define _GDFONTT_H_ 1 - -+#pragma GCC visibility push(hidden) -+ - #ifdef __cplusplus - extern "C" { - #endif -@@ -25,5 +27,7 @@ - } - #endif - -+#pragma GCC visibility pop -+ - #endif - -diff -ru libwmf-0.2.8.4/src/extra/gd/gdft.c libwmf-0.2.8.4.symbols/src/extra/gd/gdft.c ---- libwmf-0.2.8.4/src/extra/gd/gdft.c 2005-07-27 21:35:05.000000000 +0100 -+++ libwmf-0.2.8.4.symbols/src/extra/gd/gdft.c 2006-11-16 12:24:50.000000000 +0000 -@@ -533,7 +533,7 @@ - } - - /* draw_bitmap - transfers glyph bitmap to GD image */ --/* static */ char * -+static char * - gdft_draw_bitmap (gdImage * im, int fg, FT_Bitmap bitmap, int pen_x, int pen_y) - { - unsigned char *pixel = 0; -@@ -643,7 +643,7 @@ - return (char *) NULL; - } - --int -+static int - gdroundupdown (FT_F26Dot6 v1, int updown) - { - return (!updown) -@@ -651,7 +651,9 @@ - : (v1 > 0 ? ((v1 + 63) >> 6) : v1 >> 6); - } - -+#pragma GCC visibility push(hidden) - extern int any2eucjp (char *, char *, unsigned int); -+#pragma GCC visibility pop - - /********************************************************************/ - /* gdImageStringFT - render a utf8 string onto a gd image */ -diff -ru libwmf-0.2.8.4/src/extra/gd/gd_gd2.c libwmf-0.2.8.4.symbols/src/extra/gd/gd_gd2.c ---- libwmf-0.2.8.4/src/extra/gd/gd_gd2.c 2005-07-27 21:35:05.000000000 +0100 -+++ libwmf-0.2.8.4.symbols/src/extra/gd/gd_gd2.c 2006-11-16 12:21:28.000000000 +0000 -@@ -34,8 +34,10 @@ - } - t_chunk_info; - -+#pragma GCC visibility push(hidden) - extern int _gdGetColors (gdIOCtx * in, gdImagePtr im, int gd2xFlag); - extern void _gdPutColors (gdImagePtr im, gdIOCtx * out); -+#pragma GCC visibility pop - - /* */ - /* Read the extra info in the gd2 header. */ -diff -ru libwmf-0.2.8.4/src/extra/gd/gd_gd.c libwmf-0.2.8.4.symbols/src/extra/gd/gd_gd.c ---- libwmf-0.2.8.4/src/extra/gd/gd_gd.c 2005-07-27 21:35:05.000000000 +0100 -+++ libwmf-0.2.8.4.symbols/src/extra/gd/gd_gd.c 2006-11-16 12:21:43.000000000 +0000 -@@ -11,6 +11,11 @@ - /* Exported functions: */ - extern void gdImageGd (gdImagePtr im, FILE * out); - -+#pragma GCC visibility push(hidden) -+int _gdGetColors (gdIOCtx * in, gdImagePtr im, int gd2xFlag); -+void _gdPutColors (gdImagePtr im, gdIOCtx * out); -+#pragma GCC visibility pop -+ - - /* Use this for commenting out debug-print statements. */ - /* Just use the first '#define' to allow all the prints... */ -diff -ru libwmf-0.2.8.4/src/extra/gd/gd.h libwmf-0.2.8.4.symbols/src/extra/gd/gd.h ---- libwmf-0.2.8.4/src/extra/gd/gd.h 2002-12-05 20:09:11.000000000 +0000 -+++ libwmf-0.2.8.4.symbols/src/extra/gd/gd.h 2006-11-16 12:14:11.000000000 +0000 -@@ -25,6 +25,8 @@ - #include <gd_io.h> - #include <gd_clip.h> - -+#pragma GCC visibility push(hidden) -+ - /* The maximum number of palette entries in palette-based images. - In the wonderful new world of gd 2.0, you can of course have - many more colors when using truecolor mode. */ -@@ -497,6 +499,8 @@ - /* resolution affects ttf font rendering, particularly hinting */ - #define GD_RESOLUTION 96 /* pixels per inch */ - -+#pragma GCC visibility pop -+ - #ifdef __cplusplus - } - #endif -diff -ru libwmf-0.2.8.4/src/extra/gd/gdhelpers.h libwmf-0.2.8.4.symbols/src/extra/gd/gdhelpers.h ---- libwmf-0.2.8.4/src/extra/gd/gdhelpers.h 2001-03-28 10:37:31.000000000 +0100 -+++ libwmf-0.2.8.4.symbols/src/extra/gd/gdhelpers.h 2006-11-16 12:12:55.000000000 +0000 -@@ -1,6 +1,8 @@ - #ifndef GDHELPERS_H - #define GDHELPERS_H 1 - -+#pragma GCC visibility push(hidden) -+ - /* TBB: strtok_r is not universal; provide an implementation of it. */ - - extern char *gd_strtok_r(char *s, char *sep, char **state); -@@ -13,5 +15,7 @@ - void *gdMalloc(size_t size); - void *gdRealloc(void *ptr, size_t size); - -+#pragma GCC visibility pop -+ - #endif /* GDHELPERS_H */ - -diff -ru libwmf-0.2.8.4/src/extra/gd/gd_io.h libwmf-0.2.8.4.symbols/src/extra/gd/gd_io.h ---- libwmf-0.2.8.4/src/extra/gd/gd_io.h 2001-03-28 10:37:30.000000000 +0100 -+++ libwmf-0.2.8.4.symbols/src/extra/gd/gd_io.h 2006-11-16 12:13:08.000000000 +0000 -@@ -2,6 +2,8 @@ - #define GD_IO_H 1 - - #include <stdio.h> -+ -+#pragma GCC visibility push(hidden) - - typedef struct gdIOCtx { - int (*getC)(struct gdIOCtx*); -@@ -36,4 +38,6 @@ - int gdSeek(gdIOCtx *ctx, const int); - long gdTell(gdIOCtx *ctx); - -+#pragma GCC visibility pop -+ - #endif -diff -ru libwmf-0.2.8.4/src/extra/gd/gd_jpeg.c libwmf-0.2.8.4.symbols/src/extra/gd/gd_jpeg.c ---- libwmf-0.2.8.4/src/extra/gd/gd_jpeg.c 2005-07-27 21:35:06.000000000 +0100 -+++ libwmf-0.2.8.4.symbols/src/extra/gd/gd_jpeg.c 2006-11-16 12:28:13.000000000 +0000 -@@ -99,7 +99,7 @@ - return rv; - } - --void jpeg_gdIOCtx_dest (j_compress_ptr cinfo, gdIOCtx * outfile); -+static void jpeg_gdIOCtx_dest (j_compress_ptr cinfo, gdIOCtx * outfile); - - void - gdImageJpegCtx (gdImagePtr im, gdIOCtx * outfile, int quality) -@@ -266,7 +266,7 @@ - return im; - } - --void -+static void - jpeg_gdIOCtx_src (j_decompress_ptr cinfo, - gdIOCtx * infile); - -@@ -511,7 +511,7 @@ - * before any data is actually read. - */ - --void -+static void - init_source (j_decompress_ptr cinfo) - { - my_src_ptr src = (my_src_ptr) cinfo->src; -@@ -559,7 +559,7 @@ -
- #define END_JPEG_SEQUENCE "\r\n[*]--:END JPEG:--[*]\r\n"
- --safeboolean -+static safeboolean - fill_input_buffer (j_decompress_ptr cinfo) - { - my_src_ptr src = (my_src_ptr) cinfo->src; -@@ -627,7 +627,7 @@ - * buffer is the application writer's problem. - */ - --void -+static void - skip_input_data (j_decompress_ptr cinfo, long num_bytes) - { - my_src_ptr src = (my_src_ptr) cinfo->src; -@@ -669,7 +669,7 @@ - * for error exit. - */ - --void -+static void - term_source (j_decompress_ptr cinfo) - { -
-@@ -742,7 +742,7 @@ - * before any data is actually written. - */ - --void -+static void - init_destination (j_compress_ptr cinfo) - { - my_dest_ptr dest = (my_dest_ptr) cinfo->dest; -@@ -780,7 +780,7 @@ - * write it out when emptying the buffer externally. - */ - --safeboolean -+static safeboolean - empty_output_buffer (j_compress_ptr cinfo) - { - my_dest_ptr dest = (my_dest_ptr) cinfo->dest; -@@ -805,7 +805,7 @@ - * for error exit. - */ - --void -+static void - term_destination (j_compress_ptr cinfo) - { - my_dest_ptr dest = (my_dest_ptr) cinfo->dest; -diff -ru libwmf-0.2.8.4/src/extra/gd/gdkanji.c libwmf-0.2.8.4.symbols/src/extra/gd/gdkanji.c ---- libwmf-0.2.8.4/src/extra/gd/gdkanji.c 2001-05-19 14:09:34.000000000 +0100 -+++ libwmf-0.2.8.4.symbols/src/extra/gd/gdkanji.c 2006-11-16 12:29:42.000000000 +0000 -@@ -555,6 +555,11 @@ - return kanji; - } - -+#pragma GCC visibility push(hidden) -+int -+any2eucjp (unsigned char *dest, unsigned char *src, unsigned int dest_max); -+#pragma GCC visibility pop -+ - int - any2eucjp (unsigned char *dest, unsigned char *src, unsigned int dest_max) - { -diff -ru libwmf-0.2.8.4/src/extra/gd/gd_topal.c libwmf-0.2.8.4.symbols/src/extra/gd/gd_topal.c ---- libwmf-0.2.8.4/src/extra/gd/gd_topal.c 2005-07-27 21:35:06.000000000 +0100 -+++ libwmf-0.2.8.4.symbols/src/extra/gd/gd_topal.c 2006-11-16 12:25:45.000000000 +0000 -@@ -1129,7 +1129,7 @@ - * Map some rows of pixels to the output colormapped representation. - */ - --void -+static void - pass2_no_dither (gdImagePtr im, my_cquantize_ptr cquantize) - /* This version performs no dithering */ - { -@@ -1217,7 +1217,7 @@ - #endif - - --void -+static void - pass2_fs_dither (gdImagePtr im, my_cquantize_ptr cquantize) - - /* This version performs Floyd-Steinberg dithering */ -diff -ru libwmf-0.2.8.4/src/extra/gd/gd_wbmp.c libwmf-0.2.8.4.symbols/src/extra/gd/gd_wbmp.c ---- libwmf-0.2.8.4/src/extra/gd/gd_wbmp.c 2001-05-19 14:09:34.000000000 +0100 -+++ libwmf-0.2.8.4.symbols/src/extra/gd/gd_wbmp.c 2006-11-16 12:28:33.000000000 +0000 -@@ -67,7 +67,7 @@ - ** Wrapper around gdPutC for use with writewbmp - ** - */ --void -+static void - gd_putout (int i, void *out) - { - gdPutC (i, (gdIOCtx *) out); -@@ -79,7 +79,7 @@ - ** Wrapper around gdGetC for use with readwbmp - ** - */ --int -+static int - gd_getin (void *in) - { - return (gdGetC ((gdIOCtx *) in)); -diff -ru libwmf-0.2.8.4/src/extra/gd/gdxpm.c libwmf-0.2.8.4.symbols/src/extra/gd/gdxpm.c ---- libwmf-0.2.8.4/src/extra/gd/gdxpm.c 2001-05-19 14:09:34.000000000 +0100 -+++ libwmf-0.2.8.4.symbols/src/extra/gd/gdxpm.c 2006-11-16 12:18:29.000000000 +0000 -@@ -10,6 +10,7 @@ - #include "gd.h" - #include "gdhelpers.h" - -+#if 0 - #ifndef HAVE_XPM - gdImagePtr - gdImageCreateFromXpm (char *filename) -@@ -146,3 +147,4 @@ - return (im); - } - #endif -+#endif -diff -ru libwmf-0.2.8.4/src/extra/gd/jisx0208.h libwmf-0.2.8.4.symbols/src/extra/gd/jisx0208.h ---- libwmf-0.2.8.4/src/extra/gd/jisx0208.h 2001-03-28 10:37:35.000000000 +0100 -+++ libwmf-0.2.8.4.symbols/src/extra/gd/jisx0208.h 2006-11-16 12:13:19.000000000 +0000 -@@ -1,5 +1,8 @@ - #ifndef JISX0208_H - #define JISX0208_H -+ -+#pragma GCC visibility push(hidden) -+ - /* This file was derived from "src/VF_Ftype.c" in VFlib2-2.24.2 - by Dr. Kakugawa */ - -@@ -1202,4 +1205,6 @@ - 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177, - 0x2178, 0x2179, 0xFFE2, 0xFFE4, 0xFF07, 0xFF02}}; - -+#pragma GCC visibility pop -+ - #endif /* JISX0208_H */ -diff -ru libwmf-0.2.8.4/src/extra/gd/wbmp.h libwmf-0.2.8.4.symbols/src/extra/gd/wbmp.h ---- libwmf-0.2.8.4/src/extra/gd/wbmp.h 2001-03-28 10:37:37.000000000 +0100 -+++ libwmf-0.2.8.4.symbols/src/extra/gd/wbmp.h 2006-11-16 12:14:19.000000000 +0000 -@@ -12,6 +12,8 @@ - #ifndef __WBMP_H - #define __WBMP_H 1 - -+#pragma GCC visibility push(hidden) -+ - - /* WBMP struct - ** ----------- -@@ -44,4 +46,6 @@ - void freewbmp( Wbmp *wbmp ); - void printwbmp( Wbmp *wbmp ); - -+#pragma GCC visibility pop -+ - #endif diff --git a/source/l/libwmf/libwmf-0.2.8.4-useafterfree.patch b/source/l/libwmf/libwmf-0.2.8.4-useafterfree.patch deleted file mode 100644 index 328c5411..00000000 --- a/source/l/libwmf/libwmf-0.2.8.4-useafterfree.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- libwmf-0.2.8.4/src/extra/gd/gd_clip.c.CVE-2009-1364-im-clip-list 2009-04-24 04:06:44.000000000 -0400 -+++ libwmf-0.2.8.4/src/extra/gd/gd_clip.c 2009-04-24 04:08:30.000000000 -0400 -@@ -70,6 +70,7 @@ void gdClipSetAdd(gdImagePtr im,gdClipRe - { more = gdRealloc (im->clip->list,(im->clip->max + 8) * sizeof (gdClipRectangle)); - if (more == 0) return; - im->clip->max += 8; -+ im->clip->list = more; - } - im->clip->list[im->clip->count] = (*rect); - im->clip->count++; diff --git a/source/l/libwmf/libwmf.SlackBuild b/source/l/libwmf/libwmf.SlackBuild index 9c501531..8d310aab 100755 --- a/source/l/libwmf/libwmf.SlackBuild +++ b/source/l/libwmf/libwmf.SlackBuild @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2008, 2009, 2010, 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA +# Copyright 2008, 2009, 2010, 2018, 2020 Patrick J. Volkerding, Sebeka, Minnesota, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -23,8 +23,8 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=libwmf -VERSION=0.2.8.4 -BUILD=${BUILD:-9} +VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} +BUILD=${BUILD:-1} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then @@ -71,8 +71,6 @@ rm -rf libwmf-$VERSION tar xvf $CWD/libwmf-$VERSION.tar.?z* || exit 1 cd libwmf-$VERSION || exit 1 -zcat $CWD/libwmf.png14.diff.gz | patch -p1 --verbose || exit 1 - chown -R root:root . find . \ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ @@ -80,39 +78,6 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \+ -# Miscellaneous patches from Fedora: -zcat $CWD/libwmf-0.2.8.4-fallbackfont.patch.gz | patch -p1 --verbose || exit 1 -zcat $CWD/libwmf-0.2.8.4-pixbufloaderdir.patch.gz | patch -p1 --verbose || exit 1 - -# and fix a missed item from the last patch --rworkman -zcat $CWD/fixup-GDK_PIXBUF_DIR-in-configure-ac.patch.gz | patch -p1 --verbose || exit 1 - -# Don't export the modified embedded GD library symbols, to avoid conflicts with -# the system libgd: -zcat $CWD/libwmf-0.2.8.4-reducesymbols.patch.gz | patch -p1 --verbose || exit 1 - -# Patch security issues: -zcat $CWD/libwmf-0.2.8.4-useafterfree.patch.gz | patch -p1 --verbose || exit 1 -zcat $CWD/libwmf-0.2.8.4-CVE-2006-3376.patch.gz | patch -p1 --verbose || exit 1 -zcat $CWD/libwmf-0.2.8.4-CVE-2004-0941.patch.gz | patch -p1 --verbose || exit 1 -zcat $CWD/libwmf-0.2.8.4-CVE-2007-0455.patch.gz | patch -p1 --verbose || exit 1 -zcat $CWD/libwmf-0.2.8.4-CVE-2007-2756.patch.gz | patch -p1 --verbose || exit 1 -zcat $CWD/libwmf-0.2.8.4-CVE-2007-3472.patch.gz | patch -p1 --verbose || exit 1 -zcat $CWD/libwmf-0.2.8.4-CVE-2007-3473.patch.gz | patch -p1 --verbose || exit 1 -zcat $CWD/libwmf-0.2.8.4-CVE-2007-3477.patch.gz | patch -p1 --verbose || exit 1 -zcat $CWD/libwmf-0.2.8.4-CVE-2009-3546.patch.gz | patch -p1 --verbose || exit 1 -zcat $CWD/libwmf-0.2.8.4-CVE-2015-0848+CVE-2015-4588.patch.gz | patch -p1 --verbose || exit 1 -zcat $CWD/libwmf-0.2.8.4-CVE-2015-4695.patch.gz | patch -p1 --verbose || exit 1 -zcat $CWD/libwmf-0.2.8.4-CVE-2015-4696.patch.gz | patch -p1 --verbose || exit 1 -zcat $CWD/libwmf-0.2.8.4-CVE-2016-10167.patch.gz | patch -p1 --verbose || exit 1 -zcat $CWD/libwmf-0.2.8.4-CVE-2016-10168.patch.gz | patch -p1 --verbose || exit 1 -zcat $CWD/libwmf-0.2.8.4-CVE-2016-9011.patch.gz | patch -p1 --verbose || exit 1 -zcat $CWD/libwmf-0.2.8.4-CVE-2016-9317.patch.gz | patch -p1 --verbose || exit 1 -zcat $CWD/libwmf-0.2.8.4-CVE-2017-6362.patch.gz | patch -p1 --verbose || exit 1 - -autoreconf -vif -automake - CFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ @@ -126,25 +91,25 @@ make install DESTDIR=$PKG || exit 1 # Don't ship .la files: rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la -# Symlink to system fonts. We're not going to just point the fontdir to the -# system Type1 directory since libwmf still wants to use the obsolete fontdir, -# and we don't want to put that there: +# Symlink to system fonts. ( cd $PKG/usr/share/libwmf/fonts - for file in *.afm *.pfb ; do - # Check to see if the font exists on the system. It is required to have - # the ghostscript-fonts package installed during the build. - if [ -r /usr/share/fonts/Type1/$file ]; then - ln -sf ../../fonts/Type1/$file . + # Replace with a fontmap containing the system font names: + cat $CWD/fontmap > fontmap + rm *.afm *.t1 + # Link to system fonts: + for file in n019003l.afm n019003l.pfb n019004l.afm n019004l.pfb n019023l.afm n019023l.pfb n019024l.afm n019024l.pfb n021003l.afm n021003l.pfb n021004l.afm n021004l.pfb n021023l.afm n021023l.pfb n021024l.afm n021024l.pfb n022003l.afm n022003l.pfb n022004l.afm n022004l.pfb n022023l.afm n022023l.pfb n022024l.afm n022024l.pfb s050000l.afm s050000l.pfb ; do + if [ ! -r /usr/share/fonts/Type1/$file ]; then + echo "FONT $file NOT FOUND ON SYSTEM" + exit 1 fi - done -) + ln -sf ../../fonts/Type1/$file . + done || exit 1 +) || exit 1 find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null -mkdir -p $PKG/usr/doc -mv $PKG/usr/share/doc/libwmf $PKG/usr/doc/libwmf-$VERSION -rmdir $PKG/usr/share/doc +mkdir -p $PKG/usr/doc/libwmf-$VERSION cp -a \ AUTHORS BUILDING COPYING CREDITS NEWS README TODO \ $PKG/usr/doc/libwmf-$VERSION diff --git a/source/l/libwmf/libwmf.png14.diff b/source/l/libwmf/libwmf.png14.diff deleted file mode 100644 index c55b143c..00000000 --- a/source/l/libwmf/libwmf.png14.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- ./src/extra/gd/gd_png.c.orig 2005-07-27 15:35:06.000000000 -0500 -+++ ./src/extra/gd/gd_png.c 2010-02-14 18:24:19.000000000 -0600 -@@ -136,7 +136,7 @@ - /* first do a quick check that the file really is a PNG image; could - * have used slightly more general png_sig_cmp() function instead */ - gdGetBuf (sig, 8, infile); -- if (!png_check_sig (sig, 8)) -+ if (!(png_sig_cmp(sig, 0, 8) == 0)) - return NULL; /* bad signature */ - - #ifndef PNG_SETJMP_NOT_SUPPORTED diff --git a/source/l/libwmf/libwmf.url b/source/l/libwmf/libwmf.url new file mode 100644 index 00000000..7d23ab01 --- /dev/null +++ b/source/l/libwmf/libwmf.url @@ -0,0 +1 @@ +https://github.com/caolanm/libwmf diff --git a/source/l/libwmf/slack-desc b/source/l/libwmf/slack-desc index 19f99a7d..3e087daf 100644 --- a/source/l/libwmf/slack-desc +++ b/source/l/libwmf/slack-desc @@ -12,7 +12,7 @@ libwmf: libwmf is a library for interpreting metafile images and either libwmf: displaying them using X or converting them to standard formats such libwmf: as PNG, JPEG, PS, EPS and SVG. libwmf: -libwmf: +libwmf: Homepage: http://wvware.sourceforge.net/libwmf.html libwmf: libwmf: libwmf: |