rev 9452 - in trunk/packages/qt-x11-free/debian: . patches

Modestas Vainius modax-guest at alioth.debian.org
Thu Feb 21 23:52:33 UTC 2008


Author: modax-guest
Date: 2008-02-21 23:52:33 +0000 (Thu, 21 Feb 2008)
New Revision: 9452

Modified:
   trunk/packages/qt-x11-free/debian/README.Debian
   trunk/packages/qt-x11-free/debian/changelog
   trunk/packages/qt-x11-free/debian/patches/01_export_stat64_symbols.diff
Log:
Preparing -5:
* Further hack adjustments for m68k/unstable and backports.
* Removed old information about non-threaded qt version from README.Debian.

Changes are NOT urgent. -4 should build fine on all lenny arches.


Modified: trunk/packages/qt-x11-free/debian/README.Debian
===================================================================
--- trunk/packages/qt-x11-free/debian/README.Debian	2008-02-21 16:30:38 UTC (rev 9451)
+++ trunk/packages/qt-x11-free/debian/README.Debian	2008-02-21 23:52:33 UTC (rev 9452)
@@ -29,64 +29,12 @@
 Qt (so the QTDIR path) is available in /usr/share/qt3. If you need to set 
 QTDIR, do export QTDIR=/usr/share/qt3
 
-The Qt packages itself are built in two different versions: dynamic 
-non-threaded and threaded. Each of these builds have specific differences 
-that you need to watch out for. The Qt package for Debian is optimized 
-on working with the threaded version, so application developers are advised 
-to use libqt-mt.so (by installing libqt3-mt-dev) for development. 
-The specific configuration differences are: 
-
-a) non-threaded(shared library)
-
-The non-threaded library has some restrictions for the developer of Qt 
-applications, where some are Debian specific and some Qt specific: 
-- the library is called libqt.so and is placed under /usr/lib. 
-- the plugins built with this version are always using the extension 
-  <plugin>-non-mt.so, to indicate that they are to be used with the non-mt 
-  (multithreaded) version. The plugins itself will install into the same 
-  directory where the threaded version is placing its plugins too, so 
-  that applications will all find the Qt plugins independed of the 
-  version of Qt that they make use of. 
-- Qt OpenGL is not supported in the non-threaded version due to the fact 
-  that OpenGL on Debian is built threaded. If you write any program that 
-  you explicitely link against -lqt and that does make use of the QGL 
-  classes, you will get symbol referencing errors. Change the linking 
-  stage to link your application against the threaded version,-lqt-mt.
-- The libqui library is not available for non-threaded programs. That means 
-  in case a program that links against the non-threaded Qt library (-lqt) 
-  and is also linking against libqui.so (-lqui) will not link. Instead, 
-  change the linking of the program to -lqt-mt -lqui to make that work. 
-
-For other notes, see c) common build configuration.
-
-
-b) threaded (shared library)
-
-The threaded library version is the one supporting the maximum of Qt's 
-options and is to be preferred by application developers. The reasons for 
-that are mainly that it allows the use of threading as well as OpenGL, in 
-addition to that the project that makes the most use out of Qt, the KDE 
-project (http://www.kde.org) uses the threaded version by default also. 
-That means that a KDE user always already has the threaded library loaded 
-in his machine's memory. To have the minimum demands and maximum 
-performance for your application at run-time for the user's machine, it is 
-therefore best to link the application against the threaded version. 
-
-NB: for Debian package maintainers: If the Qt application you are building 
-links against -lqt, change the Makefiles in a way that it links against 
--lqt-mt. Contact the author of the application you package to change the 
-linking from -lqt to -lqt-mt (because all other distributions are doing the 
-same, defaulting on the threaded version). The library itself is called 
-libqt-mt.so and is to be found under /usr/lib.
- 
-c) common build configuration
-
 As far as the common build configuration goes, we note explicitely that the 
 Debian package of Qt will in very rare cases break the compilation (most 
 likely the linking) of applications on Debian which use Qt, in particular 
 utilizing styles in an incorrect way by deriving from one of the styles 
 that ship with Qt. In case you are a Debian packager and encounter 
-problems, either contact me (nolden at kde.org) or the Qt package maintainer. 
+problems, contact Debian Qt/KDE Maintainers (debian-qt-kde at lists.debian.org).
 We will tell you why things don't work and what you should communicate on 
 with the programmers of your application that you are packaging. The build 
 configuration generally is intended to provide a Qt version that is as 
@@ -101,23 +49,12 @@
 The only exception is the imageformat png which has been compiled built-in 
 due to the fact that there is literally no program that uses no icons at 
 all and icons are to be used preferrably in png format. The plugins are all 
-located under /usr/lib/qt3/plugins (threaded and non-threaded). This is 
-also the install location you should choose as a package maintainer for 
+located under /usr/lib/qt3/plugins. This is also the install location you
+should choose as a package maintainer for 
 qt-plugins so the user doesn't have to customize his library path for 
 loading Qt plugins. The only exception is that KDE delivers a set of Qt 
 plugins as well (mainly styles and designer plugins); those are placed in 
-/usr/lib/kde3/plugins. Plugins compiled with the non-threaded version have 
-their names changed from plugin.so to plugin-non-mt.so. If you'repackaging 
-plugins and provide them for the non-threaded Qt version as well, adapt the 
-name of the non-threaded linked version in this scheme. Due to the fact 
-that we configured the maximum possible extend of Qt to build pugins, 
-developers who derive from a class that is a plugin will get linker errors. 
-To make that explicitely clear, we added a libqt3-plugin-headers package 
-that contains the header files belonging to the plugins. This way you will 
-get errors at compile time already if the developer falsely used the styles 
-or other plugin code directly, assuming that this code is built-in into the 
-qt library. However, for reasons of completeness we created this additional 
-package. 
+/usr/lib/kde3/plugins. 
 
 QMotif Extension: As this code is only available in commercial environments 
 (and produces a static library libqmotif.a anyway that those commercial 
@@ -138,14 +75,6 @@
 have the following packages installed to run an application that links 
 against Qt:
 
-Non-Threaded version:libqt3 (the library libqt.so.*)
-
-Optionally depending on the program's requirements:
-
-libqt3-odbc (ODBC driver)
-libqt3-mysql (MySQL driver)
-libqt3-psql (PostgreSQL driver)
-
 Threaded version:libqt3-mt (the library libqt-mt.so.* and libqui.so.* for 
 loading designer-made user interfaces at runtime).
 
@@ -220,24 +149,6 @@
 started your project with Qt 1.x or 2.x, please read the FAQ section at the 
 end of this document.
 
-Another addition is that the qconfig.h file is auto-generated during configure.
-This means it is architecture specific and depends on the configure arguments.
-Therefore it is packaged in their respective versions two times, once
-with libqt3-dev for the non-threaded version, and once with libqt3-mt-dev
-for the threaded version. As this file appears twice, these two packages
-are a) architecture depending and b) conflicting with each other.
-We see the good point in this that developers and packagers can't confuse
-their packages with having the development files for both Qt builds
-installed at the same time and will preferrably use libqt3-mt, reducing
-the risk for accidential builds against libqt.
-
-.qmake.cache files are delivered with libqt3-dev and libqt3-mt-dev. They are 
-shipped as .qmake.cache in /usr/share/qt3/.qmake.cache, which makes sense
-as they are build-dependent and the -dev packages are conflicting anyway, so
-in case you need them for building Qt examples or other packages provided by
-Trolltech relying on the configuration that Qt was build with, use these file
-as required by your package.
-
 5. Packages (Translators)
 
 In order to translate a Qt program into any other language, the Qt 3 way to 
@@ -358,9 +269,9 @@
 Q: I have a question not covered by this FAQ and README file. Who should I 
 turn to ?
 
-A: Please turn to Ralf Nolden (nolden at kde.org) or Martin Loschwitz 
-(madkiss at madkiss.org) for any questions regarding Qt on Debian.
+A: Please turn to Debian Qt/KDE Maintainers (debian-qt-kde at lists.debian.org) 
+for any questions regarding Qt on Debian.
 
  -- Ralf Nolden <nolden at kde.org>  Sun, 26 Jan 2003 20:39:19 +0100
  -- Ralf Nolden <nolden at kde.org>  Mon,  1 Sep 2003 19:24:16 +0200
-    * update for qt-3.2.1
+ -- Modestas Vainius <modestas at vainius.eu> Fri, 22 Feb 2008 01:40:06 +0200

Modified: trunk/packages/qt-x11-free/debian/changelog
===================================================================
--- trunk/packages/qt-x11-free/debian/changelog	2008-02-21 16:30:38 UTC (rev 9451)
+++ trunk/packages/qt-x11-free/debian/changelog	2008-02-21 23:52:33 UTC (rev 9452)
@@ -1,3 +1,19 @@
+qt-x11-free (3:3.3.8b-5~pre1) unstable; urgency=low
+
+  +++ Changes by Modestas Vainius:
+
+  * The previous implemention of the hack was still incomplete solution for
+    restoration of [fl]?stat64 symbols on libqt-mt.so.3 compiled with -O2
+    against glibc << 2.7. In such a case, [fl]?stat64 were still inlined and
+    not exported. Therefore, the hack implementation was extended to cover the
+    latter case as a well and as result it should be fully compatible with
+    m68k/unstable and backports.
+  * Cleanup README.Debian: remove old information about non-threaded version
+    of Qt3 and substitude contacts of previous maintainers with
+    Debian Qt/KDE Maintainers (debian-qt-kde at lists.debian.org).
+
+ -- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org>  Fri, 22 Feb 2008 01:42:07 +0200
+
 qt-x11-free (3:3.3.8b-4) unstable; urgency=low
 
   +++ Changes by Modestas Vainius:

Modified: trunk/packages/qt-x11-free/debian/patches/01_export_stat64_symbols.diff
===================================================================
--- trunk/packages/qt-x11-free/debian/patches/01_export_stat64_symbols.diff	2008-02-21 16:30:38 UTC (rev 9451)
+++ trunk/packages/qt-x11-free/debian/patches/01_export_stat64_symbols.diff	2008-02-21 23:52:33 UTC (rev 9452)
@@ -1,20 +1,25 @@
-diff -uNr -x debian -x .pc qt-x11-free-3.3.8b/src/__debian_export_symbols.cpp qt-x11-free-3.3.8b.n/src/__debian_export_symbols.cpp
---- qt-x11-free-3.3.8b/src/__debian_export_symbols.cpp	1970-01-01 03:00:00.000000000 +0300
-+++ qt-x11-free-3.3.8b.n/src/__debian_export_symbols.cpp	2008-02-17 11:58:54.000000000 +0200
-@@ -0,0 +1,30 @@
-+// Use the __NO_INLINE__ hack below to prevent sys/stat.h from ever
-+// (with g++-4.3 or later) exporting __extern_inline definitions
-+// of the symbols [fl]?stat64. We must ensure that [fl]?stat64 is
-+// exported in libqt-mt.so.3 as dynamic symbols to preserve its ABI.
+--- qt-x11-free-3.3.8b/src/__debian_export_symbols.cpp	2008-02-21 16:23:18.772005855 +0200
++++ qt-x11-free-3.3.8b/src/__debian_export_symbols.cpp	2008-02-22 00:19:32.000000000 +0200
+@@ -0,0 +1,63 @@
++// Use the __NO_INLINE__ hack below to prevent sys/stat.h from
++// exporting __extern_inline definitions of the symbols [fl]?stat64
++// with g++-4.3 or later and glibc6 >= 2.7 or later. This flag has no
++// impact on [fl]?stat(64)? symbol export for glibc6 << 2.7
++//
 +#ifndef __NO_INLINE__
 +# define __NO_INLINE__
++# define INLINE_ENABLED
 +#endif
 +
-+#include <features.h>
++#include <sys/stat.h>
 +
 +#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 7)
 +
-+#include <sys/stat.h>
++// We must ensure that [fl]?stat64 are exported in the dynamic symbol
++// table of libqt-mt.so.3 as weak symbols to preserve ABI.
++int stat64 (__const char *__path, struct stat64 *__statbuf) __attribute__((weak));
++int lstat64 (__const char *__path, struct stat64 *__statbuf) __attribute__((weak));
++int fstat64 (int __fd, struct stat64 *__statbuf) __attribute__((weak));
 +
 +int stat64 (__const char *__path, struct stat64 *__statbuf)
 +{
@@ -31,17 +36,48 @@
 +    return __fxstat64 (_STAT_VER, __fd, __statbuf);
 +}
 +
++#else
++# ifndef INLINE_ENABLED
++/*
++ * Trigger export of the extern __inline [fl]?stat64 symbols
++ * (defined at <sys/stat.h>) by referencing them in the dummy
++ * hidden function below. It's very important to reference
++ * [fl]?stat64 via their [fl]?stat aliases (because LARGEFILE
++ * is enabled) for these weak symbols to get exported.
++ *
++ * This hack is compatible with libc6-dev << 2.7 headers.
++ *
++ * This source file must be compiled with -fno-inline to have
++ * expected effect.
++ **/
++void __stat_extern_inline_export_hack()
++    __attribute__((visibility("hidden")));
++
++void __stat_extern_inline_export_hack() {
++    struct stat buf;
++    stat("", &buf);
++    lstat("", &buf);
++    fstat(0, &buf);
++}
++# else
++#  error "This file must be compiled with inline disabled for the hack to be effective."
++# endif /* INLINES_ENABLED */
++
 +#endif
-diff -uNr -x debian -x .pc qt-x11-free-3.3.8b/src/qt.pro qt-x11-free-3.3.8b.n/src/qt.pro
---- qt-x11-free-3.3.8b/src/qt.pro	2008-02-16 23:37:36.000000000 +0200
-+++ qt-x11-free-3.3.8b.n/src/qt.pro	2008-02-17 12:01:12.000000000 +0200
-@@ -174,6 +174,11 @@
+--- qt-x11-free-3.3.8b/src/qt.pro	2008-02-21 20:50:46.000000000 +0200
++++ qt-x11-free-3.3.8b/src/qt.pro	2008-02-22 00:20:48.000000000 +0200
+@@ -174,6 +174,16 @@
     QMAKE_PKGCONFIG_INCDIR = $$headers.path
  }
  
 +unix {
-+   # Debian - export symbols (stat64, fstat64, lstat64) hack
-+   SOURCES += __debian_export_symbols.cpp
++    # Debian - compile __debian_export_symbols.cpp with -fno-inline
++    debian_no_inline.output  = .obj/${QMAKE_FILE_BASE}.o
++    debian_no_inline.commands = $(CXX) -c $(CXXFLAGS) $(INCPATH) -fno-inline ${QMAKE_FILE_NAME} -o ${QMAKE_FILE_OUT}
++    debian_no_inline.input = DEBIAN_NO_INLINE
++    QMAKE_EXTRA_UNIX_COMPILERS += debian_no_inline
++
++    DEBIAN_NO_INLINE = __debian_export_symbols.cpp
 +}
 +
  wince-* {




More information about the pkg-kde-commits mailing list