forked from mirrors/nixpkgs
qt4: maintenance update 4.8.4 -> 4.8.5
Also fixed search path for libGL. Tested building against master.
This commit is contained in:
parent
b0b5c24fa6
commit
e9f0d1013d
|
@ -137,7 +137,7 @@ stdenv.mkDerivation {
|
|||
'';
|
||||
#ToDo: @vcunat isn't sure if drirc will be found when in $out/etc/, but it doesn't seem important ATM
|
||||
|
||||
passthru = { inherit libdrm; inherit version; };
|
||||
passthru = { inherit libdrm version driverLink; };
|
||||
|
||||
meta = {
|
||||
description = "An open source implementation of OpenGL";
|
||||
|
|
|
@ -1,66 +0,0 @@
|
|||
From 20b26bdb3dd5e46b01b9a7e1ce8342074df3c89c Mon Sep 17 00:00:00 2001
|
||||
From: Thiago Macieira <thiago.macieira@intel.com>
|
||||
Date: Sat, 22 Dec 2012 08:32:12 -0800
|
||||
Subject: [PATCH] Change all shmget calls to user-only memory
|
||||
|
||||
Drop the read and write permissions for group and other users in the
|
||||
system.
|
||||
|
||||
Change-Id: I8fc753f09126651af3fb82df3049050f0b14e876
|
||||
(cherry-picked from Qt 5 commit 856f209fb63ae336bfb389a12d2a75fa886dc1c5)
|
||||
Reviewed-by: Richard J. Moore <rich@kde.org>
|
||||
---
|
||||
src/corelib/kernel/qsharedmemory_unix.cpp | 6 +++---
|
||||
src/corelib/kernel/qsystemsemaphore_unix.cpp | 4 ++--
|
||||
|
||||
diff --git a/src/corelib/kernel/qsharedmemory_unix.cpp b/src/corelib/kernel/qsharedmemory_unix.cpp
|
||||
index 20d76e3..4cf3acf 100644
|
||||
--- a/src/corelib/kernel/qsharedmemory_unix.cpp
|
||||
+++ b/src/corelib/kernel/qsharedmemory_unix.cpp
|
||||
@@ -238,7 +238,7 @@ bool QSharedMemoryPrivate::create(int size)
|
||||
}
|
||||
|
||||
// create
|
||||
- if (-1 == shmget(unix_key, size, 0666 | IPC_CREAT | IPC_EXCL)) {
|
||||
+ if (-1 == shmget(unix_key, size, 0600 | IPC_CREAT | IPC_EXCL)) {
|
||||
QString function = QLatin1String("QSharedMemory::create");
|
||||
switch (errno) {
|
||||
case EINVAL:
|
||||
@@ -293,7 +293,7 @@ bool QSharedMemoryPrivate::attach(QSharedMemory::AccessMode mode)
|
||||
{
|
||||
#ifndef QT_POSIX_IPC
|
||||
// grab the shared memory segment id
|
||||
- int id = shmget(unix_key, 0, (mode == QSharedMemory::ReadOnly ? 0444 : 0660));
|
||||
+ int id = shmget(unix_key, 0, (mode == QSharedMemory::ReadOnly ? 0400 : 0600));
|
||||
if (-1 == id) {
|
||||
setErrorString(QLatin1String("QSharedMemory::attach (shmget)"));
|
||||
return false;
|
||||
@@ -381,7 +381,7 @@ bool QSharedMemoryPrivate::detach()
|
||||
size = 0;
|
||||
|
||||
// Get the number of current attachments
|
||||
- int id = shmget(unix_key, 0, 0444);
|
||||
+ int id = shmget(unix_key, 0, 0400);
|
||||
cleanHandle();
|
||||
|
||||
struct shmid_ds shmid_ds;
|
||||
diff --git a/src/corelib/kernel/qsystemsemaphore_unix.cpp b/src/corelib/kernel/qsystemsemaphore_unix.cpp
|
||||
index fad9acc..e77456b 100644
|
||||
--- a/src/corelib/kernel/qsystemsemaphore_unix.cpp
|
||||
+++ b/src/corelib/kernel/qsystemsemaphore_unix.cpp
|
||||
@@ -153,10 +153,10 @@ key_t QSystemSemaphorePrivate::handle(QSystemSemaphore::AccessMode mode)
|
||||
}
|
||||
|
||||
// Get semaphore
|
||||
- semaphore = semget(unix_key, 1, 0666 | IPC_CREAT | IPC_EXCL);
|
||||
+ semaphore = semget(unix_key, 1, 0600 | IPC_CREAT | IPC_EXCL);
|
||||
if (-1 == semaphore) {
|
||||
if (errno == EEXIST)
|
||||
- semaphore = semget(unix_key, 1, 0666 | IPC_CREAT);
|
||||
+ semaphore = semget(unix_key, 1, 0600 | IPC_CREAT);
|
||||
if (-1 == semaphore) {
|
||||
setErrorString(QLatin1String("QSystemSemaphore::handle"));
|
||||
cleanHandle();
|
||||
--
|
||||
1.7.1
|
||||
|
|
@ -17,18 +17,23 @@
|
|||
|
||||
with stdenv.lib;
|
||||
|
||||
let v = "4.8.4"; in
|
||||
let
|
||||
v_maj = "4.8";
|
||||
v_min = "5";
|
||||
vers = "${v_maj}.${v_min}";
|
||||
in
|
||||
|
||||
# TODO:
|
||||
# * move some plugins (e.g., SQL plugins) to dedicated derivations to avoid
|
||||
# false build-time dependencies
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "qt-${v}";
|
||||
name = "qt-${vers}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://releases.qt-project.org/qt4/source/qt-everywhere-opensource-src-${v}.tar.gz";
|
||||
sha256 = "0w1j16q6glniv4hppdgcvw52w72gb2jab35ylkw0qjn5lj5y7c1k";
|
||||
url = "http://download.qt-project.org/official_releases/qt/"
|
||||
+ "${v_maj}/${vers}/qt-everywhere-opensource-src-${vers}.tar.gz";
|
||||
sha256 = "0f51dbgn1dcck8pqimls2qyf1pfmsmyknh767cvw87c3d218ywpb";
|
||||
};
|
||||
|
||||
prePatch = ''
|
||||
|
@ -39,11 +44,11 @@ stdenv.mkDerivation rec {
|
|||
|
||||
patches =
|
||||
[ ./glib-2.32.patch
|
||||
./CVE-2013-0254.patch
|
||||
(substituteAll {
|
||||
src = ./dlopen-absolute-paths.diff;
|
||||
inherit cups icu libXfixes;
|
||||
glibc = stdenv.gcc.libc;
|
||||
openglDriver = mesa.driverLink;
|
||||
})
|
||||
] ++ stdenv.lib.optional gtkStyle (substituteAll {
|
||||
src = ./dlopen-gtkstyle.diff;
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
diff -ru qt-everywhere-opensource-src-4.8.3-orig/src/corelib/tools/qlocale_icu.cpp qt-everywhere-opensource-src-4.8.3/src/corelib/tools/qlocale_icu.cpp
|
||||
--- qt-everywhere-opensource-src-4.8.3-orig/src/corelib/tools/qlocale_icu.cpp 2012-09-10 21:36:50.000000000 -0400
|
||||
+++ qt-everywhere-opensource-src-4.8.3/src/corelib/tools/qlocale_icu.cpp 2012-09-28 22:57:40.764153828 -0400
|
||||
@@ -81,7 +81,7 @@
|
||||
diff --git a/src/corelib/tools/qlocale_icu.cpp b/src/corelib/tools/qlocale_icu.cpp
|
||||
index c3e2907..2fac4e1 100644
|
||||
--- a/src/corelib/tools/qlocale_icu.cpp
|
||||
+++ b/src/corelib/tools/qlocale_icu.cpp
|
||||
@@ -81,7 +81,7 @@ bool qt_initIcu(const QString &localeString)
|
||||
if (status == NotLoaded) {
|
||||
|
||||
// resolve libicui18n
|
||||
|
@ -10,7 +11,7 @@ diff -ru qt-everywhere-opensource-src-4.8.3-orig/src/corelib/tools/qlocale_icu.c
|
|||
lib.setLoadHints(QLibrary::ImprovedSearchHeuristics);
|
||||
if (!lib.load()) {
|
||||
qWarning() << "Unable to load library icui18n" << lib.errorString();
|
||||
@@ -111,7 +111,7 @@
|
||||
@@ -111,7 +111,7 @@ bool qt_initIcu(const QString &localeString)
|
||||
}
|
||||
|
||||
// resolve libicuuc
|
||||
|
@ -19,10 +20,11 @@ diff -ru qt-everywhere-opensource-src-4.8.3-orig/src/corelib/tools/qlocale_icu.c
|
|||
ucLib.setLoadHints(QLibrary::ImprovedSearchHeuristics);
|
||||
if (!ucLib.load()) {
|
||||
qWarning() << "Unable to load library icuuc" << ucLib.errorString();
|
||||
diff -ru qt-everywhere-opensource-src-4.8.3-orig/src/gui/painting/qcups.cpp qt-everywhere-opensource-src-4.8.3/src/gui/painting/qcups.cpp
|
||||
--- qt-everywhere-opensource-src-4.8.3-orig/src/gui/painting/qcups.cpp 2012-09-10 21:36:51.000000000 -0400
|
||||
+++ qt-everywhere-opensource-src-4.8.3/src/gui/painting/qcups.cpp 2012-09-28 18:08:26.600720491 -0400
|
||||
@@ -87,7 +87,7 @@
|
||||
diff --git a/src/gui/painting/qcups.cpp b/src/gui/painting/qcups.cpp
|
||||
index 99ea43f..acdf9c9 100644
|
||||
--- a/src/gui/painting/qcups.cpp
|
||||
+++ b/src/gui/painting/qcups.cpp
|
||||
@@ -87,7 +87,7 @@ static CupsPrintFile _cupsPrintFile = 0;
|
||||
|
||||
static void resolveCups()
|
||||
{
|
||||
|
@ -31,10 +33,11 @@ diff -ru qt-everywhere-opensource-src-4.8.3-orig/src/gui/painting/qcups.cpp qt-e
|
|||
if(cupsLib.load()) {
|
||||
_cupsGetDests = (CupsGetDests) cupsLib.resolve("cupsGetDests");
|
||||
_cupsFreeDests = (CupsFreeDests) cupsLib.resolve("cupsFreeDests");
|
||||
diff -ru qt-everywhere-opensource-src-4.8.3-orig/src/gui/painting/qprinterinfo_unix.cpp qt-everywhere-opensource-src-4.8.3/src/gui/painting/qprinterinfo_unix.cpp
|
||||
--- qt-everywhere-opensource-src-4.8.3-orig/src/gui/painting/qprinterinfo_unix.cpp 2012-09-10 21:36:51.000000000 -0400
|
||||
+++ qt-everywhere-opensource-src-4.8.3/src/gui/painting/qprinterinfo_unix.cpp 2012-09-28 18:08:26.601720488 -0400
|
||||
@@ -454,7 +454,7 @@
|
||||
diff --git a/src/gui/painting/qprinterinfo_unix.cpp b/src/gui/painting/qprinterinfo_unix.cpp
|
||||
index 3d15538..f0f5351 100644
|
||||
--- a/src/gui/painting/qprinterinfo_unix.cpp
|
||||
+++ b/src/gui/painting/qprinterinfo_unix.cpp
|
||||
@@ -454,7 +454,7 @@ int qt_retrieveNisPrinters(QList<QPrinterDescription> *printers)
|
||||
char *domain;
|
||||
int err;
|
||||
|
||||
|
@ -43,22 +46,50 @@ diff -ru qt-everywhere-opensource-src-4.8.3-orig/src/gui/painting/qprinterinfo_u
|
|||
typedef int (*ypGetDefaultDomain)(char **);
|
||||
ypGetDefaultDomain _ypGetDefaultDomain = (ypGetDefaultDomain)lib.resolve("yp_get_default_domain");
|
||||
typedef int (*ypAll)(const char *, const char *, const struct ypall_callback *);
|
||||
diff -ru qt-everywhere-opensource-src-4.8.3-orig/src/network/kernel/qhostinfo_unix.cpp qt-everywhere-opensource-src-4.8.3/src/network/kernel/qhostinfo_unix.cpp
|
||||
--- qt-everywhere-opensource-src-4.8.3-orig/src/network/kernel/qhostinfo_unix.cpp 2012-09-10 21:36:51.000000000 -0400
|
||||
+++ qt-everywhere-opensource-src-4.8.3/src/network/kernel/qhostinfo_unix.cpp 2012-09-28 18:08:53.186643755 -0400
|
||||
@@ -95,7 +95,7 @@
|
||||
diff --git a/src/network/kernel/qhostinfo_unix.cpp b/src/network/kernel/qhostinfo_unix.cpp
|
||||
index 6b42d1e..f88b628 100644
|
||||
--- a/src/network/kernel/qhostinfo_unix.cpp
|
||||
+++ b/src/network/kernel/qhostinfo_unix.cpp
|
||||
@@ -95,7 +95,7 @@ static res_state_ptr local_res = 0;
|
||||
static void resolveLibrary()
|
||||
{
|
||||
#ifndef QT_NO_LIBRARY
|
||||
#if !defined(QT_NO_LIBRARY) && !defined(Q_OS_QNX)
|
||||
- QLibrary lib(QLatin1String("resolv"));
|
||||
+ QLibrary lib(QLatin1String("@glibc@/lib/libresolv"));
|
||||
lib.setLoadHints(QLibrary::ImprovedSearchHeuristics);
|
||||
if (!lib.load())
|
||||
return;
|
||||
diff -ru qt-everywhere-opensource-src-4.8.3-orig/src/plugins/platforms/xlib/qxlibstatic.cpp qt-everywhere-opensource-src-4.8.3/src/plugins/platforms/xlib/qxlibstatic.cpp
|
||||
--- qt-everywhere-opensource-src-4.8.3-orig/src/plugins/platforms/xlib/qxlibstatic.cpp 2012-09-10 21:36:51.000000000 -0400
|
||||
+++ qt-everywhere-opensource-src-4.8.3/src/plugins/platforms/xlib/qxlibstatic.cpp 2012-09-28 18:08:26.601720488 -0400
|
||||
@@ -242,7 +242,7 @@
|
||||
diff --git a/src/plugins/platforms/xcb/qglxintegration.cpp b/src/plugins/platforms/xcb/qglxintegration.cpp
|
||||
index 229d6f9..c122bf3 100644
|
||||
--- a/src/plugins/platforms/xcb/qglxintegration.cpp
|
||||
+++ b/src/plugins/platforms/xcb/qglxintegration.cpp
|
||||
@@ -136,7 +136,7 @@ void* QGLXContext::getProcAddress(const QString& procName)
|
||||
{
|
||||
extern const QString qt_gl_library_name();
|
||||
// QLibrary lib(qt_gl_library_name());
|
||||
- QLibrary lib(QLatin1String("GL"));
|
||||
+ QLibrary lib(QLatin1String("@openglDriver@/lib/libGL"));
|
||||
glXGetProcAddressARB = (qt_glXGetProcAddressARB) lib.resolve("glXGetProcAddressARB");
|
||||
}
|
||||
}
|
||||
diff --git a/src/plugins/platforms/xlib/qglxintegration.cpp b/src/plugins/platforms/xlib/qglxintegration.cpp
|
||||
index 2467247..a2441d4 100644
|
||||
--- a/src/plugins/platforms/xlib/qglxintegration.cpp
|
||||
+++ b/src/plugins/platforms/xlib/qglxintegration.cpp
|
||||
@@ -137,7 +137,7 @@ void* QGLXContext::getProcAddress(const QString& procName)
|
||||
{
|
||||
extern const QString qt_gl_library_name();
|
||||
// QLibrary lib(qt_gl_library_name());
|
||||
- QLibrary lib(QLatin1String("GL"));
|
||||
+ QLibrary lib(QLatin1String("@openglDriver@/lib/libGL"));
|
||||
glXGetProcAddressARB = (qt_glXGetProcAddressARB) lib.resolve("glXGetProcAddressARB");
|
||||
}
|
||||
}
|
||||
diff --git a/src/plugins/platforms/xlib/qxlibstatic.cpp b/src/plugins/platforms/xlib/qxlibstatic.cpp
|
||||
index f8f3d69..d63c5bc 100644
|
||||
--- a/src/plugins/platforms/xlib/qxlibstatic.cpp
|
||||
+++ b/src/plugins/platforms/xlib/qxlibstatic.cpp
|
||||
@@ -242,7 +242,7 @@ static void* qt_load_library_runtime(const char *library, int vernum,
|
||||
}
|
||||
|
||||
# define XFIXES_LOAD_RUNTIME(vernum, symbol, symbol_type) \
|
||||
|
|
|
@ -5077,13 +5077,12 @@ let
|
|||
|
||||
qt48 = callPackage ../development/libraries/qt-4.x/4.8 {
|
||||
# GNOME dependencies are not used unless gtkStyle == true
|
||||
mesa = mesa_noglu;
|
||||
inherit (pkgs.gnome) libgnomeui GConf gnome_vfs;
|
||||
cups = if stdenv.isLinux then cups else null;
|
||||
};
|
||||
|
||||
qt48Full = callPackage ../development/libraries/qt-4.x/4.8 {
|
||||
# GNOME dependencies are not used unless gtkStyle == true
|
||||
inherit (pkgs.gnome) libgnomeui GConf gnome_vfs;
|
||||
qt48Full = qt48.override {
|
||||
docs = true;
|
||||
demos = true;
|
||||
examples = true;
|
||||
|
|
Loading…
Reference in a new issue