2013/8/13 Christian Weisgerber <na...@mips.inka.de>:
> Vadim Zhukov <persg...@gmail.com> wrote:
>
>> Primary goal was to fix Qt4 items in WANTLIB. Those ought to be
>> lib/qt4/QtFoo, not just QtFoo. I'm totally fine with trusting you and
>> keeping extra WANTLIB.
>
> Hmm, but MODQT4_WANTLIB only contains lib/qt4/QtCore.

Yes, and what's wrong with that? The reasoning behind lib/qt4/QtFoo is
that you need to distinct, when doing actual packaging, between
libQtCore.so.X.Y from Qt3, Qt4 and, likely, Qt5. Same applies to other
cases (KDE3 and KDE4 stuff, for example).

>> x11/qt4 to MODULES only if BUILD_PACKAGES:M-qt. And the x11/qt4 MODULE
>> is preferred over simple LDEP because this module sets up some build
>> environment, too.
>
> ... which isn't passed on to post-build.

Oops. It should be passed in that case, of course. New day, new
knowledge... Fixed, thanks.

> Well, MAKE_FLAGS happens to
> make it through, but what for? It's not clear to me that MODULES+=x11/qt4
> is a gain when we don't need most of its contents and then have to
> to work around its WANTLIB and LIB_DEPENDS additions.

My point is to always use the (x11/qt4) MODULE unless it breaks
things. Or we likely to have problems when Qt5 finally arrives in
ports, because many software could be build with both Qt4 and Qt5.
The situation be the same then to what we have in JDK land already.
qt4.port.mk forces using Qt4, and Qt4 version we have in ports. It
makes builds more reliable - not a need for now but a need for
future. Unless someone will step in and port all of the Qt4-based
software in ports to Qt5. :)

Regarding working around WANTLIB and LIB_DEPENDS:

>> >> -RUN_DEPENDS-gtk=${PKGNAME-main}:net/transmission,-main \
>> >> +RUN_DEPENDS-gtk=${BUILD_PKGPATH} \
>> >
>> > No, we don't want the PSEUDO_FLAVORS to make their way into the
>> > dependency.
>>
>> And I do not see PSEUDO_FLAVORS landing in packing list.
>> This is with BUILD_PKGPATH being used:
>>
>> $ FLAVOR=no_gtk SUBPACKAGE=-qt make print-plist | fgrep pkgpath
>> @comment pkgpath=net/transmission,-qt cdrom=yes ftp=yes
>
> $ FLAVOR=no_gtk make show=BUILD_PKGPATH
> net/transmission,no_gtk

Yes. And what? PSEUDO_FLAVORS do not do their way to packaging list
(as I showed above), thus inter-package dependencies will be the
same. Where is the problem? And, if is there, should we change all
the (BUILD|BASE)_PKGPATH entries in the tree back to hardcoded
ones?

> And there was a reason I didn't use BASE_PKGPATH, too.  *Thinks*
> Oh, right.  The -gtk and -qt subpackages should not depend on a
> particular REVISION of -main.

Sorry, I got one point, but didn't get another:

1) Yep, I missed the version narrowing. My bad. Fixed.

2) What does REVISION makes with BUILD_PKGPATH/BASE_PKGPATH?

--
  WBR,
  Vadim Zhukov


Index: Makefile
===================================================================
RCS file: /cvs/ports/net/transmission/Makefile,v
retrieving revision 1.89
diff -u -p -r1.89 Makefile
--- Makefile    9 Aug 2013 19:13:08 -0000       1.89
+++ Makefile    12 Aug 2013 22:30:07 -0000
@@ -4,7 +4,7 @@ COMMENT-main=   BitTorrent command line an
 COMMENT-gtk=   BitTorrent client with GTK+ interface
 COMMENT-qt=    BitTorrent client with Qt interface
 
-VER=           2.81
+VER=           2.82
 DISTNAME=      transmission-${VER}
 PKGNAME-main=  transmission-${VER}
 PKGNAME-gtk=   transmission-gtk-${VER}
@@ -27,13 +27,16 @@ ONLY_FOR_ARCHS-qt=${GCC4_ARCHS}
 PSEUDO_FLAVORS=        no_gtk no_qt
 FLAVOR?=
 
+.include <bsd.port.arch.mk>
+
 # Reminder:
 # MODULES adds to WANTLIB and LIB_DEPENDS
 # WANTLIB-main and LIB_DEPENDS-main default to WANTLIB and LIB_DEPENDS
 
-WANTLIB=       c crypto curl event_core event_extra idn m miniupnpc \
-               natpmp pthread ssl z
-WANTLIB-gtk=   ${WANTLIB} ICE SM X11 Xcomposite Xcursor Xdamage \
+WANTLIB-common=        c crypto curl event_core event_extra idn m miniupnpc \
+               natpmp pthread ssl z ${MODGETTEXT_WANTLIB}
+WANTLIB-main=  ${WANTLIB-common}
+WANTLIB-gtk=   ${WANTLIB-common} ICE SM X11 Xcomposite Xcursor Xdamage \
                Xext Xfixes Xi Xinerama Xrandr Xrender \
                atk-1.0 atk-bridge-2.0 atspi cairo cairo-gobject \
                dbus-1 expat ffi fontconfig freetype \
@@ -42,25 +45,31 @@ WANTLIB-gtk=        ${WANTLIB} ICE SM X11 Xcomp
                harfbuzz pango-1.0 pangoft2-1.0 \
                pangocairo-1.0 pixman-1 png pcre pthread-stubs xcb \
                xcb-render xcb-shm
-WANTLIB-qt=    ${WANTLIB} ICE SM QtCore QtDBus QtGui QtNetwork QtXml \
-               X11 Xext Xi Xinerama Xrender \
-               expat fontconfig freetype stdc++
+WANTLIB-qt=    ${WANTLIB-common} ${MODQT_WANTLIB} \
+               lib/qt4/QtDBus lib/qt4/QtGui lib/qt4/QtNetwork lib/qt4/QtXml \
+               ICE SM X11 Xext Xi Xinerama Xrender fontconfig freetype \
+               stdc++
 
 MODULES=       devel/gettext textproc/intltool
+.if ${BUILD_PACKAGES:M-qt}
+MODULES+=      x11/qt4
+.endif
 
-LIB_DEPENDS=   devel/libevent2 \
+LDEP-common=   ${MODGETTEXT_LIB_DEPENDS} \
+               devel/libevent2 \
                net/curl \
                net/miniupnp/libnatpmp \
                net/miniupnp/miniupnpc
-LIB_DEPENDS-gtk=${LIB_DEPENDS} \
+LIB_DEPENDS-main=${LDEP-common}
+LIB_DEPENDS-gtk=${LDEP-common} \
                x11/gtk+3
-LIB_DEPENDS-qt=        ${LIB_DEPENDS} \
-               x11/qt4
+LIB_DEPENDS-qt=        ${LDEP-common} \
+               ${MODQT_LIB_DEPENDS}
 
-RUN_DEPENDS-gtk=${PKGNAME-main}:net/transmission,-main \
+RUN_DEPENDS-gtk=${PKGNAME-main}:${BUILD_PKGPATH} \
                devel/desktop-file-utils \
                x11/gtk+2,-guic
-RUN_DEPENDS-qt=        ${PKGNAME-main}:net/transmission,-main \
+RUN_DEPENDS-qt=        ${PKGNAME-main}:${BUILD_PKGPATH} \
                devel/desktop-file-utils
 
 USE_GMAKE=     Yes
@@ -78,8 +87,6 @@ CONFIGURE_ENV=        CPPFLAGS="-I${WRKSRC}/thi
 
 QMAKE_ARGS=    QMAKE_CXX="${CXX}" \
                QMAKE_CXXFLAGS="${CXXFLAGS}"
-
-.include <bsd.port.arch.mk>
 
 .if !${BUILD_PACKAGES:M-gtk}
 CONFIGURE_ARGS+=--without-gtk
Index: distinfo
===================================================================
RCS file: /cvs/ports/net/transmission/distinfo,v
retrieving revision 1.46
diff -u -p -r1.46 distinfo
--- distinfo    9 Aug 2013 19:13:08 -0000       1.46
+++ distinfo    12 Aug 2013 22:30:07 -0000
@@ -1,2 +1,2 @@
-SHA256 (transmission-2.81.tar.xz) = 
u7Vx9YJUZqpF5u9K0oYXYTWhqcAjT/6jUn69gAHMVqs=
-SIZE (transmission-2.81.tar.xz) = 3167816
+SHA256 (transmission-2.82.tar.xz) = 
OZZlEIffZ6hfHhtKkrG1GN3v3YTGVLjfb7zLC5HwNSI=
+SIZE (transmission-2.82.tar.xz) = 3172024
Index: patches/patch-libtransmission_platform-quota_c
===================================================================
RCS file: 
/cvs/ports/net/transmission/patches/patch-libtransmission_platform-quota_c,v
retrieving revision 1.1
diff -u -p -r1.1 patch-libtransmission_platform-quota_c
--- patches/patch-libtransmission_platform-quota_c      9 Aug 2013 19:13:08 
-0000       1.1
+++ patches/patch-libtransmission_platform-quota_c      12 Aug 2013 22:30:07 
-0000
@@ -1,30 +0,0 @@
-$OpenBSD: patch-libtransmission_platform-quota_c,v 1.1 2013/08/09 19:13:08 
naddy Exp $
---- libtransmission/platform-quota.c.orig      Tue Jul 23 13:37:31 2013
-+++ libtransmission/platform-quota.c   Tue Jul 23 13:39:38 2013
-@@ -18,7 +18,7 @@
- 
- #ifndef WIN32
-  #include <sys/types.h> /* types needed by quota.h */
-- #ifdef __FreeBSD__
-+ #if defined(__FreeBSD__) || defined(__OpenBSD__)
-   #include <ufs/ufs/quota.h> /* quotactl() */
-  #elif defined (__sun)
-   #include <sys/fs/ufs_quota.h> /* quotactl */
-@@ -203,7 +203,7 @@ getquota (const char * device)
-   int64_t freespace;
-   int64_t spaceused;
- 
--#if defined(__FreeBSD__) || defined(SYS_DARWIN)
-+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(SYS_DARWIN)
-   if (quotactl(device, QCMD(Q_GETQUOTA, USRQUOTA), getuid(), (caddr_t) &dq) 
== 0)
-     {
- #elif defined(__sun)
-@@ -235,7 +235,7 @@ getquota (const char * device)
-           /* No quota enabled for this user */
-           return -1;
-         }
--#if defined(__FreeBSD__)
-+#if defined(__FreeBSD__) || defined(__OpenBSD__)
-       spaceused = (int64_t) dq.dqb_curblocks >> 1;
- #elif defined(SYS_DARWIN)
-       spaceused = (int64_t) dq.dqb_curbytes;
Index: patches/patch-qt_favicon_cc
===================================================================
RCS file: patches/patch-qt_favicon_cc
diff -N patches/patch-qt_favicon_cc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-qt_favicon_cc 12 Aug 2013 22:30:07 -0000
@@ -0,0 +1,30 @@
+$OpenBSD$
+Make it compile with Qt4, too.
+--- qt/favicon.cc.orig Fri Aug  9 06:45:47 2013
++++ qt/favicon.cc      Sun Aug 11 03:21:47 2013
+@@ -14,7 +14,12 @@
+ #include <QNetworkAccessManager>
+ #include <QNetworkReply>
+ #include <QNetworkRequest>
+-#include <QStandardPaths>
++
++#if QT_VERSION >= 0x050000
++# include <QStandardPaths>
++#else
++# include <QDesktopServices>
++#endif
+ 
+ #include "favicon.h"
+ 
+@@ -40,7 +45,11 @@ Favicons :: ~Favicons( )
+ QString
+ Favicons :: getCacheDir( )
+ {
++#if QT_VERSION >= 0x050000
+     const QString base = QStandardPaths::writableLocation 
(QStandardPaths::CacheLocation);
++#else
++    const QString base = QDesktopServices::storageLocation( 
QDesktopServices::CacheLocation );
++#endif
+     return QDir( base ).absoluteFilePath( "favicons" );
+ }
+ 
Index: patches/patch-qt_file-tree_cc
===================================================================
RCS file: patches/patch-qt_file-tree_cc
diff -N patches/patch-qt_file-tree_cc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-qt_file-tree_cc       12 Aug 2013 22:30:07 -0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+Make it compile with Qt4, too.
+--- qt/file-tree.cc.orig       Fri Aug  9 06:45:54 2013
++++ qt/file-tree.cc    Sun Aug 11 03:22:58 2013
+@@ -885,7 +885,11 @@ FileTreeView :: FileTreeView (QWidget * parent, bool i
+   for (int i=0; i<NUM_COLUMNS; ++i)
+     {
+       setColumnHidden (i, (i<FIRST_VISIBLE_COLUMN) || 
(LAST_VISIBLE_COLUMN<i));
++#if QT_VERSION >= 0x050000
+       header()->setSectionResizeMode(i, QHeaderView::Interactive);
++#else
++      header()->setResizeMode(i, QHeaderView::Interactive);
++#endif
+     }
+ 
+   connect (this, SIGNAL(clicked(const QModelIndex&)),
Index: patches/patch-qt_qtr_pro
===================================================================
RCS file: /cvs/ports/net/transmission/patches/patch-qt_qtr_pro,v
retrieving revision 1.4
diff -u -p -r1.4 patch-qt_qtr_pro
--- patches/patch-qt_qtr_pro    7 Apr 2012 10:55:04 -0000       1.4
+++ patches/patch-qt_qtr_pro    12 Aug 2013 22:30:07 -0000
@@ -1,6 +1,6 @@
 $OpenBSD: patch-qt_qtr_pro,v 1.4 2012/04/07 10:55:04 naddy Exp $
---- qt/qtr.pro.orig    Thu Mar 29 17:30:57 2012
-+++ qt/qtr.pro Thu Mar 29 17:31:22 2012
+--- qt/qtr.pro.orig    Fri Aug  9 06:45:47 2013
++++ qt/qtr.pro Sun Aug 11 02:45:35 2013
 @@ -8,7 +8,7 @@ target.path = /bin
  INSTALLS += target
  
@@ -9,7 +9,7 @@ $OpenBSD: patch-qt_qtr_pro,v 1.4 2012/04
 +man.path = /man/man1/
  man.files = transmission-qt.1
  
- CONFIG += qt qdbus thread debug link_pkgconfig
+ CONFIG += qt thread debug link_pkgconfig
 @@ -26,7 +26,7 @@ LIBS += $${LIBUTP_LIBS}
  LIBS += $${TRANSMISSION_TOP}/third-party/dht/libdht.a
  LIBS += $${LIBUPNP_LIBS}

Reply via email to