diff options
author | Pawel 'l0ner' Soltys <[email protected]> | 2012-01-13 13:13:53 +0100 |
---|---|---|
committer | Pawel 'l0ner' Soltys <[email protected]> | 2012-01-13 13:13:53 +0100 |
commit | 98ad00377d3bffc225540571113008dc2e66ea69 (patch) | |
tree | ff3ad6fcdc0980d6cd6e5e86ebbb49cf4ecd1860 | |
parent | db9adacbc1b5ceca4b8b0649cbbc9e4865865953 (diff) | |
download | tde-packaging-98ad00377d3bffc225540571113008dc2e66ea69.tar.gz tde-packaging-98ad00377d3bffc225540571113008dc2e66ea69.zip |
qt3: depdndency fix, patched odbc module, added sime tweaks form arch
extras/qt3 package
-rw-r--r-- | arch/3.5.13/trinity-base/trinity-qt3/PKGBUILD | 92 | ||||
-rw-r--r-- | arch/3.5.13/trinity-base/trinity-qt3/qt-odbc.patch | 64 |
2 files changed, 140 insertions, 16 deletions
diff --git a/arch/3.5.13/trinity-base/trinity-qt3/PKGBUILD b/arch/3.5.13/trinity-base/trinity-qt3/PKGBUILD index 0f803979d..1dbb6585d 100644 --- a/arch/3.5.13/trinity-base/trinity-qt3/PKGBUILD +++ b/arch/3.5.13/trinity-base/trinity-qt3/PKGBUILD @@ -1,42 +1,61 @@ -# Maintainer: Calvin Morrison <[email protected]> +# Maintainer: Pawel 'l0ner' Soltys <[email protected]> +# Contributor: Calvin Morrison <[email protected]> pkgname=trinity-qt3 pkgver=3884 pkgrel=3 +pkgdesc="The Qt3 gui toolkit - with Trinity upstream" arch=('i686' 'x86_64') url="http://trinitydesktop.org" license=('GPL') groups=('trinity-base') -pkgdesc="The Qt3 gui toolkit - with Trinity upstream" -depends=('libjpeg-turbo' 'libmng' 'libmysqlclient' 'libpng' 'libxmu' 'libxcursor' 'libxinerama' 'libxft' 'libxrandr' 'mesa' 'postgresql-libs') -makedepends=('cups' 'libxi' 'mysql' 'postgresql' 'unixodbc' 'sqlite3') -provides=('trinity-qt3' 'qt3') -conflicts=('qt3' 'qt3-enhanced') -replaces=('trinity-qt3') -options=(!libtool) -source=(http://mirror.ets.kth.se/trinity/releases/3.5.13/dependencies/qt3-3.3.8.d.tar.gz) -md5sums=('78dc675e84aed595375449818cbb589a') +depends=('libpng' 'libxmu' 'libxcursor' 'libxinerama' 'mesa' 'libxft' + 'libxrandr' 'libmng') + # libmysqlclient - moved to optdepends + # postgresqli-libs - moved to optdepends + # libjpeg-turbo - removed since it's not present in extra/qt3 PKGBUILD +makedepends=('libxi' + 'mysql' 'postgresql' 'unixodbc' 'sqlite3') + # cups [add for cups support, add -cups to ./configure opts] +optdepends=('libmysqlclient' 'postgresql-libs' 'unixodbc') +provides=('trinity-qt3' 'qt3' 'qt3-enhanced' ) +conflicts=('qt3') +replaces=('qt3-enhanced') +options=('!libtool' '!emptydirs') +source=('http://mirror.ets.kth.se/trinity/releases/3.5.13/dependencies/qt3-3.3.8.d.tar.gz' 'qt-odbc.patch') +md5sums=('78dc675e84aed595375449818cbb589a' + '32772739fc53062e9151a6e283c52add') _prefix="/opt/qt" -_builddir="qt3" # install=qt.install build() { msg "Setting enviroment variables..." - export QTDIR="${srcdir}/${_builddir}/" + export QTDIR="${srcdir}/qt3/" export PATH=${QTDIR}/bin:${PATH} export LD_LIBRARY_PATH=${QTDIR}/lib:${LD_LIBRARY_PATH} export QMAKESPEC=$QTDIR/mkspecs/linux-g++ if [ "$CARCH" = "x86_64" ]; then export ARCH="-64" - else unset ARCH + else unset ARCH fi - cd "${srcdir}/${_builddir}" + # fix build problem against new unixODBC + patch -p1 -i "${srcdir}"/qt-odbc.patch + + cd "${srcdir}/qt3" rm -rf mkspecs/{*aix*,*bsd*,cygwin*,dgux*,darwin*,hpux*,hurd*,irix*,lynxos*,macx*,qnx*,reliant*,sco*,solaris*,tru64*,unixware*,win32*} + sed -i 's|-cp -P -f|-cp -L -f|' qmake/Makefile.unix + rm -rf doc/html examples tutorial + sed -i "s|sub-tutorial sub-examples||" Makefile + sed -i "s|-O2|$CXXFLAGS|" mkspecs/linux-g++/qmake.conf + sed -i "s|-O2|$CXXFLAGS|" mkspecs/linux-g++-32/qmake.conf + sed -i "s|-O2|$CXXFLAGS|" mkspecs/linux-g++-64/qmake.conf + sed -i "s|-I. |$CXXFLAGS -I. |" qmake/Makefile.unix + # auto license acceptance sed -i "s|read acceptance|acceptance=yes|" configure @@ -44,21 +63,50 @@ build() { #make -C qmake || return 1 ./configure \ -prefix ${_prefix} \ + -platform linux-g++${ARCH} \ -sysconfdir /etc/qt \ + -release \ + -sm \ + -nis \ + -stl \ + -no-g++-exceptions \ -thread \ -shared \ -system-zlib \ -system-lib{png,jpeg,mng} \ -qt-gif \ - -cups + -plugin-sql-{mysql,psql,sqlite,odbc} + + # 64bit fixes pulled from extras/qt3 PKGBUILD + # fix /opt/qt/lib path + [ "$CARCH" = "x86_64" ] && sed -i "s|/opt/qt/lib64|/opt/qt/lib|g" "${srcdir}"/qt3/src/Makefile + [ "$CARCH" = "x86_64" ] && sed -i "s|/opt/qt/lib64|/opt/qt/lib|g" "${srcdir}"/qt3/tools/designer/designer/Makefile + [ "$CARCH" = "x86_64" ] && sed -i "s|/opt/qt/lib64|/opt/qt/lib|g" "${srcdir}"/qt3/tools/designer/editor/Makefile + [ "$CARCH" = "x86_64" ] && sed -i "s|/opt/qt/lib64|/opt/qt/lib|g" "${srcdir}"/qt3/tools/assistant/lib/Makefile + [ "$CARCH" = "x86_64" ] && sed -i "s|/opt/qt/lib64|/opt/qt/lib|g" "${srcdir}"/qt3/tools/designer/uilib/Makefile msg "Building - $pkgname..." + + # build sql plugins + cd "${srcdir}"/qt3 + make -C qmake + cd "${srcdir}"/qt3/plugins/src/sqldrivers/mysql + "${srcdir}"/qt3/bin/qmake -o Makefile "INCPATH+=/usr/include/mysql" "LIBS+=-L/usr/lib/mysql -lmysqlclient" mysql.pro + cd "${srcdir}"/qt3/plugins/src/sqldrivers/psql + "${srcdir}"/qt3/bin/qmake -o Makefile "INCPATH+=/usr/src/include /usr/include/postgresql/server" "LIBS+=-L/usr/lib -lpq" psql.pro + + cd "${srcdir}"/qt3 + + # fix the broken makefiles + # sed -i 's|[[:space:]]*strip.*doc/html.*$|#|g' src/Makefile + + # build rest make } package() { msg "Packaging - $pkgname-$pkgver" - cd "$srcdir/${_builddir}" + cd "$srcdir/qt3" # Build ld.so.conf file echo "${_prefix}" > ${srcdir}/libqt-mt.conf @@ -75,4 +123,16 @@ package() { install -D -m755 ${srcdir}/qt.profile ${pkgdir}/etc/profile.d/qt3.sh make INSTALL_ROOT="$pkgdir" install + + rm -rf "${pkgdir}"/opt/qt/{phrasebooks,templates,translations} + sed -i "s|-L${srcdir}/qt3/lib ||g" "${pkgdir}"/opt/qt/lib/*.prl + install -D -m755 qmake/qmake "${pkgdir}"/opt/qt/bin/qmake + + ln -sf /opt/qt/bin/qtconfig "${pkgdir}"/opt/qt/bin/qt3config + rm -f "${pkgdir}"/opt/qt/mkspecs/linux-g++$ARCH/linux-g++$ARCH + + # install man pages + install -d -m755 "${pkgdir}"/opt/qt/man + cp -r "${srcdir}"/qt3/doc/man/{man1,man3} "${pkgdir}"/opt/qt/man/ + } diff --git a/arch/3.5.13/trinity-base/trinity-qt3/qt-odbc.patch b/arch/3.5.13/trinity-base/trinity-qt3/qt-odbc.patch new file mode 100644 index 000000000..2fefa8155 --- /dev/null +++ b/arch/3.5.13/trinity-base/trinity-qt3/qt-odbc.patch @@ -0,0 +1,64 @@ +diff -u -r qt3/src/sql/drivers/odbc/qsql_odbc.cpp src/qt3/src/sql/drivers/odbc/qsql_odbc.cpp +--- qt3/src/sql/drivers/odbc/qsql_odbc.cpp 2011-10-30 19:55:58.000000000 +0100 ++++ src/qt3/src/sql/drivers/odbc/qsql_odbc.cpp 2012-01-13 01:24:59.000000000 +0100 +@@ -61,19 +61,18 @@ + #endif + + // newer platform SDKs use SQLLEN instead of SQLINTEGER +-#ifdef SQLLEN ++#if defined(SQLLEN) || defined(Q_OS_WIN64) || defined(Q_OS_UNIX) + # define QSQLLEN SQLLEN + #else + # define QSQLLEN SQLINTEGER + #endif + +-#ifdef SQLULEN ++#if defined(SQLULEN) || defined(Q_OS_WIN64) || defined(Q_OS_UNIX) + # define QSQLULEN SQLULEN + #else + # define QSQLULEN SQLUINTEGER + #endif + +- + static const QSQLLEN COLNAMESIZE = 256; + //Map Qt parameter types to ODBC types + static const SQLSMALLINT qParamType[ 4 ] = { SQL_PARAM_INPUT, SQL_PARAM_INPUT, SQL_PARAM_OUTPUT, SQL_PARAM_INPUT_OUTPUT }; + +diff -u -r qt3/plugins/src/sqldrivers/odbc/odbc.pro src/qt3/plugins/src/sqldrivers/odbc/odbc.pro +--- qt3/plugins/src/sqldrivers/odbc/odbc.pro 2011-10-30 19:55:57.000000000 +0100 ++++ src/qt3/plugins/src/sqldrivers/odbc/odbc.pro 2012-01-13 01:39:11.000000000 +0100 +@@ -10,14 +10,14 @@ + + mac { + !contains( LIBS, .*odbc.* ) { +- LIBS *= -liodbc ++ LIBS *= -lodbc + } + } + + unix { + OBJECTS_DIR = .obj + !contains( LIBS, .*odbc.* ) { +- LIBS *= -liodbc ++ LIBS *= -lodbc + } + } + +diff -u -r qt3/src/sql/qt_sql.pri src/qt3/src/sql/qt_sql.pri +--- qt3/src/sql/qt_sql.pri 2011-10-30 19:55:58.000000000 +0100 ++++ src/qt3/src/sql/qt_sql.pri 2012-01-13 01:39:31.000000000 +0100 +@@ -110,13 +110,13 @@ + + mac { + !contains( LIBS, .*odbc.* ) { +- LIBS *= -liodbc ++ LIBS *= -lodbc + } + } + + unix { + !contains( LIBS, .*odbc.* ) { +- LIBS *= -liodbc ++ LIBS *= -lodbc + } + } |