Christian Weisgerber <[email protected]> wrote:

> * Add -qt client (and no_qt flavor).
> 
> lib-depends-check reports some "extra" libraries for -qt.  That's
> an artifact of linking only against libcurl without explicitly
> linking libcurl's dependencies... because we don't have pkg-config
> information about curl.

The -qt subpackage is only enabled on gcc4 archs.
(It doesn't build with gcc3 and it also needs a gcc4-built Qt4.)


Index: Makefile
===================================================================
RCS file: /cvs/ports/net/transmission/Makefile,v
retrieving revision 1.58
diff -u -p -r1.58 Makefile
--- Makefile    21 Oct 2010 21:52:51 -0000      1.58
+++ Makefile    23 Oct 2010 15:45:44 -0000
@@ -2,11 +2,13 @@
 
 COMMENT-main=  lightweight BitTorrent command line and daemon client
 COMMENT-gtk=   lightweight BitTorrent client with GTK+ interface
+COMMENT-qt=    lightweight BitTorrent client with Qt interface
 
 VER=           2.11
 DISTNAME=      transmission-${VER}
 PKGNAME-main=  transmission-${VER}
 PKGNAME-gtk=   transmission-gtk-${VER}
+PKGNAME-qt=    transmission-qt-${VER}
 CATEGORIES=    net
 HOMEPAGE=      http://www.transmissionbt.com/
 
@@ -21,7 +23,7 @@ PERMIT_DISTFILES_FTP= Yes
 MASTER_SITES=  http://mirrors.m0k.org/transmission/files/
 EXTRACT_SUFX=  .tar.bz2
 
-PSEUDO_FLAVORS=        no_gtk
+PSEUDO_FLAVORS=        no_gtk no_qt
 FLAVOR?=
 
 MULTI_PACKAGES=        -main
@@ -70,6 +72,25 @@ RUN_DEPENDS-gtk=:${PKGNAME-main}:net/tra
                ::devel/desktop-file-utils \
                :gamin-*:sysutils/gamin,-server,no_python
 USE_X11=       Yes
+.endif
+
+.include <bsd.own.mk>
+
+.if !${FLAVOR:L:Mno_qt} && ${COMPILER_VERSION:L:Mgcc4*}
+MULTI_PACKAGES+=-qt
+LIB_DEPENDS+=  ::x11/qt4
+WANTLIB-qt=    ${WANTLIB} QtCore QtDBus QtGui QtNetwork QtXml \
+               dbus-1 expat fontconfig freetype stdc++
+RUN_DEPENDS-qt=        :${PKGNAME-main}:net/transmission,-main
+USE_X11=       Yes
+
+post-build:
+       cd ${WRKSRC}/qt; qmake4 qtr.pro; make ${MAKE_FLAGS}
+
+post-install:
+       cd ${WRKSRC}/qt; make ${MAKE_FLAGS} install INSTALL_ROOT=${PREFIX} \
+           INSTALL_FILE="${INSTALL_DATA}" \
+           INSTALL_PROGRAM="${INSTALL_PROGRAM}"
 .endif
 
 .include <bsd.port.mk>
Index: patches/patch-qt_qtr_pro
===================================================================
RCS file: patches/patch-qt_qtr_pro
diff -N patches/patch-qt_qtr_pro
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-qt_qtr_pro    23 Oct 2010 15:45:44 -0000
@@ -0,0 +1,21 @@
+$OpenBSD$
+--- qt/qtr.pro.orig    Sun Oct 17 02:14:40 2010
++++ qt/qtr.pro Mon Oct 18 20:10:19 2010
+@@ -8,7 +8,7 @@ target.path = /bin
+ INSTALLS += target
+ 
+ unix: INSTALLS += man
+-man.path = /share/man/man1/
++man.path = /man/man1/
+ man.files = transmission-qt.1
+ 
+ CONFIG += qt qdbus thread debug link_pkgconfig
+@@ -21,7 +21,7 @@ LIBS += $${TRANSMISSION_TOP}/libtransmission/libtransm
+ LIBS += $${TRANSMISSION_TOP}/third-party/dht/libdht.a
+ LIBS += $${TRANSMISSION_TOP}/third-party/miniupnp/libminiupnp.a
+ LIBS += $${TRANSMISSION_TOP}/third-party/libnatpmp/libnatpmp.a
+-unix: LIBS += -levent
++unix: LIBS += -leventextra -levent
+ win32:DEFINES += QT_DBUS
+ win32:LIBS += -levent -lws2_32 -lintl
+ win32:LIBS += -lidn -liconv -lwldap32 -liphlpapi
Index: pkg/DESCR-qt
===================================================================
RCS file: pkg/DESCR-qt
diff -N pkg/DESCR-qt
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/DESCR-qt        23 Oct 2010 15:45:44 -0000
@@ -0,0 +1,5 @@
+Transmission is a free, lightweight BitTorrent client.  It features
+a simple, intuitive interface on top on an efficient, cross-platform
+back-end.
+
+This is the Qt graphical interface client.
Index: pkg/PLIST-qt
===================================================================
RCS file: pkg/PLIST-qt
diff -N pkg/PLIST-qt
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/PLIST-qt        23 Oct 2010 15:45:44 -0000
@@ -0,0 +1,3 @@
+...@comment $OpenBSD$
+...@bin bin/transmission-qt
+...@man man/man1/transmission-qt.1
-- 
Christian "naddy" Weisgerber                          [email protected]

Reply via email to