pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/x11 Use the libtool mode of qmake, instead of patching...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/697ad779c86d
branches:  trunk
changeset: 516214:697ad779c86d
user:      minskim <minskim%pkgsrc.org@localhost>
date:      Mon Jul 17 15:30:16 2006 +0000

description:
Use the libtool mode of qmake, instead of patching the non-libtool mode
to use libtool.  This fixes PR 33951.

Bump PKGREVISION for qt4-libs and qt4-tools.

diffstat:

 x11/qt4-libs/Makefile         |   3 +-
 x11/qt4-libs/distinfo         |   8 +++-
 x11/qt4-libs/files/qmake.conf |  26 ++++-----------
 x11/qt4-libs/patches/patch-aa |  25 +++++++++++++-
 x11/qt4-libs/patches/patch-ab |  13 ++++---
 x11/qt4-libs/patches/patch-ae |  70 +++++++++++++++++++++++++++++++++++++++++++
 x11/qt4-libs/patches/patch-ag |  14 ++++++++
 x11/qt4-tools/Makefile        |   5 ++-
 8 files changed, 132 insertions(+), 32 deletions(-)

diffs (256 lines):

diff -r d8d5981342bb -r 697ad779c86d x11/qt4-libs/Makefile
--- a/x11/qt4-libs/Makefile     Mon Jul 17 15:17:26 2006 +0000
+++ b/x11/qt4-libs/Makefile     Mon Jul 17 15:30:16 2006 +0000
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.4 2006/05/31 19:18:07 adam Exp $
+# $NetBSD: Makefile,v 1.5 2006/07/17 15:30:16 minskim Exp $
 
 .include "../../x11/qt4-libs/Makefile.common"
 
 PKGNAME=       qt4-libs-${QTVERSION}
+PKGREVISION=   1
 COMMENT=       C++ X GUI toolkit
 
 BUILD_TARGET=          sub-src
diff -r d8d5981342bb -r 697ad779c86d x11/qt4-libs/distinfo
--- a/x11/qt4-libs/distinfo     Mon Jul 17 15:17:26 2006 +0000
+++ b/x11/qt4-libs/distinfo     Mon Jul 17 15:30:16 2006 +0000
@@ -1,12 +1,14 @@
-$NetBSD: distinfo,v 1.6 2006/07/03 20:35:01 adam Exp $
+$NetBSD: distinfo,v 1.7 2006/07/17 15:30:16 minskim Exp $
 
 SHA1 (qt-x11-opensource-src-4.1.4.tar.gz) = 7924011d7fcc0c873b952670e0dac2c56fc6f0f5
 RMD160 (qt-x11-opensource-src-4.1.4.tar.gz) = a7e8558f275751b1a6217827784c3b81f84d6d5f
 Size (qt-x11-opensource-src-4.1.4.tar.gz) = 32174985 bytes
-SHA1 (patch-aa) = 5587f3d9c0613f9be04de1eed76175c9342ce5e0
-SHA1 (patch-ab) = 6c42d051ce036820167bcecc0480f7dd6d2f7334
+SHA1 (patch-aa) = 87a1b7e57853d70bbe6e7cb79f4a1c6e1c89d36b
+SHA1 (patch-ab) = 3305517f366628fdedcb820fb83026018067471e
 SHA1 (patch-ac) = 766ca4aba25029765f83c8a72873b603864ea821
 SHA1 (patch-ad) = 1db8ce11816ae2fe8423906c51290c82ddb169ea
+SHA1 (patch-ae) = f007463664a56e4dc53adf1e33c80790b07591c3
 SHA1 (patch-af) = a8576bc098c14cb5a13d45d4231b7ee21441eb89
+SHA1 (patch-ag) = 9c73840a8fd2edf518a26532ab1f04752cca3fc9
 SHA1 (patch-ah) = 62c50fe48b9ff1ce9fb757b432c8b1db7693e112
 SHA1 (patch-ai) = b15936b85b2b1946e8c9a92bf393c3d3a1fc6950
diff -r d8d5981342bb -r 697ad779c86d x11/qt4-libs/files/qmake.conf
--- a/x11/qt4-libs/files/qmake.conf     Mon Jul 17 15:17:26 2006 +0000
+++ b/x11/qt4-libs/files/qmake.conf     Mon Jul 17 15:30:16 2006 +0000
@@ -1,12 +1,12 @@
-# $NetBSD: qmake.conf,v 1.1.1.1 2006/02/20 12:08:15 adam Exp $
-# $Id: qmake.conf,v 1.1.1.1 2006/02/20 12:08:15 adam Exp $
+# $NetBSD: qmake.conf,v 1.2 2006/07/17 15:30:16 minskim Exp $
+# $Id: qmake.conf,v 1.2 2006/07/17 15:30:16 minskim Exp $
 #
-# qmake configuration for netbsd-g++
+# qmake configuration for pkgsrc
 #
 
 MAKEFILE_GENERATOR     = UNIX
 TEMPLATE               = app
-CONFIG                 += qt warn_on release
+CONFIG                 += qt warn_on release link_prl
 QT                     += core gui
 
 QMAKE_CC               = @CC@
@@ -44,16 +44,9 @@
 QMAKE_INCDIR_OPENGL    = @X11PREFIX@/include
 QMAKE_LIBDIR_OPENGL    = @X11PREFIX@/lib
 
-QMAKE_LINK             = @LIBTOOL@ --mode=link @CXX@
-QMAKE_LINK_SHLIB_CMD   = \
-       @LIBTOOL@ --mode=link @CXX@ $(LFLAGS) -o $(if $(TARGET0), \
-               $(patsubst %.so,%.la,$(DESTDIR)$(TARGET0)), \
-               $(patsubst %.so,%.la,$(DESTDIR)$(TARGET))) \
-       $(if $(TARGET0), \
-               -version-info $(subst $(TARGET0).,,$(TARGET1)):$(subst $(TARGET1).,,$(TARGET2)), \
-               -module -avoid-version) \
-       $(OBJECTS:.o=.lo) $(OBJMOC:.o=.lo) $(LIBS) \
-               -rpath $(QTPREFIX)/$(if $(TARGET0),lib,$(subst ../,,$(DESTDIR)))
+QMAKE_LINK             = @CXX@
+QMAKE_LINK_SHLIB       = @CXX@
+QMAKE_LINK_SHLIB_CMD   = $$QMAKE_LINK_SHLIB $$QMAKE_LFLAGS_SHLIB $(LFLAGS) $$QMAKE_LFLAGS -o $(TARGETD) $(OBJECTS) $(OBJMOC) $(LIBS)
 QMAKE_LFLAGS           = $(LDFLAGS) -L$(QTDIR)/lib
 QMAKE_LFLAGS_RELEASE   =
 QMAKE_LFLAGS_DEBUG     =
@@ -63,11 +56,6 @@
 QMAKE_LFLAGS_THREAD    =
 QMAKE_RPATH            = @COMPILER_RPATH_FLAG@
 
-QMAKE_RUN_CC           = @LIBTOOL@ --mode=compile @CC@ -c $(CFLAGS) $(INCPATH) -o $obj $src
-QMAKE_RUN_CC_IMP       = @LIBTOOL@ --mode=compile @CC@ -c $(CFLAGS) $(INCPATH) -o $@ $<
-QMAKE_RUN_CXX          = @LIBTOOL@ --mode=compile @CXX@ -c $(CXXFLAGS) $(INCPATH) -o $obj $src
-QMAKE_RUN_CXX_IMP      = @LIBTOOL@ --mode=compile @CXX@ -c $(CXXFLAGS) $(INCPATH) -o $@ $<
-
 QMAKE_LIBS             =
 QMAKE_LIBS_DYNLOAD     = 
 QMAKE_LIBS_X11         = -lXext -lX11 -lm @SYS_LIBS@
diff -r d8d5981342bb -r 697ad779c86d x11/qt4-libs/patches/patch-aa
--- a/x11/qt4-libs/patches/patch-aa     Mon Jul 17 15:17:26 2006 +0000
+++ b/x11/qt4-libs/patches/patch-aa     Mon Jul 17 15:30:16 2006 +0000
@@ -1,8 +1,27 @@
-$NetBSD: patch-aa,v 1.2 2006/02/28 18:02:47 adam Exp $
+$NetBSD: patch-aa,v 1.3 2006/07/17 15:30:16 minskim Exp $
 
---- qmake/generators/unix/unixmake2.cpp.orig   2006-02-16 11:51:34.000000000 +0100
+--- qmake/generators/unix/unixmake2.cpp.orig   2006-07-17 03:35:32.000000000 +0000
 +++ qmake/generators/unix/unixmake2.cpp
-@@ -1282,7 +1282,7 @@ UnixMakefileGenerator::writePkgConfigFil
+@@ -199,6 +199,8 @@ UnixMakefileGenerator::writeMakeParts(QT
+         if(!project->isEmpty("QMAKE_BUNDLE_NAME")) {
+             t << "TARGETD       = " << var("TARGET_x.y") << endl;
+             t << "TARGET0       = " << var("TARGET_") << endl;
++        } else if(project->isActiveConfig("compile_libtool")) {
++            t << "TARGETD       = " << var("TARGET_la") << endl;
+         } else if(project->isEmpty("QMAKE_HPUX_SHLIB")) {
+             t << "TARGETD       = " << var("TARGET_x.y.z") << endl;
+             t << "TARGET0       = " << var("TARGET_") << endl;
+@@ -885,6 +887,9 @@ void UnixMakefileGenerator::init2()
+         project->variables()["TARGET"].first().prepend("lib");
+         project->variables()["TARGET"].first() += ".a";
+         if(project->variables()["QMAKE_AR_CMD"].isEmpty())
++          if(project->isActiveConfig("compile_libtool"))
++            project->variables()["QMAKE_AR_CMD"].append("$(CXX) -o $(TARGET) $(OBJECTS) $(OBJMOC)");
++          else
+             project->variables()["QMAKE_AR_CMD"].append("$(AR) $(TARGET) $(OBJECTS)");
+     } else {
+         project->variables()["TARGETA"].append(project->first("DESTDIR") + "lib" + project->first("TARGET") + ".a");
+@@ -1282,7 +1287,7 @@ UnixMakefileGenerator::writePkgConfigFil
      else
          libs << "QMAKE_LIBS"; //obvious one
      libs << "QMAKE_LFLAGS_THREAD"; //not sure about this one, but what about things like -pthread?
diff -r d8d5981342bb -r 697ad779c86d x11/qt4-libs/patches/patch-ab
--- a/x11/qt4-libs/patches/patch-ab     Mon Jul 17 15:17:26 2006 +0000
+++ b/x11/qt4-libs/patches/patch-ab     Mon Jul 17 15:30:16 2006 +0000
@@ -1,13 +1,16 @@
-$NetBSD: patch-ab,v 1.1.1.1 2006/02/20 12:08:15 adam Exp $
+$NetBSD: patch-ab,v 1.2 2006/07/17 15:30:16 minskim Exp $
 
---- src/gui/painting/painting.pri.orig 2006-01-21 00:29:52.000000000 +0100
+--- src/gui/painting/painting.pri.orig 2006-06-19 10:49:23.000000000 +0000
 +++ src/gui/painting/painting.pri
-@@ -119,7 +119,7 @@ embedded {
+@@ -119,9 +119,9 @@ embedded {
  mac {
  
  } else:sse|win32-g++ {
 -    sse_compiler.commands = $$QMAKE_CXX -c -msse $(CXXFLAGS) $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
-+    sse_compiler.commands = ${LIBTOOL} --mode=compile $$QMAKE_CXX -c -msse $(CXXFLAGS) $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
++    sse_compiler.commands = ${LIBTOOL} --mode=compile $$QMAKE_CXX -c -msse $(CXXFLAGS) $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}.o
      sse_compiler.dependency_type = TYPE_C
-     sse_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
+-    sse_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
++    sse_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}.lo
      sse_compiler.input = SSE_SOURCES
+     sse_compiler.variable_out = OBJECTS
+     sse_compiler.name = compiling[sse] ${QMAKE_FILE_IN}
diff -r d8d5981342bb -r 697ad779c86d x11/qt4-libs/patches/patch-ae
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/qt4-libs/patches/patch-ae     Mon Jul 17 15:30:16 2006 +0000
@@ -0,0 +1,70 @@
+$NetBSD: patch-ae,v 1.1 2006/07/17 15:30:16 minskim Exp $
+
+--- qmake/generators/unix/unixmake.cpp.orig    2006-06-19 03:49:29.000000000 -0700
++++ qmake/generators/unix/unixmake.cpp
+@@ -250,27 +250,29 @@ UnixMakefileGenerator::init()
+                 if(libtoolify[i].startsWith("QMAKE_LINK") || libtoolify[i] == "QMAKE_AR_CMD") {
+                     libtool_flags += " --mode=link";
+                     if(project->isActiveConfig("staticlib")) {
+-                        libtool_flags += " -static";
++                        comp_flags += " -static";
+                     } else {
+                         if(!project->isEmpty("QMAKE_LIB_FLAG")) {
++                          if(project->isActiveConfig("plugin"))
++                            comp_flags += " -avoid-version";
++                          else {
+                             int maj = project->first("VER_MAJ").toInt();
+                             int min = project->first("VER_MIN").toInt();
+                             int pat = project->first("VER_PAT").toInt();
+-                            comp_flags += " -version-info " + QString::number(10*maj + min) +
+-                                          ":" + QString::number(pat) + ":0";
++                            comp_flags += " -version-info " + QString::number(maj + min) +
++                                          ":" + QString::number(pat) + 
++                                          ":" + QString::number(min);
++                          }
+                             if(libtoolify[i] != "QMAKE_AR_CMD") {
+-                                QString rpath = Option::output_dir;
+-                                if(!project->isEmpty("DESTDIR")) {
+-                                    rpath = project->first("DESTDIR");
+-                                    if(QDir::isRelativePath(rpath))
+-                                        rpath.prepend(Option::output_dir + Option::dir_sep);
+-                                }
++                                QString rpath = Option::fixPathToTargetOS(project->first("target.path"), FALSE);
++                                if(rpath.right(1) != Option::dir_sep)
++                                    rpath += Option::dir_sep;
+                                 comp_flags += " -rpath " + Option::fixPathToTargetOS(rpath, false);
+                             }
+                         }
+                     }
+                     if(project->isActiveConfig("plugin"))
+-                        libtool_flags += " -module";
++                        comp_flags += " -module";
+                 } else {
+                     libtool_flags += " --mode=compile";
+                 }
+@@ -555,7 +557,6 @@ UnixMakefileGenerator::defaultInstall(co
+     QString targetdir = Option::fixPathToTargetOS(project->first("target.path"), false);
+     if(!destdir.isEmpty() && destdir.right(1) != Option::dir_sep)
+         destdir += Option::dir_sep;
+-    targetdir = fileFixify(targetdir, FileFixifyAbsolute);
+     if(targetdir.right(1) != Option::dir_sep)
+         targetdir += Option::dir_sep;
+ 
+@@ -611,10 +612,14 @@ UnixMakefileGenerator::defaultInstall(co
+         QString src_targ = target;
+         if(src_targ == "$(TARGET)")
+             src_targ = "$(TARGETL)";
+-        QString dst_dir = fileFixify(targetdir, FileFixifyAbsolute);
++        QString dst_dir = targetdir;
+         if(QDir::isRelativePath(dst_dir))
+-            dst_dir = Option::fixPathToTargetOS(Option::output_dir + Option::dir_sep + dst_dir);
+-        ret = "-$(LIBTOOL) --mode=install cp \"" + src_targ + "\" \"" + filePrefixRoot(root, dst_dir) + "\"";
++            dst_dir = Option::fixPathToTargetOS(dst_dir);
++        if(!ret.isEmpty())
++            ret += "\n\t";
++        ret += "-$(LIBTOOL) --mode=install cp \"" + src_targ + "\" \"" + filePrefixRoot(root, dst_dir) + "\"";
++        if(!uninst.isEmpty())
++            uninst.append("\n\t");
+         uninst.append("-$(LIBTOOL) --mode=uninstall \"" + src_targ + "\"");
+     } else {
+         QString src_targ = target;
diff -r d8d5981342bb -r 697ad779c86d x11/qt4-libs/patches/patch-ag
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/qt4-libs/patches/patch-ag     Mon Jul 17 15:30:16 2006 +0000
@@ -0,0 +1,14 @@
+$NetBSD: patch-ag,v 1.3 2006/07/17 15:30:16 minskim Exp $
+
+--- qmake/project.cpp.orig     2006-06-19 03:49:22.000000000 -0700
++++ qmake/project.cpp
+@@ -1383,6 +1383,9 @@ QMakeProject::isActiveConfig(const QStri
+     else if(x == "false")
+         return false;
+ 
++    if(x == "compile_libtool" && (vars["TEMPLATE"].first() == "app" || vars["TEMPLATE"].first() == "lib"))
++        return true;
++
+     //mkspecs
+     if((Option::target_mode == Option::TARG_MACX_MODE || Option::target_mode == Option::TARG_QNX6_MODE ||
+         Option::target_mode == Option::TARG_UNIX_MODE) && x == "unix")
diff -r d8d5981342bb -r 697ad779c86d x11/qt4-tools/Makefile
--- a/x11/qt4-tools/Makefile    Mon Jul 17 15:17:26 2006 +0000
+++ b/x11/qt4-tools/Makefile    Mon Jul 17 15:30:16 2006 +0000
@@ -1,10 +1,13 @@
-# $NetBSD: Makefile,v 1.6 2006/05/31 19:19:06 adam Exp $
+# $NetBSD: Makefile,v 1.7 2006/07/17 15:30:16 minskim Exp $
 
 .include "../../x11/qt4-libs/Makefile.common"
 
 PKGNAME=       qt4-tools-${QTVERSION}
+PKGREVISION=   1
 COMMENT=       QT GUI (WYSIWYG) builder and other tools
 
+DEPENDS+=      libtool-base-[0-9]*:../../devel/libtool-base
+
 CONFIGURE_ARGS+=       -I${QTDIR}/include -L${QTDIR}/lib
 
 BUILD_TARGET=          sub-tools



Home | Main Index | Thread Index | Old Index