Date: Mon, 26 Nov 2018 21:20:37 +0000 (UTC) From: Adriaan de Groot <adridg@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r485966 - in head/misc/qbrew: . files Message-ID: <201811262120.wAQLKbjd033038@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adridg Date: Mon Nov 26 21:20:37 2018 New Revision: 485966 URL: https://svnweb.freebsd.org/changeset/ports/485966 Log: Port misc/qbrew away from Qt4 to Qt5. While at it, assume maintainership. This was discussed over email with David. Upstream is unmaintained, but it works with these minor patches. Added: head/misc/qbrew/files/patch-src_beerxmlreader.cpp (contents, props changed) head/misc/qbrew/files/patch-src_databasetool.cpp (contents, props changed) head/misc/qbrew/files/patch-src_grainmodel.cpp (contents, props changed) head/misc/qbrew/files/patch-src_hopmodel.cpp (contents, props changed) head/misc/qbrew/files/patch-src_miscmodel.cpp (contents, props changed) head/misc/qbrew/files/patch-src_qbrew.cpp (contents, props changed) head/misc/qbrew/files/patch-src_stylemodel.cpp (contents, props changed) head/misc/qbrew/files/patch-src_view.cpp (contents, props changed) Modified: head/misc/qbrew/Makefile head/misc/qbrew/files/patch-qbrew.pro Modified: head/misc/qbrew/Makefile ============================================================================== --- head/misc/qbrew/Makefile Mon Nov 26 20:29:01 2018 (r485965) +++ head/misc/qbrew/Makefile Mon Nov 26 21:20:37 2018 (r485966) @@ -3,18 +3,20 @@ PORTNAME= qbrew PORTVERSION= 0.4.1 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= misc MASTER_SITES= http://www.usermode.org/code/ -MAINTAINER= david@usermode.org +MAINTAINER= adridg@FreeBSD.org COMMENT= Homebrewer's recipe calculator -BROKEN= fails to build +LICENSE= BSD2CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE -USES= qmake qt:4 -USE_QT= moc_build uic_build rcc_build xml gui -PORTDOCS= * +USES= qmake qt:5 +USE_GL= gl +USE_QT= buildtools_build qmake_build \ + core gui printsupport widgets xml QMAKE_ARGS= CONFIG+="configure" QMAKE_ENV+= BINDIR="${PREFIX}/bin" \ @@ -22,6 +24,8 @@ QMAKE_ENV+= BINDIR="${PREFIX}/bin" \ DOCDIR="${DOCSDIR}" OPTIONS_DEFINE= DOCS + +PORTDOCS= * post-install: ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/qbrew Modified: head/misc/qbrew/files/patch-qbrew.pro ============================================================================== --- head/misc/qbrew/files/patch-qbrew.pro Mon Nov 26 20:29:01 2018 (r485965) +++ head/misc/qbrew/files/patch-qbrew.pro Mon Nov 26 21:20:37 2018 (r485966) @@ -1,10 +1,24 @@ ---- qbrew.pro.org 2008-05-25 22:35:35.000000000 -0700 -+++ qbrew.pro 2008-05-25 22:35:44.000000000 -0700 +Q_WS_* is deprecated. Rather than editing the code, just +convince ourselves that on BSD, we would still be using X11. + + https://www.kdab.com/porting-from-qt-4-to-qt-5/ + +--- qbrew.pro.orig 2008-05-26 02:21:05 UTC ++++ qbrew.pro @@ -6,6 +6,7 @@ TARGET = qbrew TEMPLATE = app CONFIG += qt warn_on -+QT += xml - ++QT += printsupport widgets xml + MOC_DIR = build OBJECTS_DIR = build +@@ -72,6 +73,8 @@ unix:!macx { + doc.path = /usr/local/share/doc/qbrew + } + ++ DEFINES += Q_WS_X11 ++ + trans.files = translations/*.qm + data.files = data/* pics/splash.png + doc.files = docs/book/*.html docs/primer/*.html README LICENSE Added: head/misc/qbrew/files/patch-src_beerxmlreader.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/misc/qbrew/files/patch-src_beerxmlreader.cpp Mon Nov 26 21:20:37 2018 (r485966) @@ -0,0 +1,13 @@ +false no longer implicitly converts via integer. Return empty recipe. + +--- src/beerxmlreader.cpp.orig 2018-11-26 11:43:40 UTC ++++ src/beerxmlreader.cpp +@@ -254,7 +254,7 @@ Recipe BeerXmlReader::readSingleRecipe() + } + if (hasError()) { + raiseError("Problem reading recipe"); +- return false; ++ return Recipe(0); + } + + // set grain use according to recipe type Added: head/misc/qbrew/files/patch-src_databasetool.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/misc/qbrew/files/patch-src_databasetool.cpp Mon Nov 26 21:20:37 2018 (r485966) @@ -0,0 +1,40 @@ +QHeaderView API change. + +--- src/databasetool.cpp.orig 2018-11-26 11:45:00 UTC ++++ src/databasetool.cpp +@@ -65,7 +65,7 @@ DatabaseTool::DatabaseTool(QWidget* pare + + grainpage.view->verticalHeader()->setDefaultSectionSize(mh); + grainpage.view->verticalHeader()->hide(); +- grainpage.view->horizontalHeader()->setClickable(true); ++ grainpage.view->horizontalHeader()->setSectionsClickable(true); + grainpage.view->horizontalHeader()->setHighlightSections(false); + + grainpage.view->setColumnWidth(GrainModel::NAME, 20*mw); +@@ -88,7 +88,7 @@ DatabaseTool::DatabaseTool(QWidget* pare + + hoppage.view->verticalHeader()->setDefaultSectionSize(mh); + hoppage.view->verticalHeader()->hide(); +- hoppage.view->horizontalHeader()->setClickable(true); ++ hoppage.view->horizontalHeader()->setSectionsClickable(true); + hoppage.view->horizontalHeader()->setHighlightSections(false); + + hoppage.view->setColumnHidden(HopModel::WEIGHT, true); +@@ -110,7 +110,7 @@ DatabaseTool::DatabaseTool(QWidget* pare + + miscpage.view->verticalHeader()->setDefaultSectionSize(mh); + miscpage.view->verticalHeader()->hide(); +- miscpage.view->horizontalHeader()->setClickable(true); ++ miscpage.view->horizontalHeader()->setSectionsClickable(true); + miscpage.view->horizontalHeader()->setHighlightSections(false); + + miscpage.view->setColumnHidden(MiscModel::QUANTITY, true); +@@ -131,7 +131,7 @@ DatabaseTool::DatabaseTool(QWidget* pare + + stylepage.view->verticalHeader()->setDefaultSectionSize(mh); + stylepage.view->verticalHeader()->hide(); +- stylepage.view->horizontalHeader()->setClickable(true); ++ stylepage.view->horizontalHeader()->setSectionsClickable(true); + stylepage.view->horizontalHeader()->setHighlightSections(false); + + stylepage.view->setColumnWidth(StyleModel::NAME, 20*mw); Added: head/misc/qbrew/files/patch-src_grainmodel.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/misc/qbrew/files/patch-src_grainmodel.cpp Mon Nov 26 21:20:37 2018 (r485966) @@ -0,0 +1,14 @@ +QAbstractItemModel API change + +--- src/grainmodel.cpp.orig 2018-11-26 11:49:13 UTC ++++ src/grainmodel.cpp +@@ -38,7 +38,8 @@ GrainModel::~GrainModel(){} + + void GrainModel::flush() + { +- reset(); ++ beginResetModel(); ++ endResetModel(); + } + + ////////////////////////////////////////////////////////////////////////////// Added: head/misc/qbrew/files/patch-src_hopmodel.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/misc/qbrew/files/patch-src_hopmodel.cpp Mon Nov 26 21:20:37 2018 (r485966) @@ -0,0 +1,14 @@ +QAbstractItemModel API change + +--- src/hopmodel.cpp.orig 2018-11-26 11:54:52 UTC ++++ src/hopmodel.cpp +@@ -34,7 +34,8 @@ HopModel::~HopModel() {} + + void HopModel::flush() + { +- reset(); ++ beginResetModel(); ++ endResetModel(); + } + + ////////////////////////////////////////////////////////////////////////////// Added: head/misc/qbrew/files/patch-src_miscmodel.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/misc/qbrew/files/patch-src_miscmodel.cpp Mon Nov 26 21:20:37 2018 (r485966) @@ -0,0 +1,14 @@ +QAbstractItemModel API change + +--- src/miscmodel.cpp.orig 2018-11-26 11:55:17 UTC ++++ src/miscmodel.cpp +@@ -34,7 +34,8 @@ MiscModel::~MiscModel() {} + + void MiscModel::flush() + { +- reset(); ++ beginResetModel(); ++ endResetModel(); + } + + ////////////////////////////////////////////////////////////////////////////// Added: head/misc/qbrew/files/patch-src_qbrew.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/misc/qbrew/files/patch-src_qbrew.cpp Mon Nov 26 21:20:37 2018 (r485966) @@ -0,0 +1,17 @@ +Missing includes, these live in QtWidgets now. + +--- src/qbrew.cpp.orig 2018-11-26 11:56:17 UTC ++++ src/qbrew.cpp +@@ -9,6 +9,12 @@ + + #include <QtGui> + ++#include <QFileDialog> ++#include <QMessageBox> ++#include <QSplashScreen> ++#include <QStyleFactory> ++#include <QWhatsThis> ++ + #include "alcoholtool.h" + #include "configure.h" + #include "data.h" Added: head/misc/qbrew/files/patch-src_stylemodel.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/misc/qbrew/files/patch-src_stylemodel.cpp Mon Nov 26 21:20:37 2018 (r485966) @@ -0,0 +1,14 @@ +QAbstractItemModel API change. + +--- src/stylemodel.cpp.orig 2018-11-26 11:58:44 UTC ++++ src/stylemodel.cpp +@@ -34,7 +34,8 @@ StyleModel::~StyleModel(){} + + void StyleModel::flush() + { +- reset(); ++ beginResetModel(); ++ endResetModel(); + } + + ////////////////////////////////////////////////////////////////////////////// Added: head/misc/qbrew/files/patch-src_view.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/misc/qbrew/files/patch-src_view.cpp Mon Nov 26 21:20:37 2018 (r485966) @@ -0,0 +1,31 @@ +QHeaderView API change + +--- src/view.cpp.orig 2018-11-26 11:59:12 UTC ++++ src/view.cpp +@@ -72,7 +72,7 @@ View::View(QWidget *parent, Recipe *reci + + grainpage.view->verticalHeader()->setDefaultSectionSize(mh); + grainpage.view->verticalHeader()->hide(); +- grainpage.view->horizontalHeader()->setClickable(true); ++ grainpage.view->horizontalHeader()->setSectionsClickable(true); + grainpage.view->horizontalHeader()->setHighlightSections(false); + + grainpage.view->setColumnWidth(GrainModel::NAME, 20*mw); +@@ -94,7 +94,7 @@ View::View(QWidget *parent, Recipe *reci + + hoppage.view->verticalHeader()->setDefaultSectionSize(mh); + hoppage.view->verticalHeader()->hide(); +- hoppage.view->horizontalHeader()->setClickable(true); ++ hoppage.view->horizontalHeader()->setSectionsClickable(true); + hoppage.view->horizontalHeader()->setHighlightSections(false); + + hoppage.view->setColumnWidth(HopModel::NAME, 20*mw); +@@ -115,7 +115,7 @@ View::View(QWidget *parent, Recipe *reci + + miscpage.view->verticalHeader()->setDefaultSectionSize(mh); + miscpage.view->verticalHeader()->hide(); +- miscpage.view->horizontalHeader()->setClickable(true); ++ miscpage.view->horizontalHeader()->setSectionsClickable(true); + miscpage.view->horizontalHeader()->setHighlightSections(false); + + miscpage.view->setColumnWidth(MiscModel::NAME, 20*mw);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201811262120.wAQLKbjd033038>