tweak to create correct .la files for the qt libraries, and install them.

after a few iterations to fix various builds such as bacula.
work from Vadim Zhukov
This commit is contained in:
espie 2011-11-06 12:44:04 +00:00
parent 1e4f1a9788
commit 37d18d6a19
7 changed files with 81 additions and 28 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.92 2011/10/02 07:03:11 espie Exp $
# $OpenBSD: Makefile,v 1.93 2011/11/06 12:44:04 espie Exp $
USE_GMAKE = Yes
COMMENT-debug = C++ GUI toolkit, debug
@ -29,7 +29,7 @@ REVISION-examples = 0
REVISION-sqlite2 = 0
REVISION-sqlite = 0
REVISION-tds = 0
REVISION-main = 0
REVISION-main = 1
REVISION-debug = 0
REVISION-html = 0
@ -128,8 +128,12 @@ CONFIGURE_ARGS += -I${LOCALBASE}/include/postgresql \
-I${LOCALBASE}/include/postgresql/server \
-plugin-sql-psql
# XXX make sure those libraries gets written to libQtGui.la
QMAKE_LIBS_GUI = freetype SM ICE Xi Xrender Xinerama fontconfig Xext X11
#QMAKE_LIBS_GUI =
CONFIGURE_ENV = LOCALBASE=${LOCALBASE} QTDIR="${WRKSRC}" \
X11BASE=${X11BASE}
X11BASE=${X11BASE} QMAKE_LIBS_GUI="${QMAKE_LIBS_GUI:C/^/-l/}"
.if defined(MAKE_JOBS)
CONFIGURE_ENV += BOOTSTRAP_MAKE_FLAGS='-j${MAKE_JOBS}'
.endif
@ -299,6 +303,11 @@ DESTDIRNAME = INSTALL_ROOT
pre-patch:
cd ${WRKDIST} && cp -R mkspecs/openbsd-g++ mkspecs/openbsd-g++4
post-build:
.for l v in ${SHARED_LIBS}
-${SUBST_CMD} ${WRKBUILD}/lib/lib$l.la
.endfor
post-install:
# extra doc
cd ${WRKSRC}; ${INSTALL_DATA} ${DOCS} ${QT_DOC}

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-qmake_generators_unix_unixmake2_cpp,v 1.14 2011/09/07 09:54:07 espie Exp $
--- qmake/generators/unix/unixmake2.cpp.orig Tue Aug 23 14:02:27 2011
+++ qmake/generators/unix/unixmake2.cpp Mon Sep 5 11:19:03 2011
$OpenBSD: patch-qmake_generators_unix_unixmake2_cpp,v 1.15 2011/11/06 12:44:04 espie Exp $
--- qmake/generators/unix/unixmake2.cpp.orig Mon Sep 12 10:49:28 2011
+++ qmake/generators/unix/unixmake2.cpp Sun Oct 30 01:32:03 2011
@@ -80,6 +80,9 @@ UnixMakefileGenerator::writeMakefile(QTextStream &t)
{
@ -59,18 +59,21 @@ $OpenBSD: patch-qmake_generators_unix_unixmake2_cpp,v 1.14 2011/09/07 09:54:07 e
if(!project->isEmpty("QMAKE_POST_LINK"))
t << "\n\t" << var("QMAKE_POST_LINK");
t << endl << endl;
@@ -998,6 +990,10 @@ void UnixMakefileGenerator::init2()
@@ -998,6 +990,13 @@ void UnixMakefileGenerator::init2()
project->values("VER_MAJ").append(l[0]);
project->values("VER_MIN").append(l[1]);
project->values("VER_PAT").append(l[2]);
+ project->values("OBSD_TARGET_NAME").append(project->first("TARGET"));
+ project->values("OBSD_TARGET_VERSION").append(project->first("VER_MAJ") + "." + project->first("VER_MIN"));
+ // for (portable) Makefiles
+ project->values("OBSD_TARGET_x.y").append("lib" + project->first("TARGET") + "." + project->first("QMAKE_EXTENSION_SHLIB") + ".$(LIB" + project->first("TARGET") + "_VERSION)");
+ // for libtool files, to be updated by SUBST_CMD in OpenBSD ports
+ project->values("OBSD_SUBST_x.y").append("lib" + project->first("TARGET") + "." + project->first("QMAKE_EXTENSION_SHLIB") + ".${LIB" + project->first("TARGET") + "_VERSION}");
+
if(project->isEmpty("QMAKE_FRAMEWORK_VERSION"))
project->values("QMAKE_FRAMEWORK_VERSION").append(project->values("VER_MAJ").first());
@@ -1135,7 +1131,7 @@ void UnixMakefileGenerator::init2()
@@ -1135,7 +1134,7 @@ void UnixMakefileGenerator::init2()
project->first("VER_MIN") + "." +
project->first("VER_PAT"));
}
@ -79,3 +82,53 @@ $OpenBSD: patch-qmake_generators_unix_unixmake2_cpp,v 1.14 2011/09/07 09:54:07 e
}
if(project->isEmpty("QMAKE_LN_SHLIB"))
project->values("QMAKE_LN_SHLIB").append("ln -s");
@@ -1280,18 +1279,31 @@ UnixMakefileGenerator::writeLibtoolFile()
<< QT_VERSION_STR << ") on: " << QDateTime::currentDateTime().toString();
t << "\n";
- t << "# The name that we can dlopen(3).\n"
- << "dlname='" << var(project->isActiveConfig("plugin") ? "TARGET" : "TARGET_x")
- << "'\n\n";
+ t << "# The name that we can dlopen(3).\ndlname='";
+ if(project->isActiveConfig("plugin")) {
+ t << var("TARGET");
+ } else {
+#ifdef __OpenBSD__
+ t << var("OBSD_SUBST_x.y");
+#else
+ t << var("TARGET_x");
+#endif
+ }
+ t << "'\n\n";
t << "# Names of this library.\n";
t << "library_names='";
if(project->isActiveConfig("plugin")) {
t << var("TARGET");
} else {
- if (project->isEmpty("QMAKE_HPUX_SHLIB"))
- t << var("TARGET_x.y.z") << " ";
- t << var("TARGET_x") << " " << var("TARGET_");
+ if (project->isEmpty("QMAKE_HPUX_SHLIB")) {
+#ifdef __OpenBSD__
+ t << var("OBSD_SUBST_x.y") << " ";
+#else
+ t << var("TARGET_x.y.z") << " " << var("TARGET_x") << " ";
+#endif
+ }
+ t << var("TARGET_");
}
t << "'\n\n";
@@ -1303,10 +1315,10 @@ UnixMakefileGenerator::writeLibtoolFile()
if(!project->isEmpty("QMAKE_INTERNAL_PRL_LIBS"))
libs = project->values("QMAKE_INTERNAL_PRL_LIBS");
else
libs << "QMAKE_LIBS"; //obvious one
t << "dependency_libs='";
for(QStringList::ConstIterator it = libs.begin(); it != libs.end(); ++it)
- t << project->values((*it)).join(" ") << " ";
+ t << project->values((*it)).join(" ").replace('(', '{').replace(')', '}') << " ";
t << "'\n\n";
t << "# Version information for " << lname << "\n";

View File

@ -7,7 +7,8 @@ simple example programs (source + binaries).
There's a debug version of the libraries: qt4-debug.
There are database plugins: qt4-mysql and qt4-postgresql.
There are database plugins: qt4-mysql, qt4-postgresql, qt4-sqlite,
qt4-sqlite2 and qt4-tds.
People who want to use qt4 to compile applications outside the ports tree
should note that qt4's installation conforms to OpenBSD habits, not

View File

@ -1,3 +0,0 @@
This is the phonon library, set apart because of too many dependencies.
Please note that this contains the full version of qtconfig, which
unfortunately links with gstreamer for the time being.

View File

@ -1 +0,0 @@
@comment $OpenBSD: PFRAG.shared-phonon,v 1.2 2009/04/18 17:25:43 espie Exp $

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST-main,v 1.29 2011/09/07 09:54:07 espie Exp $
@comment $OpenBSD: PLIST-main,v 1.30 2011/11/06 12:44:04 espie Exp $
@pkgpath x11/qt4
@pkgpath x11/qt4,-phonon
%%SHARED%%
@ -2989,11 +2989,11 @@ lib/qt4/imports/Qt/labs/shaders/qmldir
lib/qt4/imports/QtWebKit/
lib/qt4/imports/QtWebKit/qmldir
lib/qt4/include
@comment lib/qt4/libQt3Support.la
lib/qt4/libQt3Support.la
lib/qt4/libQt3Support.prl
lib/qt4/libQtCLucene.la
lib/qt4/libQtCLucene.prl
@comment lib/qt4/libQtCore.la
lib/qt4/libQtCore.la
lib/qt4/libQtCore.prl
lib/qt4/libQtDBus.la
lib/qt4/libQtDBus.prl
@ -3001,21 +3001,21 @@ lib/qt4/libQtDeclarative.la
lib/qt4/libQtDeclarative.prl
lib/qt4/libQtDesigner.prl
lib/qt4/libQtDesignerComponents.prl
@comment lib/qt4/libQtGui.la
lib/qt4/libQtGui.la
lib/qt4/libQtGui.prl
lib/qt4/libQtHelp.la
lib/qt4/libQtHelp.prl
lib/qt4/libQtMultimedia.la
lib/qt4/libQtMultimedia.prl
@comment lib/qt4/libQtNetwork.la
lib/qt4/libQtNetwork.la
lib/qt4/libQtNetwork.prl
@comment lib/qt4/libQtOpenGL.la
lib/qt4/libQtOpenGL.la
lib/qt4/libQtOpenGL.prl
lib/qt4/libQtScript.la
lib/qt4/libQtScript.prl
lib/qt4/libQtScriptTools.la
lib/qt4/libQtScriptTools.prl
@comment lib/qt4/libQtSql.la
lib/qt4/libQtSql.la
lib/qt4/libQtSql.prl
lib/qt4/libQtSvg.la
lib/qt4/libQtSvg.prl
@ -3023,11 +3023,11 @@ lib/qt4/libQtTest.la
lib/qt4/libQtTest.prl
lib/qt4/libQtUiTools.a
lib/qt4/libQtUiTools.prl
@comment lib/qt4/libQtXml.la
lib/qt4/libQtXml.la
lib/qt4/libQtXml.prl
lib/qt4/libQtXmlPatterns.la
lib/qt4/libQtXmlPatterns.prl
@comment lib/qt4/libphonon.la
lib/qt4/libphonon.la
lib/qt4/libphonon.prl
lib/qt4/mkspecs/
lib/qt4/mkspecs/aix-g++/

View File

@ -1,6 +0,0 @@
@comment $OpenBSD: PLIST-phonon,v 1.1 2008/10/21 22:20:00 espie Exp $
bin/qtconfig4
@bin lib/qt4/bin/qtconfig
lib/qt4/libphonon.la
lib/qt4/libphonon.prl
%%SHARED%%