From 3fb14049100f5df1fc411233849c547d778a366c Mon Sep 17 00:00:00 2001 From: minskim Date: Sun, 12 Mar 2006 06:49:21 +0000 Subject: Force to use the libtool mode of qmake, instead of patching the non-libtool mode to use libool. In this way, qmake will generates valid install commands. This closes PR pkg/29572. Bump qt3-tools PKGREVISION. --- x11/qt3-libs/distinfo | 5 +++- x11/qt3-libs/files/qmake.conf | 31 ++++++---------------- x11/qt3-libs/patches/patch-ak | 61 +++++++++++++++++++++++++++++++++++++++++++ x11/qt3-libs/patches/patch-al | 23 ++++++++++++++++ x11/qt3-libs/patches/patch-am | 16 ++++++++++++ 5 files changed, 112 insertions(+), 24 deletions(-) create mode 100644 x11/qt3-libs/patches/patch-ak create mode 100644 x11/qt3-libs/patches/patch-al create mode 100644 x11/qt3-libs/patches/patch-am (limited to 'x11/qt3-libs') diff --git a/x11/qt3-libs/distinfo b/x11/qt3-libs/distinfo index 9e37e6f6dd3..3d16967934e 100644 --- a/x11/qt3-libs/distinfo +++ b/x11/qt3-libs/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.34 2006/03/02 23:41:55 minskim Exp $ +$NetBSD: distinfo,v 1.35 2006/03/12 06:49:21 minskim Exp $ SHA1 (qt-x11-free-3.3.5.tar.bz2) = 8d7c7ba0b39848ef60b3cd93fc1d33e9527694ec RMD160 (qt-x11-free-3.3.5.tar.bz2) = 376ae3fc36c70ec864653ca78582ba29410def7f @@ -13,6 +13,9 @@ SHA1 (patch-ag) = a413055f8df258b0bb91e46d6f611e9ec511b913 SHA1 (patch-ah) = f9e0a77ea62e06b3c037921094e0eb1d50a5ffce SHA1 (patch-ai) = 582a02a1b697ef038cd5a8ead5dd3b0910e6297b SHA1 (patch-aj) = 414260de4a3cb91cbd6ec384cafda7268205930d +SHA1 (patch-ak) = d7ebd00b6173be00c40e951dc4ac6bd2b0245818 +SHA1 (patch-al) = 95c9fa4ffcb7ea1cfd53bf689d3594536010ec75 +SHA1 (patch-am) = d03608cc641edab382f0b6afc6f29b5d97a285a5 SHA1 (patch-bb) = b6a15a4b2b7b83b89bd3610cf2e48c242dbce2e5 SHA1 (patch-bc) = d8a84e1b66bf1953b53df57ae81d2c98cce69c41 SHA1 (patch-bd) = a116ecf305ee5b5338bf84cb908d695f3baea830 diff --git a/x11/qt3-libs/files/qmake.conf b/x11/qt3-libs/files/qmake.conf index e44ac220d52..647593f72e0 100644 --- a/x11/qt3-libs/files/qmake.conf +++ b/x11/qt3-libs/files/qmake.conf @@ -1,12 +1,12 @@ -# $NetBSD: qmake.conf,v 1.20 2006/03/11 04:56:17 reed Exp $ -# $Id: qmake.conf,v 1.20 2006/03/11 04:56:17 reed Exp $ +# $NetBSD: qmake.conf,v 1.21 2006/03/12 06:49:21 minskim Exp $ +# $Id: qmake.conf,v 1.21 2006/03/12 06:49:21 minskim Exp $ # # qmake configuration for netbsd-g++ (pkgsrc) # MAKEFILE_GENERATOR = UNIX TEMPLATE = app -CONFIG += qt warn_on release +CONFIG += qt warn_on release link_prl QMAKE_CC = @CC@ QMAKE_LEX = @LEX@ @@ -19,7 +19,7 @@ QMAKE_CFLAGS_WARN_ON = QMAKE_CFLAGS_WARN_OFF = QMAKE_CFLAGS_RELEASE = QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = +QMAKE_CFLAGS_SHLIB = QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses QMAKE_CFLAGS_THREAD = -D_REENTRANT @@ -43,32 +43,17 @@ QMAKE_LIBDIR_QT = $(QTDIR)/lib 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 `expr $(subst $(TARGET0).,,$(TARGET1)) + $(subst $(TARGET1).,,$(TARGET2))`:$(subst $(TARGET2).,,$(TARGET)):$(subst $(TARGET1).,,$(TARGET2)), \ - -module -avoid-version) \ - $(OBJECTS:.o=.lo) $(OBJMOC:.o=.lo) $(LIBS) \ - -rpath $(if $(TARGET0), \ - $(QTPREFIX)/lib, \ - $(subst ../../..,$(QTPREFIX)/plugins,$(DESTDIR))) +QMAKE_LINK = @CXX@ +QMAKE_LINK_SHLIB = @CXX@ +QMAKE_LINK_SHLIB_CMD = $$QMAKE_LINK_SHLIB $$QMAKE_LFLAGS_SHLIB $(LFLAGS) $$QMAKE_LFLAGS -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS) QMAKE_LFLAGS = $(LDFLAGS) -L$(QTDIR)/lib QMAKE_LFLAGS_RELEASE = QMAKE_LFLAGS_DEBUG = -QMAKE_LFLAGS_SHLIB = +QMAKE_LFLAGS_SHLIB = QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB QMAKE_LFLAGS_SONAME = 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 --git a/x11/qt3-libs/patches/patch-ak b/x11/qt3-libs/patches/patch-ak new file mode 100644 index 00000000000..98f2cd49898 --- /dev/null +++ b/x11/qt3-libs/patches/patch-ak @@ -0,0 +1,61 @@ +$NetBSD: patch-ak,v 1.1 2006/03/12 06:49:21 minskim Exp $ + +--- qmake/generators/unix/unixmake.cpp.orig 2005-09-02 12:43:19.000000000 +0000 ++++ qmake/generators/unix/unixmake.cpp +@@ -340,27 +340,31 @@ 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); ++ rpath = fileFixify(rpath); ++ 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"; + } +@@ -820,8 +824,12 @@ UnixMakefileGenerator::defaultInstall(co + src_targ = "$(TARGETL)"; + QString dst_dir = fileFixify(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 + "\" \"" + root + dst_dir + "\""; ++ dst_dir = Option::fixPathToTargetOS(dst_dir); ++ if(!ret.isEmpty()) ++ ret += "\n\t"; ++ ret += "-$(LIBTOOL) --mode=install cp \"" + src_targ + "\" \"" + root + dst_dir + "\""; ++ if(!uninst.isEmpty()) ++ uninst.append("\n\t"); + uninst.append("-$(LIBTOOL) --mode=uninstall \"" + src_targ + "\""); + } else { + QString src_targ = target; diff --git a/x11/qt3-libs/patches/patch-al b/x11/qt3-libs/patches/patch-al new file mode 100644 index 00000000000..a8b646b5863 --- /dev/null +++ b/x11/qt3-libs/patches/patch-al @@ -0,0 +1,23 @@ +$NetBSD: patch-al,v 1.1 2006/03/12 06:49:21 minskim Exp $ + +--- qmake/generators/unix/unixmake2.cpp.orig 2005-09-02 12:43:19.000000000 +0000 ++++ qmake/generators/unix/unixmake2.cpp +@@ -1206,6 +1206,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) $(OBJMOC)"); + } else { + project->variables()["TARGETA"].append(project->first("DESTDIR") + "lib" + project->first("TARGET") + ".a"); +@@ -1489,7 +1492,7 @@ UnixMakefileGenerator::pkgConfigFileName + QString ret = var("TARGET"); + int slsh = ret.findRev(Option::dir_sep); + if(slsh != -1) +- ret = ret.right(ret.length() - slsh); ++ ret = ret.right(ret.length() - slsh - 1); + if(ret.startsWith("lib")) + ret = ret.mid(3); + int dot = ret.find('.'); diff --git a/x11/qt3-libs/patches/patch-am b/x11/qt3-libs/patches/patch-am new file mode 100644 index 00000000000..5ecf3837b64 --- /dev/null +++ b/x11/qt3-libs/patches/patch-am @@ -0,0 +1,16 @@ +$NetBSD: patch-am,v 1.1 2006/03/12 06:49:21 minskim Exp $ + +--- qmake/project.cpp.orig 2005-09-02 12:43:19.000000000 +0000 ++++ qmake/project.cpp +@@ -695,6 +695,11 @@ QMakeProject::isActiveConfig(const QStri + if(x.isEmpty()) + return TRUE; + ++ if(x == "compile_libtool" && ++ (vars["TEMPLATE"].first() == "app" || ++ vars["TEMPLATE"].first() == "lib")) ++ return TRUE; ++ + if((Option::target_mode == Option::TARG_MACX_MODE || Option::target_mode == Option::TARG_QNX6_MODE || + Option::target_mode == Option::TARG_UNIX_MODE) && x == "unix") + return TRUE; -- cgit v1.2.3