For a Qt5-based application that I'm testing on FreeBSD (Tupi, for cartoon-ish 
2D animation), I needed a Qt5-based archivers/quazip. How are we (or are we at 
all) going to support libraries like that that can build against both Qt4 and 
Qt5?

Actually modifying the existing port to build against Qt5 was straightforward. 
The resulting Makefile is attached. The only change is the USE_QT4 line morphs 
into USE_QT5 and the names of components change. 

However, during the build I got linking errors in the qztest directory; the 
tail end of the linking command looked like this:

 -L/usr/local/lib\ -L/usr/local/lib -L -L/usr/local/lib -lQt5Test -lQt5Core

That is going to add two directories to the link search path, neither of which 
is sensible; I modified the ports-patch to qztest.pro to produce a slightly 
different sequence of -Ls, changed file also attached. After that the port 
builds fine against Qt5 (which then raises the question: what if I also wanted 
a Qt4 installation and quazip on this machine?).

[ade]
# Created by: Nicola Vitale <ni...@freebsd.org>
# $FreeBSD: head/archivers/quazip/Makefile 348485 2014-03-17 15:54:22Z swills $

PORTNAME=	quazip
PORTVERSION=	0.6.2
CATEGORIES=	archivers
MASTER_SITES=	SF

MAINTAINER=	ni...@freebsd.org
COMMENT=	Qt/C++ wrapper for ZIP/UNZIP package

LICENSE=	LGPL21

USES=		qmake
USE_LDCONFIG=	yes
USE_QT5=	core buildtools testlib

.include <bsd.port.mk>
--- ./qztest/qztest.pro.orig	2014-02-09 12:36:57.000000000 +0100
+++ ./qztest/qztest.pro	2014-03-30 05:01:44.000000000 +0200
@@ -39,7 +39,10 @@
 
 win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../quazip/release/ -lquazip
 else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../quazip/debug/ -lquazip
-else:unix: LIBS += -L$$OUT_PWD/../quazip/ -lquazip
+else:unix: LIBS += -L$$OUT_PWD/../quazip/ -lquazip -L$$QMAKE_LIBDIR_QT $$join(QMAKE_LIBDIR, " -L", "")
+
+QMAKE_LIBDIR=
+QMAKE_LIBDIR_QT=
 
 INCLUDEPATH += $$PWD/..
 DEPENDPATH += $$PWD/../quazip
_______________________________________________
kde-freebsd mailing list
kde-freebsd@kde.org
https://mail.kde.org/mailman/listinfo/kde-freebsd
See also http://freebsd.kde.org/ for latest information

Reply via email to