summaryrefslogtreecommitdiffstats
path: root/source/kde/kde.SlackBuild
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2018-05-28 19:12:29 +0000
committer Eric Hameleers <alien@slackware.com>2018-05-31 23:39:35 +0200
commit646a5c1cbfd95873950a87b5f75d52073a967023 (patch)
treeb8b8d2ab3b0d432ea69ad1a64d1c789649d65020 /source/kde/kde.SlackBuild
parentd31c50870d0bee042ce660e445c9294a59a3a65b (diff)
downloadcurrent-646a5c1cbfd95873950a87b5f75d52073a967023.tar.gz
current-646a5c1cbfd95873950a87b5f75d52073a967023.tar.xz
Mon May 28 19:12:29 UTC 201820180528191229
a/pkgtools-15.0-noarch-13.txz: Rebuilt. installpkg: default line length for --terselength is the number of columns. removepkg: added --terse mode. upgradepkg: default line length for --terselength is the number of columns. upgradepkg: accept -option in addition to --option. ap/vim-8.1.0026-x86_64-1.txz: Upgraded. d/bison-3.0.5-x86_64-1.txz: Upgraded. e/emacs-26.1-x86_64-1.txz: Upgraded. kde/kopete-4.14.3-x86_64-8.txz: Rebuilt. Recompiled against libidn-1.35. n/conntrack-tools-1.4.5-x86_64-1.txz: Upgraded. n/libnetfilter_conntrack-1.0.7-x86_64-1.txz: Upgraded. n/libnftnl-1.1.0-x86_64-1.txz: Upgraded. n/links-2.16-x86_64-2.txz: Rebuilt. Rebuilt to enable X driver for -g mode. n/lynx-2.8.9dev.19-x86_64-1.txz: Upgraded. n/nftables-0.8.5-x86_64-1.txz: Upgraded. n/p11-kit-0.23.11-x86_64-1.txz: Upgraded. n/ulogd-2.0.7-x86_64-1.txz: Upgraded. n/whois-5.3.1-x86_64-1.txz: Upgraded. xap/network-manager-applet-1.8.12-x86_64-1.txz: Upgraded. xap/vim-gvim-8.1.0026-x86_64-1.txz: Upgraded.
Diffstat (limited to '')
-rwxr-xr-xsource/kde/kde.SlackBuild (renamed from source/kde/KDE.SlackBuild)125
1 files changed, 92 insertions, 33 deletions
diff --git a/source/kde/KDE.SlackBuild b/source/kde/kde.SlackBuild
index 56af191d8..1b58e99d2 100755
--- a/source/kde/KDE.SlackBuild
+++ b/source/kde/kde.SlackBuild
@@ -1,5 +1,5 @@
-#!/bin/sh
-# Copyright 2011, 2012 Patrick J. Volkerding, Sebeka, MN, USA
+#!/bin/bash
+# Copyright 2011, 2012, 2017, 2018 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -58,8 +58,18 @@ pkgbase() {
}
# Set initial variables:
-CWD=$(pwd)
-TMP=${TMP:-/tmp}
+cd $(dirname $0) ; CWD=$(pwd)
+if [ -z "$TMP" ]; then
+ TMP=/tmp
+ # Old default output directory. If $TMP wasn't predefined, we'll default to
+ # using it unless a different value is provided:
+ SLACK_KDE_BUILD_DIR=${SLACK_KDE_BUILD_DIR:-/tmp/kde_build}
+else
+ # $TMP already set. We'll also use it for the output directory unless
+ # a different value is provided:
+ SLACK_KDE_BUILD_DIR=${SLACK_KDE_BUILD_DIR:-$TMP}
+fi
+mkdir -p $TMP $SLACK_KDE_BUILD_DIR
# Set up a few useful functions:
@@ -78,10 +88,15 @@ fix_perms() {
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
+ # Also strip rpaths:
+ for file in $(find $target_dir | xargs file | grep -e "executable" -e "shared object" | grep ELF | cut -f 1 -d : 2> /dev/null) ; do
+ if [ ! "$(patchelf --print-rpath $file 2> /dev/null)" = "" ]; then
+ patchelf --remove-rpath $file
+ fi
+ done
}
process_man_pages() {
@@ -212,9 +227,11 @@ build_mod_pkg () {
continue
fi
else
- echo
- echo "Building from source ${kde_src}"
- echo
+ if [ -z "$PRINT_PACKAGE_NAME" ]; then
+ echo
+ echo "Building from source ${kde_src}"
+ echo
+ fi
fi
if grep -wq "^$PKGNAME" ${CWD}/modularize ; then
# Set $PKG to a private dir for the modular package build:
@@ -226,6 +243,24 @@ build_mod_pkg () {
# 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)
+ # If this variable is passed to the script, nothing will be built.
+ # Instead, a list of packages to be built will be output.
+ if [ ! -z "$PRINT_PACKAGE_NAME" ]; then
+ if [ -r $CWD/build/${PKGNAME} ]; then
+ MODBUILD=$(cat $CWD/build/${PKGNAME})
+ else
+ MODBUILD=$BUILD
+ fi
+ if [ "$PKGNAME" = "kde-runtime" -o "$PKGNAME" = "kmix" ]; then
+ # If this package is being built for ALSA (no PulseAudio), use the _alsa $TAG:
+ if [ ! -r /usr/lib${LIBDIRSUFFIX}/pkgconfig/libpulse.pc ]; then
+ MODBUILD=${MODBUILD}_alsa
+ fi
+ fi
+ echo "${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz"
+ continue
+ fi
+
rm -rf $(pkgbase $kde_src)
tar xf $(find $CWD/src -name ${kde_src}) || exit 1
cd $(pkgbase $kde_src) || exit 1
@@ -252,8 +287,16 @@ build_mod_pkg () {
. $CWD/cmake/cmake
fi
- make $NUMJOBS || make || exit 1
- make install DESTDIR=$PKG || exit 1
+ # Run make, using custom make script if needed:
+ if [ -r $CWD/make/${PKGNAME} ]; then
+ . $CWD/make/${PKGNAME}
+ elif [ -r $CWD/make/${kde_module} ]; then
+ . $CWD/make/${kde_module}
+ else
+ # This is the default make && make install routine:
+ make $NUMJOBS || make || exit 1
+ make install DESTDIR=$PKG || exit 1
+ fi
# Back to source toplevel builddir, since cmake may have run in a subdir:
cd $SLACK_KDE_BUILD_DIR/${kde_module}/$(pkgbase $kde_src)
@@ -314,6 +357,12 @@ build_mod_pkg () {
else
MODBUILD=$BUILD
fi
+ if [ "$PKGNAME" = "kde-runtime" -o "$PKGNAME" = "kmix" ]; then
+ # If this package is being built for ALSA (no PulseAudio), use the _alsa $TAG:
+ if [ ! -r /usr/lib${LIBDIRSUFFIX}/pkgconfig/libpulse.pc ]; then
+ MODBUILD=${MODBUILD}_alsa
+ fi
+ fi
if [ -r $CWD/makepkg/${PKGNAME} ]; then
BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
else
@@ -338,32 +387,40 @@ build_mod_pkg () {
# If every package listed in modules/"<kde_module>" is also listed
# in the modularize file, then there's no need to make a package
# for "<kde_module>":
- echo
- echo "Searching for packages in ${kde_module} that were not built modular:"
+ if [ -z "$PRINT_PACKAGE_NAME" ]; then
+ echo
+ echo "Searching for packages in ${kde_module} that were not built modular:"
+ fi
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."
+ if [ -z "$PRINT_PACKAGE_NAME" ]; then
+ echo "Found non-modular package $checkpackage."
+ fi
exit 99
fi
done
# Exit if everything in "<kde_module>" 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
+ if [ -z "$PRINT_PACKAGE_NAME" ]; then
+ echo "No non-modular components found in ${kde_module}."
+ echo "Not building catch-all package for ${kde_module}."
+ echo
+ fi
return
fi
# If there's no /usr directory in the "<kde_module>" 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
+ if [ -z "$PRINT_PACKAGE_NAME" ]; then
+ echo "No /usr directory found in package-${kde_module}."
+ echo "Not building catch-all package for ${kde_module}."
+ echo
+ fi
return
fi
@@ -372,11 +429,13 @@ build_mod_pkg () {
# 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
+ if [ -z "$PRINT_PACKAGE_NAME" ]; then
+ echo
+ echo "**************************************************************************"
+ echo "* Building combined package for non-modular parts of ${kde_module}"
+ echo "**************************************************************************"
+ echo
+ fi
PKGARCH=$ARCH
cd $PKG
@@ -443,7 +502,7 @@ deterministic_build() {
# MAIN PART #
# Import the build configuration options for as far as they are not already set:
-[ -r ./KDE.options ] && . ./KDE.options
+[ -r ./kde.options ] && . ./kde.options
# This avoids compiling a version number into KDE's .la files:
QTDIR=/usr/lib${LIBDIRSUFFIX}/qt ; export QTDIR
@@ -451,10 +510,6 @@ 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
@@ -511,20 +566,24 @@ fi
for module in \
$MODQUEUE ;
do
- echo "SlackBuild processing module '$module'"
+ if [ -z "$PRINT_PACKAGE_NAME" ]; then
+ echo "SlackBuild processing module '$module'"
+ fi
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}/
+ mv ${SLACK_KDE_BUILD_DIR}/$(echo $module |cut -f1 -d:)/*.t?z ${SLACK_KDE_BUILD_DIR}/ 2> /dev/null
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."
+ if [ -z "$PRINT_PACKAGE_NAME" ]; then
+ echo "${module} failed to build."
+ fi
exit 1
fi
- cd - ;
+ cd - > /dev/null
done
exit 0