qwt6-qt4 stable port information

Info2: <<
Package: qwt6-qt4-%type_pkg[gui]
Version: 6.0.1
Revision: 1
Type: gui (x11 mac)
Description: Qt Widgets for Technical Applications
Homepage: http://qwt.sourceforge.net
License: LGPL
Maintainer: Daniel Macks
Depends: <<
%N-shlibs (= %v-%r),
libiconv,
libpng15-shlibs,
qt4-base-%type_pkg[gui]-qtcore-shlibs (>= 4.7.3-1),
qt4-base-%type_pkg[gui]-qtgui-shlibs (>= 4.7.3-1),
qt4-base-%type_pkg[gui]-qtsvg-shlibs (>= 4.7.3-1)
<<
BuildDepends: <<
fink (>= 0.27.2),
fink-package-precedence,
libiconv-dev,
libpng15,
qt4-base-%type_pkg[gui] (>= 4.7.3-1),
system-openssl-dev,
(%type_pkg[gui] = x11) x11-dev
<<
BuildDependsOnly: true
# BDO pkgs orthogonal in qwt6-qt4-* but historically not in qwt-qt4-*
Conflicts: qwt-qt4-x11, qwt-qt4-mac, qwt-doc, qwt-qt4-mac-doc
Replaces: qwt-qt4-x11, qwt-qt4-mac, qwt-doc, qwt-qt4-mac-doc

Source: mirror:sourceforge:qwt/qwt-%v.tar.bz2
Source-MD5: ace68558eab873e2da7e641179c4ef0c

PatchFile: qwt6-qt4.patch
PatchFile-MD5: 099e0d434827761464c859c6131d09ae
PatchScript: sed 's,@PREFIX@,%p,g; s,@GUI@,%type_pkg[gui],' < %{PatchFile} | patch -p1

GCC: 4.0

CompileScript: <<
#!/bin/sh -ev
unset QMAKESPEC
export QTDIR=%p/lib/qt4-%type_pkg[gui]
export PATH="$QTDIR/bin:$PATH"
qmake qwt.pro QMAKE_CXXFLAGS=-MD
make
fink-package-precedence --depfile-ext='\.d' --prohibit-bdep=%n .
<<

InstallScript: <<
make install INSTALL_ROOT=%d

mkdir -p %i/lib/qt4-%type_pkg[gui]/qwt
cp -R examples %i/lib/qt4-%type_pkg[gui]/qwt/
<<

DocFiles: COPYING CHANGES README

SplitOff: <<
Package: qwt6-qt4-%type_pkg[gui]-designer-plugin
Depends: <<
%N-shlibs (= %v-%r),
libiconv,
libpng15-shlibs,
qt4-base-%type_pkg[gui]-qtcore-shlibs (>= 4.7.3-1),
qt4-base-%type_pkg[gui]-qtdesigner-shlibs (>= 4.7.3-1),
qt4-base-%type_pkg[gui]-qtgui-shlibs (>= 4.7.3-1),
qt4-base-%type_pkg[gui]-qtscript-shlibs (>= 4.7.3-1),
qt4-base-%type_pkg[gui]-qtxml-shlibs (>= 4.7.3-1)
<<
Conflicts: qwt-qt4-%type_pkg[gui]-designer-plugin
Replaces: qwt-qt4-%type_pkg[gui]-designer-plugin
Files: lib/qt4-%type_pkg[gui]/plugins/designer
DocFiles: COPYING CHANGES README
<<

Splitoff2: <<
Package: %N-shlibs
Depends: <<
libiconv,
libpng15-shlibs,
qt4-base-%type_pkg[gui]-qtcore-shlibs (>= 4.7.3-1),
qt4-base-%type_pkg[gui]-qtgui-shlibs (>= 4.7.3-1),
qt4-base-%type_pkg[gui]-qtsvg-shlibs (>= 4.7.3-1),
qt4-base-%type_pkg[gui]-qtxml-shlibs (>= 4.7.3-1)

<<
Replaces: %N ( << 5.2.0-1 )
Files: <<
(%type_pkg[gui] = x11) lib/qt4-%type_pkg[gui]/lib/libqwt.6*.dylib
(%type_pkg[gui] = x11) lib/qt4-%type_pkg[gui]/lib/libqwtmathml.6*.dylib
(%type_pkg[gui] = mac) lib/qt4-%type_pkg[gui]/lib/qwt.framework/Versions/6/qwt
(%type_pkg[gui] = mac) lib/qt4-%type_pkg[gui]/lib/qwtmathml.framework/Versions/6/qwtmathml
<<
Shlibs: <<
(%type_pkg[gui] = x11) %p/lib/qt4-%type_pkg[gui]/lib/libqwt.6.dylib 6.0.0 %n (>= 6.0.1-1)
(%type_pkg[gui] = x11) %p/lib/qt4-%type_pkg[gui]/lib/libqwtmathml.6.dylib 6.0.0 %n (>= 6.0.1-1)
(%type_pkg[gui] = mac) %p/lib/qt4-%type_pkg[gui]/lib/qwt.framework/Versions/6/qwt 6.0.0 %n (>= 6.0.1-1)
(%type_pkg[gui] = mac) %p/lib/qt4-%type_pkg[gui]/lib/qwtmathml.framework/Versions/6/qwtmathml 6.0.0 %n (>= 6.0.1-1)
<<
Description: Qt Widgets for Technical Applications -- shared library
DocFiles: COPYING CHANGES README
<<

DescDetail: <<
Qwt is a graphics extension to the Qt GUI application
framework from Trolltech AS of Norway. It provides a
2D plotting widget and more.
<<
DescPackaging: <<
dmacks fixed dependency-tracking for parallel build and
linking against builddir lib (5.2.0-5)

dmacks overhauled the packaging layout, reeling various -doc
splitoffs into the main package (they are for developers using
the library and their names were confusing) as of 5.2.2-2,
which will make it easier to swap among various libversions,
and varianted.
<<
DescPort: <<
darwin doesn't have clockid_t so use Mac-native timers even
in -x11 variant (upstream conflates platform and gui-mode)
<<
<<

qwt6-qt4 stable port .patch

diff -Nurd -x'*~' qwt-6.0.1.orig/designer/designer.pro qwt-6.0.1/designer/designer.pro
--- qwt-6.0.1.orig/designer/designer.pro 2011-08-01 10:33:53.000000000 -0400
+++ qwt-6.0.1/designer/designer.pro 2011-08-17 19:28:19.000000000 -0400
@@ -27,16 +27,15 @@

contains(QWT_CONFIG, QwtFramework) {

- LIBS += -F$${QWT_ROOT}/lib
+ LIBFILE = $${QWT_ROOT}/lib/qwt.framework/qwt
}
else {

- LIBS += -L$${QWT_ROOT}/lib
+ LIBFILE = $${QWT_ROOT}/lib/libqwt.$${QMAKE_EXTENSION_SHLIB}
}

- IPATH = $${INCLUDEPATH}
- qtAddLibrary(qwt)
- INCLUDEPATH = $${IPATH}
+ PRE_TARGETDEPS += $${LIBFILE}
+ LIBS += $${LIBFILE}

contains(QWT_CONFIG, QwtDll) {

diff -Nurd -x'*~' qwt-6.0.1.orig/examples/examples.pri qwt-6.0.1/examples/examples.pri
--- qwt-6.0.1.orig/examples/examples.pri 2011-08-01 10:33:53.000000000 -0400
+++ qwt-6.0.1/examples/examples.pri 2011-08-17 19:25:48.000000000 -0400
@@ -21,16 +21,15 @@

contains(QWT_CONFIG, QwtFramework) {

- LIBS += -F$${QWT_ROOT}/lib
+ LIBFILE = $${QWT_ROOT}/lib/qwt.framework/qwt
}
else {

- LIBS += -L$${QWT_ROOT}/lib
+ LIBFILE = $${QWT_ROOT}/lib/libqwt.$${QMAKE_EXTENSION_SHLIB}
}

-IPATH = $${INCLUDEPATH}
-qtAddLibrary(qwt)
-INCLUDEPATH = $${IPATH}
+PRE_TARGETDEPS += $${LIBFILE}
+LIBS += $${LIBFILE}

contains(QWT_CONFIG, QwtSvg) {

diff -Nurd -x'*~' qwt-6.0.1.orig/qwt.pro qwt-6.0.1/qwt.pro
--- qwt-6.0.1.orig/qwt.pro 2011-08-01 10:33:53.000000000 -0400
+++ qwt-6.0.1/qwt.pro 2011-08-17 07:48:25.000000000 -0400
@@ -16,12 +16,16 @@
src \
textengines

+textengines.depends = src
+
contains(QWT_CONFIG, QwtDesigner ) {
SUBDIRS += designer
+ designer.depends = src
}

contains(QWT_CONFIG, QwtExamples ) {
SUBDIRS += examples
+ designer.depends = src
}

qwtspec.files = qwtconfig.pri qwt.prf
diff -Nurd -x'*~' qwt-6.0.1.orig/qwtbuild.pri qwt-6.0.1/qwtbuild.pri
--- qwt-6.0.1.orig/qwtbuild.pri 2011-08-01 10:33:53.000000000 -0400
+++ qwt-6.0.1/qwtbuild.pri 2011-08-17 08:28:08.000000000 -0400
@@ -14,7 +14,6 @@
CONFIG += qt
CONFIG += warn_on
CONFIG += no_keywords
-CONFIG += silent

######################################################################
# release/debug mode
@@ -64,6 +63,8 @@
# linker path, so that the installed libraries will be
# used instead of the local ones.

- error( "local build will conflict with $${QMAKE_LIBDIR_QT}/libqwt.*" )
+ #fink's hacks overcome this build-system stupidity
+ #error( "local build will conflict with $${QMAKE_LIBDIR_QT}/libqwt.*" )
}
}
+QMAKE_LFLAGS_SONAME = -install_name$${LITERAL_WHITESPACE}@PREFIX@/lib/qt4-@GUI@/lib/
diff -Nurd -x'*~' qwt-6.0.1.orig/qwtconfig.pri qwt-6.0.1/qwtconfig.pri
--- qwt-6.0.1.orig/qwtconfig.pri 2011-08-01 10:33:53.000000000 -0400
+++ qwt-6.0.1/qwtconfig.pri 2011-08-18 09:17:04.000000000 -0400
@@ -19,15 +19,15 @@
QWT_INSTALL_PREFIX = $$[QT_INSTALL_PREFIX]

unix {
- QWT_INSTALL_PREFIX = /usr/local/qwt-$$QWT_VERSION
+ QWT_INSTALL_PREFIX = @PREFIX@/lib/qt4-@GUI@
}

win32 {
QWT_INSTALL_PREFIX = C:/Qwt-$$QWT_VERSION
}

-QWT_INSTALL_DOCS = $${QWT_INSTALL_PREFIX}/doc
-QWT_INSTALL_HEADERS = $${QWT_INSTALL_PREFIX}/include
+QWT_INSTALL_DOCS = @PREFIX@/share/doc/qt4-@GUI@
+QWT_INSTALL_HEADERS = $${QWT_INSTALL_PREFIX}/include/qwt
QWT_INSTALL_LIBS = $${QWT_INSTALL_PREFIX}/lib

######################################################################
@@ -105,7 +105,7 @@
# Otherwise you have to build them from the examples directory.
######################################################################

-# QWT_CONFIG += QwtExamples
+QWT_CONFIG += QwtExamples

######################################################################
# When Qt has been built as framework qmake ( qtAddLibrary ) wants
diff -Nurd -x'*~' qwt-6.0.1.orig/src/qwt_system_clock.cpp qwt-6.0.1/src/qwt_system_clock.cpp
--- qwt-6.0.1.orig/src/qwt_system_clock.cpp 2011-08-01 10:33:53.000000000 -0400
+++ qwt-6.0.1/src/qwt_system_clock.cpp 2011-08-18 09:57:09.000000000 -0400
@@ -14,7 +14,7 @@
#include
#endif

-#if defined(Q_OS_MAC)
+#if defined(__APPLE__)
#include
#include
#define QWT_HIGH_RESOLUTION_CLOCK
@@ -43,7 +43,7 @@

private:

-#if defined(Q_OS_MAC)
+#if defined(__APPLE__)
static double msecsTo( uint64_t, uint64_t );

uint64_t d_timeStamp;
@@ -64,7 +64,7 @@
#endif
};

-#if defined(Q_OS_MAC)
+#if defined(__APPLE__)
QwtHighResolutionClock::QwtHighResolutionClock():
d_timeStamp( 0 )
{
diff -Nurd -x'*~' qwt-6.0.1.orig/src/src.pro qwt-6.0.1/src/src.pro
--- qwt-6.0.1.orig/src/src.pro 2011-08-01 10:33:53.000000000 -0400
+++ qwt-6.0.1/src/src.pro 2011-08-17 08:28:25.000000000 -0400
@@ -216,7 +216,7 @@

target.path = $${QWT_INSTALL_LIBS}

-doc.files = $${QWT_ROOT}/doc/html
+doc.files = $${QWT_ROOT}/doc/html
unix:doc.files += $${QWT_ROOT}/doc/man
doc.path = $${QWT_INSTALL_DOCS}

diff -Nurd -x'*~' qwt-6.0.1.orig/textengines/textengines.pri qwt-6.0.1/textengines/textengines.pri
--- qwt-6.0.1.orig/textengines/textengines.pri 2011-08-01 10:33:53.000000000 -0400
+++ qwt-6.0.1/textengines/textengines.pri 2011-08-17 19:27:24.000000000 -0400
@@ -29,16 +29,15 @@
contains(QWT_CONFIG, QwtFramework) {

CONFIG += lib_bundle
- LIBS += -F$${QWT_ROOT}/lib
+ LIBFILE = $${QWT_ROOT}/lib/qwt.framework/qwt
}
else {

- LIBS += -L$${QWT_ROOT}/lib
+ LIBFILE = $${QWT_ROOT}/lib/libqwt.$${QMAKE_EXTENSION_SHLIB}
}

-IPATH = $${INCLUDEPATH}
-qtAddLibrary(qwt)
-INCLUDEPATH = $${IPATH}
+PRE_TARGETDEPS += $${LIBFILE}
+LIBS += $${LIBFILE}

# Install directives

qwt6-qt4 _unstable_ port .patch