pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/graphics



Module Name:    pkgsrc
Committed By:   nia
Date:           Tue Jul 20 10:54:18 UTC 2021

Modified Files:
        pkgsrc/graphics: Makefile
Added Files:
        pkgsrc/graphics/drawpile: DESCR Makefile PLIST distinfo
        pkgsrc/graphics/drawpile/patches: patch-doc_CMakeLists.txt
            patch-src_desktop_bundled_QtColorWidgets_color__wheel.cpp
            patch-src_desktop_widgets_popupmessage.h
            patch-src_thinsrv_webadmin_qmhttp.cpp

Log Message:
add graphics/drawpile

Drawpile is a drawing program that lets you share the canvas with other
users in real time.


To generate a diff of this commit:
cvs rdiff -u -r1.946 -r1.947 pkgsrc/graphics/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/graphics/drawpile/DESCR \
    pkgsrc/graphics/drawpile/Makefile pkgsrc/graphics/drawpile/PLIST \
    pkgsrc/graphics/drawpile/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/graphics/drawpile/patches/patch-doc_CMakeLists.txt \
    pkgsrc/graphics/drawpile/patches/patch-src_desktop_bundled_QtColorWidgets_color__wheel.cpp \
    pkgsrc/graphics/drawpile/patches/patch-src_desktop_widgets_popupmessage.h \
    pkgsrc/graphics/drawpile/patches/patch-src_thinsrv_webadmin_qmhttp.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/graphics/Makefile
diff -u pkgsrc/graphics/Makefile:1.946 pkgsrc/graphics/Makefile:1.947
--- pkgsrc/graphics/Makefile:1.946      Sun Jul 18 18:08:43 2021
+++ pkgsrc/graphics/Makefile    Tue Jul 20 10:54:18 2021
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.946 2021/07/18 18:08:43 gutteridge Exp $
+# $NetBSD: Makefile,v 1.947 2021/07/20 10:54:18 nia Exp $
 #
 
 COMMENT=       Graphics tools and libraries
@@ -106,6 +106,7 @@ SUBDIR+=    djview4
 SUBDIR+=       djvulibre-lib
 SUBDIR+=       djvulibre-tools
 SUBDIR+=       drawing
+SUBDIR+=       drawpile
 SUBDIR+=       dvipng
 SUBDIR+=       dx
 SUBDIR+=       dxsamples

Added files:

Index: pkgsrc/graphics/drawpile/DESCR
diff -u /dev/null pkgsrc/graphics/drawpile/DESCR:1.1
--- /dev/null   Tue Jul 20 10:54:18 2021
+++ pkgsrc/graphics/drawpile/DESCR      Tue Jul 20 10:54:18 2021
@@ -0,0 +1,2 @@
+Drawpile is a drawing program that lets you share the canvas with other
+users in real time.
Index: pkgsrc/graphics/drawpile/Makefile
diff -u /dev/null pkgsrc/graphics/drawpile/Makefile:1.1
--- /dev/null   Tue Jul 20 10:54:18 2021
+++ pkgsrc/graphics/drawpile/Makefile   Tue Jul 20 10:54:18 2021
@@ -0,0 +1,32 @@
+# $NetBSD: Makefile,v 1.1 2021/07/20 10:54:18 nia Exp $
+
+DISTNAME=      Drawpile-2.1.17
+PKGNAME=       ${DISTNAME:tl}
+CATEGORIES=    graphics
+MASTER_SITES=  ${MASTER_SITE_GITHUB:=drawpile/}
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      https://drawpile.net/
+COMMENT=       Collaborative drawing program
+LICENSE=       gnu-gpl-v3
+
+USE_CMAKE=     yes
+USE_TOOLS+=    pkg-config
+USE_LANGUAGES= c c++
+
+CMAKE_ARGS+=   -DINITSYS=""
+
+TOOL_DEPENDS+= qt5-qttools-[0-9]*:../../x11/qt5-qttools
+
+.include "../../archivers/karchive/buildlink3.mk"
+.include "../../graphics/giflib/buildlink3.mk"
+.include "../../graphics/hicolor-icon-theme/buildlink3.mk"
+.include "../../multimedia/libvpx/buildlink3.mk"
+.include "../../net/miniupnpc/buildlink3.mk"
+.include "../../security/libsodium/buildlink3.mk"
+.include "../../sysutils/desktop-file-utils/desktopdb.mk"
+.include "../../www/libmicrohttpd/buildlink3.mk"
+.include "../../x11/qt5-qtbase/buildlink3.mk"
+.include "../../x11/qt5-qtmultimedia/buildlink3.mk"
+.include "../../x11/qt5-qtsvg/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/graphics/drawpile/PLIST
diff -u /dev/null pkgsrc/graphics/drawpile/PLIST:1.1
--- /dev/null   Tue Jul 20 10:54:18 2021
+++ pkgsrc/graphics/drawpile/PLIST      Tue Jul 20 10:54:18 2021
@@ -0,0 +1,206 @@
+@comment $NetBSD: PLIST,v 1.1 2021/07/20 10:54:18 nia Exp $
+bin/drawpile
+bin/${PKGNAME}
+bin/drawpile-srv
+man/man1/drawpile-srv.1
+share/applications/net.drawpile.drawpile.desktop
+share/doc/drawpile/COPYING
+share/doc/drawpile/ChangeLog
+share/doc/drawpile/README.md
+share/doc/drawpile/logins.md
+share/doc/drawpile/messages.md
+share/doc/drawpile/openraster.txt
+share/doc/drawpile/protocol.md
+share/doc/drawpile/textloader.md
+share/drawpile/drawpile/i18n/drawpile_cs.qm
+share/drawpile/drawpile/i18n/drawpile_de.qm
+share/drawpile/drawpile/i18n/drawpile_fi.qm
+share/drawpile/drawpile/i18n/drawpile_it.qm
+share/drawpile/drawpile/i18n/drawpile_ja.qm
+share/drawpile/drawpile/i18n/drawpile_ru.qm
+share/drawpile/drawpile/i18n/drawpile_uk.qm
+share/drawpile/drawpile/i18n/drawpile_vi.qm
+share/drawpile/drawpile/i18n/drawpile_zh.qm
+share/drawpile/drawpile/nightmode.colors
+share/drawpile/drawpile/palettes/Breeze.gpl
+share/drawpile/drawpile/palettes/DB32.gpl
+share/drawpile/drawpile/palettes/Grayscale.gpl
+share/drawpile/drawpile/palettes/Ponies.gpl
+share/drawpile/drawpile/palettes/Sketching.gpl
+share/drawpile/drawpile/palettes/Tango.gpl
+share/drawpile/drawpile/sounds/chat.wav
+share/drawpile/drawpile/sounds/lock.wav
+share/drawpile/drawpile/sounds/login.wav
+share/drawpile/drawpile/sounds/logout.wav
+share/drawpile/drawpile/sounds/marker.wav
+share/drawpile/drawpile/sounds/sounds.txt
+share/drawpile/drawpile/sounds/unlock.wav
+share/drawpile/drawpile/theme/dark/application-exit.svg
+share/drawpile/drawpile/theme/dark/application-menu.svg
+share/drawpile/drawpile/theme/dark/color-picker.svg
+share/drawpile/drawpile/theme/dark/configure-shortcuts.svg
+share/drawpile/drawpile/theme/dark/cursor-arrow.svg
+share/drawpile/drawpile/theme/dark/document-export.svg
+share/drawpile/drawpile/theme/dark/document-new.svg
+share/drawpile/drawpile/theme/dark/document-open.svg
+share/drawpile/drawpile/theme/dark/document-save-as.svg
+share/drawpile/drawpile/theme/dark/document-save.svg
+share/drawpile/drawpile/theme/dark/dontknow.svg
+share/drawpile/drawpile/theme/dark/draw-bezier-curves.svg
+share/drawpile/drawpile/theme/dark/draw-brush.svg
+share/drawpile/drawpile/theme/dark/draw-ellipse.svg
+share/drawpile/drawpile/theme/dark/draw-eraser.svg
+share/drawpile/drawpile/theme/dark/draw-freehand.svg
+share/drawpile/drawpile/theme/dark/draw-line.svg
+share/drawpile/drawpile/theme/dark/draw-rectangle.svg
+share/drawpile/drawpile/theme/dark/draw-text.svg
+share/drawpile/drawpile/theme/dark/drawpile_chat.svg
+share/drawpile/drawpile/theme/dark/drawpile_incremental_mode.svg
+share/drawpile/drawpile/theme/dark/drawpile_pixelround.svg
+share/drawpile/drawpile/theme/dark/drawpile_round.svg
+share/drawpile/drawpile/theme/dark/drawpile_square.svg
+share/drawpile/drawpile/theme/dark/edit-copy.svg
+share/drawpile/drawpile/theme/dark/edit-cut.svg
+share/drawpile/drawpile/theme/dark/edit-delete.svg
+share/drawpile/drawpile/theme/dark/edit-paste.svg
+share/drawpile/drawpile/theme/dark/edit-redo.svg
+share/drawpile/drawpile/theme/dark/edit-select-lasso.svg
+share/drawpile/drawpile/theme/dark/edit-undo.svg
+share/drawpile/drawpile/theme/dark/fill-color.svg
+share/drawpile/drawpile/theme/dark/flag-blue.svg
+share/drawpile/drawpile/theme/dark/flag-red.svg
+share/drawpile/drawpile/theme/dark/format-align-vertical-bottom.svg
+share/drawpile/drawpile/theme/dark/format-align-vertical-center.svg
+share/drawpile/drawpile/theme/dark/format-align-vertical-top.svg
+share/drawpile/drawpile/theme/dark/format-justify-center.svg
+share/drawpile/drawpile/theme/dark/format-justify-fill.svg
+share/drawpile/drawpile/theme/dark/format-justify-left.svg
+share/drawpile/drawpile/theme/dark/format-justify-right.svg
+share/drawpile/drawpile/theme/dark/format-text-bold.svg
+share/drawpile/drawpile/theme/dark/format-text-italic.svg
+share/drawpile/drawpile/theme/dark/format-text-strikethrough.svg
+share/drawpile/drawpile/theme/dark/format-text-underline.svg
+share/drawpile/drawpile/theme/dark/go-jump.svg
+share/drawpile/drawpile/theme/dark/help-whatsthis.svg
+share/drawpile/drawpile/theme/dark/im-ban-user.svg
+share/drawpile/drawpile/theme/dark/im-kick-user.svg
+share/drawpile/drawpile/theme/dark/im-user.svg
+share/drawpile/drawpile/theme/dark/irc-operator.svg
+share/drawpile/drawpile/theme/dark/irc-unvoice.svg
+share/drawpile/drawpile/theme/dark/layer-visible-off.svg
+share/drawpile/drawpile/theme/dark/layer-visible-on.svg
+share/drawpile/drawpile/theme/dark/list-add.svg
+share/drawpile/drawpile/theme/dark/media-playback-pause.svg
+share/drawpile/drawpile/theme/dark/media-playback-start.svg
+share/drawpile/drawpile/theme/dark/media-record.svg
+share/drawpile/drawpile/theme/dark/media-seek-backward.svg
+share/drawpile/drawpile/theme/dark/media-seek-forward.svg
+share/drawpile/drawpile/theme/dark/media-skip-backward.svg
+share/drawpile/drawpile/theme/dark/media-skip-forward.svg
+share/drawpile/drawpile/theme/dark/object-flip-horizontal.svg
+share/drawpile/drawpile/theme/dark/object-flip-vertical.svg
+share/drawpile/drawpile/theme/dark/object-locked.svg
+share/drawpile/drawpile/theme/dark/object-rotate-left.svg
+share/drawpile/drawpile/theme/dark/object-rotate-right.svg
+share/drawpile/drawpile/theme/dark/security-high.svg
+share/drawpile/drawpile/theme/dark/security-medium.svg
+share/drawpile/drawpile/theme/dark/select-rectangular.svg
+share/drawpile/drawpile/theme/dark/transform-rotate.svg
+share/drawpile/drawpile/theme/dark/window-pin.svg
+share/drawpile/drawpile/theme/dark/zoom-in.svg
+share/drawpile/drawpile/theme/dark/zoom-original.svg
+share/drawpile/drawpile/theme/dark/zoom-out.svg
+share/drawpile/drawpile/theme/dark/zoom-select.svg
+share/drawpile/drawpile/theme/icons.txt
+share/drawpile/drawpile/theme/light/application-exit.svg
+share/drawpile/drawpile/theme/light/application-menu.svg
+share/drawpile/drawpile/theme/light/color-picker.svg
+share/drawpile/drawpile/theme/light/configure-shortcuts.svg
+share/drawpile/drawpile/theme/light/cursor-arrow.svg
+share/drawpile/drawpile/theme/light/document-export.svg
+share/drawpile/drawpile/theme/light/document-new.svg
+share/drawpile/drawpile/theme/light/document-open.svg
+share/drawpile/drawpile/theme/light/document-save-as.svg
+share/drawpile/drawpile/theme/light/document-save.svg
+share/drawpile/drawpile/theme/light/dontknow.svg
+share/drawpile/drawpile/theme/light/draw-bezier-curves.svg
+share/drawpile/drawpile/theme/light/draw-brush.svg
+share/drawpile/drawpile/theme/light/draw-ellipse.svg
+share/drawpile/drawpile/theme/light/draw-eraser.svg
+share/drawpile/drawpile/theme/light/draw-freehand.svg
+share/drawpile/drawpile/theme/light/draw-line.svg
+share/drawpile/drawpile/theme/light/draw-rectangle.svg
+share/drawpile/drawpile/theme/light/draw-text.svg
+share/drawpile/drawpile/theme/light/drawpile_chat.svg
+share/drawpile/drawpile/theme/light/drawpile_incremental_mode.svg
+share/drawpile/drawpile/theme/light/drawpile_pixelround.svg
+share/drawpile/drawpile/theme/light/drawpile_round.svg
+share/drawpile/drawpile/theme/light/drawpile_square.svg
+share/drawpile/drawpile/theme/light/edit-copy.svg
+share/drawpile/drawpile/theme/light/edit-cut.svg
+share/drawpile/drawpile/theme/light/edit-delete.svg
+share/drawpile/drawpile/theme/light/edit-paste.svg
+share/drawpile/drawpile/theme/light/edit-redo.svg
+share/drawpile/drawpile/theme/light/edit-select-lasso.svg
+share/drawpile/drawpile/theme/light/edit-undo.svg
+share/drawpile/drawpile/theme/light/fill-color.svg
+share/drawpile/drawpile/theme/light/flag-blue.svg
+share/drawpile/drawpile/theme/light/flag-red.svg
+share/drawpile/drawpile/theme/light/format-align-vertical-bottom.svg
+share/drawpile/drawpile/theme/light/format-align-vertical-center.svg
+share/drawpile/drawpile/theme/light/format-align-vertical-top.svg
+share/drawpile/drawpile/theme/light/format-justify-center.svg
+share/drawpile/drawpile/theme/light/format-justify-fill.svg
+share/drawpile/drawpile/theme/light/format-justify-left.svg
+share/drawpile/drawpile/theme/light/format-justify-right.svg
+share/drawpile/drawpile/theme/light/format-text-bold.svg
+share/drawpile/drawpile/theme/light/format-text-italic.svg
+share/drawpile/drawpile/theme/light/format-text-strikethrough.svg
+share/drawpile/drawpile/theme/light/format-text-underline.svg
+share/drawpile/drawpile/theme/light/go-jump.svg
+share/drawpile/drawpile/theme/light/help-whatsthis.svg
+share/drawpile/drawpile/theme/light/im-ban-user.svg
+share/drawpile/drawpile/theme/light/im-kick-user.svg
+share/drawpile/drawpile/theme/light/im-user.svg
+share/drawpile/drawpile/theme/light/irc-operator.svg
+share/drawpile/drawpile/theme/light/irc-unvoice.svg
+share/drawpile/drawpile/theme/light/layer-visible-off.svg
+share/drawpile/drawpile/theme/light/layer-visible-on.svg
+share/drawpile/drawpile/theme/light/list-add.svg
+share/drawpile/drawpile/theme/light/media-playback-pause.svg
+share/drawpile/drawpile/theme/light/media-playback-start.svg
+share/drawpile/drawpile/theme/light/media-record.svg
+share/drawpile/drawpile/theme/light/media-seek-backward.svg
+share/drawpile/drawpile/theme/light/media-seek-forward.svg
+share/drawpile/drawpile/theme/light/media-skip-backward.svg
+share/drawpile/drawpile/theme/light/media-skip-forward.svg
+share/drawpile/drawpile/theme/light/object-flip-horizontal.svg
+share/drawpile/drawpile/theme/light/object-flip-vertical.svg
+share/drawpile/drawpile/theme/light/object-locked.svg
+share/drawpile/drawpile/theme/light/object-rotate-left.svg
+share/drawpile/drawpile/theme/light/object-rotate-right.svg
+share/drawpile/drawpile/theme/light/security-high.svg
+share/drawpile/drawpile/theme/light/security-medium.svg
+share/drawpile/drawpile/theme/light/select-rectangular.svg
+share/drawpile/drawpile/theme/light/transform-rotate.svg
+share/drawpile/drawpile/theme/light/window-pin.svg
+share/drawpile/drawpile/theme/light/zoom-in.svg
+share/drawpile/drawpile/theme/light/zoom-original.svg
+share/drawpile/drawpile/theme/light/zoom-out.svg
+share/drawpile/drawpile/theme/light/zoom-select.svg
+share/icons/hicolor/128x128/apps/drawpile.png
+share/icons/hicolor/128x128/mimetypes/application-x-drawpile-recording.png
+share/icons/hicolor/16x16/apps/drawpile.png
+share/icons/hicolor/16x16/mimetypes/application-x-drawpile-recording.png
+share/icons/hicolor/256x256/apps/drawpile.png
+share/icons/hicolor/256x256/mimetypes/application-x-drawpile-recording.png
+share/icons/hicolor/32x32/apps/drawpile.png
+share/icons/hicolor/32x32/mimetypes/application-x-drawpile-recording.png
+share/icons/hicolor/48x48/apps/drawpile.png
+share/icons/hicolor/48x48/mimetypes/application-x-drawpile-recording.png
+share/icons/hicolor/64x64/apps/drawpile.png
+share/icons/hicolor/64x64/mimetypes/application-x-drawpile-recording.png
+share/icons/hicolor/scalable/apps/drawpile.svgz
+share/icons/hicolor/scalable/mimetypes/application-x-drawpile-recording.svgz
+share/metainfo/net.drawpile.drawpile.appdata.xml
+share/mime/packages/x-drawpile.xml
Index: pkgsrc/graphics/drawpile/distinfo
diff -u /dev/null pkgsrc/graphics/drawpile/distinfo:1.1
--- /dev/null   Tue Jul 20 10:54:18 2021
+++ pkgsrc/graphics/drawpile/distinfo   Tue Jul 20 10:54:18 2021
@@ -0,0 +1,10 @@
+$NetBSD: distinfo,v 1.1 2021/07/20 10:54:18 nia Exp $
+
+SHA1 (Drawpile-2.1.17.tar.gz) = e436db084d903b891d0703abf46d04126b0cdcd5
+RMD160 (Drawpile-2.1.17.tar.gz) = fdc6dc5bcc63d8f84e8a2a7b09e5bbd91b69c932
+SHA512 (Drawpile-2.1.17.tar.gz) = 57fb472ea885c1a4844a9e56d3d8eab6dfac59b63118f23671799cbe9110940885546e96be9d0444f1b023d5c9527156990b043e109880896c87a0e1476e68aa
+Size (Drawpile-2.1.17.tar.gz) = 2521569 bytes
+SHA1 (patch-doc_CMakeLists.txt) = 5cefd3f4b354d60784b0681730a4f30dacd54f73
+SHA1 (patch-src_desktop_bundled_QtColorWidgets_color__wheel.cpp) = 8740f0d7bb1cceeaa8bae7d82d59a6a681cef3f4
+SHA1 (patch-src_desktop_widgets_popupmessage.h) = 29da8b8f19f30c6bcc188c68c44a9faf095ef372
+SHA1 (patch-src_thinsrv_webadmin_qmhttp.cpp) = ede288361c38c124ee427cf501f73721f6196f7d

Index: pkgsrc/graphics/drawpile/patches/patch-doc_CMakeLists.txt
diff -u /dev/null pkgsrc/graphics/drawpile/patches/patch-doc_CMakeLists.txt:1.1
--- /dev/null   Tue Jul 20 10:54:18 2021
+++ pkgsrc/graphics/drawpile/patches/patch-doc_CMakeLists.txt   Tue Jul 20 10:54:18 2021
@@ -0,0 +1,23 @@
+$NetBSD: patch-doc_CMakeLists.txt,v 1.1 2021/07/20 10:54:18 nia Exp $
+
+Install man pages to the proper directory.
+
+--- doc/CMakeLists.txt.orig    2020-02-16 16:35:42.000000000 +0000
++++ doc/CMakeLists.txt
+@@ -13,13 +13,14 @@ SET(man1
+       drawpile-srv.1
+ )
+ 
+-if (UNIX AND NOT APPLE)
++if (UNIX)
++      include(GNUInstallDirs)
+       install (
+               FILES ${base_files}
+               DESTINATION "share/doc/drawpile"
+               )
+       INSTALL (
+               FILES ${man1}
+-              DESTINATION "share/man/man1"
++              DESTINATION "${CMAKE_INSTALL_MANDIR}/man1"
+               )
+ endif ()
Index: pkgsrc/graphics/drawpile/patches/patch-src_desktop_bundled_QtColorWidgets_color__wheel.cpp
diff -u /dev/null pkgsrc/graphics/drawpile/patches/patch-src_desktop_bundled_QtColorWidgets_color__wheel.cpp:1.1
--- /dev/null   Tue Jul 20 10:54:18 2021
+++ pkgsrc/graphics/drawpile/patches/patch-src_desktop_bundled_QtColorWidgets_color__wheel.cpp  Tue Jul 20 10:54:18 2021
@@ -0,0 +1,14 @@
+$NetBSD: patch-src_desktop_bundled_QtColorWidgets_color__wheel.cpp,v 1.1 2021/07/20 10:54:18 nia Exp $
+
+Fix building with latest Qt.
+
+--- src/desktop/bundled/QtColorWidgets/color_wheel.cpp.orig    2020-02-16 16:35:42.000000000 +0000
++++ src/desktop/bundled/QtColorWidgets/color_wheel.cpp
+@@ -25,6 +25,7 @@
+ #include <QtMath>
+ #include <QMouseEvent>
+ #include <QPainter>
++#include <QPainterPath>
+ #include <QLineF>
+ #include <QDragEnterEvent>
+ #include <QMimeData>
Index: pkgsrc/graphics/drawpile/patches/patch-src_desktop_widgets_popupmessage.h
diff -u /dev/null pkgsrc/graphics/drawpile/patches/patch-src_desktop_widgets_popupmessage.h:1.1
--- /dev/null   Tue Jul 20 10:54:18 2021
+++ pkgsrc/graphics/drawpile/patches/patch-src_desktop_widgets_popupmessage.h   Tue Jul 20 10:54:18 2021
@@ -0,0 +1,14 @@
+$NetBSD: patch-src_desktop_widgets_popupmessage.h,v 1.1 2021/07/20 10:54:18 nia Exp $
+
+Fix building with latest Qt.
+
+--- src/desktop/widgets/popupmessage.h.orig    2020-02-16 16:35:42.000000000 +0000
++++ src/desktop/widgets/popupmessage.h
+@@ -20,6 +20,7 @@
+ #define POPUPMESSAGE_H
+ 
+ #include <QWidget>
++#include <QPainterPath>
+ 
+ class QTextDocument;
+ class QTimer;
Index: pkgsrc/graphics/drawpile/patches/patch-src_thinsrv_webadmin_qmhttp.cpp
diff -u /dev/null pkgsrc/graphics/drawpile/patches/patch-src_thinsrv_webadmin_qmhttp.cpp:1.1
--- /dev/null   Tue Jul 20 10:54:18 2021
+++ pkgsrc/graphics/drawpile/patches/patch-src_thinsrv_webadmin_qmhttp.cpp      Tue Jul 20 10:54:18 2021
@@ -0,0 +1,72 @@
+$NetBSD: patch-src_thinsrv_webadmin_qmhttp.cpp,v 1.1 2021/07/20 10:54:18 nia Exp $
+
+Compatibility with libmicrohttpd-0.9.71
+
+--- src/thinsrv/webadmin/qmhttp.cpp.orig       2020-02-16 16:35:42.000000000 +0000
++++ src/thinsrv/webadmin/qmhttp.cpp
+@@ -30,6 +30,20 @@
+ 
+ #include <microhttpd.h>
+ 
++/*
++ * In version 0.9.71 of libmicrohttpd, MHD_YES and MHD_NO have been changed
++ * from being #defines to being enum values. Several callback types have also
++ * changed from returning an int to returning an MHD_Result.
++ *
++ * That's fine in C, but it actually breaks in C++ and errors out, so we have
++ * to add this compatibility shim to make things work again.
++ *
++ * https://lists.gnu.org/archive/html/libmicrohttpd/2020-06/msg00013.html
++ */
++#if MHD_VERSION < 0x00097002
++typedef int MHD_Result;
++#endif
++
+ static const char *MSG_401 = "<html><body>401 - Unauthorized</body></html>";
+ static const char *MSG_404 = "<html><body>404 - Page not found</body></html>";
+ 
+@@ -80,7 +94,7 @@ static void logMessage(MHD_Connection *c
+                       statusCode, qPrintable(clientAddress.toString()), method, url);
+ }
+ 
+-int iterate_post(void *con_cls, enum MHD_ValueKind kind, const char *key, const char *filename, const char *content_type, const char *transfer_encoding, const char *data, uint64_t off, size_t size)
++MHD_Result iterate_post(void *con_cls, enum MHD_ValueKind kind, const char *key, const char *filename, const char *content_type, const char *transfer_encoding, const char *data, uint64_t off, 
size_t size)
+ {
+       Q_UNUSED(kind);
+       Q_UNUSED(filename);
+@@ -97,7 +111,7 @@ int iterate_post(void *con_cls, enum MHD
+       return MHD_YES;
+ }
+ 
+-int assign_to_hash(void *cls, enum MHD_ValueKind kind, const char *key, const char *value)
++MHD_Result assign_to_hash(void *cls, enum MHD_ValueKind kind, const char *key, const char *value)
+ {
+       Q_UNUSED(kind);
+       QHash<QString,QString> *hash = reinterpret_cast<QHash<QString,QString>*>(cls);
+@@ -117,7 +131,7 @@ void request_completed(void *cls, struct
+       *con_cls = nullptr;
+ }
+ 
+-int request_handler(void *cls, MHD_Connection *connection, const char *url, const char *methodstr, const char *version, const char *upload_data, size_t *upload_data_size, void **con_cls)
++MHD_Result request_handler(void *cls, MHD_Connection *connection, const char *url, const char *methodstr, const char *version, const char *upload_data, size_t *upload_data_size, void **con_cls)
+ {
+       Q_UNUSED(version);
+       MicroHttpd::Private *d = reinterpret_cast<MicroHttpd::Private*>(cls);
+@@ -212,7 +226,7 @@ int request_handler(void *cls, MHD_Conne
+                                               response);
+                               }
+                               MHD_destroy_response(response);
+-                              return ret;
++                              return ret ? MHD_YES : MHD_NO;
+                       }
+               }
+ 
+@@ -277,7 +291,7 @@ int request_handler(void *cls, MHD_Conne
+       return ret;
+ }
+ 
+-int access_policy(void *cls, const struct sockaddr * addr, socklen_t addrlen)
++MHD_Result access_policy(void *cls, const struct sockaddr * addr, socklen_t addrlen)
+ {
+       Q_UNUSED(addrlen);
+       MicroHttpd::Private *d = reinterpret_cast<MicroHttpd::Private*>(cls);



Home | Main Index | Thread Index | Old Index