diff options
Diffstat (limited to 'l/qt/qt.SlackBuild')
-rwxr-xr-x | l/qt/qt.SlackBuild | 396 |
1 files changed, 256 insertions, 140 deletions
diff --git a/l/qt/qt.SlackBuild b/l/qt/qt.SlackBuild index abc3e79..69d676b 100755 --- a/l/qt/qt.SlackBuild +++ b/l/qt/qt.SlackBuild @@ -40,59 +40,25 @@ # qt 4.7.3, 4.7.4, 4.8.0, 4.8.1, 4.8.2, 4.8.4 are built from original nokia sources. PKGNAM=qt -VERSION=$(ls qt-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev) +VERSION=${VERSION:-$(ls qt-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} BUILD=${BUILD:-1} NUMJOBS=${NUMJOBS:--j7} # Automatically determine the architecture we're building on: -MARCH=$( uname -m ) -if [ -z "$ARCH" ]; then - case "$MARCH" in - i?86) export ARCH=i486 ;; - armv7hl) export ARCH=$MARCH ;; - arm*) export ARCH=arm ;; - # Unless $ARCH is already set, use uname -m for all other archs: - *) export ARCH=$MARCH ;; - esac -fi - -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "s390" ]; then - SLKCFLAGS="-O2" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC" - LIBDIRSUFFIX="64" -elif [ "$ARCH" = "armv7hl" ]; then - # To prevent "qatomic_armv6.h error: output number 2 not directly addressable" - # More permanent solution is to patch gcc: - # http://bazaar.launchpad.net/~linaro-toolchain-dev/gcc-linaro/4.6/revision/106731 - SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16 -fno-strict-volatile-bitfields" - LIBDIRSUFFIX="" -else - SLKCFLAGS="-O2" - LIBDIRSUFFIX="" -fi - -case "$ARCH" in - arm*) TARGET=$ARCH-slackware-linux-gnueabi ;; - *) TARGET=$ARCH-slackware-linux ;; -esac - CWD=$(pwd) TMP=${TMP:-/tmp} PKG=$TMP/package-${PKGNAM} +set -e + rm -rf $PKG mkdir -p $TMP $PKG cd $TMP rm -rf qt-everywhere-opensource-src-$VERSION tar xvf $CWD/qt-everywhere-opensource-src-$VERSION.tar.xz # For qt releases -cd qt-everywhere-opensource-src-$VERSION || exit 1 - +cd qt-everywhere-opensource-src-$VERSION +# We have to use rpath here as the library which the chown -R root:root . find . \ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ @@ -100,64 +66,213 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; -if [ $ARCH = "i486" ]; then - sed -i -e "s/QMAKE_CFLAGS_RELEASE += -O2/QMAKE_CFLAGS_RELEASE += $SLKCFLAGS/" mkspecs/common/gcc-base.conf || exit 1 -fi - # Fix path to mysql header -zcat $CWD/qt.mysql.h.diff.gz | patch -p1 --verbose || exit 1 +# zcat $CWD/qt.mysql.h.diff.gz | patch -p1 --verbose || exit 1 # Stupid idea - remove it: -zcat $CWD/qt.webkit-no_Werror.patch.gz | patch -p1 --verbose || exit 1 +# zcat $CWD/qt.webkit-no_Werror.patch.gz | patch -p1 --verbose || exit 1 + +#! PATCH +sed -i 's/Shlwapi.h/shlwapi.h/' qttools/src/windeployqt/utils.cpp + +#! PATCH +case "${HOST_TRIPLET}" in + *-*-mingw*) + cat $CWD/0001-configure-use-pkg-config-for-libpng.patch \ + | patch -p1 --verbose + cat $CWD/0002-Use-widl-instead-of-midl.-Also-set-QMAKE_DLLTOOL-to-.patch \ + | patch -p1 --verbose + + cat $CWD/qt5-dont-add-resource-files-to-qmake-libs.patch \ + | ( cd qtbase && patch -p1 --verbose ) + cat $CWD/qt5-qmake-implib-dll-a.patch \ + | ( cd qtbase && patch -p1 --verbose ) + + sed -i '/option.host_build./ d' qtactiveqt/src/tools/idc/idc.pro + + cat $CWD/0001-QCoreApplication-ibraryPaths-discovers-plugpath-rela.patch \ + | patch -p1 --verbose + + EXEEXT=".exe" + ;; + *) + EXEEXT="" + ;; +esac # Fix crash on malformed GIF images (CVE-2014-0190): -zcat $CWD/qt.fix.broken.gif.crash.diff.gz | patch -p1 --verbose || exit 1 +zcat $CWD/qt.fix.broken.gif.crash.diff.gz | patch -p1 --verbose -export CFLAGS="$SLKCFLAGS" -export CXXFLAGS="$SLKCFLAGS" -export OPENSOURCE_CXXFLAGS="$SLKCFLAGS" -./configure \ +export CFLAGS="-O2" +export CXXFLAGS="-O2" +export OPENSOURCE_CXXFLAGS="-O2" + +MAKEFLAGS="${NUMJOBS}" ./configure \ -confirm-license \ -opensource \ - -prefix /usr/lib${LIBDIRSUFFIX}/qt \ - -fast \ - -system-libpng \ - -system-libjpeg \ - -system-zlib \ - -system-sqlite \ - -plugin-sql-sqlite \ - -dbus \ - -webkit \ - -no-phonon \ + -prefix /${PREFIX} \ + -headerdir /${PREFIX}/include/qt5 \ + -libdir /${PREFIX}/lib${LIBDIRSUFFIX} \ + -no-compile-examples \ -nomake examples \ - -nomake demos \ - -nomake docs \ + -nomake tests \ + -no-kms \ + -no-cups \ + -no-gtkstyle \ + -no-glib \ + -no-fontconfig \ + ${CONFIGURE_OPTIONS} \ + -release \ + -optimized-qmake \ -no-separate-debug-info \ -no-pch # No-precompiled-headers is ccache-friendly. +# Kill building of some sub-modules that cannot be disabled through configure. +# In particular this makes it possible to not build GUI and widgets code while +# still having 'uic' built. +# 70% reduction in build time for tools-only builds in addition to the gains +# through the various -skip configure parameters (which cut the build times in +# half). +for p in ${HACKY_DISABLES}; do + printf 'all:\n\ttrue\n\ninstall:\n\ttrue\n' > "qtbase/src/${p}/Makefile" +done + # Sometimes a failure happens when parallelizing make. Try again if make fails, # but make a failure the second time around (single threaded) a fatal error: -make $NUMJOBS || make || exit 1 -make install INSTALL_ROOT=$PKG || exit 1 +make $NUMJOBS || make +make install INSTALL_ROOT=$PKG + +case "${HOST_TRIPLET}" in + *-*-mingw*) + if [ x"${HOST_TRIPLET}" != x"${BUILD_TRIPLET}" ]; then + (cd qtbase/qmake + make clean + make \ + CC=${HOST_TRIPLET}-gcc \ + CXX=${HOST_TRIPLET}-g++ \ + QMAKESPEC=${PWD}/../mkspecs/win32-g++ \ + EXTRA_CPPFLAGS=-DUNICODE \ + QMAKE_LFLAGS="-lole32 -luuid -ladvapi32 -lkernel32" \ + EXEEXT="${EXEEXT}" \ + QTOBJS='qfilesystemengine_win.o qfilesystemiterator_win.o qfsfileengine_win.o qlocale_win.o registry.o qsettings_win.o qsystemlibrary.o' \ + $NUMJOBS + install -m 755 ../bin/qmake${EXEEXT} $PKG/${PREFIX}/bin + ) + + tool() { + local TOOL_PATH="${1}" + local TOOL="${2:-""}" + if [ -n "${TOOL}" ]; then + local TARGET="${TOOL}${EXEEXT}" + local WITH_TARGET="TARGET=${TARGET}" + else + local TARGET="" + local WITH_TARGET="" + fi + + make -C ${TOOL_PATH}/${TOOL} clean + + sed -i '/INCPATH \+=/ s/linux-g++/win32-g++/g' ${TOOL_PATH}/${TOOL}/Makefile + + make -C ${TOOL_PATH}/${TOOL} \ + CC="${HOST_TRIPLET}-gcc" \ + CXX="${HOST_TRIPLET}-g++" \ + LINK='$(CXX)' \ + AR="${HOST_TRIPLET}-ar cqs" \ + ${WITH_TARGET} \ + LIBS="-L${PWD}/qtbase/lib ${EXTRA_LIBS} -lQt5Core" \ + LFLAGS="-Wl,-O1" \ + CFLAGS="-O2 -fno-exceptions -Wall -W -D_REENTRANT "'$(DEFINES)'" -DUNICODE ${EXTRA_CPPFLAGS}" \ + CXXFLAGS="-O2 -std=c++0x -fno-exceptions -Wall -W -D_REENTRANT "'$(DEFINES)'" -DUNICODE ${EXTRA_CPPFLAGS}" \ + $NUMJOBS + + if [ -n "${TARGET}" ]; then + install -m 755 "${TOOL_PATH}/${TOOL}/${TARGET}" "$PKG/${PREFIX}/bin" + fi + } + + tool "qtbase/src/tools" moc + tool "qtbase/src/tools" rcc + tool "qtbase/src/tools" qlalr + EXTRA_LIBS="-lQt5Xml" \ + tool "qtbase/src/tools" qdoc + tool "qtbase/src/tools" uic + EXTRA_LIBS="-lQt5DBus" \ + tool "qtbase/src/tools" qdbusxml2cpp + EXTRA_LIBS="-lQt5DBus" EXTRA_CPPFLAGS="$(pkg-config --cflags dbus-1)" \ + tool "qtbase/src/tools" qdbuscpp2xml + + EXTRA_LIBS="-lshlwapi" \ + tool "qttools/src" windeployqt + EXTRA_LIBS="-lQt5Xml" \ + tool "qttools/src/linguist" lconvert + EXTRA_LIBS="-lQt5Xml" \ + tool "qttools/src/linguist" lrelease + EXTRA_LIBS="-L../../../../qtdeclarative/lib -lQt5Qml -lQt5Xml" \ + tool "qttools/src/linguist" lupdate + + EXTRA_LIBS="-L../../lib -lQt5Qml" \ + tool "qtdeclarative/tools" qmlimportscanner + EXTRA_LIBS="-L../../lib -lQt5Qml" \ + tool "qtdeclarative/src/qmldevtools" "" + EXTRA_LIBS="-L../../lib -lQt5QmlDevTools -lQt5Qml" \ + tool "qtdeclarative/tools" qmlmin + + (cd $PKG/${PREFIX}/bin + rm -f lconvert lrelease lupdate moc qdbuscpp2xml qdbusxml2cpp qdoc qlalr + rm -f qmake qmlimportscanner qmlmin rcc uic windeployqt + ) + fi + ;; +esac + +# Qt isn't redeployable by default: it is full of hardcoded paths and values. +# We need to create a file named "qt.conf" for it not to look into +# "/opt/windows_??" when running on Windows. +# Credits to Cristian Adams at +# http://cristianadam.blogspot.fr/2012/06/portable-qmake.html with the change +# that qmake will look for "qt.conf" and not "qmake.conf" (probably a +# difference in Qt5; spotted through ProcessMonitor). +cat > $PKG/${PREFIX}/bin/qt.conf << EOF +[Paths] + Prefix=.. + Headers=include/qt5 +EOF + +# qmake is a pile of assumptions written in stone during its compilation. For +# cross-compile, we will have to put a "qt.conf" file next to it, telling it +# not to look in the current installation prefix (and provide env vars for the +# specs file lookup but that doesn't matter here). +# Since the configuration we want is for cross-toolchain, we can only add it +# during the cross_toolchain series. The issue is that qt.conf is searched for +# at basically "$(dirname argv[1])/qt.conf", i.e. it will be +# ${YYPREFIX_NATIVE}/bin/qt.conf. Fortunately for us it doesn't do any check +# related to symlinks so we add a symlink from ${YYPREFIX_CROSS}/bin/qmake to +# the binary in the native prefix. This however requires the cross prefix to +# always be before the native one in ${PATH} and this is simply too risky so in +# addition to that, we rename the qmake binary in native_toolchain in order to +# "poison" it. This is fine since it is only to be used for win-builds. +if [ x"${TARGET_TRIPLET}" = x"${HOST_TRIPLET}" ] && [ x"${TARGET_TRIPLET}" = x"${BUILD_TRIPLET}" ]; then + mv ${PKG}/${PREFIX}/bin/qmake ${PKG}/${PREFIX}/bin/qmake-poisoned +fi # The infamous qt -> qt-${VERSION} link that keeps the full path out of .la files: -( cd $PKG/usr/lib${LIBDIRSUFFIX} ; ln -sf qt qt-${VERSION} ) +( cd $PKG/${PREFIX}/lib${LIBDIRSUFFIX} ; ln -sf qt qt-${VERSION} ) # Add a missing Qt.pc which is needed by KDE applications: -mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/qt/lib/pkgconfig -cat <<EOF > $PKG/usr/lib${LIBDIRSUFFIX}/qt/lib/pkgconfig/Qt.pc -prefix=/usr/lib${LIBDIRSUFFIX}/qt +mkdir -p $PKG/${PREFIX}/lib${LIBDIRSUFFIX}/pkgconfig +cat <<EOF > $PKG/${PREFIX}/lib${LIBDIRSUFFIX}/pkgconfig/Qt.pc +prefix=/${PREFIX} bindir=\${prefix}/bin datadir=\${prefix} docdir=\${prefix}/doc headerdir=\${prefix}/include importdir=\${prefix}/imports -libdir=\${prefix}/lib -moc=\${bindir}/moc +libdir=\${prefix}/lib${LIBDIRSUFFIX} +moc=\${bindir}/moc${EXEEXT} plugindir=\${prefix}/plugins -qmake=\${bindir}/qmake -sysconfdir=\${prefix}/etc/settings +qmake=\${bindir}/qmake${EXEEXT} translationdir=\${prefix}/translations Name: Qt @@ -166,76 +281,76 @@ Version: $VERSION EOF # libjscore is used internally. Prevent a false dependency on this in the .la and .pc files: -sed -i "s,-ljscore,,g" $PKG/usr/lib${LIBDIRSUFFIX}/qt/lib/*.la $PKG/usr/lib${LIBDIRSUFFIX}/qt/lib/pkgconfig/*.pc -sed -i "s,-L../JavaScriptCore/release,,g" $PKG/usr/lib${LIBDIRSUFFIX}/qt/lib/*.la $PKG/usr/lib${LIBDIRSUFFIX}/qt/lib/pkgconfig/*.pc +# sed -i "s,-ljscore,,g" $PKG/${PREFIX}/lib${LIBDIRSUFFIX}/qt/lib/pkgconfig/*.pc +# sed -i "s,-L../JavaScriptCore/release,,g" $PKG/${PREFIX}/lib${LIBDIRSUFFIX}/qt/lib/pkgconfig/*.pc # libwebcore is used internally. Prevent a false dependency on this in the .la and .pc files: -sed -i \ - -e "s#-L/usr/lib${LIBDIRSUFFIX}/qt/lib -L../../WebCore/release -L../../JavaScriptCore/release -L/usr/X11R6/lib$LIBDIRSUFFIX -lwebcore##g" \ - -e "s#-L/usr/lib${LIBDIRSUFFIX}/qt/lib -L../../WebCore/release -L../../JavaScriptCore/release -L/usr/X11R6/lib -lwebcore##g" \ - -e "s# -lwebcore##g" \ - $PKG/usr/lib${LIBDIRSUFFIX}/qt/lib/libQtWebKit.la $PKG/usr/lib${LIBDIRSUFFIX}/qt/lib/pkgconfig/QtWebKit.pc - -# Link the shared libraries into /usr/lib: -( cd $PKG/usr/lib${LIBDIRSUFFIX} - for file in qt/lib/*.so* ; do - ln -sf $file . - done -) - -find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +# sed -i \ +# -e "s#-L/${PREFIX}/lib${LIBDIRSUFFIX}/qt/lib -L../../WebCore/release -L../../JavaScriptCore/release -L/${PREFIX}/X11R6/lib$LIBDIRSUFFIX -lwebcore##g" \ +# -e "s#-L/${PREFIX}/lib${LIBDIRSUFFIX}/qt/lib -L../../WebCore/release -L../../JavaScriptCore/release -L/${PREFIX}/X11R6/lib -lwebcore##g" \ +# -e "s# -lwebcore##g" \ +# $PKG/${PREFIX}/lib${LIBDIRSUFFIX}/qt/lib/libQtWebKit.la $PKG/${PREFIX}/lib${LIBDIRSUFFIX}/qt/lib/pkgconfig/QtWebKit.pc + +# Link the shared libraries into /${PREFIX}/lib: +# ( cd $PKG/${PREFIX}/lib${LIBDIRSUFFIX} +# for file in qt/lib/*.so* ; do +# ln -sf $file . +# done +# ) + +find $PKG -size +4k -type f | xargs file | egrep -e "executable|shared object" \ + | grep ${HOST_EXE_FORMAT} | cut -f 1 -d : \ + | xargs ${HOST_STRIP} --strip-unneeded 2> /dev/null # Add profile scripts -mkdir -p $PKG/etc/profile.d -sed -e "s#usr/lib/#usr/lib${LIBDIRSUFFIX}/#g" $CWD/profile.d/qt4.sh \ - > $PKG/etc/profile.d/qt4.sh -sed -e "s#usr/lib/#usr/lib${LIBDIRSUFFIX}/#g" $CWD/profile.d/qt4.csh \ - > $PKG/etc/profile.d/qt4.csh -chmod 0755 $PKG/etc/profile.d/* - -# Put a ton of links to more "normal" places. I'd just use a prefix of /usr, but it -# creates a ton of new (and ambiguously named) /usr directories... -mkdir -p $PKG/usr/bin -( cd $PKG/usr/lib${LIBDIRSUFFIX}/qt/bin - for file in * ; do - ( cd $PKG/usr/bin ; ln -sf /usr/lib${LIBDIRSUFFIX}/qt/bin/$file . ) - done -) - -mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig -( cd $PKG/usr/lib${LIBDIRSUFFIX}/qt/lib/pkgconfig - for file in *.pc ; do - ( cd $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig ; ln -sf /usr/lib${LIBDIRSUFFIX}/qt/lib/pkgconfig/$file . ) - done -) +# mkdir -p $PKG/etc/profile.d +# sed -e "s#${PREFIX}/lib/#${PREFIX}/lib${LIBDIRSUFFIX}/#g" $CWD/profile.d/qt4.sh \ +# > $PKG/etc/profile.d/qt4.sh +# sed -e "s#${PREFIX}/lib/#${PREFIX}/lib${LIBDIRSUFFIX}/#g" $CWD/profile.d/qt4.csh \ +# > $PKG/etc/profile.d/qt4.csh +# chmod 0755 $PKG/etc/profile.d/* + +# Put a ton of links to more "normal" places. I'd just use a prefix of /${PREFIX}, but it +# creates a ton of new (and ambiguously named) /${PREFIX} directories... +# mkdir -p $PKG/${PREFIX}/bin +# ( cd $PKG/${PREFIX}/lib${LIBDIRSUFFIX}/qt/bin +# for file in * ; do +# ( cd $PKG/${PREFIX}/bin ; ln -sf /${PREFIX}/lib${LIBDIRSUFFIX}/qt/bin/$file . ) +# done +# ) + +# mkdir -p $PKG/${PREFIX}/lib${LIBDIRSUFFIX}/pkgconfig +# ( cd $PKG/${PREFIX}/lib${LIBDIRSUFFIX}/qt/lib/pkgconfig +# for file in *.pc ; do +# ( cd $PKG/${PREFIX}/lib${LIBDIRSUFFIX}/pkgconfig ; ln -sf /${PREFIX}/lib${LIBDIRSUFFIX}/qt/lib/pkgconfig/$file . ) +# done +# ) # Install Qt's private headers - at least Gentoo and Fedora are adding these # and some software has (inevitably) started depending on them: # We're using `rsync -R` as easy way to preserve relative path names: -rsync -aR \ - include/Qt{Core,Declarative,Gui,Script}/private \ - src/{corelib,declarative,gui,script}/*/*_p.h \ - ${PKG}/usr/lib${LIBDIRSUFFIX}/qt/ + +ln -s 5.3.1/QtCore/private qtbase/include/QtCore/private +ln -s 5.3.1/QtGui/private qtbase/include/QtGui/private # Add menu entries for all those hidden but great Qt applications: # Qt logo: -convert $PKG/usr/lib$LIBDIRSUFFIX/qt/doc/src/images/qt-logo.png -resize 48x48 $PKG/usr/share/icons/hicolor/48x48/apps/qt-logo.png -convert $PKG/usr/lib$LIBDIRSUFFIX/qt/doc/src/images/qt-logo.png -resize 48x48 $PKG/usr/share/icons/hicolor/48x48/apps/qt-logo.png +mkdir -p $PKG/${PREFIX}/share/icons/hicolor/48x48/apps/ +convert qtdoc/doc/src/images/qt-logo.png -resize 48x48 $PKG/${PREFIX}/share/icons/hicolor/48x48/apps/qt-logo.png # Assistant icons -install -p -m644 -D tools/assistant/tools/assistant/images/assistant.png $PKG/usr/share/icons/hicolor/32x32/apps/assistant.png -install -p -m644 -D tools/assistant/tools/assistant/images/assistant-128.png $PKG/usr/share/icons/hicolor/128x128/apps/assistant.png +install -p -m644 -D qttools/src/assistant/assistant/images/assistant.png $PKG/${PREFIX}/share/icons/hicolor/32x32/apps/assistant.png +install -p -m644 -D qttools/src/assistant/assistant/images/assistant-128.png $PKG/${PREFIX}/share/icons/hicolor/128x128/apps/assistant.png # Designer icon -install -p -m644 -D tools/designer/src/designer/images/designer.png $PKG/usr/share/icons/hicolor/128x128/apps/designer.png +install -p -m644 -D qttools/src/designer/src/designer/images/designer.png $PKG/${PREFIX}/share/icons/hicolor/128x128/apps/designer.png # Linguist icons -for icon in tools/linguist/linguist/images/icons/linguist-*-32.png ; do +for icon in qttools/src/linguist/linguist/images/icons/linguist-*-32.png ; do size=$(echo $(basename ${icon}) | cut -d- -f2) - install -p -m644 -D ${icon} $PKG/usr/share/icons/hicolor/${size}x${size}/apps/linguist.png + install -p -m644 -D ${icon} $PKG/${PREFIX}/share/icons/hicolor/${size}x${size}/apps/linguist.png done # And the .desktop files -mkdir -p $PKG/usr/share/applications -cat <<EOF > $PKG/usr/share/applications/designer.desktop +mkdir -p $PKG/${PREFIX}/share/applications +cat <<EOF > $PKG/${PREFIX}/share/applications/designer.desktop [Desktop Entry] Name=Qt4 Designer GenericName=Interface Designer @@ -248,7 +363,7 @@ Encoding=UTF-8 Type=Application Categories=Qt;Development; EOF -cat <<EOF > $PKG/usr/share/applications/assistant.desktop +cat <<EOF > $PKG/${PREFIX}/share/applications/assistant.desktop [Desktop Entry] Name=Qt4 Assistant Comment=Shows Qt4 documentation and examples @@ -259,7 +374,7 @@ Encoding=UTF-8 Type=Application Categories=Qt;Development;Documentation; EOF -cat <<EOF > $PKG/usr/share/applications/linguist.desktop +cat <<EOF > $PKG/${PREFIX}/share/applications/linguist.desktop [Desktop Entry] Name=Qt4 Linguist Comment=Add translations to Qt4 applications @@ -271,7 +386,7 @@ Encoding=UTF-8 Type=Application Categories=Qt;Development; EOF -cat <<EOF > $PKG/usr/share/applications/qtconfig.desktop +cat <<EOF > $PKG/${PREFIX}/share/applications/qtconfig.desktop [Desktop Entry] Name=Qt4 Config Comment=Configure Qt4 behavior, styles, fonts @@ -284,19 +399,20 @@ Categories=Qt;Settings; EOF # Add a documentation directory: -mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION -cp -a *GPL_EXCEPTION* FAQ* INSTALL KNOWN* LICENSE* README* changes-* \ - $PKG/usr/doc/$PKGNAM-$VERSION -if [ -d $PKG/usr/lib${LIBDIRSUFFIX}/qt/doc/html ]; then - ( cd $PKG/usr/doc/$PKGNAM-$VERSION - ln -sf /usr/lib${LIBDIRSUFFIX}/qt/doc/html . +mkdir -p $PKG/${PREFIX}/doc/$PKGNAM-$VERSION +cp -a *GPL_EXCEPTION* LICENSE* README* \ + $PKG/${PREFIX}/doc/$PKGNAM-$VERSION +if [ -d $PKG/${PREFIX}/lib${LIBDIRSUFFIX}/qt/doc/html ]; then + ( cd $PKG/${PREFIX}/doc/$PKGNAM-$VERSION + ln -sf /${PREFIX}/lib${LIBDIRSUFFIX}/qt/doc/html . ) fi -mkdir -p $PKG/install -zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh -cat $CWD/slack-desc > $PKG/install/slack-desc - -cd $PKG -/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz - +cat ${CWD}/${PKGNAM}.yypkg.script | sed \ + -e "s/%{PKG}/${PKGNAM}/" \ + -e "s/%{HST}/${HOST_TRIPLET}/" \ + -e "s/%{TGT}//" \ + -e "s/%{VER}/${VERSION}/" \ + -e "s/%{BUILD}/${BUILD}/" \ + -e "s/%{DESCR}/${DESCR:-"No description"}/" \ + | yypkg --makepkg --output ${YYOUTPUT} --script - --directory "${PKG}/${PREFIX}" |