From 1e9a96991ae655be8f9d91e96fcc9bae55478618 Mon Sep 17 00:00:00 2001 From: bcallah Date: Fri, 21 Aug 2020 03:22:50 +0000 Subject: [PATCH] Upstream mistakenly uses a signed long in a place where they should be using an unsigned long, which triggers a build failure (-Wc++11-narrowing) on 32-bit systems. I have reported this upstream. Bump REVISION. Thanks to sthen@'s i386 build failures emails, which alerted me to the issue. --- x11/worker/Makefile | 5 ++-- x11/worker/patches/patch-src_aguix_aguix_cc | 24 ++++++++++++++++ x11/worker/patches/patch-src_aguix_aguix_h | 28 +++++++++++++++++++ x11/worker/patches/patch-src_aguix_awindow_cc | 16 +++++++++++ .../patches/patch-src_worker_net_wm_icon_h | 13 +++++++++ 5 files changed, 84 insertions(+), 2 deletions(-) create mode 100644 x11/worker/patches/patch-src_aguix_aguix_cc create mode 100644 x11/worker/patches/patch-src_aguix_aguix_h create mode 100644 x11/worker/patches/patch-src_aguix_awindow_cc create mode 100644 x11/worker/patches/patch-src_worker_net_wm_icon_h diff --git a/x11/worker/Makefile b/x11/worker/Makefile index 2212fed9a8d..9cc6b11d0ad 100644 --- a/x11/worker/Makefile +++ b/x11/worker/Makefile @@ -1,8 +1,9 @@ -# $OpenBSD: Makefile,v 1.45 2020/08/17 22:14:51 bcallah Exp $ +# $OpenBSD: Makefile,v 1.46 2020/08/21 03:22:50 bcallah Exp $ BROKEN-hppa = no atomic ops COMMENT = Midnight Commander-like file manager for X DISTNAME = worker-4.5.0 +REVISION = 0 CATEGORIES = x11 HOMEPAGE = http://www.boomerangsworld.de/ @@ -16,7 +17,7 @@ WANTLIB += fontconfig freetype m pthread xcb z ${COMPILER_LIBCXX} MASTER_SITES = http://www.boomerangsworld.de/cms/worker/downloads/ -# C++11 +# C++14 COMPILER = base-clang ports-clang ports-gcc RUN_DEPENDS = devel/desktop-file-utils \ diff --git a/x11/worker/patches/patch-src_aguix_aguix_cc b/x11/worker/patches/patch-src_aguix_aguix_cc new file mode 100644 index 00000000000..11f2c0c793d --- /dev/null +++ b/x11/worker/patches/patch-src_aguix_aguix_cc @@ -0,0 +1,24 @@ +$OpenBSD: patch-src_aguix_aguix_cc,v 1.1 2020/08/21 03:22:50 bcallah Exp $ + +This needs to be unsigned for 32-bit. + +Index: src/aguix/aguix.cc +--- src/aguix/aguix.cc.orig ++++ src/aguix/aguix.cc +@@ -4373,14 +4373,14 @@ bool AGUIX::isModifierPressed( unsigned int mask ) + return m_modifier_pressed & mask; + } + +-void AGUIX::setStandardIconData( const long *data, ++void AGUIX::setStandardIconData( const unsigned long *data, + size_t data_length ) + { + m_net_wm_icon_data = data; + m_net_wm_icon_data_length = data_length; + } + +-bool AGUIX::getStandardIconData( const long **return_data, ++bool AGUIX::getStandardIconData( const unsigned long **return_data, + size_t *return_data_length ) const + { + if ( ! m_net_wm_icon_data ) return false; diff --git a/x11/worker/patches/patch-src_aguix_aguix_h b/x11/worker/patches/patch-src_aguix_aguix_h new file mode 100644 index 00000000000..196ea0c54cb --- /dev/null +++ b/x11/worker/patches/patch-src_aguix_aguix_h @@ -0,0 +1,28 @@ +$OpenBSD: patch-src_aguix_aguix_h,v 1.1 2020/08/21 03:22:50 bcallah Exp $ + +This needs to be unsigned for 32-bit. + +Index: src/aguix/aguix.h +--- src/aguix/aguix.h.orig ++++ src/aguix/aguix.h +@@ -375,9 +375,9 @@ class AGUIX { (public) + + bool isModifierPressed( unsigned int mask ); + +- void setStandardIconData( const long *data, ++ void setStandardIconData( const unsigned long *data, + size_t data_length ); +- bool getStandardIconData( const long **return_data, ++ bool getStandardIconData( const unsigned long **return_data, + size_t *return_data_length ) const; + private: + Display *dsp; +@@ -647,7 +647,7 @@ class AGUIX { (public) + + unsigned int m_modifier_pressed = 0; + +- const long *m_net_wm_icon_data = NULL; ++ const unsigned long *m_net_wm_icon_data = NULL; + size_t m_net_wm_icon_data_length = 0; + }; + diff --git a/x11/worker/patches/patch-src_aguix_awindow_cc b/x11/worker/patches/patch-src_aguix_awindow_cc new file mode 100644 index 00000000000..3ac92f828f7 --- /dev/null +++ b/x11/worker/patches/patch-src_aguix_awindow_cc @@ -0,0 +1,16 @@ +$OpenBSD: patch-src_aguix_awindow_cc,v 1.1 2020/08/21 03:22:50 bcallah Exp $ + +This needs to be unsigned for 32-bit. + +Index: src/aguix/awindow.cc +--- src/aguix/awindow.cc.orig ++++ src/aguix/awindow.cc +@@ -1626,7 +1626,7 @@ Widget *AWindow::findWidgetForRootPos( int rx, int ry + + void AWindow::applyIcon() + { +- const long *data = NULL; ++ const unsigned long *data = NULL; + size_t data_length = 0; + + if ( ! _aguix->getStandardIconData( &data, &data_length ) ) { diff --git a/x11/worker/patches/patch-src_worker_net_wm_icon_h b/x11/worker/patches/patch-src_worker_net_wm_icon_h new file mode 100644 index 00000000000..f785f7237f9 --- /dev/null +++ b/x11/worker/patches/patch-src_worker_net_wm_icon_h @@ -0,0 +1,13 @@ +$OpenBSD: patch-src_worker_net_wm_icon_h,v 1.1 2020/08/21 03:22:50 bcallah Exp $ + +This needs to be unsigned for 32-bit. + +Index: src/worker_net_wm_icon.h +--- src/worker_net_wm_icon.h.orig ++++ src/worker_net_wm_icon.h +@@ -1,4 +1,4 @@ +-static const long worker_net_wm_icon_data[] = { ++static const unsigned long worker_net_wm_icon_data[] = { + 16, 16, + 0xff0e5bd6, 0xff0e5bd6, 0xff0e5bd6, 0xff0e5bd6, 0xff0e5bd6, 0xff0e5bd6, 0xff0e5bd6, 0xff0e5bd6, + 0xff0e5bd6, 0xff0e5bd6, 0xff0e5bd6, 0xff0e5bd6, 0xff0e5bd6, 0xff0e5bd6, 0xff0e5bd6, 0xff0e5bd6,