void-packages/srcpkgs/qt/template

178 lines
5.1 KiB
Plaintext
Raw Normal View History

# Template file for 'qt'
pkgname=qt
2014-04-27 10:15:11 +02:00
version=4.8.6
revision=1
_distname=qt-everywhere-opensource-src
patch_args="-Np1"
wrksrc=${_distname}-${version}
homepage="http://qt-project.com/"
short_desc="A cross-platform application and UI framework"
maintainer="Juan RP <xtraeme@gmail.com>"
2011-10-08 10:54:06 +02:00
license="GPL-3, LGPL-2.1"
distfiles="http://download.qt-project.org/official_releases/qt/4.8/${version}/${_distname}-${version}.tar.gz"
2014-04-27 10:15:11 +02:00
checksum=8b14dd91b52862e09b8e6a963507b74bc2580787d171feda197badfa7034032c
2014-02-20 10:43:02 +01:00
if [ "$CROSS_BUILD" ]; then
msg_red "${pkgname}-${version}: this package cannot be cross compiled right now.\n"
exit 0
2014-02-20 10:43:02 +01:00
fi
hostmakedepends="pkg-config"
makedepends="libpng-devel>=1.6 MesaLib-devel libXrender-devel unixodbc-devel
2012-11-29 20:56:35 +01:00
fontconfig-devel libXi-devel libXv-devel libXinerama-devel libXrandr-devel
libXcursor-devel dbus-devel glib-devel icu-devel cups-devel libjpeg-turbo-devel
sqlite-devel alsa-lib-devel openssl-devel tiff-devel libmng-devel libxshmfence-devel
libSM-devel gtk+-devel libmysqlclient-devel>=5.5.27 postgresql-libs-devel
pulseaudio-devel"
pre_configure() {
sed -i "s|-O2|${CXXFLAGS}|" mkspecs/common/{g++,gcc}-base.conf
sed -i "/^QMAKE_LFLAGS_RPATH/s| -Wl,-rpath,||g" mkspecs/common/gcc-base-unix.conf
sed -i "/^QMAKE_LFLAGS\s/s|+=|+= ${LDFLAGS}|g" mkspecs/common/gcc-base.conf
}
2012-11-29 20:56:35 +01:00
2011-11-03 17:46:10 +01:00
do_configure() {
export LD_LIBRARY_PATH="${wrksrc}/lib:${LD_LIBRARY_PATH}"
2013-04-14 17:45:22 +02:00
export LD="$CXX"
./configure -confirm-license -opensource \
-prefix /usr -sysconfdir /etc -plugindir /usr/lib/qt/plugins \
2011-10-08 10:54:06 +02:00
-importdir /usr/lib/qt/imports \
-translationdir /usr/share/qt/translations \
-datadir /usr/share/qt \
-nomake demos -nomake examples -nomake docs -gtkstyle \
-system-sqlite -no-phonon -no-phonon-backend \
-graphicssystem raster -openssl-linked -silent -no-rpath \
-optimized-qmake -reduce-relocations -dbus-linked -no-openvg
2011-11-03 17:46:10 +01:00
}
2011-11-03 17:46:10 +01:00
do_build() {
2013-04-14 17:45:22 +02:00
export LD_LIBRARY_PATH="${wrksrc}/lib:${LD_LIBRARY_PATH}"
export LD="$CXX"
make ${makejobs}
}
2011-11-03 17:46:10 +01:00
do_install() {
local hicolordir=${DESTDIR}/usr/share/icons/hicolor
make INSTALL_ROOT=${DESTDIR} install
2012-01-13 10:45:25 +01:00
# delete tests
rm -rf ${DESTDIR}/usr/tests
# install missing icons and desktop files
for icon in tools/linguist/linguist/images/icons/linguist-*-32.png ; do
size=$(echo $(basename ${icon}) | cut -d- -f2)
install -D -m644 ${icon} \
${hicolordir}/${size}x${size}/apps/linguist.png
done
2011-11-03 17:46:10 +01:00
install -Dm644 src/gui/dialogs/images/qtlogo-64.png \
${hicolordir}/64x64/apps/qtlogo.png
2011-11-03 17:46:10 +01:00
install -Dm644 src/gui/dialogs/images/qtlogo-64.png \
${DESTDIR}/usr/share/pixmaps/qtlogo.png
2011-11-03 17:46:10 +01:00
install -Dm644 tools/assistant/tools/assistant/images/assistant.png \
${hicolordir}/32x32/apps/assistant.png
2011-11-03 17:46:10 +01:00
install -Dm644 tools/designer/src/designer/images/designer.png \
${hicolordir}/128x128/apps/designer.png
install -d ${DESTDIR}/usr/share/applications
install -m644 ${FILESDIR}/*.desktop \
${DESTDIR}/usr/share/applications
2012-05-23 23:10:40 +02:00
vinstall LGPL_EXCEPTION.txt 644 usr/share/licenses/qt
}
2013-04-14 17:45:22 +02:00
qt-designer_package() {
depends="hicolor-icon-theme"
short_desc+=" - GUI designer"
2013-04-14 17:45:22 +02:00
pkg_install() {
vmove usr/bin/designer
vmove "usr/lib/libQtDesigner.so*"
vmove "usr/lib/libQtDesignerComponents.so*"
vmove usr/lib/qt/plugins/designer
vmove "usr/share/icons/hicolor/128x128/apps/designer.*"
vmove "usr/share/applications/designer.*"
vmove "usr/share/qt/translations/designer*"
}
}
qt-devel-tools_package() {
depends="hicolor-icon-theme"
short_desc+=" - development tools"
2013-04-14 17:45:22 +02:00
pkg_install() {
for f in assistant* lconvert linguist pixeltool qcollectiongenerator \
qhelp* xmlpatterns* qttrace* qdoc3 qmlviewer; do
2013-04-14 17:45:22 +02:00
vmove usr/bin/${f}
done
vmove usr/share/icons/hicolor
for f in linguist assistant; do
vmove usr/share/applications/${f}.desktop
[ ! -f ${DESTDIR}/usr/share/pixmaps/${f}.png ] && continue
vmove usr/share/pixmaps/${f}.png
done
vmove usr/share/qt/phrasebooks
}
}
qt-devel_package() {
lib32depends="libX11-devel>=0 icu-devel>=0"
2013-04-14 17:45:22 +02:00
depends="qt-qmake libX11-devel icu-devel"
short_desc+=" - development files"
2013-04-14 17:45:22 +02:00
pkg_install() {
for f in lrelease lupdate moc qdbuscpp2xml qdbusxml2cpp qt3to4 \
rcc uic uic3; do
vmove usr/bin/${f}
done
vmove usr/include
vmove "usr/lib/*.a"
vmove "usr/lib/*.prl"
vmove usr/lib/pkgconfig
}
}
qt-plugin-odbc_package() {
short_desc+=" - ODBC plugin"
pkg_install() {
vmove usr/lib/qt/plugins/sqldrivers/libqsqlodbc.so
}
}
qt-plugin-pgsql_package() {
short_desc+=" - PostgreSQL plugin"
pkg_install() {
vmove usr/lib/qt/plugins/sqldrivers/libqsqlpsql.so
}
}
qt-plugin-mysql_package() {
short_desc+=" - MySQL plugin"
pkg_install() {
vmove usr/lib/qt/plugins/sqldrivers/libqsqlmysql.so
}
}
qt-plugin-sqlite_package() {
short_desc+=" - SQLite plugin"
pkg_install() {
vmove usr/lib/qt/plugins/sqldrivers/libqsqlite.so
}
}
qt-qmake_package() {
short_desc+=" - qmake Makefile generator tool"
pkg_install() {
2013-04-14 17:45:22 +02:00
vmove usr/bin/qmake
vmove usr/share/qt/mkspecs
}
}
qt-qtconfig_package() {
depends="hicolor-icon-theme"
short_desc+=" - configuration tool"
pkg_install() {
vmove usr/bin/qtconfig
vmove usr/share/applications/qtconfig.desktop
vmove usr/share/pixmaps/qtlogo.png
vmove "usr/share/qt/translations/qtconfig*"
}
}