LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Building KDE 4.8.5 from Slackware sources - few remarks (http://www.linuxquestions.org/questions/slackware-14/building-kde-4-8-5-from-slackware-sources-few-remarks-4175457103/)

kikinovak 04-06-2013 06:00 AM

Building KDE 4.8.5 from Slackware sources - few remarks
 
Hi,

I'm currently building KDE 4.8.5 from the Sources found on the Slackware DVD. If you wonder why I would do such a thing: I'd like to tweak the KDE desktop like Tomas M. from Slax did: only build needed apps, and don't build those I never intend to use. Plus, build in a few enhancements.

First things first, one dragon at a time.

The master KDE.SlackBuild allows either building all KDE packages in one go, or build modules individually by passing them as an argument. All modules are listed in the script, around the line 420:

Code:

KDEMODS=" \
  kdelibs \
  kdepimlibs \
  kdebase \
  kdesdk \
  kdegraphics \
  kdebindings \
  kdebase:kde-workspace \
  kdeaccessibility \
  kdeutils \
  kdelibs \
  kdemultimedia \
  extragear:libktorrent \
  kdenetwork \
  oxygen-icons \
  kdeadmin \
  kdeartwork \
  kdegames \
  kdetoys \
  kdepim \
  kdepim-runtime \
  kdeedu \
  kdewebdev \
  kdeplasma-addons \
  polkit-kde \
  extragear \
  "

First strange thing that strikes me. When I build the first module like this:

Code:

# ./KDE.SlackBuild kdelibs
... the module compiles fine, but then:
  1. makepkg builds the package.
  2. It gets installed.
  3. makepkg builds the package again immediately afterwards.
  4. It gets "updated" with itself.

Is this intended or just a minor bug in the build script?

Cheers,

Niki

phenixia2003 04-06-2013 06:57 AM

Hello,

This is documented in the SlackBuild:

Code:

# 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).
KDEMODS=" \
  kdelibs \
  kdepimlibs \
  kdebase \
  kdesdk \
  kdegraphics \
  kdebindings \
  kdebase:kde-workspace \
  kdeaccessibility \
  kdeutils \
  kdelibs \
  kdemultimedia \
  extragear:libktorrent \
  kdenetwork \
  oxygen-icons \
  kdeadmin \
  kdeartwork \
  kdegames \
  kdetoys \
  kdepim \
  kdepim-runtime \
  kdeedu \
  kdewebdev \
  kdeplasma-addons \
  polkit-kde \
  extragear \
  "

--
SeB

kikinovak 04-06-2013 07:55 AM

Yes, I know kdebase is built twice. But here, the package is compiled twice immediately after the first build. That's something else. I'm talking about the package construction with makepkg immediately after the first build.

Alien Bob 04-06-2013 08:48 AM

It's a side effect of having "kdelibs" both as the name of a module sub-package (inside modules/kdelibs) and as the module name itself (modules/kdelibs). This should be optimized at some point. But it does not hurt, so the priority is low...

Eric

volkerdi 04-06-2013 10:11 AM

Quote:

Originally Posted by Alien Bob (Post 4926242)
It's a side effect of having "kdelibs" both as the name of a module sub-package (inside modules/kdelibs) and as the module name itself (modules/kdelibs). This should be optimized at some point. But it does not hurt, so the priority is low...

It was optimized. The sources that are in -current right now don't do this. I made the fixes in the script when 4.10.1 went into -current (4.10.2 is there now, BTW).

kikinovak 04-06-2013 10:55 AM

Thanks for the clarification. Now I've found some other curiosity that's bugging me. Here goes.

The master KDE.SlackBuild calls a series of custom cmake scripts:

Code:

      # Run cmake, using custom cmake script if needed:
      if [ -r $CWD/cmake/${PKGNAME} ]; then
        . $CWD/cmake/${PKGNAME}
      else
        # This is the default configure script:
        . $CWD/cmake/cmake
      fi

This works fine for kdelibs for example. If I put something (echo "YATAHONGAGA!!!") at the top of cmake/kdelibs and then run this:

Code:

# ./KDE.SlackBuild kdelibs
... I'll see my random line fly by at the top of the configuration lines.

But the same thing seems to fail with cmake/kdebase. Meaning I can add whatever I want at the top of cmake/kdebase and then run this:

Code:

# ./KDE.SlackBuild/kdebase
... it will just get ignored.

So I have to conclude cmake/kdebase is ignored by the master script. Which is a pity, because that's precisely where I would have put my customizations, like specifying which apps to build and which to leave out (like Konqueror for example).

Any idea what's wrong here?

kikinovak 04-06-2013 11:07 AM

OK, I'll answer that myself, I think I just found out. If there's no file in the cmake directory corresponding to the exact module name (like kde-baseapps) and not the mere "big" package name (like kdebase), then the default 'cmake' file is included.

Now here's the solution to the problem:

Code:

# cd cmake
# cp kdebase kde-baseapps

Edit this file like this, for example:

Code:

cat CMakeLists.txt | \
  grep -v "add_subdirectory( konqueror )" | \
  grep -v "add_subdirectory( keditbookmarks )" | \
  grep -v "add_subdirectory( konq-plugins )" \
  > yatahongaga
mv yatahongaga CMakeLists.txt
mkdir -p build
cd build
  cmake \
    $KDE_OPT_ARGS \
    -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} \
    -DRUN_KAPPFINDER=ON \
    ..

Now the kde-baseapps module will be built without Konqueror.

kikinovak 04-06-2013 01:02 PM

BTW, I'd be curious to know what XAP stuff is exactly needed for various KDE packages to either build or run.

Alien Bob 04-06-2013 02:37 PM

Quote:

Originally Posted by kikinovak (Post 4926387)
BTW, I'd be curious to know what XAP stuff is exactly needed for various KDE packages to either build or run.

Capture a log of your KDE compilation and look for these lines:
Code:

The following OPTIONAL packages could NOT be located on your system.
That will tell you exactly what you could optionally add (some of the stuff you'll see is not part of Slackware at all by the way).
If any required software is missing, you will not even get past the "cmake" step of the module.

Eric

Woodsman 04-06-2013 02:53 PM

I would be grateful if the OP would post a copy of these customized scripts! :) I started tinkering with the same idea --- to create a custom package set with only the desired elements. I've been busy and never got very far.

Alien Bob 04-06-2013 03:10 PM

Quote:

Originally Posted by Woodsman (Post 4926434)
I would be grateful if the OP would post a copy of these customized scripts! :) I started tinkering with the same idea --- to create a custom package set with only the desired elements. I've been busy and never got very far.

Kikinovak already did: https://github.com/kikinovak/worksta...4.0/source/kde

Eric

kikinovak 04-06-2013 04:54 PM

Quote:

Originally Posted by Alien Bob (Post 4926426)
Capture a log of your KDE compilation and look for these lines:
Code:

The following OPTIONAL packages could NOT be located on your system.
That will tell you exactly what you could optionally add (some of the stuff you'll see is not part of Slackware at all by the way).
If any required software is missing, you will not even get past the "cmake" step of the module.

Eric

OK, thanks, Eric!

kikinovak 04-06-2013 04:56 PM

Quote:

Originally Posted by Alien Bob (Post 4926442)

Careful! This is really only a work in progress, and currently in a highly unusable state. I'll keep you posted once I've "reached a green twig", as we say in Austria.

Woodsman 04-06-2013 05:20 PM

Okay, thanks. My big bump right now is I can't figure out how to build Qt4 with the QT_NO_TOOLTIP option. The build always fails. :(

kikinovak 04-06-2013 05:27 PM

Well, just ignore the tooltips. Or as some yoga teacher once said to me: don't think about that pink elephant. :D


All times are GMT -5. The time now is 01:39 AM.