2016-02-24 01:27:23 +01:00
|
|
|
# Description: A cross-platform application and UI framework
|
|
|
|
# URL: http://qt-project.org/
|
|
|
|
# Packager: pierre at nutyx dot org, tnut at nutyx dot org, fanch at nutyx dot org
|
|
|
|
# Depends on:xorg-proto xorg-libxkbfile xorg-xtrans xorg-libx11 xorg-libxext xorg-libfs xorg-libice xorg-libsm xorg-libxscrnsaver xorg-libxt xorg-libxmu xorg-libxpm xorg-libxaw xorg-libxfixes xorg-libxcomposite xorg-libxrender xorg-libxcursor xorg-libxdamage xorg-libfontenc xorg-libxfont xorg-libxft xorg-libxi xorg-libxinerama xorg-libxrandr xorg-libxres xorg-libxtst xorg-libxv xorg-libxvmc xorg-libxxf86dga xorg-libxxf86vm xorg-libdmx xorg-libpciaccess xorg-libxkbfile xorg-libxshmfence xcb-proto xcb-util-image xcb-util-keysyms xcb-util-renderutil xcb-util-wm alsa-lib ca-certificates cups dbus glib gstreamer-plugins-base icu jasper libjpeg-turbo libmng libpng libtiff libwebp xorg-mesa mtdev openssl pcre sqlite ruby gstreamer1-plugins-base geoclue gtk2 harfbuzz postgresql pulseaudio unixodbc libxkbcommon mariadb
|
|
|
|
|
|
|
|
name=qt5
|
|
|
|
version=5.5.1
|
2016-03-23 17:28:44 +01:00
|
|
|
release=1
|
|
|
|
source=(http://download.qt.io/official_releases/qt/${version%.*}/$version/single/qt-everywhere-opensource-src-$version.tar.xz)
|
2016-02-24 01:27:23 +01:00
|
|
|
|
|
|
|
build() {
|
2016-03-23 17:28:44 +01:00
|
|
|
cd qt-everywhere-opensource-src-$version
|
|
|
|
|
|
|
|
# Respect system CXX
|
|
|
|
[ "$CXX" ] || CXX=g++
|
|
|
|
sed -i "/^QMAKE_CXX\s/s|=.*|= $CXX|" qtbase/mkspecs/common/g++-base.conf
|
|
|
|
|
|
|
|
# Remove obsolete xorg path
|
|
|
|
sed -i 's|X11R6/||g' qtbase/mkspecs/*/*.conf
|
|
|
|
|
|
|
|
# Respect system CXXFLAGS
|
|
|
|
sed -i "s|^\(QMAKE_CFLAGS_RELEASE.*\)|\1 ${CXXFLAGS}|" qtbase/mkspecs/common/gcc-base.conf
|
|
|
|
#sed -i "s|-O2|$CXXFLAGS|" qtbase/mkspecs/common/g++-unix.conf
|
|
|
|
#sed -i "s|-O2|${CXXFLAGS}|" qtbase/mkspecs/common/{g++,gcc}-base.conf
|
|
|
|
|
|
|
|
# Respect system LDFLAGS
|
|
|
|
sed -i "s|^\(QMAKE_LFLAGS_RELEASE.*\)|\1 ${LDFLAGS}|" qtbase/mkspecs/common/g++-unix.conf
|
|
|
|
#sed -i "/^QMAKE_LFLAGS\s/s|+=|+= ${LDFLAGS}|g" qtbase/mkspecs/common/gcc-base.conf
|
|
|
|
|
|
|
|
# Fix quoting bug
|
|
|
|
sed -i 's|"$COMPILER" -c|$COMPILER -c|' qtbase/config.tests/unix/fvisibility.test
|
|
|
|
|
|
|
|
export QTDIR="$PWD"
|
|
|
|
export LD_LIBRARY_PATH="$QTDIR/qtbase/lib:$QTDIR/qttools/lib:$LD_LIBRARY_PATH"
|
|
|
|
export QT_PLUGIN_PATH="$QTDIR/qtbase/plugins"
|
|
|
|
|
|
|
|
./configure -prefix /usr/share/qt5 \
|
|
|
|
-bindir /usr/share/qt5/bin \
|
|
|
|
-headerdir /usr/share/qt5/include \
|
|
|
|
-libdir /usr/share/qt5/lib \
|
|
|
|
-libexecdir /usr/share/qt5/lib \
|
|
|
|
-plugindir /usr/share/qt5/plugins \
|
|
|
|
-sysconfdir /usr/etc/xdg \
|
|
|
|
-openssl-linked -dbus-linked \
|
|
|
|
-system-lib{png,jpeg} -system-{zlib,sqlite} \
|
|
|
|
-no-cups -optimized-qmake \
|
|
|
|
-x{cursor,inerama,kb,randr,render} \
|
|
|
|
-nomake examples \
|
|
|
|
-no-separate-debug-info -no-strip -shared -no-rpath \
|
|
|
|
-opensource -confirm-license -release -reduce-relocations
|
|
|
|
|
|
|
|
make
|
|
|
|
make INSTALL_ROOT=$PKG install
|
|
|
|
|
|
|
|
# Fix paths
|
|
|
|
find $PKG/usr/share/qt5/lib -type f -name '*.prl' \
|
|
|
|
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\1/' {} \;
|
|
|
|
|
|
|
|
sed -e "s|$PWD/qtbase|/usr/share/qt5/lib|g" \
|
|
|
|
-i $PKG/usr/share/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri
|
|
|
|
|
|
|
|
# Remove unnecessary files
|
|
|
|
rm -rf $(find $PKG/usr/share/qt5/mkspecs/* | \
|
|
|
|
egrep -v '(linux-g++|common|modules|pri|features)')
|
|
|
|
|
|
|
|
rm -f $PKG/usr/share/qt5/mkspecs/linux-g++/linux-g++
|
|
|
|
rm -rf $PKG/usr/share/qt5/mkspecs/features/{mac,win32}
|
|
|
|
rm -rf $PKG/usr/share/qt5/mkspecs/common/mac*
|
|
|
|
rm -rf $PKG/usr/share/qt5/{phrasebooks,translations}
|
|
|
|
|
|
|
|
# Install linker config
|
|
|
|
install -d $PKG/{etc/ld.so.conf.d,usr/{bin,lib,include}}
|
|
|
|
echo "/usr/share/qt5/lib" > $PKG/etc/ld.so.conf.d/qt5.conf
|
|
|
|
|
|
|
|
ln -s ../share/qt5/include $PKG/usr/include/qt5
|
|
|
|
ln -s ../share/qt5/lib $PKG/usr/lib/qt5
|
|
|
|
ln -s linux-g++ $PKG/usr/share/qt5/mkspecs/default
|
|
|
|
|
|
|
|
# Install pkg config
|
|
|
|
mv $PKG/usr/share/qt5/lib/pkgconfig $PKG/usr/lib
|
|
|
|
|
|
|
|
# Fix paths
|
|
|
|
sed \
|
|
|
|
-e "s|-L$SRC/qt-everywhere-opensource-src-$version/lib ||g" \
|
|
|
|
-e "s|$SRC/qt-everywhere-opensource-src-$version/bin|/usr/share/qt5/bin|g" \
|
|
|
|
-i $PKG/usr/lib/pkgconfig/*.pc
|
|
|
|
|
|
|
|
# Install useful symlinks
|
|
|
|
install -d $PKG/usr/bin
|
|
|
|
for b in $PKG/usr/share/qt5/bin/*; do
|
|
|
|
ln -s /usr/share/qt5/bin/$(basename $b) $PKG/usr/bin/$(basename $b)-qt5
|
|
|
|
done
|
|
|
|
|
|
|
|
# cmake
|
|
|
|
install -d $PKG/usr/lib/cmake
|
|
|
|
for b in $PKG/usr/share/qt5/lib/cmake/*; do
|
|
|
|
ln -s /usr/share/qt5/lib/cmake/$(basename $b) $PKG/usr/lib/cmake/$(basename $b)
|
|
|
|
done
|
2016-02-24 01:27:23 +01:00
|
|
|
|
|
|
|
}
|