From 39366733c3fe943363566756e2e152c45a1b3cb2 Mon Sep 17 00:00:00 2001 From: Patrick J Volkerding Date: Fri, 25 May 2018 23:29:36 +0000 Subject: Fri May 25 23:29:36 UTC 2018 patches/packages/glibc-zoneinfo-2018e-noarch-2_slack14.2.txz: Rebuilt. Handle removal of US/Pacific-New timezone. If we see that the machine is using this, it will be automatically switched to US/Pacific. --- patches/source/kdelibs/KDE.SlackBuild | 532 +++++++++++++++++++++ patches/source/kdelibs/KDE.options | 58 +++ patches/source/kdelibs/build/kdelibs | 1 + patches/source/kdelibs/cmake/kdelibs | 17 + patches/source/kdelibs/doinst.sh/kdelibs | 9 + patches/source/kdelibs/kdelibs.SlackBuild | 2 + patches/source/kdelibs/modularize | 268 +++++++++++ patches/source/kdelibs/modules/kdelibs | 1 + patches/source/kdelibs/noarch | 5 + patches/source/kdelibs/package-blacklist | 9 + patches/source/kdelibs/patch/kdelibs.patch | 14 + .../kdelibs/patch/kdelibs/coding-style-fixes.patch | 62 +++ .../kdelibs/patch/kdelibs/kdelibs.docbook.patch | 11 + .../patch/kdelibs/kdelibs.upnp_conditional.patch | 15 + .../return-application-icons-properly.patch | 56 +++ .../return-not-break.-copy-paste-error.patch | 31 ++ .../kdelibs/post-install/kdelibs.post-install | 2 + patches/source/kdelibs/slack-desc/kdelibs | 19 + 18 files changed, 1112 insertions(+) create mode 100755 patches/source/kdelibs/KDE.SlackBuild create mode 100644 patches/source/kdelibs/KDE.options create mode 100644 patches/source/kdelibs/build/kdelibs create mode 100644 patches/source/kdelibs/cmake/kdelibs create mode 100644 patches/source/kdelibs/doinst.sh/kdelibs create mode 100755 patches/source/kdelibs/kdelibs.SlackBuild create mode 100644 patches/source/kdelibs/modularize create mode 100644 patches/source/kdelibs/modules/kdelibs create mode 100644 patches/source/kdelibs/noarch create mode 100644 patches/source/kdelibs/package-blacklist create mode 100644 patches/source/kdelibs/patch/kdelibs.patch create mode 100644 patches/source/kdelibs/patch/kdelibs/coding-style-fixes.patch create mode 100644 patches/source/kdelibs/patch/kdelibs/kdelibs.docbook.patch create mode 100644 patches/source/kdelibs/patch/kdelibs/kdelibs.upnp_conditional.patch create mode 100644 patches/source/kdelibs/patch/kdelibs/return-application-icons-properly.patch create mode 100644 patches/source/kdelibs/patch/kdelibs/return-not-break.-copy-paste-error.patch create mode 100644 patches/source/kdelibs/post-install/kdelibs.post-install create mode 100644 patches/source/kdelibs/slack-desc/kdelibs (limited to 'patches/source/kdelibs') diff --git a/patches/source/kdelibs/KDE.SlackBuild b/patches/source/kdelibs/KDE.SlackBuild new file mode 100755 index 000000000..ea663a694 --- /dev/null +++ b/patches/source/kdelibs/KDE.SlackBuild @@ -0,0 +1,532 @@ +#!/bin/sh +# Copyright 2011, 2012 Patrick J. Volkerding, Sebeka, MN, USA +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# Adapted by Eric Hameleers from the modular x.org build. + +# To build only a single package group, specify it as $1, like: +# ./KDE.SlackBuild kdeedu +# To build only a single package, specify both the group name +# and the name of the package, like: +# ./KDE.SlackBuild kdeedu:marble +# ./KDE.SlackBuild kdebindings:perlqt,perlkde + + +CLEANUP=${CLEANUP:-"yes"} # clean up build directory after successful build. +PRECHECK=${PRECHECK:-"no"} # don't let the script check the available sources. +CHECKOUT=${CHECKOUT:-"no"} # don't let the script checkout missing sources. + +KDEGITURI="git://anongit.kde.org" + +pkgbase() { + PKGEXT=$(echo $1 | rev | cut -f 1 -d . | rev) + case $PKGEXT in + 'gz' ) + PKGRETURN=$(basename $1 .tar.gz) + ;; + 'bz2' ) + PKGRETURN=$(basename $1 .tar.bz2) + ;; + 'lzma' ) + PKGRETURN=$(basename $1 .tar.lzma) + ;; + 'xz' ) + PKGRETURN=$(basename $1 .tar.xz) + ;; + *) + PKGRETURN=$(basename $1) + ;; + esac + echo $PKGRETURN +} + +# Set initial variables: +CWD=$(pwd) +TMP=${TMP:-/tmp} + +# Set up a few useful functions: + +fix_perms() { + target_dir=$1 + [ -z "$target_dir" ] && target_dir='.' + + chown -R root:root $target_dir + find $target_dir \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; +} + +strip_binaries() { + target_dir=$1 + [ -z "$target_dir" ] && target_dir='.' + + find $target_dir | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + find $target_dir | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + find $target_dir | xargs file | grep "current ar archive" | grep ELF | cut -f 1 -d : | xargs strip -g 2> /dev/null +} + +process_man_pages() { + # Compress and if needed symlink the man pages: + if [ -d usr/man ]; then + ( cd usr/man + for manpagedir in $(find . -type d -name "man*") ; do + ( cd $manpagedir + for eachpage in $( find . -type l -maxdepth 1) ; do + ln -s $( readlink $eachpage ).gz $eachpage.gz + rm $eachpage + done + gzip -9 *.* + ) + done + ) + fi +} + +process_info_pages() { + # Compress info pages and purge "dir" file from the package: + if [ -d usr/info ]; then + ( cd usr/info + rm -f dir + gzip -9 * + ) + fi +} + +no_usr_share_doc() { + # If there are docs, move them: + if [ -d usr/share/doc ]; then + mkdir -p usr/doc + mv usr/share/doc/* usr/doc + rmdir usr/share/doc + fi +} + +precheck() { + # See if the sources we have match the module components we want to build: + RETVAL=0 + + for SRCFILE in $(find $CWD/src -name "*.tar.?z*") ; do + if cat modules/* |grep "^ *#" |grep -wq $(echo $(basename $SRCFILE) | rev | cut -f2- -d- | rev)$ ; then + echo "Source file '$(basename $SRCFILE)' is commented out in 'modules' !" + elif ! cat modules/* |grep -v "^ *#" |grep -wq $(echo $(basename $SRCFILE) | rev | cut -f2- -d- | rev) ; then + echo "Source file '$(basename $SRCFILE)' is not mentioned in 'modules' !" + RETVAL=1 + fi + done + + for MODULE in $(cat $CWD/modules/* | grep -v "^#") ; do + #if [ -z "$(find $CWD/src -name ${MODULE}-*)" ] ; then + if [ -z "$(find $CWD/src -name $MODULE-*.tar.* |grep -E "$MODULE-[^-]+.tar.*$|$MODULE-[0-9].+.tar.*$")" ] ; then + echo "Module '$MODULE' does not have a matching source tarball !" + if [ "$CHECKOUT" = "yes" -o "$CHECKOUT" = "YES" ]; then + echo "Checking out KDE component at branch '$VERSION'." + git archive --format=tar --prefix {$MODULE}-${VERSION}/ --remote ${KDEGITURI}/${MODULE}.git v${VERSION} | xz -c > $CWD/src/${MODULE}-${VERSION}.tar.xz + RETVAL=$? + if [ $RETVAL -ne 0 ]; then + echo "Error while checking out '$MODULE' !" + mv $CWD/src/${MODULE}-${VERSION}.tar.xz $CWD/src/${MODULE}-${VERSION}.tar.xz.failed + fi + else + RETVAL=1 + fi + fi + # A missing slack-desc counts as fatal even if the program may end up + # inside the big meta-package. + if [ -z "$(find $CWD/slack-desc -name ${MODULE})" ] ; then + echo "Module '$MODULE' does not have a slack-desc file !" + RETVAL=1 + fi + done + + if [ $RETVAL -eq 0 ]; then + echo "Check complete, build starts in 5 seconds" + sleep 5 + else + exit 1 + fi +} + +# Support function builds one complete module (like 'kdelibs'), or +# exactly one package which is part of a module (like 'okular'): +build_mod_pkg () { + kde_module=$1 + kde_pkg=$2 + + cd $CWD/modules + + # See if $kde_module is a module name like "kdeadmin": + if [ ! -z "$kde_module" ]; then + if [ ! -f "$kde_module" ]; then + return + fi + fi + PKG=${SLACK_KDE_BUILD_DIR}/${kde_module}/package-${kde_module} + rm -rf $PKG + mkdir -p $PKG + ( for PKGNAME in $(cat $kde_module |grep -v "^$" |grep -v "^#") ; do + # Find the full source filename - yeah ugly, but I had two goals: + # 1- source tarball can be in a random subdirectory of src/ + # 2- differentiate between e.g. 'kdepim' and 'kdepim-runtime' + kde_src=$(basename $(find $CWD/src -name "$PKGNAME-*.tar.?z*" |grep -E "$PKGNAME-[^-]+.tar.*$|$PKGNAME-[0-9].+.tar.*$") 2>/dev/null) + if [ "x$kde_src" = "x" ]; then + echo "** Did not find '$PKGNAME' in src" + continue + fi + # Reset $PKGARCH to its initial value: + PKGARCH=$ARCH + # Perhaps $PKGARCH should be something different: + if grep -wq "^$PKGNAME" ${CWD}/noarch ; then + PKGARCH=noarch + fi + if grep -wq "^$PKGNAME" ${CWD}/package-blacklist ; then + continue + fi + cd $SLACK_KDE_BUILD_DIR/${kde_module} + # If $kde_pkg is set, we only want to build one package: + if [ ! -z "$kde_pkg" ]; then + if [ "$kde_pkg" = "$PKGNAME" ]; then + # Set $PKG to a private dir for the modular package build: + PKG=$SLACK_KDE_BUILD_DIR/${kde_module}/package-$PKGNAME + rm -rf $PKG + mkdir -p $PKG + else + continue + fi + else + echo + echo "Building from source ${kde_src}" + echo + fi + if grep -wq "^$PKGNAME" ${CWD}/modularize ; then + # Set $PKG to a private dir for the modular package build: + PKG=$SLACK_KDE_BUILD_DIR/${kde_module}/package-$PKGNAME + rm -rf $PKG + mkdir -p $PKG + fi + + # Let's figure out the version number on the modular package: + MODULAR_PACKAGE_VERSION=$(echo $kde_src | rev | cut -f 3- -d . | cut -f 1 -d - | rev) + + rm -rf $(pkgbase $kde_src) + tar xf $(find $CWD/src -name ${kde_src}) || exit 1 + cd $(pkgbase $kde_src) || exit 1 + + fix_perms + + # If any patches are needed, call this script to apply them: + if [ -r $CWD/patch/${PKGNAME}.patch ]; then + . $CWD/patch/${PKGNAME}.patch || exit 1 + fi + + # If there's any pre-install things to do, do them: + if [ -r $CWD/pre-install/${PKGNAME}.pre-install ]; then + . $CWD/pre-install/${PKGNAME}.pre-install + fi + + # Run cmake, using custom cmake script if needed: + if [ -r $CWD/cmake/${PKGNAME} ]; then + . $CWD/cmake/${PKGNAME} + elif [ -r $CWD/cmake/${kde_module} ]; then + . $CWD/cmake/${kde_module} + else + # This is the default configure script: + . $CWD/cmake/cmake + fi + + make $NUMJOBS || make || exit 1 + make install DESTDIR=$PKG || exit 1 + + # Back to source toplevel builddir, since cmake may have run in a subdir: + cd $SLACK_KDE_BUILD_DIR/${kde_module}/$(pkgbase $kde_src) + + mkdir -p $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION} + # Use specific documentation files if available, else use a default set: + if [ -r $CWD/docs/${PKGNAME} ]; then + cp -a $(cat $CWD/docs/${PKGNAME}) \ + $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION} + else + cp -a \ + AUTHORS* CONTRIBUTING* COPYING* HACKING* \ + INSTALL* MAINTAINERS README* NEWS* TODO* \ + $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION} + # If there's a ChangeLog, installing at least part of the recent + # history is useful, but don't let it get totally out of control: + if [ -r ChangeLog ]; then + DOCSDIR=$(echo $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION) + cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog + touch -r ChangeLog $DOCSDIR/ChangeLog + fi + fi + + # Get rid of zero-length junk files: + find $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION -type f -size 0 -exec rm --verbose "{}" \; + rmdir --verbose $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION 2> /dev/null + + # Strip binaries: + strip_binaries $PKG + + # If there's any special post-install things to do, do them: + if [ -r $CWD/post-install/${PKGNAME}.post-install ]; then + . $CWD/post-install/${PKGNAME}.post-install + fi + + # If this package requires some doinst.sh material, add it here: + if [ -r $CWD/doinst.sh/${PKGNAME} ]; then + mkdir -p $PKG/install + cat $CWD/doinst.sh/${PKGNAME} \ + | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \ + >> $PKG/install/doinst.sh + fi + + # If this is a modular package, build it here: + if [ -d $SLACK_KDE_BUILD_DIR/${kde_module}/package-$PKGNAME ]; then + cd $PKG + process_man_pages + process_info_pages + no_usr_share_doc + mkdir -p $PKG/install + if [ -r $CWD/slack-desc/${PKGNAME} ]; then + cat $CWD/slack-desc/${PKGNAME} > $PKG/install/slack-desc + else + touch $PKG/install/slack-desc-missing + fi + if [ -r $CWD/build/${PKGNAME} ]; then + MODBUILD=$(cat $CWD/build/${PKGNAME}) + else + MODBUILD=$BUILD + fi + if [ -r $CWD/makepkg/${PKGNAME} ]; then + BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME} + else + /sbin/makepkg -l y -c n ${SLACK_KDE_BUILD_DIR}/${kde_module}/${PKGNAME}-$(echo $MODULAR_PACKAGE_VERSION |tr - _)-${PKGARCH}-${MODBUILD}.txz + fi + # We will continue with the fresh packages installed: + upgradepkg --install-new --reinstall ${SLACK_KDE_BUILD_DIR}/${kde_module}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz + # Keep MIME database current: + /usr/bin/update-mime-database /usr/share/mime 1>/dev/null 2>/dev/null & + fi + + # Reset $PKG to assume we're building the whole source dir: + PKG=${SLACK_KDE_BUILD_DIR}/${kde_module}/package-${kde_module} + + done + + # At this point, we have left the loop to build modular packages. + # We might need to build a package for the "", but to + # avoid needlessly repacking if there happens to be a package with + # the same name as "", we'll do some checks first. + + # If every package listed in modules/"" is also listed + # in the modularize file, then there's no need to make a package + # for "": + echo + echo "Searching for packages in ${kde_module} that were not built modular:" + cat $CWD/modules/${kde_module} | grep -v "^#" | grep -v -w "^" | while read checkpackage ; do + if ! grep -wq "^$checkpackage" ${CWD}/modularize ; then + # Non-modular package found, so we'll have to build the package below. + # It might already have been built once, but in that case it is likely + # that more things have been added to the package directory since then. + echo "Found non-modular package $checkpackage." + exit 99 + fi + done + + # Exit if everything in "" was built modular: + if [ ! $? = 99 ]; then + echo "No non-modular components found in ${kde_module}." + echo "Not building catch-all package for ${kde_module}." + echo + return + fi + + # If there's no /usr directory in the "" package directory, + # then skip it. There's nothing present worth packing up. + if [ ! -d ${SLACK_KDE_BUILD_DIR}/${kde_module}/package-${kde_module}/usr ]; then + echo "No /usr directory found in package-${kde_module}." + echo "Not building catch-all package for ${kde_module}." + echo + return + fi + + # Build a "" package for anything that wasn't built modular: + # It's safer to consider these to have binaries in them. ;-) + + # Put up a bit of a black-box warning, in case this was a mistake where + # something was meant to be listed in the modularize file and wasn't: + echo + echo "**************************************************************************" + echo "* Building combined package for non-modular parts of ${kde_module}" + echo "**************************************************************************" + echo + + PKGARCH=$ARCH + cd $PKG + + process_man_pages + process_info_pages + no_usr_share_doc + + # If there are post-install things to do for the combined package, + # we do them here. This could be used for things like making a + # VERSION number for a combined package. :-) + if [ -r $CWD/post-install/${kde_module}.post-install ]; then + . $CWD/post-install/${kde_module}.post-install + fi + mkdir -p $PKG/install + if [ -r $CWD/slack-desc/${kde_module} ]; then + cat $CWD/slack-desc/${kde_module} > $PKG/install/slack-desc + else + touch $PKG/install/slack-desc-missing + fi + if [ -r $CWD/doinst.sh/${kde_module} ]; then + cat $CWD/doinst.sh/${kde_module} \ + | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \ + >> $PKG/install/doinst.sh + fi + if [ -r $CWD/build/${kde_module} ]; then + SRCDIRBUILD=$(cat $CWD/build/${kde_module}) + else + SRCDIRBUILD=$BUILD + fi + if [ -r $CWD/makepkg/${kde_module} ]; then + BUILD=$SRCDIRBUILD . $CWD/makepkg/${kde_module} + else + /sbin/makepkg -l y -c n ${SLACK_KDE_BUILD_DIR}/${kde_module}/${kde_module}-$(echo $VERSION |tr - _)-${PKGARCH}-${SRCDIRBUILD}.txz + fi + # We will continue with the fresh packages installed: + upgradepkg --install-new --reinstall ${SLACK_KDE_BUILD_DIR}/${kde_module}/${kde_module}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz + # Keep MIME database current: + /usr/bin/update-mime-database /usr/share/mime 1>/dev/null 2>/dev/null & + ) +} + +# Process the module queue. Format is: +# module[:subpackage[,subpackage]] [module...] +deterministic_build() { + RET=0 + for ENTRY in $1 ; do + KDE_MOD=$(echo "$ENTRY": | cut -f1 -d:) + KDE_PKGS=$(echo "$ENTRY": | cut -f2 -d:) + if [ -z "$KDE_PKGS" ]; then + build_mod_pkg $KDE_MOD + let RET=$RET+$? + else + for KDE_PKG in $(echo $KDE_PKGS |tr ',' ' ') ; do + build_mod_pkg $KDE_MOD $KDE_PKG + let RET=$RET+$? + done + fi + done + + return $RET +} + +# MAIN PART # + +# Import the build configuration options for as far as they are not already set: +[ -r ./KDE.options ] && . ./KDE.options + +# This avoids compiling a version number into KDE's .la files: +QTDIR=/usr/lib${LIBDIRSUFFIX}/qt ; export QTDIR + +# Get the kde environment variables +[ -d post-install/kdebase ] && eval $(sed -e "s#/lib#/lib${LIBDIRSUFFIX}#" ./post-install/kdebase/profile.d/kde.sh) + +# Where we are going to do all the hard labour: +SLACK_KDE_BUILD_DIR=$TMP/kde_build +mkdir -p $SLACK_KDE_BUILD_DIR + +# Yes, we know kde-workspace is built twice. kdebase needs the +# plasma bits from it, and then we build it again for good measure... +# Same goes for kdelibs (at least during KDE 4.8.x) kdeutils:ksecrets needs +# kdelibs and then kdelibs needs a rebuild to pick up ksecretservice +# (this will no longer be required in KDE 4.9). +# And kde-baseapps is rebuilt after kdewebdev because it can then pickup +# libtidy and enable the Konqueror validators plugin to validate HTML. +KDEMODS=" \ + kdelibs \ + kdebase:nepomuk-core \ + kdepimlibs \ + kdebase \ + kdesdk \ + extragear:libkscreen \ + kdegraphics \ + kdebindings \ + kdebase:kde-workspace \ + kdeaccessibility \ + kdeutils \ + kdelibs \ + kdemultimedia \ + extragear:libktorrent \ + kdenetwork \ + oxygen-icons \ + kdeadmin \ + kdeartwork \ + kdegames \ + kdetoys \ + kdepim \ + kdepim-runtime \ + kdenetwork:kopete \ + kdeedu \ + kdewebdev \ + kdebase:kde-baseapps \ + kdeplasma-addons \ + polkit-kde \ + extragear \ + " + +# Allow for specification of individual packages to be built: +if [ -z "$1" ]; then + MODQUEUE=$KDEMODS +else + MODQUEUE="$*" +fi + +# If requested, check if +# sources, module definitions and slack-desc are complete and matching: +if [ "$PRECHECK" = "yes" -o "$PRECHECK" = "YES" ]; then + precheck +fi + +# And finally, start working! +for module in \ + $MODQUEUE ; +do + echo "SlackBuild processing module '$module'" + deterministic_build $module + if [ $? = 0 ]; then + # Move the created packages up into the KDE build directory: + mv ${SLACK_KDE_BUILD_DIR}/$(echo $module |cut -f1 -d:)/*.t?z ${SLACK_KDE_BUILD_DIR}/ + if [ "$CLEANUP" = "yes" -o "$CLEANUP" = "YES" ]; then + # Clean out package and build directories: + rm -rf ${SLACK_KDE_BUILD_DIR}/$(echo $module |cut -f1 -d:) + fi + else + echo "${module} failed to build." + exit 1 + fi + cd - ; +done + +exit 0 + + diff --git a/patches/source/kdelibs/KDE.options b/patches/source/kdelibs/KDE.options new file mode 100644 index 000000000..c54dbfcfd --- /dev/null +++ b/patches/source/kdelibs/KDE.options @@ -0,0 +1,58 @@ +# Set default version/arch/build. You can override these settings +# in the SlackBuild scripts for each package (koffice, for example, +# usually has a different version number), or by setting your own +# environment variables. + +[ -z $VERSION ] && export VERSION=4.14.3 +[ -z $BUILD ] && export BUILD=1 + +# Automatically determine the architecture we're building on: +MARCH=$( uname -m ) +if [ -z "$ARCH" ]; then + case "$MARCH" in + i?86) export ARCH=i586 ;; + 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 + +[ -z $PKGARCH ] && export PKGARCH=$ARCH + +# Use this as CFLAGS and CXXFLAGS: +if [ -z "$SLKCFLAGS" ]; then + if [ "$ARCH" = "i586" ]; then + export SLKCFLAGS="-O2 -march=i586 -mtune=i686" + export LIBDIRSUFFIX="" + elif [ "$ARCH" = "s390" ]; then + export SLKCFLAGS="-O2" + export LIBDIRSUFFIX="" + elif [ "$ARCH" = "x86_64" ]; then + export SLKCFLAGS="-O2 -fPIC" + export LIBDIRSUFFIX="64" + elif [ "$ARCH" = "arm" ]; then + export SLKCFLAGS="-O2 -march=armv4 -mtune=xscale" + export LIBDIRSUFFIX="" + elif [ "$ARCH" = "armel" ]; then + export SLKCFLAGS="-O2 -march=armv4t" + export LIBDIRSUFFIX="" + elif [ "$ARCH" = "armv7hl" ]; then + export SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16" + export LIBDIRSUFFIX="" + else + export SLKCFLAGS="-O2" + export LIBDIRSUFFIX="" + fi +fi + +# Use this to set the number of parallel make jobs: +if [ -z "$NUMJOBS" ]; then + export NUMJOBS="-j7" +fi + +# Additional cmake flags that are spanned across the KDE modules +# Do not use "final build" unless we build an actual release. +#export KDE_OPT_ARGS=" -DKDE4_ENABLE_FINAL=\"ON\" -DSITE=\"slackware.com\" " +export KDE_OPT_ARGS=" -DKDE4_BUILD_TESTS=OFF -DSITE=\"slackware.com\" -DKDE_DISTRIBUTION_TEXT=\"volkerdi@slackware.com\" " + diff --git a/patches/source/kdelibs/build/kdelibs b/patches/source/kdelibs/build/kdelibs new file mode 100644 index 000000000..1074c5613 --- /dev/null +++ b/patches/source/kdelibs/build/kdelibs @@ -0,0 +1 @@ +1_slack14.2 diff --git a/patches/source/kdelibs/cmake/kdelibs b/patches/source/kdelibs/cmake/kdelibs new file mode 100644 index 000000000..92015a911 --- /dev/null +++ b/patches/source/kdelibs/cmake/kdelibs @@ -0,0 +1,17 @@ +mkdir -p build +cd build + cmake \ + $KDE_OPT_ARGS \ + -DWITH_HAL=OFF \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DMAN_INSTALL_DIR=/usr/man \ + -DSYSCONF_INSTALL_DIR=/etc/kde \ + -DLIB_SUFFIX=${LIBDIRSUFFIX} \ + -DKDE_DISTRIBUTION_TEXT="volkerdi@slackware.com" \ + .. + diff --git a/patches/source/kdelibs/doinst.sh/kdelibs b/patches/source/kdelibs/doinst.sh/kdelibs new file mode 100644 index 000000000..d7006c70a --- /dev/null +++ b/patches/source/kdelibs/doinst.sh/kdelibs @@ -0,0 +1,9 @@ + +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database /usr/share/applications >/dev/null 2>&1 +fi + +if [ -x usr/bin/update-mime-database ]; then + /usr/bin/update-mime-database /usr/share/mime >/dev/null 2>&1 +fi + diff --git a/patches/source/kdelibs/kdelibs.SlackBuild b/patches/source/kdelibs/kdelibs.SlackBuild new file mode 100755 index 000000000..542ddb604 --- /dev/null +++ b/patches/source/kdelibs/kdelibs.SlackBuild @@ -0,0 +1,2 @@ +./KDE.SlackBuild kdelibs:kdelibs +mv /tmp/kde_build/kdelibs*txz /tmp diff --git a/patches/source/kdelibs/modularize b/patches/source/kdelibs/modularize new file mode 100644 index 000000000..4dd401b5a --- /dev/null +++ b/patches/source/kdelibs/modularize @@ -0,0 +1,268 @@ +# If a package is listed here, it will be built apart from the +# usual "grab bag" package that's made from each source directory. +# +# Things to note: +# +# Listing a package here will not cause it to be built. To do that, +# make sure it is added to one of the files in the modules/ directory +# that is built by the main KDE.SlackBuild script. +# +# If a subpackage name happens to be the same as the "grab bag" package +# that contains it, you need to be a bit careful. Unless everything +# in that collection will be built modular, *do not* list that name +# here! If you do, first the module by that name will be built, and +# then everything that's not modular in that collection will be built +# into a "grab bag" that will replace that first package. +# +# If the goal is to build the most combined packages possible, the +# easiest way to accomplish that is just to move this file out of the +# way and replace it with an empty one before building. + +# kdeaccessibility +jovie +kaccessible +kmouth +kmousetool +kmag + +# kdelibs: +kdelibs + +# kdebase: +baloo +baloo-widgets +nepomuk-core +nepomuk-widgets +kfilemetadata +kde-baseapps +kactivities +konsole +kate +kde-wallpapers +kde-workspace +kde-runtime +kde-base-artwork + +# kdeedu: +libkdeedu +analitza +artikulate +blinken +cantor +kalgebra +kalzium +kanagram +kbruch +kgeography +khangman +kig +kiten +klettres +kmplot +kqtquickcharts +kstars +ktouch +kturtle +kwordquiz +marble +parley +pairs +rocs +step + +# kdeadmin +kcron +ksystemlog +kuser +#kdeadmin + +# kdeartwork +kdeartwork + +# kdegraphics: +libkipi +libkexiv2 +libkdcraw +libksane +okular +kdegraphics-mobipocket +kdegraphics-strigi-analyzer +kdegraphics-thumbnailers +gwenview +kamera +kcolorchooser +kgamma +kolourpaint +kruler +ksaneplugin +ksnapshot +svgpart + +# kdebindings +smokegen +smokeqt +qtruby +perlqt +smokekde +korundum +perlkde +pykde4 +kross-interpreters +kimono +qyoto + +# kdemultimedia +libkcddb +libkcompactdisc +audiocd-kio +dragon +ffmpegthumbs +mplayerthumbs +juk +kmix +kscd + +# kdenetwork +kdenetwork-filesharing +kdenetwork-strigi-analyzers +#kdnssd +zeroconf-ioslave +kget +kopete +kppp +krdc +krfb +#kdenetwork + +# kdeutils +ark +filelight +kcalc +kcharselect +kdf +kfloppy +kgpg +#printer-applet +print-manager +kremotecontrol +ktimer +kwalletmanager +superkaramba +sweeper + +# kdegames +libkdegames +libkmahjongg +klickety +ksudoku +ksquares +kpat +klines +ksnakeduel +kollision +kshisen +kblocks +lskat +kreversi +bovo +kajongg +granatier +kmines +kiriki +kigo +bomber +kolf +kdiamond +kbounce +konquest +kapman +knavalbattle +killbots +kubrick +kgoldrunner +knetwalk +kbreakout +ksirk +kfourinline +picmi +kblackbox +palapeli +katomic +ktuberling +kjumpingcube +kmahjongg +kspaceduel + +# kdewebdev +kdewebdev + +# kdepim +kdepim +kdepim-runtime + +# kdepimlibs +kdepimlibs + +# kdeplasma-addons +kdeplasma-addons + +# kdesdk +cervisia +dolphin-plugins +kapptemplate +kcachegrind +kde-dev-scripts +kde-dev-utils +kdesdk-kioslaves +kdesdk-strigi-analyzers +kdesdk-thumbnailers +libkomparediff2 +kompare +lokalize +okteta +poxml +umbrello +#kdesdk + +# kdetoys +amor +kteatime +ktux +#kdetoys + +# oxygen-icons +oxygen-icons + +# polkit-kde +polkit-kde-agent-1 +polkit-kde-kcmodules-1 + +# extragear +bluedevil +k3b +kaudiocreator +kplayer +kwebkitpart +oxygen-gtk2 +kdevplatform +kdevelop-pg-qt +kdevelop +kdev-python +kdevelop-php +kdevelop-php-docs +#quanta +wicd-kde +libmm-qt +libnm-qt +plasma-nm +skanlite +kio-mtp +libktorrent +ktorrent +amarok +calligra +libkscreen +kscreen +partitionmanager +kdeconnect-kde + diff --git a/patches/source/kdelibs/modules/kdelibs b/patches/source/kdelibs/modules/kdelibs new file mode 100644 index 000000000..473159785 --- /dev/null +++ b/patches/source/kdelibs/modules/kdelibs @@ -0,0 +1 @@ +kdelibs diff --git a/patches/source/kdelibs/noarch b/patches/source/kdelibs/noarch new file mode 100644 index 000000000..0c1318f12 --- /dev/null +++ b/patches/source/kdelibs/noarch @@ -0,0 +1,5 @@ +# List packages with an $ARCH of "noarch" (i.e. packages +# that contain no binaries) here: + +kde-wallpapers + diff --git a/patches/source/kdelibs/package-blacklist b/patches/source/kdelibs/package-blacklist new file mode 100644 index 000000000..71e99c40c --- /dev/null +++ b/patches/source/kdelibs/package-blacklist @@ -0,0 +1,9 @@ +# Enter packages to skip (perhaps because they aren't used on +# this platform) below. Just the package name -- no version +# number is needed. + +## kdebindings: +# needs c-sharp: +kimono +qyoto + diff --git a/patches/source/kdelibs/patch/kdelibs.patch b/patches/source/kdelibs/patch/kdelibs.patch new file mode 100644 index 000000000..c314b559c --- /dev/null +++ b/patches/source/kdelibs/patch/kdelibs.patch @@ -0,0 +1,14 @@ +# Slackware ships a different version of XML DTDs: +zcat $CWD/patch/kdelibs/kdelibs.docbook.patch.gz | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; } + +# Make uPnP support depend on the environment variable SOLID_UPNP, +# e.g. by creating an /etc/profile.d/upnp.sh file with the following contents: +# export SOLID_UPNP=1 +zcat $CWD/patch/kdelibs/kdelibs.upnp_conditional.patch.gz | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; } + +# Revert 3 patches which (although they probably follow the FDo spec better), +# cause incorrect icon overrides: +zcat $CWD/patch/kdelibs/return-not-break.-copy-paste-error.patch.gz | patch -R -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; } +zcat $CWD/patch/kdelibs/coding-style-fixes.patch.gz | patch -R -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; } +zcat $CWD/patch/kdelibs/return-application-icons-properly.patch.gz | patch -R -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; } + diff --git a/patches/source/kdelibs/patch/kdelibs/coding-style-fixes.patch b/patches/source/kdelibs/patch/kdelibs/coding-style-fixes.patch new file mode 100644 index 000000000..11108f0a4 --- /dev/null +++ b/patches/source/kdelibs/patch/kdelibs/coding-style-fixes.patch @@ -0,0 +1,62 @@ +From 2173580f070e806d4715e13048c697c49ec262e2 Mon Sep 17 00:00:00 2001 +From: Aaron Seigo +Date: Thu, 21 Feb 2013 17:59:58 +0100 +Subject: [PATCH 047/111] coding style fixes + +--- + kdeui/icons/kiconloader.cpp | 27 ++++++++++++--------------- + 1 file changed, 12 insertions(+), 15 deletions(-) + +diff --git a/kdeui/icons/kiconloader.cpp b/kdeui/icons/kiconloader.cpp +index 6fed667..dba474d 100644 +--- a/kdeui/icons/kiconloader.cpp ++++ b/kdeui/icons/kiconloader.cpp +@@ -938,32 +938,29 @@ K3Icon KIconLoaderPrivate::findMatchingIcon(const QString& name, int size) const + } + } + +- foreach (KIconThemeNode *themeNode, links) +- { ++ foreach (KIconThemeNode *themeNode, links) { + QString currentName = name; + +- while (!currentName.isEmpty()) +- { +- ++ while (!currentName.isEmpty()) { + //kDebug(264) << "Looking up" << currentName; + +-// The following code has been commented out because the Qt SVG renderer needs +-// to be improved. If you are going to change/remove some code from this part, +-// please contact me before (ereslibre@kde.org), or kde-core-devel@kde.org. (ereslibre) +- for (int i = 0 ; i < 4 ; i++) +- { ++ for (int i = 0 ; i < 4 ; i++) { + icon = themeNode->theme->iconPath(currentName + ext[i], size, KIconLoader::MatchExact); +- if (icon.isValid()) +- return icon; ++ if (icon.isValid()) { ++ break; ++ } + + icon = themeNode->theme->iconPath(currentName + ext[i], size, KIconLoader::MatchBest); +- if (icon.isValid()) +- return icon; ++ if (icon.isValid()) { ++ break; ++ } + } ++ //kDebug(264) << "Looking up" << currentName; + +- if (genericFallback) ++ if (genericFallback) { + // we already tested the base name + break; ++ } + + int rindex = currentName.lastIndexOf('-'); + if (rindex > 1) { // > 1 so that we don't split x-content or x-epoc +-- +1.8.1.4 + + diff --git a/patches/source/kdelibs/patch/kdelibs/kdelibs.docbook.patch b/patches/source/kdelibs/patch/kdelibs/kdelibs.docbook.patch new file mode 100644 index 000000000..6a20cd279 --- /dev/null +++ b/patches/source/kdelibs/patch/kdelibs/kdelibs.docbook.patch @@ -0,0 +1,11 @@ +--- kdelibs-4.4.85/cmake/modules/FindDocBookXML.cmake.orig 2010-05-27 19:25:00.000000000 +0200 ++++ kdelibs-4.4.85/cmake/modules/FindDocBookXML.cmake 2010-06-07 16:18:35.000000000 +0200 +@@ -12,7 +12,7 @@ + # Redistribution and use is allowed according to the terms of the BSD license. + # For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +-set (DOCBOOKXML_CURRENTDTD_VERSION "4.2" ++set (DOCBOOKXML_CURRENTDTD_VERSION "4.5" + CACHE INTERNAL "Required version of XML DTDs") + + set (DTD_PATH_LIST diff --git a/patches/source/kdelibs/patch/kdelibs/kdelibs.upnp_conditional.patch b/patches/source/kdelibs/patch/kdelibs/kdelibs.upnp_conditional.patch new file mode 100644 index 000000000..3a1944774 --- /dev/null +++ b/patches/source/kdelibs/patch/kdelibs/kdelibs.upnp_conditional.patch @@ -0,0 +1,15 @@ +--- kdelibs-4.8.0/solid/solid/managerbase.cpp.orig 2011-07-27 20:34:39.000000000 +0200 ++++ kdelibs-4.8.0/solid/solid/managerbase.cpp 2012-01-26 09:17:49.409993419 +0100 +@@ -90,7 +90,11 @@ + # endif + + # if defined (HUPNP_FOUND) +- m_backends << new Solid::Backends::UPnP::UPnPDeviceManager(0); ++ bool solidUpnpEnabled ++ = QString::fromLocal8Bit(qgetenv("SOLID_UPNP")).toInt()==1; ++ if (solidUpnpEnabled) { ++ m_backends << new Solid::Backends::UPnP::UPnPDeviceManager(0); ++ } + # endif + } + } diff --git a/patches/source/kdelibs/patch/kdelibs/return-application-icons-properly.patch b/patches/source/kdelibs/patch/kdelibs/return-application-icons-properly.patch new file mode 100644 index 000000000..2bdb53adf --- /dev/null +++ b/patches/source/kdelibs/patch/kdelibs/return-application-icons-properly.patch @@ -0,0 +1,56 @@ +From 613c951a1157df0d8a907a155a5eaa706816d5f9 Mon Sep 17 00:00:00 2001 +From: Aaron Seigo +Date: Thu, 21 Feb 2013 17:58:11 +0100 +Subject: return application icons properly + +BUG:315578 +--- + kdeui/icons/kiconloader.cpp | 31 ++++++++++++++++++++++++++++++- + 1 file changed, 30 insertions(+), 1 deletion(-) + +diff --git a/kdeui/icons/kiconloader.cpp b/kdeui/icons/kiconloader.cpp +index f65e941..6fed667 100644 +--- a/kdeui/icons/kiconloader.cpp ++++ b/kdeui/icons/kiconloader.cpp +@@ -909,7 +909,36 @@ K3Icon KIconLoaderPrivate::findMatchingIcon(const QString& name, int size) const + const char * const ext[4] = { ".png", ".svgz", ".svg", ".xpm" }; + bool genericFallback = name.endsWith(QLatin1String("-x-generic")); + +- foreach(KIconThemeNode *themeNode, links) ++ // Do two passes through themeNodes. ++ // ++ // The first pass looks for an exact match in each themeNode one after the other. ++ // If one is found and it is an app icon then return that icon. ++ // ++ // In the next pass (assuming the first pass failed), it looks for exact matches ++ // and then generic fallbacks in each themeNode one after the other ++ // ++ // The reasoning is that application icons should always match exactly, all other ++ // icons may fallback. Since we do not know what the context is here when we start ++ // looking for it, we can only go by the path found. ++ foreach (KIconThemeNode *themeNode, links) { ++ for (int i = 0 ; i < 4 ; i++) { ++ icon = themeNode->theme->iconPath(name + ext[i], size, KIconLoader::MatchExact); ++ if (icon.isValid()) { ++ break; ++ } ++ ++ icon = themeNode->theme->iconPath(name + ext[i], size, KIconLoader::MatchBest); ++ if (icon.isValid()) { ++ break; ++ } ++ } ++ ++ if (icon.isValid() && icon.path.contains("/apps/")) { ++ return icon; ++ } ++ } ++ ++ foreach (KIconThemeNode *themeNode, links) + { + QString currentName = name; + +-- +1.8.1.4 + + diff --git a/patches/source/kdelibs/patch/kdelibs/return-not-break.-copy-paste-error.patch b/patches/source/kdelibs/patch/kdelibs/return-not-break.-copy-paste-error.patch new file mode 100644 index 000000000..b62818ed6 --- /dev/null +++ b/patches/source/kdelibs/patch/kdelibs/return-not-break.-copy-paste-error.patch @@ -0,0 +1,31 @@ +From 0edfd42151ad57322a10a24ab4971b638e220e6e Mon Sep 17 00:00:00 2001 +From: Aaron Seigo +Date: Thu, 21 Feb 2013 18:14:54 +0100 +Subject: [PATCH 049/111] return, not break. copy/paste error + +--- + kdeui/icons/kiconloader.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/kdeui/icons/kiconloader.cpp b/kdeui/icons/kiconloader.cpp +index dba474d..ce6aeea 100644 +--- a/kdeui/icons/kiconloader.cpp ++++ b/kdeui/icons/kiconloader.cpp +@@ -947,12 +947,12 @@ K3Icon KIconLoaderPrivate::findMatchingIcon(const QString& name, int size) const + for (int i = 0 ; i < 4 ; i++) { + icon = themeNode->theme->iconPath(currentName + ext[i], size, KIconLoader::MatchExact); + if (icon.isValid()) { +- break; ++ return icon; + } + + icon = themeNode->theme->iconPath(currentName + ext[i], size, KIconLoader::MatchBest); + if (icon.isValid()) { +- break; ++ return icon; + } + } + //kDebug(264) << "Looking up" << currentName; +-- +1.8.1.4 + diff --git a/patches/source/kdelibs/post-install/kdelibs.post-install b/patches/source/kdelibs/post-install/kdelibs.post-install new file mode 100644 index 000000000..9239a3e5f --- /dev/null +++ b/patches/source/kdelibs/post-install/kdelibs.post-install @@ -0,0 +1,2 @@ +# Move the polkit dbus configuration files to the proper place: +mv $PKG/etc/kde/dbus-1 $PKG/etc/ diff --git a/patches/source/kdelibs/slack-desc/kdelibs b/patches/source/kdelibs/slack-desc/kdelibs new file mode 100644 index 000000000..a89ea3c8a --- /dev/null +++ b/patches/source/kdelibs/slack-desc/kdelibs @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' on +# the right side marks the last column you can put a character in. You must make +# exactly 11 lines for the formatting to be correct. It's also customary to +# leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +kdelibs: kdelibs (KDE libraries) +kdelibs: +kdelibs: System libraries and other resources required for the KDE Platform. +kdelibs: +kdelibs: +kdelibs: +kdelibs: +kdelibs: +kdelibs: +kdelibs: +kdelibs: -- cgit v1.2.3