mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04:00
print/qpdfview: add flavors set maintainership
Add qt5 and qt6 flavors. While here, submitter takes maintainership. Already maintainer of several ports. PR: 279882 Reported by: mew14930xvi@inbox.lv
This commit is contained in:
parent
9f755ee624
commit
bd58b57d81
4 changed files with 36 additions and 44 deletions
|
@ -1,30 +1,42 @@
|
|||
PORTNAME= qpdfview
|
||||
DISTVERSION= 0.5.0
|
||||
PORTREVISION= 4
|
||||
PORTREVISION= 5
|
||||
CATEGORIES= print
|
||||
MASTER_SITES= https://launchpad.net/${PORTNAME}/trunk/${DISTVERSION}/+download/
|
||||
DISTNAME= ${PORTNAME}-0.5
|
||||
DISTNAME= ${PORTNAME}-${DISTVERSION:S/.0$//}
|
||||
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
MAINTAINER= mew14930xvi@inbox.lv
|
||||
COMMENT= Tabbed DjVu/PDF/PS document viewer
|
||||
WWW= https://launchpad.net/qpdfview
|
||||
|
||||
LICENSE= GPLv2+
|
||||
LICENSE_FILE= ${WRKSRC}/COPYING
|
||||
|
||||
LIB_DEPENDS= libpoppler-qt5.so:graphics/poppler-qt5
|
||||
LIB_DEPENDS= libpoppler-${FLAVOR}.so:graphics/poppler-${FLAVOR}
|
||||
|
||||
USES= compiler:c++17-lang desktop-file-utils gl pkgconfig qmake qt:5
|
||||
USE_GL= gl
|
||||
FLAVORS= qt6 qt5
|
||||
FLAVOR?= qt6
|
||||
|
||||
USES= desktop-file-utils gl pkgconfig qmake
|
||||
USE_LDCONFIG= yes
|
||||
USE_QT= concurrent core dbus gui imageformats linguisttools \
|
||||
printsupport sql sql-sqlite3 svg widgets xml buildtools:build
|
||||
|
||||
.if ${FLAVOR} == "qt5"
|
||||
PKGNAMESUFFIX= -qt5
|
||||
USES+= compiler:c++17-lang qt:5
|
||||
USE_GL= gl
|
||||
USE_QT= concurrent core dbus gui linguisttools printsupport \
|
||||
sql svg widgets xml buildtools:build
|
||||
CONFLICTS_INSTALL= ${PORTNAME}
|
||||
.else
|
||||
USES+= compiler:c++11-lang qt:6
|
||||
USE_GL= opengl
|
||||
USE_QT= base svg tools:build
|
||||
CONFLICTS_INSTALL= ${PORTNAME}-qt5
|
||||
.endif
|
||||
|
||||
QMAKE_SOURCE_PATH= ${PORTNAME}.pro
|
||||
|
||||
DATADIR= ${PREFIX}/share/${PORTNAME}
|
||||
|
||||
OPTIONS_DEFINE= CUPS DJVU PS
|
||||
OPTIONS_DEFINE= CUPS DJVU PS SYNCTEX
|
||||
OPTIONS_DEFAULT= CUPS DJVU PS
|
||||
OPTIONS_SUB= yes
|
||||
|
||||
|
@ -34,14 +46,22 @@ CUPS_QMAKE_OFF= "CONFIG+=without_cups"
|
|||
DJVU_LIB_DEPENDS= libdjvulibre.so:graphics/djvulibre
|
||||
DJVU_QMAKE_OFF= "CONFIG+=without_djvu"
|
||||
|
||||
PS_LIB_DEPENDS= libspectre.so:print/libspectre
|
||||
PS_QMAKE_OFF= "CONFIG+=without_ps"
|
||||
PS_LIB_DEPENDS= libspectre.so:print/libspectre
|
||||
PS_QMAKE_OFF= "CONFIG+=without_ps"
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
SYNCTEX_DESC= SyncTeX support
|
||||
SYNCTEX_LIB_DEPENDS= libsynctex.so:devel/tex-synctex
|
||||
SYNCTEX_QMAKE_OFF= "CONFIG+=without_synctex"
|
||||
|
||||
post-patch:
|
||||
.if ${FLAVOR} == "qt5"
|
||||
${REINPLACE_CMD} -e '/CONFIG/s/c\+\+11/c++17/' \
|
||||
${WRKSRC}/${PORTNAME}.pri
|
||||
.endif
|
||||
${REINPLACE_CMD} -e 's|/usr|${PREFIX}|g' \
|
||||
${WRKSRC}/${PORTNAME}.pri
|
||||
|
||||
pre-configure:
|
||||
${REINPLACE_CMD} -e 's#/usr#${PREFIX}#g' \
|
||||
${WRKSRC}/${PORTNAME}.pri
|
||||
cd ${WRKSRC} && ${LRELEASE} ${PORTNAME}.pro
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
--- qpdfview.pri.orig 2024-01-02 16:01:53 UTC
|
||||
+++ qpdfview.pri
|
||||
@@ -12,4 +12,4 @@ os2:include(qpdfview_os2.pri)
|
||||
win32:include(qpdfview_win32.pri)
|
||||
os2:include(qpdfview_os2.pri)
|
||||
|
||||
-CONFIG += c++11
|
||||
+CONFIG += c++17
|
|
@ -1,10 +0,0 @@
|
|||
--- sources/djvumodel.cpp.orig 2020-05-21 10:55:32 UTC
|
||||
+++ sources/djvumodel.cpp
|
||||
@@ -29,6 +29,7 @@ along with qpdfview. If not, see <http://www.gnu.org/
|
||||
#include <cstdio>
|
||||
|
||||
#include <QFile>
|
||||
+#include <QPainterPath>
|
||||
#include <qmath.h>
|
||||
|
||||
#if defined(Q_OS_WIN) && defined(DJVU_STATIC)
|
|
@ -1,10 +0,0 @@
|
|||
--- sources/model.h.orig 2020-05-21 10:55:32 UTC
|
||||
+++ sources/model.h
|
||||
@@ -27,6 +27,7 @@ along with qpdfview. If not, see <http://www.gnu.org/
|
||||
#include <QtPlugin>
|
||||
#include <QWidget>
|
||||
#include <QVector>
|
||||
+#include <QPainterPath>
|
||||
|
||||
class QAbstractItemModel;
|
||||
class QColor;
|
Loading…
Add table
Reference in a new issue