lib32/lib32-qt/PKGBUILD

95 lines
3.4 KiB
Bash
Raw Normal View History

2011-01-15 22:29:29 +08:00
# Lib32 Packages for Chakra, part of chakra-project.org
#
# maintainer Anke Boersma <abveritas[at]chakra-project[dot]org>
2011-01-15 22:29:29 +08:00
_pkgbasename=qt
pkgname="lib32-${_pkgbasename}"
2012-11-30 07:01:33 +08:00
pkgver=4.8.4
pkgrel=1
pkgdesc='A cross-platform application and UI framework. (ELF32)'
2011-01-15 22:29:29 +08:00
arch=('x86_64')
url='http://qt-project.org/'
2011-01-15 22:29:29 +08:00
license=('GPL3' 'LGPL')
depends=(lib32-{fontconfig,sqlite3,alsa-lib,glib2,dbus-core,openssl,gstreamer0.10,gstreamer0.10-base}
lib32-lib{png,tiff,mng,gl,sm,xrandr,xv,xi,xinerama,xcursor,xfixes,ffi,xml2}
"${_pkgbasename}=${pkgver}")
makedepends=('cups' 'gcc-multilib' lib32-{mesa,libcups,libxfixes})
2011-01-15 22:29:29 +08:00
options=('!libtool')
_pkgfqn="${_pkgbasename}-everywhere-opensource-src-${pkgver}"
2012-05-28 04:30:54 +08:00
source=("http://releases.qt-project.org/qt4/source/${_pkgfqn}.tar.gz")
2012-11-30 07:01:33 +08:00
md5sums=('89c5ecba180cae74c66260ac732dc5cb')
2011-01-15 22:29:29 +08:00
build() {
cd "${srcdir}/${_pkgfqn}"
export CC='gcc -m32'
export CXX='g++ -m32'
2011-01-15 22:29:29 +08:00
export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
export QT4DIR="${srcdir}/${_pkgfqn}"
export LD_LIBRARY_PATH="${QT4DIR}/lib:${LD_LIBRARY_PATH}"
# some of those are likely unnecessary, but I'm too lazy to find and remove them
sed -i "/^QMAKE_LINK\s/s|g++|g++ -m32|g" mkspecs/common/g++-base.conf
sed -i "s|-O2|${CXXFLAGS} -m32|" mkspecs/common/g++-base.conf
sed -i "s|-O2|${CXXFLAGS} -m32|" mkspecs/common/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} -m32|g" mkspecs/common/gcc-base.conf
sed -i "s|-Wl,-O1|-m32 -Wl,-O1|" mkspecs/common/g++-unix.conf
sed -e "s|-O2|$CXXFLAGS -m32|" \
-e "/^QMAKE_RPATH/s| -Wl,-rpath,||g" \
-e "/^QMAKE_LINK\s/s|g++|g++ -m32|g" \
-e "/^QMAKE_LFLAGS\s/s|+=|+= $LDFLAGS|g" \
-i mkspecs/common/g++.conf
2011-01-15 22:29:29 +08:00
./configure -confirm-license -opensource -v -platform linux-g++-32 \
-prefix /usr \
-libdir /usr/lib32 \
-plugindir /usr/lib32/qt/plugins \
-importdir /usr/lib32/qt/imports \
-datadir /usr/share/qt \
-translationdir /usr/share/qt/translations \
-sysconfdir /etc \
-system-sqlite \
-no-phonon \
-no-phonon-backend \
-webkit \
-no-javascript-jit \
-openssl-linked \
-nomake demos \
-nomake examples \
-nomake docs \
-nomake tools \
-optimized-qmake \
-no-rpath \
-dbus-linked \
-reduce-relocations \
-no-openvg \
-xcursor
# disable "warnings are errors" for some source directories
sed -e 's,-Werror,,' \
-i src/3rdparty/webkit/Source/WebCore/Makefile* \
-i src/3rdparty/webkit/Source/JavaScriptCore/Makefile* \
-i src/3rdparty/webkit/Source/WebKit/qt/Makefile* \
2011-01-15 22:29:29 +08:00
make
2011-01-15 22:29:29 +08:00
}
package() {
cd "${srcdir}/${_pkgfqn}"
make install INSTALL_ROOT="${pkgdir}"
2011-01-15 22:29:29 +08:00
# Fix wrong path in pkgconfig files
find "${pkgdir}/usr/lib32/pkgconfig" -type f -name '*.pc' \
-exec perl -pi -e "s, -L${srcdir}/?\S+,,g" {} \;
2011-01-15 22:29:29 +08:00
# Fix wrong path in prl files
find "${pkgdir}/usr/lib32" -type f -name '*.prl' \
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\1/' {} \;
2011-01-15 22:29:29 +08:00
rm -rf "${pkgdir}/usr"/{include,share,bin}
mkdir -p "${pkgdir}/usr/share/licenses"
ln -s "${_pkgbasename}" "${pkgdir}/usr/share/licenses/${pkgname}"
2011-01-15 22:29:29 +08:00
}