From 86e4ef9e64cb6abbb4d1ae3a6e67eb57fc2d9bac Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Fri, 22 Dec 2017 01:02:13 +0100 Subject: Adapt the KDE.SlackBuild framework for a KDE4-less future --- kde/KDE.SlackBuild | 164 ++++-------------- kde/KDE.options | 25 ++- kde/modularize | 494 ----------------------------------------------------- 3 files changed, 41 insertions(+), 642 deletions(-) delete mode 100644 kde/modularize diff --git a/kde/KDE.SlackBuild b/kde/KDE.SlackBuild index 36b054c..5401811 100755 --- a/kde/KDE.SlackBuild +++ b/kde/KDE.SlackBuild @@ -22,15 +22,15 @@ # 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 +# ./KDE.SlackBuild frameworks # To build only a single package, specify both the group name # and the name of the package, like: -# ./KDE.SlackBuild kdeedu:marble +# ./KDE.SlackBuild applications:dolphin # To build multiple packages in a module, separate the package names with comma: -# ./KDE.SlackBuild kdebindings:perlqt,perlkde +# ./KDE.SlackBuild plasma:powerdevil,bluedevil # To build a package *and* all the remaining packages following it # in the modules file, end the package name with a comma: -# ./KDE.SlackBuild plasma:kio-extras,kwin, +# ./KDE.SlackBuild plasma:breeze,kwin, # ---------------------------------------------------------------------------- @@ -38,6 +38,7 @@ CLEANUP=${CLEANUP:-"yes"} # clean up build directory after successful build. UPGRADE=${UPGRADE:-"yes"} # upgrade package 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. +GRACETME=${GRACETME:-"10"} # grace time to change your mind before build starts KDEGITURI="git://anongit.kde.org" @@ -177,57 +178,47 @@ precheck() { fi unset PKGDUP - # Any source not being built modular (i.e. forgotten to add to modularize)? - for PSRC in $(cat modules/* | grep -v "^ *#" | grep -v "^$"); do - if ! grep -wq "^${PSRC}$" modularize ; then - echo "Not built modular: $PSRC" - RETVAL=1 - fi - done - unset PSRC - - for MODULE in $(cat $CWD/modules/* | grep -v "^ *#") ; do + for MODPKG in $(cat $CWD/modules/* | grep -v "^ *#") ; do # First find out if the pkg source is different from the actual pkg name: - if [ -f $CWD/pkgsrc/$MODULE ]; then - MODBASE=$(basename $(cat $CWD/pkgsrc/$MODULE)) - MODLOC=$(dirname $(cat $CWD/pkgsrc/$MODULE))/ + if [ -f $CWD/pkgsrc/$MODPKG ]; then + MODBASE=$(basename $(cat $CWD/pkgsrc/$MODPKG)) + MODLOC=$(dirname $(cat $CWD/pkgsrc/$MODPKG))/ else - MODBASE=$MODULE + MODBASE=$MODPKG MODLOC="" fi MODSRC="$(find $CWD/src/$MODLOC -name $MODBASE-*.tar.* |grep -vE ".asc$|.sig$" |grep -E "$MODBASE-[^-]+.tar.*$|$MODBASE-[0-9].+.tar.*$")" if [ -z "$MODSRC" ] ; then - echo "Module '$MODULE' does not have a matching source tarball ($MODLOC$MODBASE)!" + echo "Module '$MODPKG' does not have a matching source tarball ($MODLOC$MODBASE)!" if [ "$CHECKOUT" = "yes" -o "$CHECKOUT" = "YES" ]; then echo "Checking out KDE component at branch '$VERSION'." git archive --format=tar --prefix ${MODBASE}-${VERSION}/ --remote ${KDEGITURI}/${MODBASE}.git v${VERSION} | xz -c > $CWD/src/${MODLOC}/${MODBASE}-${VERSION}.tar.xz RETVAL=$? if [ $RETVAL -ne 0 ]; then - echo "Error while checking out '$MODULE' ($MODLOC/$MODBASE) !" + echo "Error while checking out '$MODPKG' ($MODLOC/$MODBASE) !" mv $CWD/src/$MODLOC/${MODBASE}-${VERSION}.tar.xz $CWD/src/$MODLOC/${MODBASE}-${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 !" + # A missing slack-desc counts as fatal: + if [ -z "$(find $CWD/slack-desc -name ${MODPKG})" ] ; then + echo "Module '$MODPKG' 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 + echo "Check complete, build starts in ${GRACETME} seconds.." + sleep ${GRACETME} else echo "Precheck failed with error code '$RETVAL'." exit 1 fi } -# Support function builds one complete module (like 'kdelibs'), or +# Support function builds one complete module (like 'frameworks'), or # exactly one package which is part of a module (like 'okular'): build_mod_pkg () { kde_module=$1 @@ -235,9 +226,10 @@ build_mod_pkg () { cd $CWD/modules - # See if $kde_module is a module name like "kdeadmin": + # See if $kde_module is a module name like "frameworks": if [ ! -z "$kde_module" ]; then if [ ! -f "$kde_module" ]; then + echo "** '${kde_module}' is not an existing module." return fi fi @@ -246,6 +238,7 @@ build_mod_pkg () { mkdir -p $PKG ( for PKGNAME in $(cat $kde_module |grep -v "^$" |grep -v "^ *#") ; do if grep -wq "^${PKGNAME}$" ${CWD}/package-blacklist ; then + echo "** '${PKGNAME}' is on the package blacklist." continue fi # Find the full source filename - yeah ugly, but I had two goals: @@ -285,12 +278,11 @@ build_mod_pkg () { 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 + + # 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 # 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) @@ -408,99 +400,8 @@ build_mod_pkg () { fi 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: - if [ "$UPGRADE" = "yes" -o "$UPGRADE" = "YES" ]; then - 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 & - fi ) } @@ -540,25 +441,22 @@ deterministic_build() { [ -r ./KDE.options ] && . ./KDE.options # This avoids compiling a version number into KDE's .la files: -QTDIR=/usr/lib${LIBDIRSUFFIX}/qt ; export QTDIR +QTDIR=/usr/lib${LIBDIRSUFFIX}/qt5 ; 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) +# Get the KDE environment variables: +[ -d post-install/kservice ] && eval $(sed -e "s#/lib#/lib${LIBDIRSUFFIX}#" ./post-install/kservice/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 -# kwallet is built again after kdepim, -# so that it can pick up support for gpgmepp. +# Build/install libkdiagram before compiling kdepim: +# Build/install libktorrent before compiling kget: KDEMODS=" \ - frameworks:extra-cmake-modules \ kde4 \ - kde4-extragear \ frameworks \ applications-extra:kdiagram \ kdepim \ - frameworks:kwallet \ plasma \ plasma-extra \ applications-extra:libktorrent \ diff --git a/kde/KDE.options b/kde/KDE.options index 74dc6c0..1125561 100644 --- a/kde/KDE.options +++ b/kde/KDE.options @@ -1,21 +1,17 @@ -# 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. +# Set default arch/build. A default version is not needed since +# package versions are determined by their source tarvall. -[ -z $VERSION ] && export VERSION=5.11.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=i486 ;; - armv7hl) export ARCH=$MARCH ;; - arm*) export ARCH=arm ;; + case "$(uname -m)" in + i?86) ARCH=i586 ;; + arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;; # Unless $ARCH is already set, use uname -m for all other archs: - *) export ARCH=$MARCH ;; + *) ARCH=$(uname -m) ;; esac + export ARCH fi [ -z $PKGARCH ] && export PKGARCH=$ARCH @@ -25,6 +21,9 @@ if [ -z "$SLKCFLAGS" ]; then if [ "$ARCH" = "i486" ]; then export SLKCFLAGS="-O2 -march=i486 -mtune=i686" export LIBDIRSUFFIX="" + elif [ "$ARCH" = "i586" ]; then + export SLKCFLAGS="-O2 -march=i586 -mtune=i686" + export LIBDIRSUFFIX="" elif [ "$ARCH" = "s390" ]; then export SLKCFLAGS="-O2" export LIBDIRSUFFIX="" @@ -46,9 +45,6 @@ if [ -z "$SLKCFLAGS" ]; then fi fi -# For KF5 beta builds (not co-installable with KDE4): -export SLKCFLAGS="-I/opt/kf5/include $SLKCFLAGS" - # Use this to set the number of parallel make jobs: if [ -z "$NUMJOBS" ]; then export NUMJOBS="-j7" @@ -56,6 +52,5 @@ 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=" -Wno-dev -DBUILD_TESTING=OFF -DKDE4_BUILD_TESTS=OFF -DSITE=\"slackware.com\" -DKDE_DISTRIBUTION_TEXT=\"volkerdi@slackware.com\" " diff --git a/kde/modularize b/kde/modularize deleted file mode 100644 index a02f165..0000000 --- a/kde/modularize +++ /dev/null @@ -1,494 +0,0 @@ -# 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. - -# -# The Frameworks 5, Plasma 5 and Applications: -# - -# frameworks -# Tier 1, depends on Qt5, system libraries: -extra-cmake-modules -attica-framework -kitemmodels -kitemviews -kplotting -threadweaver -kcodecs -kguiaddons -kidletime -kwidgetsaddons -sonnet -kconfig -kwindowsystem -solid -karchive -kdbusaddons -kcoreaddons -kimageformats -ki18n -networkmanager-qt -modemmanager-qt -bluez-qt -kwayland -prison -kirigami2 -syntax-highlighting -# Tier 2, depends on Tier 1, Qt5, system libraries: -kauth -kcrash -kglobalaccel -kjobwidgets -kcompletion -kdoctools -kpackage -kdnssd -knotifications -kunitconversion -kpty -kfilemetadata5 -# Tier 3, depends on Tier 1 and 2, Qt5, system libraries: -kconfigwidgets -kservice -kiconthemes -kwallet -kemoticons -kdesu -ktextwidgets -kxmlgui -kbookmarks -kio -knewstuff -kparts -kdewebkit -kdesignerplugin -kdeclarative -kcmutils -kinit -kded -knotifyconfig -ktexteditor -kactivities-framework -kactivities-stats -plasma-framework -kpeople -kxmlrpcclient -baloo5 -qqc2-desktop-style -# Tier 4, depends on Tier 1, 2 and 3, Qt5, system libraries: -kjsembed -kross -kmediaplayer -krunner -kjs -kapidox -frameworkintegration -kdelibs4support -khtml -breeze-icons -oxygen-icons5 - -# plasma -kgamma5 -kdecoration -breeze -breeze-gtk -breeze-grub -breeze-plymouth -kde-cli-tools -kinfocenter -libksysguard -ksysguard -kscreenlocker -kwin -kwrited -libkscreen2 -milou -oxygen -systemsettings -kwayland-integration -plasma-integration -plasma-desktop -plasma-workspace -kdeplasma-addons -plasma-workspace-wallpapers -plasma5-nm -powerdevil -bluedevil -khotkeys -kmenuedit -polkit-kde-framework -kscreen2 -sddm-kcm -kde-gtk-config -muon -ksshaskpass -plasma-sdk -plasma-mediacenter -kactivitymanagerd -kwallet-pam -plasma-pa -plasma-tests -user-manager -discover -xdg-desktop-portal-kde -drkonqi -plasma-vault -plymouth-kcm - -# plasma-extra -sddm-qt5 -kdeconnect-framework -polkit-kde-kcmodules-framework -kde-wallpapers -oxygen-fonts - -# applications -# kdebase: -kio-extras -kdebugsettings -kate -konsole -kdialog -keditbookmarks -kfind -konqueror -kde-workspace -kde-runtime -kde-base-artwork -dolphin -# kdesdk: -kapptemplate -okteta -cervisia -dolphin-plugins -kcachegrind -kde-dev-scripts -kde-dev-utils -kdesdk-kioslaves -kdesdk-strigi-analyzers -kdesdk-thumbnailers -libkomparediff2 -kompare -lokalize -poxml -umbrello -# kdegraphics: -libkipi -libkexiv2 -libkdcraw -libksane -gwenview -kdegraphics-mobipocket -kdegraphics-strigi-analyzer -okular -kdegraphics-thumbnailers -kamera -kcolorchooser -kolourpaint -kruler -ksaneplugin -ksnapshot -spectacle -svgpart -libkface -# kdeaccessibility: -jovie -kaccessible -kmouth -kmousetool -kmag -# kdeutils: -ark -baloo5-widgets -filelight -kcalc -kcharselect -kdf -kfloppy -kgpg -print-manager -kremotecontrol -ktimer -khelpcenter -kwalletmanager -superkaramba -sweeper -# kdemultimedia: -libkcddb -libkcompactdisc -audiocd-kio -dragon -ffmpegthumbs -mplayerthumbs -juk -kmix -kscd -kwave -k3b -# oxygen icon set: -oxygen-icons -# kdenetwork: -kdenetwork-filesharing -kdenetwork-strigi-analyzers -zeroconf-ioslave -kget -kopete -kppp -krdc -krfb -# kdeadmin: -kcron -ksystemlog -# kdeartwork: -kdeartwork -# 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 -# kdetoys: -amor -kteatime -ktux -# kdeedu: -libkdeedu -kdeedu-data -libkeduvocdocument -analitza -kalgebra -kanagram -khangman -kig -parley -artikulate -blinken -cantor -kalzium -kbruch -kgeography -kiten -klettres -kmplot -kstars -kqtquickcharts -ktouch -kturtle -kwordquiz -marble -pairs -rocs -step -minuet -# After marble: -libkgeomap -kdenlive -# kdewebdev: -kfilereplace -kimagemapeditor -klinkstatus -kommander -# KDE Telepathy: -signon-kwallet-extension -kaccounts-providers -kaccounts-integration -ktp-common-internals -ktp-accounts-kcm -ktp-contact-list -ktp-contact-runner -ktp-text-ui -ktp-approver -ktp-kded-module -ktp-auth-handler -ktp-filetransfer-handler -ktp-send-file -ktp-call-ui -ktp-desktop-applets -# KDE PIM -akonadi -akonadi-calendar -akonadi-calendar-tools -akonadi-contacts -akonadi-import-wizard -akonadi-mime -akonadi-notes -akonadi-search -akonadiconsole -akregator -blogilo -calendarsupport -eventviews -grantlee-editor -grantleetheme -incidenceeditor -kaddressbook -kalarm -kalarmcal -kblog -kcalcore -kcalutils -kcontacts -libkgapi -kdav -kdepim-addons -kdepim-apps-libs -kdepim-runtime -kholidays -kidentitymanagement -kimap -kldap -kleopatra -kmail -kmail-account-wizard -kmailtransport -kmbox -kmime -knotes -kontact -kontactinterface -korganizer -kpimtextedit -ktnef -libgravatar -libkdepim -libkleo -libksieve -mailcommon -mailimporter -mbox-importer -messagelib -pim-data-exporter -pim-sieve-editor -pim-storage-service-manager -pimcommon -syndication - -# -# The old KDE 4 stuff which has not been migrated yet. or is still needed -# by un-migrated applications: -# - -# kdelibs: -kdelibs - -# kdebase: -akonadi4 -baloo -baloo-widgets -nepomuk-core -kdepimlibs4 -nepomuk-widgets -kfilemetadata -kactivities -katepart4 -konsolepart4 - -# kdebindings: -smokegen -smokeqt -qtruby -perlqt -smokekde -korundum -perlkde -pykde4 -kross-interpreters -kimono -qyoto - -# kdegames: -libkdegames4 -libkmahjongg4 - -# kdesdk: -oktetapart4 - -# kdegraphics: -libksane4 -libkexiv2_4 - -# kde4-extragear -libkcddb4 -libkcompactdisc4 -audiocd-kio4 -kplayer -oxygen-gtk2 -kio-mtp -kdeconnect4 - -# applications-extra -calligra -digikam -krita -libktorrent -ktorrent -skanlite -kpmcore -partitionmanager -kdevplatform -kdevelop-pg-qt -kdevelop -kdev-python -kdev-php -kuser -kdiagram -kjots -krusader -kile -kaudiocreator -kwebkitpart -yakuake - -- cgit v1.2.3