On Mon, Apr 06, 2021 at 03:08:45AM -0000, Anindya Mukherjee wrote:
>On Mon, Apr 05, 2021 at 07:56:54PM -0700, Anindya Mukherjee wrote:
>> Hi,
>> 
>> Qutebrowser has a bug on OpenBSD which causes the prefers-color-scheme
>> setting to not work correctly (e.g., test sites show that it is not
>> supported, etc.). The problem is a hard-coded library filename for
>> libQt5WebEngineCore.so.5 in
>> /usr/local/lib/python3.8/site-packages/qutebrowser/misc/elf.py. I worked
>> with The-Compiler and a fix has been committed upstream:
>> https://github.com/qutebrowser/qutebrowser/commit/eb6f1cf9898cb431af9d2812ec40f811e37f57f0
>> Would it be possible to backport this into the current port? I have
>> tested the patch on my system and it fixes the issue. To test, simply
>> set colors.webpage.preferred_color_scheme = dark and load
>> https://www.openbsd.org/faq/. It will be displayed using the light
>> scheme without this fix, regardless of the above setting.
>> 
>> OTOH 2.2 is not too far off and updating to that won't need maintaining
>> a patch. I'm not sure what is the best way to proceed.
>> 
>> Regards,
>> Anindya
>
>Incidentally, setting QUTE_DARKMODE_VARIANT=qt_515_2 also works around
>the bug by forcing the library version to what we know is the correct
>one for OpenBSD.

Should've CC'd me. Do you've any idea about the release date for 2.2?
Hopefully this will do in the meanwhile.

Build & Run tested on amd64.

regards,
  Dimitri

Index: Makefile
===================================================================
RCS file: /cvs/ports/www/qutebrowser/Makefile,v
retrieving revision 1.28
diff -u -p -r1.28 Makefile
--- Makefile    2 Apr 2021 14:24:40 -0000       1.28
+++ Makefile    6 Apr 2021 04:06:59 -0000
@@ -4,6 +4,7 @@ COMMENT =               keyboard-focused browser with
 
 MODPY_EGG_VERSION =    2.1.1
 DISTNAME =             qutebrowser-${MODPY_EGG_VERSION}
+REVISION =             0
 
 HOMEPAGE =             https://www.qutebrowser.org/
 
@@ -25,6 +26,9 @@ RUN_DEPENDS =         devel/desktop-file-utils 
                        x11/py-qt5${MODPY_FLAVOR} \
                        www/py-jinja2${MODPY_FLAVOR} \
                        www/py-qtwebengine${MODPY_FLAVOR}
+
+post-patch:
+       sed -i s,so.5,so.1.0, ${WRKSRC}/qutebrowser/misc/elf.py
 
 post-install:
        ${INSTALL_DATA_DIR} ${PREFIX}/share/applications/

Reply via email to