pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/x11/qt5-qtbase x11/qt5-qtbase: Fix build on FreeBSD an...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/704e130d43bc
branches:  trunk
changeset: 355543:704e130d43bc
user:      marino <marino%pkgsrc.org@localhost>
date:      Sun Dec 04 21:46:54 2016 +0000

description:
x11/qt5-qtbase: Fix build on FreeBSD and DragonFly

1. DragonFly needs -lexecinfo LDFLAG
2. Qlockfile is unsupported on DF, allow to fall through
3. QStorageInfo only worked for NetBSD.  Take patch from historical
   ports to fix FreeBSD, DragonFly, and OpenBSD.  (It's been fixed
   upstread for QT5 5.6)

diffstat:

 x11/qt5-qtbase/Makefile                                           |   3 +-
 x11/qt5-qtbase/distinfo                                           |   6 +-
 x11/qt5-qtbase/patches/patch-src_corelib_io_qlockfile__unix.cpp   |  11 +++-
 x11/qt5-qtbase/patches/patch-src_corelib_io_qstorageinfo_unix.cpp |  21 +++++++++-
 4 files changed, 31 insertions(+), 10 deletions(-)

diffs (111 lines):

diff -r 78ac610b01b9 -r 704e130d43bc x11/qt5-qtbase/Makefile
--- a/x11/qt5-qtbase/Makefile   Sun Dec 04 21:29:33 2016 +0000
+++ b/x11/qt5-qtbase/Makefile   Sun Dec 04 21:46:54 2016 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.38 2016/12/04 05:17:15 ryoon Exp $
+# $NetBSD: Makefile,v 1.39 2016/12/04 21:46:54 marino Exp $
 
 DISTNAME=      qtbase-opensource-src-${QTVERSION}
 PKGNAME=       qt5-qtbase-${QTVERSION}
@@ -84,6 +84,7 @@
 SYS_LIBS=              -lbind -ldb -ldl
 .elif ${OPSYS} == "DragonFly"
 CONFIGURE_ARGS+=       -platform freebsd-g++
+LDFLAGS+=              -lexecinfo
 .elif ${OPSYS} == "Darwin"
 CONFIGURE_ARGS+=       -platform macx-clang
 CONFIGURE_ARGS+=       -no-framework
diff -r 78ac610b01b9 -r 704e130d43bc x11/qt5-qtbase/distinfo
--- a/x11/qt5-qtbase/distinfo   Sun Dec 04 21:29:33 2016 +0000
+++ b/x11/qt5-qtbase/distinfo   Sun Dec 04 21:46:54 2016 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.30 2016/03/14 06:12:17 dbj Exp $
+$NetBSD: distinfo,v 1.31 2016/12/04 21:46:54 marino Exp $
 
 SHA1 (qtbase-opensource-src-5.5.1.tar.xz) = 0b651543fa013ae151b7a11f0d0dee092050aa3f
 RMD160 (qtbase-opensource-src-5.5.1.tar.xz) = ce4bccd0703aaf8d904fbecd1f334ef13d698a44
@@ -20,9 +20,9 @@
 SHA1 (patch-src_corelib_codecs_qiconvcodec.cpp) = c206e4bea1a25b9c8dc301b0cc7a66fd1b85d101
 SHA1 (patch-src_corelib_global_qsystemdetection.h) = 9bdf20f66818ca1dd2a825a749109ad5fbcb2180
 SHA1 (patch-src_corelib_io_io.pri) = 9a59b621441291f388860b523f80b59730632328
-SHA1 (patch-src_corelib_io_qlockfile__unix.cpp) = 62274f5a0c114ef86460218b4de303901ab7d0e6
+SHA1 (patch-src_corelib_io_qlockfile__unix.cpp) = f07812f0867bd04dfdea736847a668843a5fe646
 SHA1 (patch-src_corelib_io_qstandardpaths_unix.cpp) = de4b6c6be89524763e40698bcf5e8f413abdb938
-SHA1 (patch-src_corelib_io_qstorageinfo_unix.cpp) = 41852cf146138df3fd0f26d124a6f9a338d472a0
+SHA1 (patch-src_corelib_io_qstorageinfo_unix.cpp) = 688de65bf3364cb8c982a7f82c9b67f5ecbebd10
 SHA1 (patch-src_network_kernel_qhostinfo__unix.cpp) = 0335273353daa7c980ccb4febb6eed11b452e50d
 SHA1 (patch-src_openglextensions_openglextensions.pro) = e79effc1433ddda744b79d7e1f47764fee406580
 SHA1 (patch-src_platformsupport_devicediscovery_devicediscovery.pri) = 2cd24768b41c813d0aee0943f97f913308794611
diff -r 78ac610b01b9 -r 704e130d43bc x11/qt5-qtbase/patches/patch-src_corelib_io_qlockfile__unix.cpp
--- a/x11/qt5-qtbase/patches/patch-src_corelib_io_qlockfile__unix.cpp   Sun Dec 04 21:29:33 2016 +0000
+++ b/x11/qt5-qtbase/patches/patch-src_corelib_io_qlockfile__unix.cpp   Sun Dec 04 21:46:54 2016 +0000
@@ -1,8 +1,9 @@
-$NetBSD: patch-src_corelib_io_qlockfile__unix.cpp,v 1.1 2015/10/26 19:03:59 adam Exp $
+$NetBSD: patch-src_corelib_io_qlockfile__unix.cpp,v 1.2 2016/12/04 21:46:54 marino Exp $
 
 Add support for NetBSD and OpenBSD.
+Enable fallback to unsupported for DragonFly
 
---- src/corelib/io/qlockfile_unix.cpp.orig     2015-10-25 12:40:42.000000000 +0000
+--- src/corelib/io/qlockfile_unix.cpp.orig     2015-10-13 04:35:31 UTC
 +++ src/corelib/io/qlockfile_unix.cpp
 @@ -54,6 +54,10 @@
  #elif defined(Q_OS_LINUX)
@@ -15,10 +16,11 @@
  #elif defined(Q_OS_BSD4) && !defined(Q_OS_IOS)
  #   include <sys/user.h>
  # if defined(__GLIBC__) && defined(__FreeBSD_kernel__)
-@@ -239,6 +243,19 @@ QString QLockFilePrivate::processNameByP
+@@ -239,7 +243,20 @@ QString QLockFilePrivate::processNameByP
      }
      buf[len] = 0;
      return QFileInfo(QFile::decodeName(buf)).fileName();
+-#elif defined(Q_OS_BSD4) && !defined(Q_OS_IOS)
 +#elif defined(Q_OS_NETBSD) || defined(Q_OS_OPENBSD)
 +    kvm_t *kd = kvm_open(NULL, NULL, NULL, KVM_NO_FILES, NULL);
 +    int cnt;
@@ -32,6 +34,7 @@
 +    }
 +    kvm_close(kd);
 +    return name;
- #elif defined(Q_OS_BSD4) && !defined(Q_OS_IOS)
++#elif defined(Q_OS_BSD4) && !defined(Q_OS_IOS) && !defined(__DragonFly__)
  # if defined(__GLIBC__) && defined(__FreeBSD_kernel__)
      int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, pid };
+     size_t len = 0;
diff -r 78ac610b01b9 -r 704e130d43bc x11/qt5-qtbase/patches/patch-src_corelib_io_qstorageinfo_unix.cpp
--- a/x11/qt5-qtbase/patches/patch-src_corelib_io_qstorageinfo_unix.cpp Sun Dec 04 21:29:33 2016 +0000
+++ b/x11/qt5-qtbase/patches/patch-src_corelib_io_qstorageinfo_unix.cpp Sun Dec 04 21:46:54 2016 +0000
@@ -1,9 +1,10 @@
-$NetBSD: patch-src_corelib_io_qstorageinfo_unix.cpp,v 1.5 2015/10/26 19:03:59 adam Exp $
+$NetBSD: patch-src_corelib_io_qstorageinfo_unix.cpp,v 1.6 2016/12/04 21:46:54 marino Exp $
 
 * make statvfs available on non-NetBSD BSD platforms
+* Use f_bsize instead of f_frsize on non-NetBSD BSD platforms
 * fix build on SunOS
 
---- src/corelib/io/qstorageinfo_unix.cpp.orig  2015-10-13 04:35:31.000000000 +0000
+--- src/corelib/io/qstorageinfo_unix.cpp.orig  2015-10-13 04:35:31 UTC
 +++ src/corelib/io/qstorageinfo_unix.cpp
 @@ -68,8 +68,8 @@
  
@@ -34,3 +35,19 @@
  #  define QT_STATFSBUF struct statvfs
  #  define QT_STATFS    ::statvfs
  #else
+@@ -506,9 +506,15 @@ void QStorageInfoPrivate::retrieveVolume
+         valid = true;
+         ready = true;
+ 
++#if defined(Q_OS_BSD4) && !defined(Q_OS_NETBSD)
++        bytesTotal = statfs_buf.f_blocks * statfs_buf.f_bsize;
++        bytesFree = statfs_buf.f_bfree * statfs_buf.f_bsize;
++        bytesAvailable = statfs_buf.f_bavail * statfs_buf.f_bsize;
++#else
+         bytesTotal = statfs_buf.f_blocks * statfs_buf.f_frsize;
+         bytesFree = statfs_buf.f_bfree * statfs_buf.f_frsize;
+         bytesAvailable = statfs_buf.f_bavail * statfs_buf.f_frsize;
++#endif
+ #if defined(Q_OS_ANDROID) || defined (Q_OS_BSD4)
+ #if defined(_STATFS_F_FLAGS)
+         readOnly = (statfs_buf.f_flags & ST_RDONLY) != 0;



Home | Main Index | Thread Index | Old Index