Difference between revisions of "TDE 14.0.0 prerequisites"

From Studiosg
Jump to navigationJump to search
(Page updated to new template)
(Some minor updates)
Line 1: Line 1:
{{header_en|title=How-to build TDE base packages| keyword={{Template:keyword_en_tde}}| description=Building, installing and configuring working packages for TDE base on Slackware Linux | link_page=TDE_14.0.0_pacchetti_base}}
+
{{header_en|title=How-to build TDE prerequisites| keyword={{Template:keyword_en_tde}}| description=Building, installing and configuring working packages for TDE prerequisites on Slackware Linux | link_page=TDE_14.0.0_prerequisiti}}
  
== '''Base Packages''' ==
+
== '''Prerequisites''' ==
 
[[En/trinity_desktop_environment_14.0.0 | Trinity Desktop Environment 14.0.0]]
 
[[En/trinity_desktop_environment_14.0.0 | Trinity Desktop Environment 14.0.0]]
  
You built and installed '''TDE prerequisites''' packages it's now time to move on to the real '''desktop environment'''. Being a huge and complex environment its source code is split among several packages, around thirty, depending on its scope and the functions it provides. All main daemons and bulk applications are grouped among two packages only labeled '''base packages''': '''tdelibs''' and '''tdebase'''. The two packages together make up the '''Trinity Desktop Environment''' skeleton and should be installed first. After installing both packages it will be possible to start the desktop environment and test some basic functionality like creating and moving a window, starting an application, but not much more. All of the programs and configuration tools making TDE useful and productive won't be available.
+
Packages grouped with the generic name '''Prerequisites''' include all of the desktop environment base libraries and some optional components needed for advanced features. The base libraries obviously include '''TQt3''', the Qt fork developed and maintained by the Trinity project members, '''tqtinterface''', a library providing an abstraction layer between TQt and TDE, '''arts''', the TDE sound server and sound stream mixer, '''dbus-tqt''' and '''dbus-1-tqt''', which tie the desktop environment with the hardware subsystem. The remaining libraries: '''avahi-tqt''', '''libart-lgpl''', '''libcaldav''', '''libcarddav''', '''python-tqt''', '''sip4-tqt''', '''tqca''', '''tqca-tls''' and '''tqscintilla''' are optional ones. The desktop environment could be built without them, but will miss some useful functionality.
  
 
=== Build System ===
 
=== Build System ===
  
In accordance to the Trinity project goals, '''both packages were successfully migrated to [http://www.cmake.org/ cmake]''' a tool that can be used to configure and build the source code.
+
One among the Trinity project main goals consists of porting the package build system from '''autotools''' to '''[http://www.cmake.org/ cmake]'''. The migration is still a work in progress partially concluded only for a bunch of the previously listed packages. A package list matched with the used build system follows:
 +
 
 +
{| style="width: 80%;"
 +
|+ '''BUILD SYSTEM'''
 +
! Package !! Package Type !! Build System
 +
|- style="text-align: center;"
 +
| arts || Base || Cmake
 +
|- style="text-align: center;"
 +
| avahi-tqt || Add-on || Autotools
 +
|- style="text-align: center;"
 +
| dbus-1-tqt || Base || Cmake
 +
|- style="text-align: center;"
 +
| dbus-tqt || Base || Cmake
 +
|- style="text-align: center;"
 +
| libart-lgpl || Add-on || Autotools
 +
|- style="text-align: center;"
 +
| libcaldav || Add-on || Autotools
 +
|- style="text-align: center;"
 +
| libcarddav || Add-on || Autotools
 +
|- style="text-align: center;"
 +
| python-tqt || Add-on || configure.py script <br> Python interpreter required
 +
|- style="text-align: center;"
 +
| sip4-tqt || Add-on || configure.py script  <br> Python interpreter required
 +
|- style="text-align: center;"
 +
| tqca || Add-on || Autotools
 +
|- style="text-align: center;"
 +
| tqca-tls || Add-on || Autotools
 +
|- style="text-align: center;"
 +
| tqscintilla || Add-on || Uses script qscintilla.pro for qmake <br> TQt3 library required
 +
|- style="text-align: center;"
 +
| tqt3 || Base || Autotools
 +
|- style="text-align: center;"
 +
| tqtinterface || Base || Cmake
 +
|}
 +
 
 +
The need for four different build script templates is evident. Templates should share as much code as possible, but differences will surely arise while invoking the build process because of both the different employed build systems and the need for package specific options. The common SlackBuild script structure, global options and finally package specific options all will be discussed and detailed below.
  
 
=== Common Build Script Structure ===
 
=== Common Build Script Structure ===
  
Code written for the prerequisite packages build scripts was reused as much as possible to maintain a certain degree of homogeneity. Please check the corresponding page for better details: [[TDE_14.0.0_prerequisites#Common_Build_Script_Structure |Common Build Script Structure]].
+
Scripts for version 3.5.13.2 of TDE ([[En/trinity_desktop_environment#Prerequisites |Prerequisites]]) were updated and adapted to the last available release. The script skeleton is nearly untouched:
 +
* Introduction where a brief description and license information are provided for the script.
 +
* External files containing global and local build options are loaded:
 +
<syntaxhighlight lang="bash">
 +
  if [ -r ../../TDE.options ]; then
 +
      . ../../TDE.options
 +
  fi
 +
  PREFIX_TDE=${PREFIX}
 +
  if [ -r ./local.options ]; then
 +
      . ./local.options
 +
  fi
 +
</syntaxhighlight>
 +
* Declare some global variables for the script:
 +
<syntaxhighlight lang="bash">
 +
  ARCHIVE_FORMAT=${ARCHIVE_FORMAT:-"tar.bz2"}
 +
  BUILD=${BUILD:-"1"}
 +
  LD_LIBRARY_PATH=""  # Will be defined later on
 +
  PRGNAM="tqtinterface"
 +
  PREFIX=${PREFIX:-"/usr"}
 +
  MANDIR=${MANDIR:-${PREFIX}/man}
 +
  SOURCE_SUBDIR=${SOURCE_SUBDIR:-"dependencies"}
 +
  SRCVER=${SRCVER:-"R14.0.0"}
 +
  TAG=${TAG:-"sg"}
 +
  TAR_OPTION=${TAR_OPTION:-"-xjvf"}
 +
  VERSION=$(echo ${SRCVER} | tr '-' '.')
 +
 
 +
  DOCS="AUTHORS COPYING HOW.TO.BUILD NAMING README TODO TRINITY.RELEASE tqtinterface.lsm"
 +
</syntaxhighlight>
 +
: Some variables were added since release 3.5.13.2, among them: the archive format and options for the '''tar''' program. All of the additions are meant to ease the build procedure once the project will settle on a compression format for source code archives.
 +
* Determine the target architecture for the package and set proper parameters for the compiler, linker, included libraries, etc.:
 +
<syntaxhighlight lang="bash">
 +
  if [ -z "${MARCH}" ]; then
 +
      MARCH=`uname -m`
 +
  fi
 +
  if [ -z "${ARCH}" ]; then
 +
      case "${MARCH}" in
 +
        i?86)
 +
            export ARCH=i486
 +
        ;;
 +
        arm*)
 +
            export ARCH=arm
 +
        ;;
 +
        *)
 +
            export ARCH=${MARCH}
 +
        ;;
 +
      esac
 +
  fi
 +
</syntaxhighlight>
 +
: Code was updated in order to read the target architecture from global parameters thus providing a suitable script for '''chroot''' environments.
 +
* Create a directory build tree:
 +
<syntaxhighlight lang="bash">
 +
  mkdir -p ${TMP}/tmp-${PRGNAM}  # Location to build the source
 +
  rm -rf ${TMP}/tmp-${PRGNAM}/*  # Remove the remnants of previous build and continue
 +
  mkdir -p ${PKG}                # Place for the package to be built
 +
  rm -rf ${PKG}/*                # We always erase old package's contents
 +
  mkdir -p ${OUTPUT}            # Place for the package to be saved
 +
</syntaxhighlight>
 +
* Assign sane permissions to files:
 +
<syntaxhighlight lang="bash">
 +
  chown -R root:root .
 +
  find . \
 +
  \( -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 {} \;
 +
</syntaxhighlight>
 +
* Configure, build and install the package.
 +
* Add some documentation, links, examples and whatever is needed to obtain a fully functional package:
 +
<syntaxhighlight lang="bash">
 +
  mkdir -p ${PKG}/usr/doc/${PRGNAM}"-"$VERSION
 +
  cp -a ${DOCS} ${PKG}/usr/doc/${PRGNAM}"-"${VERSION}
 +
  chown -R root:root ${PKG}/usr/doc/${PRGNAM}"-"${VERSION}
 +
  find ${PKG}/usr/doc -type f -exec chmod 644 {} \;
 +
 
 +
  # Add a package description.
 +
  mkdir -p ${PKG}/install
 +
  cat ${SRCDIR}/slack-desc > ${PKG}/install/slack-desc
 +
 
 +
  # Set sane permissions for the include files.
 +
  if [ -d ${PKG}/${PREFIX}/include ]; then
 +
      find ${PKG}/${PREFIX}/include -type f -exec chmod 0644 {} \;
 +
  fi
 +
</syntaxhighlight>
 +
* Crete the package.
  
 
=== Generic Options ===
 
=== Generic Options ===
  
Generic options used for both packages uniform to the ones detailed in the [http://www.cmake.org/ cmake] section of the TDE prerequisites page. You are again welcome to check the related page for further details: [[TDE_14.0.0_prerequisites#Generic_Options |Generic Options]].
+
Generic build options will vary depending on the adopted build system only. '''Autotools''' related packages require the following:
 +
* Rebuild the '''Autoconf / Automake''' used files:
 +
<syntaxhighlight lang="bash">
 +
  cp -Rp /usr/share/aclocal/libtool.m4 <pkg_path_build>/admin/libtool.m4.in
 +
  cp -Rp <path to your systems ltmain.sh file> admin/ltmain.sh
 +
  make -f admin/Makefile.common
 +
</syntaxhighlight>
 +
* Set options for the compiler and linker, set paths for include files, libraries and man pages:
 +
<syntaxhighlight lang="bash">
 +
  export LD_LIBRARY_PATH=${PREFIX}/lib${LIBDIRSUFFIX}:${PREFIX}/lib${LIBDIRSUFFIX}/trinity:${LD_LIBRARY_PATH}
 +
  export LIBDIR=${PREFIX}/lib${LIBDIRSUFFIX}
 +
  export MANDIR
 +
  export PATH=${PREFIX}/bin:${PATH}
 +
  export PKG_CONFIG_PATH=:${PREFIX}/lib${LIBDIRSUFFIX}/pkgconfig:${PKG_CONFIG_PATH}
 +
  export PREFIX
 +
  export QTDIR=${PREFIX}
 +
  export SYSCONFDIR=/etc/trinity
 +
  # Enable only one of the following:
 +
  # export DEBUG_AUTOTOOL_OPT="--enable-debug=full"
 +
  export DEBUG_AUTOTOOL_OPT="--disable-debug"
 +
</syntaxhighlight>
 +
* Configure source code:
 +
<syntaxhighlight lang="bash">
 +
  CFLAGS="${SLKCFLAGS}" \
 +
  CXXFLAGS="${SLKCFLAGS}" \
 +
  ./configure \
 +
      --prefix=${PREFIX} \
 +
      --libdir=${LIBDIR} \
 +
      --mandir=${MANDIR} \
 +
      --build=$ARCH-slackware-linux \
 +
      2>&1 | tee -a ${OUTPUT}/${PRGNAM}_configure.log
 +
</syntaxhighlight>
 +
* Build and install:
 +
<syntaxhighlight lang="bash">
 +
  make VERBOSE=1 2>&1 | tee ${OUTPUT}/${PRGNAM}_make.log
 +
  make install DESTDIR=${PKG} 2>&1 | tee ${OUTPUT}/${PRGNAM}_install.log
 +
</syntaxhighlight>
 +
 
 +
 
 +
Steps for '''[http://www.cmake.org/ Cmake]''' consist of:
 +
* Clean the cmake cache:
 +
<syntaxhighlight lang="bash">
 +
  find . -name CMakeCache.txt -exec rm {} \;
 +
</syntaxhighlight>
 +
* Set options for the compiler and linker, set paths for include files, libraries and man pages:
 +
<syntaxhighlight lang="bash">
 +
  export LD_LIBRARY_PATH=${PREFIX}/lib${LIBDIRSUFFIX}:${PREFIX}/lib${LIBDIRSUFFIX}/trinity:${LD_LIBRARY_PATH}
 +
  export LIBDIR=${PREFIX}/lib${LIBDIRSUFFIX}
 +
  export MANDIR
 +
  export PATH=${PREFIX}/bin:${PATH}
 +
  export PKG_CONFIG_PATH=${PREFIX}/lib${LIBDIRSUFFIX}/pkgconfig:${PKG_CONFIG_PATH}
 +
  export PREFIX
 +
  export QTDIR=${PREFIX}
 +
  export SYSCONFDIR=/etc/trinity
 +
  # Enable only one of the following:
 +
  # export DEBUG_AUTOTOOL_OPT="--disable-debug"
 +
  export DEBUG_CMAKE_OPT=""
 +
</syntaxhighlight>
 +
* Configure source code:
 +
<syntaxhighlight lang="bash">
 +
  cmake ${TMP}/tmp-${PRGNAM}/${DIR_SRC} \
 +
      -DCMAKE_C_FLAGS:STRING="${SLKCFLAGS}" \
 +
      -DCMAKE_CXX_FLAGS:STRING="${SLKCFLAGS} $DEBUG_CMAKE_OPT" \
 +
      -DCMAKE_INSTALL_PREFIX=${PREFIX} \
 +
      -DLIB_SUFFIX=${LIBDIRSUFFIX} \
 +
      -DMAN_INSTALL_DIR=${MANDIR} \
 +
      -DSYSCONF_INSTALL_DIR=${SYSCONFDIR} \
 +
      -DBUILD_ALL=ON \
 +
      2>&1 | tee ${OUTPUT}/${PRGNAM}_configure.log
 +
</syntaxhighlight>
 +
* Build and install:
 +
<syntaxhighlight lang="bash">
 +
  make VERBOSE=1 2>&1 | tee ${OUTPUT}/${PRGNAM}_make.log
 +
  make install DESTDIR=${PKG} 2>&1 | tee ${OUTPUT}/${PRGNAM}_install.log
 +
</syntaxhighlight>
 +
 
 +
 
 +
Packages '''python-tqt''' and '''sip4-tqt''' use a script written in Python language to configure source code. Both scripts only accept options for the compiler and linker.
 +
* Configure source code:
 +
<syntaxhighlight lang="bash">
 +
  python configure.py \
 +
      CFLAGS="${SLKCFLAGS}" \
 +
      CXXFLAGS="${SLKCFLAGS}" \
 +
      2>&1 | tee ${OUTPUT}/${PRGNAM}_configure.log
 +
</syntaxhighlight>
 +
* Build and install:
 +
<syntaxhighlight lang="bash">
 +
  make VERBOSE=1 2>&1 | tee ${OUTPUT}/${PRGNAM}_make.log
 +
  make install DESTDIR=${PKG} 2>&1 | tee ${OUTPUT}/${PRGNAM}_install.log
 +
</syntaxhighlight>
 +
 
 +
 
 +
Last is '''tqscintilla''', the only package to use '''tqmake''', which requires options for the compiler and linker.
 +
* Configure source code:
 +
<syntaxhighlight lang="bash">
 +
  CFLAGS="${SLKCFLAGS}" \
 +
  CXXFLAGS="${SLKCFLAGS} -fno-exceptions" \
 +
  tqmake qscintilla.pro \
 +
      2>&1 | tee ${OUTPUT}/${PRGNAM}_configure.log
 +
</syntaxhighlight>
 +
* Build and install:
 +
<syntaxhighlight lang="bash">
 +
  make VERBOSE=1 2>&1 | tee ${OUTPUT}/${PRGNAM}_make.log
 +
  make install INSTALL_ROOT=${PKG} 2>&1 | tee ${OUTPUT}/${PRGNAM}_install.log
 +
</syntaxhighlight>
  
 
=== Custom Options ===
 
=== Custom Options ===
  
Building both '''tdebase''' and '''tedelibs''' obviously required for some custom options. The former of the two in greater part, due to its targeted goal, required quite a lot of customization. Package specific options are detailed below together with links to download each SlackBuild script. Scripts are provided in order to help whoever wishes to build working packages from the source code archives.
+
The generic options used to configure and build each package in the prerequisites group were discussed above. Package specific options instead are detailed below together with some tips to attain a successful build. Moreover a download link for each SlackBuild is provided in order to help whoever wishes to test a full build.
  
==== TDEBASE ====
+
==== ARTS ====
  
'''Tdebase is the Trinity Desktop Environment main package'''. It contains base libraries, files, configuration tools and all of the applications needed to run the environment. Together with tdelibs, tdebase makes up a minimal desktop environment which other TDE packages grow and expand adding functionality and tools. Tdebase includes some general purpose applications such as the file manager and the configuration programs. Among the many included programs are:
+
The '''A'''nalog '''R'''eal '''T'''ime '''S'''ynthesizer is a sound library providing '''an integrated sound server''', a sound streams mixer and some configuration tools. Used since KDE 2, Arts was replaced by '''Phonon''' in KDE 4 and later adopted by TDE. To build Arts You need to set the '''-DCMAKE_SKIP_RPATH="OFF"''' option while running the configuration script. The '''[http://www.cmake.org/ cmake]''' invocation command is:
* The control center ('''kcontrol''').
+
<syntaxhighlight lang="bash">
* The desktop log-in manager ('''tdm''').
+
  cmake ${TMP}/tmp-${PRGNAM}/${DIR_SRC} \
* TDE integrated manual ('''khelpcenter''').
+
      -DCMAKE_C_FLAGS:STRING="${SLKCFLAGS}" \
* TDE panel ('''kicker''').
+
      -DCMAKE_CXX_FLAGS:STRING="${SLKCFLAGS} $DEBUG_CMAKE_OPT" \
* TDE web browser and integrated file manager ('''konqueror''').
+
      -DCMAKE_INSTALL_PREFIX=${PREFIX} \
* The terminal emulator ('''konsole''').
+
      -DCMAKE_SKIP_RPATH="OFF" \
* The window manager ('''twin''').
+
      -DLIB_SUFFIX=${LIBDIRSUFFIX} \
* The desktop environment start-up script ('''starttde''').
+
      -DMAN_INSTALL_DIR=${MANDIR} \
 +
      -DSYSCONF_INSTALL_DIR=${SYSCONFDIR} \
 +
      -DBUILD_ALL=ON
 +
</syntaxhighlight>
 +
A compressed archive containing the SlackBuild script and the related configuration files can be downloaded from the following [http://www.giustetti.net/resource/slackbuild/tde/1400/arts.tar.gz link].
  
The tdebase package includes some '''window managers''': programs that draw application windows on screen. A new window manager was introduced in TDE 14.0.0: '''[https://github.com/chjj/compton Compton]''' that replaces the old,
+
==== AVAHI-TQT ====
out of support, no more in development '''Kompmgr composition manager''' which once shipped with '''KDE 3'''. Sadly the TDE distributed version of Compton is afflicted by some compile issues making it impossible to build a working binary file. As a temporary work around '''the SlackBuild script removes the Compton dependency''':
+
 
 +
A library providing DNS resolution capabilities to the base TDE packages tdebase and tdelibs. Avahi-tqt requires the '''avahi''' library as a dependency, but the latter is not part of a standard Slackware release. A build script for avahi can be downloaded from the [http://slackbuilds.org slackbuilds.org] web page. Once installed the dependency, '''avahi-tqt''' can be built setting some environment variables:
 +
<syntaxhighlight lang="bash">
 +
  PREFIX="/usr/local"
 +
  MANDIR="/usr/man"
 +
</syntaxhighlight>
 +
Exporting the '''tqt3''' path:
 +
<syntaxhighlight lang="bash">
 +
  export QTDIR=${PREFIX_TDE}
 +
</syntaxhighlight>
 +
Running the autogen.sh script to create all of the build scripts and configuration files:
 +
<syntaxhighlight lang="bash">
 +
  sh ./autogen.sh
 +
</syntaxhighlight>
 +
Then configuring the source code passing some parameters to the script:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
   ( cd ${TMP}/tmp-${PRGNAM}/${DIR_SRC}; sed -i "twin/CMakeLists.txt" -e "/compton-tde/ s/^/#/" )
+
   CFLAGS="${SLKCFLAGS}" \
 +
  CXXFLAGS="${SLKCFLAGS}" \
 +
  ./configure \
 +
      --prefix=${PREFIX} \
 +
      --libdir=${LIBDIR} \
 +
      --mandir=${MANDIR} \
 +
      --build=$ARCH-slackware-linux
 
</syntaxhighlight>
 
</syntaxhighlight>
Therefore the window manager '''won't be built'''.  
+
A compressed archive containing the SlackBuild script and the related configuration files can be downloaded from the following [http://www.giustetti.net/resource/slackbuild/tde/1400/avahi-tqt.tar.gz link]. Please note: The script is provided for reference only. I don't usually build optional packages nor set on add-on functionality if I can do without. Having no avahi package installed, I could not test the SlackBuild script behavior, just its syntax.
  
It is worth mentioning that the standard Compton version, unlike the one shipped with TDE, presents no issue. Were You interested in testing the window manager Your best bet consists of building the standard package recurring to the build scripts available from the project [http://slackbuilds.org slackbuilds.org] web page.
+
==== DBUS-TQT ====
  
To configure and build the package recurring to [http://www.cmake.org/ cmake] a lot of parameters are required. A likely command line should look something like:
+
A library interfacing to the '''dbus''' daemon included in most modern '''Linux''' distributions to manage hardware and provide a common messaging infrastructure for applications. Dbus is a replacement for '''HAL'''. To configure and build the package using '''[http://www.cmake.org/ cmake]''' you should:
 +
 
 +
Clean the cmake cache:
 +
<syntaxhighlight lang="bash">
 +
  find . -name CMakeCache.txt -exec rm {} \;
 +
</syntaxhighlight>
 +
Pass the '''-DCMAKE_SKIP_RPATH="OFF"''' option to cmake. The cmake command line should be something like:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
   cmake ${TMP}/tmp-${PRGNAM}/${DIR_SRC} \
 
   cmake ${TMP}/tmp-${PRGNAM}/${DIR_SRC} \
Line 53: Line 305:
 
       -DMAN_INSTALL_DIR=${MANDIR} \
 
       -DMAN_INSTALL_DIR=${MANDIR} \
 
       -DSYSCONF_INSTALL_DIR=${SYSCONFDIR} \
 
       -DSYSCONF_INSTALL_DIR=${SYSCONFDIR} \
      -DBUILD_CRASHTEST=ON \
 
      -DWITH_ARTS=ON \
 
      -DWITH_HAL=OFF \
 
      -DWITH_LDAP=ON \
 
      -DWITH_LIBRAW1394=ON \
 
      -DWITH_OPENEXR=ON \
 
      -DWITH_PAM=OFF \
 
      -DWITH_GCC_VISIBILITY=OFF \
 
      -DWITH_SAMBA=ON \
 
      -DWITH_SASL=ON \
 
      -DWITH_SHADOW=ON \
 
      -DWITH_TDEHWLIB=ON \
 
      -DWITH_USBIDS="/usr/share/hwdata/usb.ids" \
 
      -DWITH_XCOMPOSITE=ON \
 
      -DWITH_XCURSOR=ON \
 
      -DWITH_XDAMAGE=ON \
 
      -DWITH_XDMCP=ON \
 
      -DWITH_XEXT=ON \
 
      -DWITH_XFIXES=ON \
 
      -DWITH_XINERAMA=ON \
 
      -DWITH_XRANDR=ON \
 
      -DWITH_XRENDER=ON \
 
      -DWITH_XTEST=ON \
 
 
       -DBUILD_ALL=ON
 
       -DBUILD_ALL=ON
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
A compressed archive containing the SlackBuild script and the related configuration files can be downloaded from the following [http://www.giustetti.net/resource/slackbuild/tde/1400/dbus-tqt.tar.gz link].
  
After compiling the source code and installing the obtained binary files some tasks need taking care of: adding scripts, configuration files and some more stuff needed by the environment to work flawlessly:
+
==== DBUS-1-TQT ====
 +
 
 +
A '''dbus-tqt''' related library adding an abstraction layer between the dbus daemon and the TQt3 library. The package can be configured recurring to '''[http://www.cmake.org/ cmake]'''. Follow some easy steps:
 +
 
 +
Clean the cmake cache:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
   # Add some configuration files / scripts needed by TDE.
+
   find . -name CMakeCache.txt -exec rm {} \;
   mkdir -p ${PKG}/etc/trinity
+
</syntaxhighlight>
   mkdir -p ${PKG}/etc/rc.d
+
Pass the '''-DCMAKE_SKIP_RPATH="OFF"''' option to cmake. The cmake command line should be something like:
   mv ${PKG}/${PREFIX}/share/config/tdm ${PKG}/etc/trinity/tdm
+
<syntaxhighlight lang="bash">
   ( cd ${PKG}/${PREFIX}/share/config ; ln -sf /etc/trinity/tdm tdm )
+
  cmake ${TMP}/tmp-${PRGNAM}/${DIR_SRC} \
 +
      -DCMAKE_C_FLAGS:STRING="${SLKCFLAGS}" \
 +
      -DCMAKE_CXX_FLAGS:STRING="${SLKCFLAGS} $DEBUG_CMAKE_OPT" \
 +
      -DCMAKE_INSTALL_PREFIX=${PREFIX} \
 +
      -DCMAKE_SKIP_RPATH="OFF" \
 +
      -DLIB_SUFFIX=${LIBDIRSUFFIX} \
 +
      -DMAN_INSTALL_DIR=${MANDIR} \
 +
      -DSYSCONF_INSTALL_DIR=${SYSCONFDIR} \
 +
      -DBUILD_ALL=ON
 +
</syntaxhighlight>
 +
A compressed archive containing the SlackBuild script and the related configuration files can be downloaded from the following [http://www.giustetti.net/resource/slackbuild/tde/1400/dbus-1-tqt.tar.gz link].
 +
 
 +
==== LIBART-LGPL ====
 +
 
 +
'''Libart''' is a library for high-performance 2D graphics used by '''Gnome''', '''KDE''' and '''TDE'''. The library release distributed with TDE is different from the standard one included in many Linux distributions. You are recommended to replace the installed version if any with the TDE provided one. To build a libart package please define some environment variables:
 +
<syntaxhighlight lang="bash">
 +
  PREFIX="/usr"
 +
  MANDIR="/usr/man"
 +
</syntaxhighlight>
 +
Then configure the source code:
 +
<syntaxhighlight lang="bash">
 +
  CFLAGS="${SLKCFLAGS}" \
 +
  CXXFLAGS="${SLKCFLAGS}" \
 +
  ./configure \
 +
      --prefix=${PREFIX} \
 +
      --libdir=${LIBDIR} \
 +
      --build=$ARCH-slackware-linux
 +
</syntaxhighlight>
 +
A compressed archive containing the SlackBuild script and the related configuration files can be downloaded from the following [http://www.giustetti.net/resource/slackbuild/tde/1400/libart-lgpl.tar.gz link].
 +
 
 +
==== LIBCALDAV ====
 +
 
 +
The '''Libcaldav''' library implements the client side '''CALDAV''' protocol defined in the '''rfc4791''' paper. The library is used by the shared calendar included in the '''tdepim''' package. It is an add-on package. Some environment variables are needed to build '''libcaldav''':
 +
<syntaxhighlight lang="bash">
 +
  PREFIX="/usr/local"
 +
  MANDIR="/usr/man"
 +
</syntaxhighlight>
 +
Define the TQt3 library path:
 +
<syntaxhighlight lang="bash">
 +
  export QTDIR=${PREFIX_TDE}
 +
</syntaxhighlight>
 +
Run the autogen.sh script to create all of the build scripts and configuration files:
 +
<syntaxhighlight lang="bash">
 +
  sh ./autogen.sh
 +
</syntaxhighlight>
 +
Then configure the source code passing some parameters to the script:
 +
<syntaxhighlight lang="bash">
 +
  CFLAGS="${SLKCFLAGS}" \
 +
  CXXFLAGS="${SLKCFLAGS}" \
 +
  ./configure \
 +
      --prefix=${PREFIX} \
 +
      --libdir=${LIBDIR} \
 +
      --mandir=${MANDIR} \
 +
      --build=$ARCH-slackware-linux
 +
</syntaxhighlight>
 +
A compressed archive containing the SlackBuild script and the related configuration files can be downloaded from the following [http://www.giustetti.net/resource/slackbuild/tde/1400/libcaldav.tar.gz link].
 +
 
 +
==== LIBCARDDAV ====
 +
 
 +
The '''Libcarddav''' library implements the '''CARDDAV''' protocol used by the '''tdepim''' package. '''Libcarddav''' is an add-on package providing some optional functionality. To build the package set some environment variables:
 +
<syntaxhighlight lang="bash">
 +
  PREFIX="/usr/local"
 +
  MANDIR="/usr/man"
 +
</syntaxhighlight>
 +
Define the TQt3 library path:
 +
<syntaxhighlight lang="bash">
 +
  export QTDIR=${PREFIX_TDE}
 +
</syntaxhighlight>
 +
Run the autogen.sh script to create all of the build scripts and configuration files:
 +
<syntaxhighlight lang="bash">
 +
  sh ./autogen.sh
 +
</syntaxhighlight>
 +
And configure the source code passing some parameters to the script:
 +
<syntaxhighlight lang="bash">
 +
  CFLAGS="${SLKCFLAGS}" \
 +
  CXXFLAGS="${SLKCFLAGS}" \
 +
  ./configure \
 +
      --prefix=${PREFIX} \
 +
      --libdir=${LIBDIR} \
 +
      --mandir=${MANDIR} \
 +
      --build=$ARCH-slackware-linux
 +
</syntaxhighlight>
 +
Some lines of code in the script '''install the man pages'''. Those ''' should be commented out''' to avoid an error that aborts the whole build procedure.
 +
<syntaxhighlight lang="bash">
 +
   # Add man pages (No man page => Comment the following lines to avoid errors)
 +
  # if [ -d ${PKG}/${MANDIR} ]; then
 +
  #  gzip -9 $PKG/${MANDIR}/man?/*
 +
  # fi
 +
</syntaxhighlight>
 +
A compressed archive containing the SlackBuild script and the related configuration files can be downloaded from the following [http://www.giustetti.net/resource/slackbuild/tde/1400/libcarddav.tar.gz link].
 +
 
 +
==== SIP4-TQT ====
 +
 
 +
'''Sip''' is a tool that eases the creation of '''Python''' bindings for '''C''' or '''C++''' libraries. It was originally developed to bind Python to Qt, but can be used for any C or C++ library. As many other previously discussed packages, sip can be built setting some environment variables:
 +
<syntaxhighlight lang="bash">
 +
  PREFIX="/usr/local"
 +
  MANDIR="/usr/man"
 +
</syntaxhighlight>
 +
Setting a target path for man pages:
 +
<syntaxhighlight lang="bash">
 +
  export MANDIR
 +
</syntaxhighlight>
 +
Adding to the standard compiler options some paths where to search for include files:
 +
<syntaxhighlight lang="bash">
 +
  SLKCFLAGS="${SLKCFLAGS} -I/usr/include/tqt -I/opt/trinity/include"
 +
</syntaxhighlight>
 +
and finally running a configuration script written in Python:
 +
<syntaxhighlight lang="bash">
 +
   python configure.py \
 +
      CFLAGS="${SLKCFLAGS}" \
 +
      CXXFLAGS="${SLKCFLAGS}"
 +
</syntaxhighlight>
 +
A compressed archive containing the SlackBuild script and the related configuration files can be downloaded from the following [http://www.giustetti.net/resource/slackbuild/tde/1400/sip4-tqt.tar.gz link].
 +
 
 +
==== TQCA ====
 +
 
 +
Another optional library, '''Tqca''' (TQt Cryptographic Architecture), provides an API to add cryptographic features to the Trinity Desktop Environment. Tqca has a small fingerprint and can be built recurring to some package specific steps:
 +
 
 +
Set some environment variables:
 +
<syntaxhighlight lang="bash">
 +
  PREFIX="/usr/local"
 +
  MANDIR="/usr/man"
 +
</syntaxhighlight>
 +
Set the installation path for the TQt library:
 +
<syntaxhighlight lang="bash">
 +
  export QTDIR=${PREFIX_TDE}
 +
</syntaxhighlight>
 +
Pass the aforementioned variables as parameters to the configuration script:
 +
<syntaxhighlight lang="bash">
 +
  CFLAGS="${SLKCFLAGS}" \
 +
  CXXFLAGS="${SLKCFLAGS}" \
 +
  ./configure \
 +
      --prefix=${PREFIX} \
 +
      --qtdir=${QTDIR} \
 +
</syntaxhighlight>
 +
Another peculiarity consists of the variable used to set the produced binary packages destination: '''INSTALL_ROOT''' in place of '''DESTDIR''', used by almost all of the packages.
 +
<syntaxhighlight lang="bash">
 +
   make install INSTALL_ROOT=${PKG}
 +
</syntaxhighlight>
 +
When all variables are set the build process can be started running the '''make''' command.
 +
 
 +
A compressed archive containing the SlackBuild script and the related configuration files can be downloaded from the following [http://www.giustetti.net/resource/slackbuild/tde/1400/tqca.tar.gz link].
 +
 
 +
==== TQCA-TLS ====
 +
 
 +
'''Tqca-tls''' is a plug-in providing support for cryptography through a SSL/TLS channel for programs using the '''TQt Cryptographic Architecture'''. Perhaps the easiest package to build as the configure script sets sane values for all of its options. To build a working package you need to set the TQt library installation path:
 +
<syntaxhighlight lang="bash">
 +
  export QTDIR=${PREFIX}
 +
</syntaxhighlight>
 +
Then execute the build script:
 +
<syntaxhighlight lang="bash">
 +
  CFLAGS="${SLKCFLAGS}" \
 +
  CXXFLAGS="${SLKCFLAGS}" \
 +
  ./configure \
 +
      --qtdir=${QTDIR}
 +
</syntaxhighlight>
 +
As for '''tqca''', the only package peculiarity consists of the variable used to set a target directory for produced binary files: '''INSTALL_ROOT'''
 +
<syntaxhighlight lang="bash">
 +
  make install INSTALL_ROOT=${PKG}
 +
</syntaxhighlight>
 +
 
 +
A compressed archive containing the SlackBuild script and the related configuration files can be downloaded from the following [http://www.giustetti.net/resource/slackbuild/tde/1400/tqca-tls.tar.gz link].
 +
 
 +
==== TQT3 ====
 +
 
 +
'''TQt''' is a library providing all of the base widgets used by the desktop environment and as such has a fundamental importance. Building the package requires a great deal of time, but it relatively straightforward. First of all some environment variables are required:
 +
<syntaxhighlight lang="bash">
 +
  export LD_LIBRARY_PATH=/usr/lib${LIBDIRSUFFIX}:${TMP}/tmp-${PRGNAM}/${DIR_SRC}/lib:${TMP}/tmp-${PRGNAM}/build/lib
 +
  export QTDIR=${PREFIX}
 +
</syntaxhighlight>
 +
The '''LD_LIBRARY_PATH''' variable requires special care as it should point to the directory where intermediate binary files are stored. Files which are needed in later steps of the procedure. Set the wrong value and the build procedure will fail returning an error. Given the library complexity, the '''configure''' script is invoked with an option dense command line:
 +
<syntaxhighlight lang="bash">
 +
  LDFLAGS="${SLKLDFLAGS}" \
 +
  CFLAGS="${SLKCFLAGS}" \
 +
   CXXFLAGS="${SLKCFLAGS}" \
 +
  ../${DIR_SRC}/configure \
 +
      -cups \
 +
      -dlopen-opengl \
 +
      -enable-opengl \
 +
      -I/usr/include/freetype2/freetype \
 +
      -I/usr/include/mysql \
 +
      -inputmethod \
 +
      -ipv6 \
 +
      -L/usr/lib${LIBDIRSUFFIX} \
 +
      -lfontconfig \
 +
      -libdir ${PREFIX}/lib${LIBDIRSUFFIX} \
 +
      -nis \
 +
      -no-g++-exceptions \
 +
      -no-pch \
 +
      -platform linux-g++ \
 +
      -plugin-imgfmt-mng \
 +
      -plugin-sql-mysql \
 +
      -plugin-sql-sqlite \
 +
      -plugin-style-cde \
 +
      -plugin-style-compact \
 +
      -plugin-style-motifplus \
 +
      -plugin-style-platinum \
 +
      -plugin-style-sgi \
 +
      -plugin-style-windows \
 +
      -prefix ${PREFIX} \
 +
      -qt-gif \
 +
      -qt-imgfmt-jpeg \
 +
      -qt-imgfmt-mng \
 +
      -qt-imgfmt-png \
 +
      -qt-style-motif \
 +
      -release \
 +
      -R${TMP}/tmp-${PRGNAM}/lib \
 +
      -shared \
 +
      -sm \
 +
      -stl \
 +
      -system-libjpeg \
 +
      -system-libmng \
 +
      -system-libpng \
 +
      -system-zlib \
 +
      -thread \
 +
      -tablet \
 +
      -v \
 +
      -xcursor \
 +
      -xft \
 +
      -xinerama \
 +
      -xkb \
 +
      -xrandr \
 +
      -xrender \
 +
      -xshape
 +
</syntaxhighlight>
 +
The '''make''' command requires running twice. The second time around to create symbolic links and some other stuff:
 +
<syntaxhighlight lang="bash">
 +
  make VERBOSE=1
 +
  make install INSTALL_ROOT=${PKG}
 +
  make -i symlinks sub-src sub-tool
 +
  make install INSTALL_ROOT=${PKG}
 +
</syntaxhighlight>
 +
Some other post build actions should be taken to add other symbolic links, configuration scripts,  and some files needed to ensure everything will run smoothly once installed:
 +
<syntaxhighlight lang="bash">
 +
  # Some configure scripts seem unable to find lib64 => Create a symlink to lib
 +
  if [[ "x86_64" = "${ARCH}" ]]; then
 +
      ln -sf ${PREFIX}/lib${LIBDIRSUFFIX} ${PKG}/${PREFIX}/lib
 +
  fi
 
    
 
    
   # Set sane permissions for the include files.
+
   # Adding a link to the include folder
   if [ -d ${PKG}/${PREFIX}/include ]; then
+
  mkdir -p ${PKG}/usr/include
       find ${PKG}/${PREFIX}/include -type f -exec chmod 0644 {} \;
+
  ln -sf ${PREFIX}/include ${PKG}/usr/include/${PRGNAM}
 +
 
 +
  # Move the qt-mt.pc in the pkgconfig directory
 +
   if [[ ! -f ${PKG}/${PREFIX}/lib${LIBDIRSUFFIX}/pkgconfig/tqt-mt.pc ]]; then
 +
       mkdir -p ${PKG}/${PREFIX}/lib${LIBDIRSUFFIX}/pkgconfig
 +
      mv ${PKG}/${PREFIX}/lib${LIBDIRSUFFIX}/tqt-mt.pc ${PKG}/${PREFIX}/lib${LIBDIRSUFFIX}/pkgconfig/tqt-mt.pc
 
   fi
 
   fi
 +
  # Link for qt-mt.pc to the /usr/lib[64] directory
 +
  mkdir -p ${PKG}/usr/lib${LIBDIRSUFFIX}/pkgconfig
 +
  ln -sf ${PREFIX}/lib${LIBDIRSUFFIX}/pkgconfig/tqt-mt.pc ${PKG}/usr/lib${LIBDIRSUFFIX}/pkgconfig/tqt-mt.pc
 
    
 
    
   # Ensure correct login manager session file is available.
+
   # Fix some bad links
   mkdir -p ${PKG}/usr/share/apps/tdm/sessions
+
   if [[ -d ${PKG}/${PREFIX}/lib${LIBDIRSUFFIX}/${PRGNAM}/mkspecs/linux-g++ ]]; then
   cp ${PKG}/${PREFIX}/share/apps/tdm/sessions/tde.desktop ${PKG}/usr/share/apps/tdm/sessions/
+
      if [[ -L ${PKG}/${PREFIX}/lib${LIBDIRSUFFIX}/${PRGNAM}/mkspecs/linux-g++/linux-g++ ]]; then
 
+
        unlink ${PKG}/${PREFIX}/lib${LIBDIRSUFFIX}/${PRGNAM}/mkspecs/linux-g++/linux-g++
  cat ${SRCDIR}/rc.4 | sed "s|PREFIX/|${PREFIX}/|g" > ${PKG}/etc/rc.d/rc.4.new
+
      fi
 +
      ln -sf ${PREFIX}/lib${LIBDIRSUFFIX}/${PRGNAM}/mkspecs/linux-g++ ${PKG}/${PREFIX}/lib${LIBDIRSUFFIX}/${PRGNAM}/mkspecs/linux-g++/linux-g++
 +
      if [[ -L ${PKG}/${PREFIX}/lib${LIBDIRSUFFIX}/${PRGNAM}/mkspecs/default ]]; then
 +
        unlink ${PKG}/${PREFIX}/lib${LIBDIRSUFFIX}/${PRGNAM}/mkspecs/default
 +
      fi
 +
      ln -sf ${PREFIX}/lib${LIBDIRSUFFIX}/${PRGNAM}/mkspecs/linux-g++ ${PKG}/${PREFIX}/lib${LIBDIRSUFFIX}/${PRGNAM}/mkspecs/default
 +
   elif [[ -d ${PKG}/${PREFIX}/mkspecs/linux-g++ ]]; then
 +
      if [[ -L ${PKG}/${PREFIX}/mkspecs/linux-g++/linux-g++ ]]; then
 +
        unlink ${PKG}/${PREFIX}/mkspecs/linux-g++/linux-g++
 +
      fi
 +
      ln -sf ${PREFIX}/mkspecs/linux-g++ ${PKG}${PREFIX}/mkspecs/linux-g++/linux-g++
 +
      if [[ -L ${PKG}/${PREFIX}/mkspecs/default ]]; then
 +
        unlink ${PKG}/${PREFIX}/mkspecs/default
 +
      fi
 +
      ln -sf ${PREFIX}/mkspecs/linux-g++ ${PKG}/${PREFIX}/mkspecs/default
 +
  fi
 
    
 
    
   # In the old days these files were copied over existing ones. Folks who
+
   # Create and populate the profile.d directory
  # customized these files got smacked. Now they are created as *.new files.
+
   mkdir -p ${PKG}/etc/profile.d
  # The doinst.sh install script will either remove the .new extension or leave
+
   # Put profile.d scripts in package TQT installation path.
  # things be for the user to decide.
+
   cat ${SRCDIR}/profile.d/tqt3.sh  | sed -e "s:TDE_PREFIX:${PREFIX}:" > ${PKG}/etc/profile.d/tqt3.sh
   mkdir -p ${PKG}/etc/X11/xinit ${PKG}/etc/profile.d
+
   cat ${SRCDIR}/profile.d/tqt3.csh | sed -e "s:TDE_PREFIX:${PREFIX}:" > ${PKG}/etc/profile.d/tqt3.csh
   cat ${SRCDIR}/xinit/xinitrc.trinity | sed "s|PREFIX|${PREFIX}|g" > ${PKG}/etc/X11/xinit/xinitrc.trinity.new
 
   cat ${SRCDIR}/profile.d/trinity.sh  | sed "s|PREFIX|${PREFIX}|g" > ${PKG}/etc/profile.d/trinity.sh.new
 
   cat ${SRCDIR}/profile.d/trinity.csh | sed "s|PREFIX|${PREFIX}|g" > ${PKG}/etc/profile.d/trinity.csh.new
 
  # Assign some sane permissions to the scripts.
 
  chmod 755 ${PKG}/etc/X11/xinit/xinitrc.*.new ${PKG}/etc/profile.d/*.*.new
 
 
    
 
    
   # Copy desktop environment start script.
+
   chmod 755 ${PKG}/etc/profile.d/*
  if [[ -f ${PKG}/${PREFIX}/bin/starttde ]]; then
 
      mkdir -p ${PKG}/usr/bin
 
      cp ${PKG}/${PREFIX}/bin/starttde ${PKG}/usr/bin/starttde.new
 
  fi
 
  mkdir -p ${PKG}/usr/bin
 
  cat ${SRCDIR}/xinit/xwmconfig > ${PKG}/usr/bin/xwmconfig.new
 
  chmod +x ${PKG}/usr/bin/xwmconfig.new
 
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
As usual a compressed archive containing the SlackBuild script and the related configuration files can be downloaded from the following [http://www.giustetti.net/resource/slackbuild/tde/1400/tqt3.tar.gz link].
  
A compressed archive containing the SlackBuild script and the related configuration files can be downloaded from the following [http://www.giustetti.net/resource/slackbuild/tde/1400/tdebase.tar.gz link].
+
==== TQTINTERFACE ====
  
==== TDELIBS ====
+
The '''Trinity Qt Interface''' is a library that abstracts Qt from Trinity. The abstraction layer allows to use both applications linked to TQt and Qt4 in a transparent way permitting both environments to coexist. To work correctly '''TQtinterface''' should be installed in directory '''/usr'''. To build the package set some environment variables:
 
+
<syntaxhighlight lang="bash">
Package '''tdelibs''' includes a set of libraries serving as foundation for the Trinity Desktop Environment. Tdelibs were built upon the '''TQt3''' framework with the intent to ease application writing while maintaining consistency in look and base functionality. Among other functionality tdelibs provides:
+
  PREFIX="/usr"
* Classes for inter process communication handling ('''dcop''').
+
  MANDIR="/usr/man"
* Shared access to the TDE address book ('''tdeabc''').
+
</syntaxhighlight>
* Standard widgets for application interfaces design adding to the QT provided ones ('''tdedeui''').
+
Then run '''[http://www.cmake.org/ cmake]''' passing it some configuration options of which '''-DQT_VERSION=3''' is worth mentioning:
* Feature rich '''HTML and Javascript engines''' ('''tdehtml''' and '''kjs''').
 
* A program to start the environment ('''tdeinit''').
 
* Low level access to input / output network data streams ('''tdeio''').
 
* A standard way to reuse parts of an application in another one ('''tdeparts''').
 
* Printing process control functions ('''tdeprint''').
 
* OpenSSL integration ('''kssl''').
 
* High level reusable functions as "Find and Replace" ('''tdeutils''').
 
* A '''MIDI''' management library ('''libtdemid''').
 
 
 
To configure the source code, please run [http://www.cmake.org/ cmake] passing it the '''-DCMAKE_SKIP_RPATH''' option and some other useful parameters:
 
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
   cmake ${TMP}/tmp-${PRGNAM}/${DIR_SRC} \
 
   cmake ${TMP}/tmp-${PRGNAM}/${DIR_SRC} \
Line 142: Line 615:
 
       -DCMAKE_CXX_FLAGS:STRING="${SLKCFLAGS} $DEBUG_CMAKE_OPT" \
 
       -DCMAKE_CXX_FLAGS:STRING="${SLKCFLAGS} $DEBUG_CMAKE_OPT" \
 
       -DCMAKE_INSTALL_PREFIX=${PREFIX} \
 
       -DCMAKE_INSTALL_PREFIX=${PREFIX} \
      -DCMAKE_SKIP_RPATH="OFF" \
 
 
       -DLIB_SUFFIX=${LIBDIRSUFFIX} \
 
       -DLIB_SUFFIX=${LIBDIRSUFFIX} \
 
       -DMAN_INSTALL_DIR=${MANDIR} \
 
       -DMAN_INSTALL_DIR=${MANDIR} \
 +
      -DQT_VERSION=3 \
 
       -DSYSCONF_INSTALL_DIR=${SYSCONFDIR} \
 
       -DSYSCONF_INSTALL_DIR=${SYSCONFDIR} \
 
       -DBUILD_ALL=ON
 
       -DBUILD_ALL=ON
 
</syntaxhighlight>
 
</syntaxhighlight>
Then run the '''make''' command.
+
A compressed archive containing the SlackBuild script and the related configuration files can be downloaded from the following [http://www.giustetti.net/resource/slackbuild/tde/1400/tqtinterface.tar.gz link].
 
 
A compressed archive containing the SlackBuild script and the related configuration files can be downloaded from the following [http://www.giustetti.net/resource/slackbuild/tde/1400/tdelibs.tar.gz link].
 
  
 
=== Conclusions ===
 
=== Conclusions ===
  
This paper presented and discussed the procedure to build '''Base''' packages for the '''Trinity Desktop Environment'''. Options specific to each package were discussed and a copy of all the used '''SlackBuild''' scripts were provided in the hope for them to be useful to '''Slackware Linux''' users wishing to give a try at building the desktop environment from scratch.
+
The present paper presented and discussed the procedure to build '''Prerequisites''' packages for the '''Trinity Desktop Environment'''. Some general rules common to the whole project were described along with options specific to packages. Finally links for all of the used '''SlackBuild''' scripts were provided in the hope for them to be useful to '''Slackware Linux''' users wishing to give a try at building the desktop environment from scratch.
  
  
Line 167: Line 638:
 
* [http://www.slackware.com Slackware home page]
 
* [http://www.slackware.com Slackware home page]
 
* [http://slackbuilds.org SlackBuilds.org home page]
 
* [http://slackbuilds.org SlackBuilds.org home page]
* [https://github.com/chjj/compton Compton home page]
 
  
 
----
 
----
  
{{footer_en | link_page=TDE_14.0.0_pacchetti_base}}
+
{{footer_en | link_page=TDE_14.0.0_prerequisiti}}

Revision as of 14:09, 21 December 2016

Welcome to Simone Giustetti's wiki pages.


Languages: English - Italiano


Prerequisites

Trinity Desktop Environment 14.0.0

Packages grouped with the generic name Prerequisites include all of the desktop environment base libraries and some optional components needed for advanced features. The base libraries obviously include TQt3, the Qt fork developed and maintained by the Trinity project members, tqtinterface, a library providing an abstraction layer between TQt and TDE, arts, the TDE sound server and sound stream mixer, dbus-tqt and dbus-1-tqt, which tie the desktop environment with the hardware subsystem. The remaining libraries: avahi-tqt, libart-lgpl, libcaldav, libcarddav, python-tqt, sip4-tqt, tqca, tqca-tls and tqscintilla are optional ones. The desktop environment could be built without them, but will miss some useful functionality.

Build System

One among the Trinity project main goals consists of porting the package build system from autotools to cmake. The migration is still a work in progress partially concluded only for a bunch of the previously listed packages. A package list matched with the used build system follows:

BUILD SYSTEM
Package Package Type Build System
arts Base Cmake
avahi-tqt Add-on Autotools
dbus-1-tqt Base Cmake
dbus-tqt Base Cmake
libart-lgpl Add-on Autotools
libcaldav Add-on Autotools
libcarddav Add-on Autotools
python-tqt Add-on configure.py script
Python interpreter required
sip4-tqt Add-on configure.py script
Python interpreter required
tqca Add-on Autotools
tqca-tls Add-on Autotools
tqscintilla Add-on Uses script qscintilla.pro for qmake
TQt3 library required
tqt3 Base Autotools
tqtinterface Base Cmake

The need for four different build script templates is evident. Templates should share as much code as possible, but differences will surely arise while invoking the build process because of both the different employed build systems and the need for package specific options. The common SlackBuild script structure, global options and finally package specific options all will be discussed and detailed below.

Common Build Script Structure

Scripts for version 3.5.13.2 of TDE (Prerequisites) were updated and adapted to the last available release. The script skeleton is nearly untouched:

  • Introduction where a brief description and license information are provided for the script.
  • External files containing global and local build options are loaded:
   if [ -r ../../TDE.options ]; then
      . ../../TDE.options
   fi
   PREFIX_TDE=${PREFIX}
   if [ -r ./local.options ]; then
      . ./local.options
   fi
  • Declare some global variables for the script:
   ARCHIVE_FORMAT=${ARCHIVE_FORMAT:-"tar.bz2"}
   BUILD=${BUILD:-"1"}
   LD_LIBRARY_PATH=""  # Will be defined later on
   PRGNAM="tqtinterface"
   PREFIX=${PREFIX:-"/usr"}
   MANDIR=${MANDIR:-${PREFIX}/man}
   SOURCE_SUBDIR=${SOURCE_SUBDIR:-"dependencies"}
   SRCVER=${SRCVER:-"R14.0.0"}
   TAG=${TAG:-"sg"}
   TAR_OPTION=${TAR_OPTION:-"-xjvf"}
   VERSION=$(echo ${SRCVER} | tr '-' '.')
   
   DOCS="AUTHORS COPYING HOW.TO.BUILD NAMING README TODO TRINITY.RELEASE tqtinterface.lsm"
Some variables were added since release 3.5.13.2, among them: the archive format and options for the tar program. All of the additions are meant to ease the build procedure once the project will settle on a compression format for source code archives.
  • Determine the target architecture for the package and set proper parameters for the compiler, linker, included libraries, etc.:
   if [ -z "${MARCH}" ]; then
      MARCH=`uname -m`
   fi
   if [ -z "${ARCH}" ]; then
      case "${MARCH}" in
         i?86)
            export ARCH=i486
         ;;
         arm*)
            export ARCH=arm
         ;;
         *)
            export ARCH=${MARCH}
         ;;
      esac
   fi
Code was updated in order to read the target architecture from global parameters thus providing a suitable script for chroot environments.
  • Create a directory build tree:
   mkdir -p ${TMP}/tmp-${PRGNAM}  # Location to build the source
   rm -rf ${TMP}/tmp-${PRGNAM}/*  # Remove the remnants of previous build and continue
   mkdir -p ${PKG}                # Place for the package to be built
   rm -rf ${PKG}/*                # We always erase old package's contents
   mkdir -p ${OUTPUT}             # Place for the package to be saved
  • Assign sane permissions to files:
   chown -R root:root .
   find . \
   \( -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 {} \;
  • Configure, build and install the package.
  • Add some documentation, links, examples and whatever is needed to obtain a fully functional package:
   mkdir -p ${PKG}/usr/doc/${PRGNAM}"-"$VERSION
   cp -a ${DOCS} ${PKG}/usr/doc/${PRGNAM}"-"${VERSION}
   chown -R root:root ${PKG}/usr/doc/${PRGNAM}"-"${VERSION}
   find ${PKG}/usr/doc -type f -exec chmod 644 {} \;
   
   # Add a package description.
   mkdir -p ${PKG}/install
   cat ${SRCDIR}/slack-desc > ${PKG}/install/slack-desc
   
   # Set sane permissions for the include files.
   if [ -d ${PKG}/${PREFIX}/include ]; then
      find ${PKG}/${PREFIX}/include -type f -exec chmod 0644 {} \;
   fi
  • Crete the package.

Generic Options

Generic build options will vary depending on the adopted build system only. Autotools related packages require the following:

  • Rebuild the Autoconf / Automake used files:
   cp -Rp /usr/share/aclocal/libtool.m4 <pkg_path_build>/admin/libtool.m4.in
   cp -Rp <path to your systems ltmain.sh file> admin/ltmain.sh
   make -f admin/Makefile.common
  • Set options for the compiler and linker, set paths for include files, libraries and man pages:
   export LD_LIBRARY_PATH=${PREFIX}/lib${LIBDIRSUFFIX}:${PREFIX}/lib${LIBDIRSUFFIX}/trinity:${LD_LIBRARY_PATH}
   export LIBDIR=${PREFIX}/lib${LIBDIRSUFFIX}
   export MANDIR
   export PATH=${PREFIX}/bin:${PATH}
   export PKG_CONFIG_PATH=:${PREFIX}/lib${LIBDIRSUFFIX}/pkgconfig:${PKG_CONFIG_PATH}
   export PREFIX
   export QTDIR=${PREFIX}
   export SYSCONFDIR=/etc/trinity
   # Enable only one of the following:
   # export DEBUG_AUTOTOOL_OPT="--enable-debug=full"
   export DEBUG_AUTOTOOL_OPT="--disable-debug"
  • Configure source code:
   CFLAGS="${SLKCFLAGS}" \
   CXXFLAGS="${SLKCFLAGS}" \
   ./configure \
      --prefix=${PREFIX} \
      --libdir=${LIBDIR} \
      --mandir=${MANDIR} \
      --build=$ARCH-slackware-linux \
      2>&1 | tee -a ${OUTPUT}/${PRGNAM}_configure.log
  • Build and install:
   make VERBOSE=1 2>&1 | tee ${OUTPUT}/${PRGNAM}_make.log
   make install DESTDIR=${PKG} 2>&1 | tee ${OUTPUT}/${PRGNAM}_install.log


Steps for Cmake consist of:

  • Clean the cmake cache:
   find . -name CMakeCache.txt -exec rm {} \;
  • Set options for the compiler and linker, set paths for include files, libraries and man pages:
   export LD_LIBRARY_PATH=${PREFIX}/lib${LIBDIRSUFFIX}:${PREFIX}/lib${LIBDIRSUFFIX}/trinity:${LD_LIBRARY_PATH}
   export LIBDIR=${PREFIX}/lib${LIBDIRSUFFIX}
   export MANDIR
   export PATH=${PREFIX}/bin:${PATH}
   export PKG_CONFIG_PATH=${PREFIX}/lib${LIBDIRSUFFIX}/pkgconfig:${PKG_CONFIG_PATH}
   export PREFIX
   export QTDIR=${PREFIX}
   export SYSCONFDIR=/etc/trinity
   # Enable only one of the following:
   # export DEBUG_AUTOTOOL_OPT="--disable-debug"
   export DEBUG_CMAKE_OPT=""
  • Configure source code:
   cmake ${TMP}/tmp-${PRGNAM}/${DIR_SRC} \
      -DCMAKE_C_FLAGS:STRING="${SLKCFLAGS}" \
      -DCMAKE_CXX_FLAGS:STRING="${SLKCFLAGS} $DEBUG_CMAKE_OPT" \
      -DCMAKE_INSTALL_PREFIX=${PREFIX} \
      -DLIB_SUFFIX=${LIBDIRSUFFIX} \
      -DMAN_INSTALL_DIR=${MANDIR} \
      -DSYSCONF_INSTALL_DIR=${SYSCONFDIR} \
      -DBUILD_ALL=ON \
      2>&1 | tee ${OUTPUT}/${PRGNAM}_configure.log
  • Build and install:
   make VERBOSE=1 2>&1 | tee ${OUTPUT}/${PRGNAM}_make.log
   make install DESTDIR=${PKG} 2>&1 | tee ${OUTPUT}/${PRGNAM}_install.log


Packages python-tqt and sip4-tqt use a script written in Python language to configure source code. Both scripts only accept options for the compiler and linker.

  • Configure source code:
   python configure.py \
      CFLAGS="${SLKCFLAGS}" \
      CXXFLAGS="${SLKCFLAGS}" \
      2>&1 | tee ${OUTPUT}/${PRGNAM}_configure.log
  • Build and install:
   make VERBOSE=1 2>&1 | tee ${OUTPUT}/${PRGNAM}_make.log
   make install DESTDIR=${PKG} 2>&1 | tee ${OUTPUT}/${PRGNAM}_install.log


Last is tqscintilla, the only package to use tqmake, which requires options for the compiler and linker.

  • Configure source code:
   CFLAGS="${SLKCFLAGS}" \
   CXXFLAGS="${SLKCFLAGS} -fno-exceptions" \
   tqmake qscintilla.pro \
      2>&1 | tee ${OUTPUT}/${PRGNAM}_configure.log
  • Build and install:
   make VERBOSE=1 2>&1 | tee ${OUTPUT}/${PRGNAM}_make.log
   make install INSTALL_ROOT=${PKG} 2>&1 | tee ${OUTPUT}/${PRGNAM}_install.log

Custom Options

The generic options used to configure and build each package in the prerequisites group were discussed above. Package specific options instead are detailed below together with some tips to attain a successful build. Moreover a download link for each SlackBuild is provided in order to help whoever wishes to test a full build.

ARTS

The Analog Real Time Synthesizer is a sound library providing an integrated sound server, a sound streams mixer and some configuration tools. Used since KDE 2, Arts was replaced by Phonon in KDE 4 and later adopted by TDE. To build Arts You need to set the -DCMAKE_SKIP_RPATH="OFF" option while running the configuration script. The cmake invocation command is:

   cmake ${TMP}/tmp-${PRGNAM}/${DIR_SRC} \
      -DCMAKE_C_FLAGS:STRING="${SLKCFLAGS}" \
      -DCMAKE_CXX_FLAGS:STRING="${SLKCFLAGS} $DEBUG_CMAKE_OPT" \
      -DCMAKE_INSTALL_PREFIX=${PREFIX} \
      -DCMAKE_SKIP_RPATH="OFF" \
      -DLIB_SUFFIX=${LIBDIRSUFFIX} \
      -DMAN_INSTALL_DIR=${MANDIR} \
      -DSYSCONF_INSTALL_DIR=${SYSCONFDIR} \
      -DBUILD_ALL=ON

A compressed archive containing the SlackBuild script and the related configuration files can be downloaded from the following link.

AVAHI-TQT

A library providing DNS resolution capabilities to the base TDE packages tdebase and tdelibs. Avahi-tqt requires the avahi library as a dependency, but the latter is not part of a standard Slackware release. A build script for avahi can be downloaded from the slackbuilds.org web page. Once installed the dependency, avahi-tqt can be built setting some environment variables:

   PREFIX="/usr/local"
   MANDIR="/usr/man"

Exporting the tqt3 path:

   export QTDIR=${PREFIX_TDE}

Running the autogen.sh script to create all of the build scripts and configuration files:

   sh ./autogen.sh

Then configuring the source code passing some parameters to the script:

   CFLAGS="${SLKCFLAGS}" \
   CXXFLAGS="${SLKCFLAGS}" \
   ./configure \
      --prefix=${PREFIX} \
      --libdir=${LIBDIR} \
      --mandir=${MANDIR} \
      --build=$ARCH-slackware-linux

A compressed archive containing the SlackBuild script and the related configuration files can be downloaded from the following link. Please note: The script is provided for reference only. I don't usually build optional packages nor set on add-on functionality if I can do without. Having no avahi package installed, I could not test the SlackBuild script behavior, just its syntax.

DBUS-TQT

A library interfacing to the dbus daemon included in most modern Linux distributions to manage hardware and provide a common messaging infrastructure for applications. Dbus is a replacement for HAL. To configure and build the package using cmake you should:

Clean the cmake cache:

   find . -name CMakeCache.txt -exec rm {} \;

Pass the -DCMAKE_SKIP_RPATH="OFF" option to cmake. The cmake command line should be something like:

   cmake ${TMP}/tmp-${PRGNAM}/${DIR_SRC} \
      -DCMAKE_C_FLAGS:STRING="${SLKCFLAGS}" \
      -DCMAKE_CXX_FLAGS:STRING="${SLKCFLAGS} $DEBUG_CMAKE_OPT" \
      -DCMAKE_INSTALL_PREFIX=${PREFIX} \
      -DCMAKE_SKIP_RPATH="OFF" \
      -DLIB_SUFFIX=${LIBDIRSUFFIX} \
      -DMAN_INSTALL_DIR=${MANDIR} \
      -DSYSCONF_INSTALL_DIR=${SYSCONFDIR} \
      -DBUILD_ALL=ON

A compressed archive containing the SlackBuild script and the related configuration files can be downloaded from the following link.

DBUS-1-TQT

A dbus-tqt related library adding an abstraction layer between the dbus daemon and the TQt3 library. The package can be configured recurring to cmake. Follow some easy steps:

Clean the cmake cache:

   find . -name CMakeCache.txt -exec rm {} \;

Pass the -DCMAKE_SKIP_RPATH="OFF" option to cmake. The cmake command line should be something like:

   cmake ${TMP}/tmp-${PRGNAM}/${DIR_SRC} \
      -DCMAKE_C_FLAGS:STRING="${SLKCFLAGS}" \
      -DCMAKE_CXX_FLAGS:STRING="${SLKCFLAGS} $DEBUG_CMAKE_OPT" \
      -DCMAKE_INSTALL_PREFIX=${PREFIX} \
      -DCMAKE_SKIP_RPATH="OFF" \
      -DLIB_SUFFIX=${LIBDIRSUFFIX} \
      -DMAN_INSTALL_DIR=${MANDIR} \
      -DSYSCONF_INSTALL_DIR=${SYSCONFDIR} \
      -DBUILD_ALL=ON

A compressed archive containing the SlackBuild script and the related configuration files can be downloaded from the following link.

LIBART-LGPL

Libart is a library for high-performance 2D graphics used by Gnome, KDE and TDE. The library release distributed with TDE is different from the standard one included in many Linux distributions. You are recommended to replace the installed version if any with the TDE provided one. To build a libart package please define some environment variables:

   PREFIX="/usr"
   MANDIR="/usr/man"

Then configure the source code:

   CFLAGS="${SLKCFLAGS}" \
   CXXFLAGS="${SLKCFLAGS}" \
   ./configure \
      --prefix=${PREFIX} \
      --libdir=${LIBDIR} \
      --build=$ARCH-slackware-linux

A compressed archive containing the SlackBuild script and the related configuration files can be downloaded from the following link.

LIBCALDAV

The Libcaldav library implements the client side CALDAV protocol defined in the rfc4791 paper. The library is used by the shared calendar included in the tdepim package. It is an add-on package. Some environment variables are needed to build libcaldav:

   PREFIX="/usr/local"
   MANDIR="/usr/man"

Define the TQt3 library path:

   export QTDIR=${PREFIX_TDE}

Run the autogen.sh script to create all of the build scripts and configuration files:

   sh ./autogen.sh

Then configure the source code passing some parameters to the script:

   CFLAGS="${SLKCFLAGS}" \
   CXXFLAGS="${SLKCFLAGS}" \
   ./configure \
      --prefix=${PREFIX} \
      --libdir=${LIBDIR} \
      --mandir=${MANDIR} \
      --build=$ARCH-slackware-linux

A compressed archive containing the SlackBuild script and the related configuration files can be downloaded from the following link.

LIBCARDDAV

The Libcarddav library implements the CARDDAV protocol used by the tdepim package. Libcarddav is an add-on package providing some optional functionality. To build the package set some environment variables:

   PREFIX="/usr/local"
   MANDIR="/usr/man"

Define the TQt3 library path:

   export QTDIR=${PREFIX_TDE}

Run the autogen.sh script to create all of the build scripts and configuration files:

   sh ./autogen.sh

And configure the source code passing some parameters to the script:

   CFLAGS="${SLKCFLAGS}" \
   CXXFLAGS="${SLKCFLAGS}" \
   ./configure \
      --prefix=${PREFIX} \
      --libdir=${LIBDIR} \
      --mandir=${MANDIR} \
      --build=$ARCH-slackware-linux

Some lines of code in the script install the man pages. Those should be commented out to avoid an error that aborts the whole build procedure.

   # Add man pages (No man page => Comment the following lines to avoid errors)
   # if [ -d ${PKG}/${MANDIR} ]; then
   #   gzip -9 $PKG/${MANDIR}/man?/*
   # fi

A compressed archive containing the SlackBuild script and the related configuration files can be downloaded from the following link.

SIP4-TQT

Sip is a tool that eases the creation of Python bindings for C or C++ libraries. It was originally developed to bind Python to Qt, but can be used for any C or C++ library. As many other previously discussed packages, sip can be built setting some environment variables:

   PREFIX="/usr/local"
   MANDIR="/usr/man"

Setting a target path for man pages:

   export MANDIR

Adding to the standard compiler options some paths where to search for include files:

   SLKCFLAGS="${SLKCFLAGS} -I/usr/include/tqt -I/opt/trinity/include"

and finally running a configuration script written in Python:

   python configure.py \
      CFLAGS="${SLKCFLAGS}" \
      CXXFLAGS="${SLKCFLAGS}"

A compressed archive containing the SlackBuild script and the related configuration files can be downloaded from the following link.

TQCA

Another optional library, Tqca (TQt Cryptographic Architecture), provides an API to add cryptographic features to the Trinity Desktop Environment. Tqca has a small fingerprint and can be built recurring to some package specific steps:

Set some environment variables:

   PREFIX="/usr/local"
   MANDIR="/usr/man"

Set the installation path for the TQt library:

   export QTDIR=${PREFIX_TDE}

Pass the aforementioned variables as parameters to the configuration script:

   CFLAGS="${SLKCFLAGS}" \
   CXXFLAGS="${SLKCFLAGS}" \
   ./configure \
      --prefix=${PREFIX} \
      --qtdir=${QTDIR} \

Another peculiarity consists of the variable used to set the produced binary packages destination: INSTALL_ROOT in place of DESTDIR, used by almost all of the packages.

   make install INSTALL_ROOT=${PKG}

When all variables are set the build process can be started running the make command.

A compressed archive containing the SlackBuild script and the related configuration files can be downloaded from the following link.

TQCA-TLS

Tqca-tls is a plug-in providing support for cryptography through a SSL/TLS channel for programs using the TQt Cryptographic Architecture. Perhaps the easiest package to build as the configure script sets sane values for all of its options. To build a working package you need to set the TQt library installation path:

   export QTDIR=${PREFIX}

Then execute the build script:

   CFLAGS="${SLKCFLAGS}" \
   CXXFLAGS="${SLKCFLAGS}" \
   ./configure \
      --qtdir=${QTDIR}

As for tqca, the only package peculiarity consists of the variable used to set a target directory for produced binary files: INSTALL_ROOT

   make install INSTALL_ROOT=${PKG}

A compressed archive containing the SlackBuild script and the related configuration files can be downloaded from the following link.

TQT3

TQt is a library providing all of the base widgets used by the desktop environment and as such has a fundamental importance. Building the package requires a great deal of time, but it relatively straightforward. First of all some environment variables are required:

   export LD_LIBRARY_PATH=/usr/lib${LIBDIRSUFFIX}:${TMP}/tmp-${PRGNAM}/${DIR_SRC}/lib:${TMP}/tmp-${PRGNAM}/build/lib
   export QTDIR=${PREFIX}

The LD_LIBRARY_PATH variable requires special care as it should point to the directory where intermediate binary files are stored. Files which are needed in later steps of the procedure. Set the wrong value and the build procedure will fail returning an error. Given the library complexity, the configure script is invoked with an option dense command line:

   LDFLAGS="${SLKLDFLAGS}" \
   CFLAGS="${SLKCFLAGS}" \
   CXXFLAGS="${SLKCFLAGS}" \
   ../${DIR_SRC}/configure \
      -cups \
      -dlopen-opengl \
      -enable-opengl \
      -I/usr/include/freetype2/freetype \
      -I/usr/include/mysql \
      -inputmethod \
      -ipv6 \
      -L/usr/lib${LIBDIRSUFFIX} \
      -lfontconfig \
      -libdir ${PREFIX}/lib${LIBDIRSUFFIX} \
      -nis \
      -no-g++-exceptions \
      -no-pch \
      -platform linux-g++ \
      -plugin-imgfmt-mng \
      -plugin-sql-mysql \
      -plugin-sql-sqlite \
      -plugin-style-cde \
      -plugin-style-compact \
      -plugin-style-motifplus \
      -plugin-style-platinum \
      -plugin-style-sgi \
      -plugin-style-windows \
      -prefix ${PREFIX} \
      -qt-gif \
      -qt-imgfmt-jpeg \
      -qt-imgfmt-mng \
      -qt-imgfmt-png \
      -qt-style-motif \
      -release \
      -R${TMP}/tmp-${PRGNAM}/lib \
      -shared \
      -sm \
      -stl \
      -system-libjpeg \
      -system-libmng \
      -system-libpng \
      -system-zlib \
      -thread \
      -tablet \
      -v \
      -xcursor \
      -xft \
      -xinerama \
      -xkb \
      -xrandr \
      -xrender \
      -xshape

The make command requires running twice. The second time around to create symbolic links and some other stuff:

   make VERBOSE=1
   make install INSTALL_ROOT=${PKG}
   make -i symlinks sub-src sub-tool
   make install INSTALL_ROOT=${PKG}

Some other post build actions should be taken to add other symbolic links, configuration scripts, and some files needed to ensure everything will run smoothly once installed:

   # Some configure scripts seem unable to find lib64 => Create a symlink to lib
   if [[ "x86_64" = "${ARCH}" ]]; then
      ln -sf ${PREFIX}/lib${LIBDIRSUFFIX} ${PKG}/${PREFIX}/lib
   fi
   
   # Adding a link to the include folder
   mkdir -p ${PKG}/usr/include
   ln -sf ${PREFIX}/include ${PKG}/usr/include/${PRGNAM}
   
   # Move the qt-mt.pc in the pkgconfig directory
   if [[ ! -f ${PKG}/${PREFIX}/lib${LIBDIRSUFFIX}/pkgconfig/tqt-mt.pc ]]; then
      mkdir -p ${PKG}/${PREFIX}/lib${LIBDIRSUFFIX}/pkgconfig
      mv ${PKG}/${PREFIX}/lib${LIBDIRSUFFIX}/tqt-mt.pc ${PKG}/${PREFIX}/lib${LIBDIRSUFFIX}/pkgconfig/tqt-mt.pc
   fi
   # Link for qt-mt.pc to the /usr/lib[64] directory
   mkdir -p ${PKG}/usr/lib${LIBDIRSUFFIX}/pkgconfig
   ln -sf ${PREFIX}/lib${LIBDIRSUFFIX}/pkgconfig/tqt-mt.pc ${PKG}/usr/lib${LIBDIRSUFFIX}/pkgconfig/tqt-mt.pc
   
   # Fix some bad links
   if [[ -d ${PKG}/${PREFIX}/lib${LIBDIRSUFFIX}/${PRGNAM}/mkspecs/linux-g++ ]]; then
      if [[ -L ${PKG}/${PREFIX}/lib${LIBDIRSUFFIX}/${PRGNAM}/mkspecs/linux-g++/linux-g++ ]]; then
         unlink ${PKG}/${PREFIX}/lib${LIBDIRSUFFIX}/${PRGNAM}/mkspecs/linux-g++/linux-g++
      fi
      ln -sf ${PREFIX}/lib${LIBDIRSUFFIX}/${PRGNAM}/mkspecs/linux-g++ ${PKG}/${PREFIX}/lib${LIBDIRSUFFIX}/${PRGNAM}/mkspecs/linux-g++/linux-g++
      if [[ -L ${PKG}/${PREFIX}/lib${LIBDIRSUFFIX}/${PRGNAM}/mkspecs/default ]]; then
         unlink ${PKG}/${PREFIX}/lib${LIBDIRSUFFIX}/${PRGNAM}/mkspecs/default
      fi
      ln -sf ${PREFIX}/lib${LIBDIRSUFFIX}/${PRGNAM}/mkspecs/linux-g++ ${PKG}/${PREFIX}/lib${LIBDIRSUFFIX}/${PRGNAM}/mkspecs/default
   elif [[ -d ${PKG}/${PREFIX}/mkspecs/linux-g++ ]]; then
      if [[ -L ${PKG}/${PREFIX}/mkspecs/linux-g++/linux-g++ ]]; then
         unlink ${PKG}/${PREFIX}/mkspecs/linux-g++/linux-g++
      fi
      ln -sf ${PREFIX}/mkspecs/linux-g++ ${PKG}${PREFIX}/mkspecs/linux-g++/linux-g++
      if [[ -L ${PKG}/${PREFIX}/mkspecs/default ]]; then
         unlink ${PKG}/${PREFIX}/mkspecs/default
      fi
      ln -sf ${PREFIX}/mkspecs/linux-g++ ${PKG}/${PREFIX}/mkspecs/default
   fi
   
   # Create and populate the profile.d directory
   mkdir -p ${PKG}/etc/profile.d
   # Put profile.d scripts in package TQT installation path.
   cat ${SRCDIR}/profile.d/tqt3.sh  | sed -e "s:TDE_PREFIX:${PREFIX}:" > ${PKG}/etc/profile.d/tqt3.sh
   cat ${SRCDIR}/profile.d/tqt3.csh | sed -e "s:TDE_PREFIX:${PREFIX}:" > ${PKG}/etc/profile.d/tqt3.csh
   
   chmod 755 ${PKG}/etc/profile.d/*

As usual a compressed archive containing the SlackBuild script and the related configuration files can be downloaded from the following link.

TQTINTERFACE

The Trinity Qt Interface is a library that abstracts Qt from Trinity. The abstraction layer allows to use both applications linked to TQt and Qt4 in a transparent way permitting both environments to coexist. To work correctly TQtinterface should be installed in directory /usr. To build the package set some environment variables:

   PREFIX="/usr"
   MANDIR="/usr/man"

Then run cmake passing it some configuration options of which -DQT_VERSION=3 is worth mentioning:

   cmake ${TMP}/tmp-${PRGNAM}/${DIR_SRC} \
      -DCMAKE_C_FLAGS:STRING="${SLKCFLAGS}" \
      -DCMAKE_CXX_FLAGS:STRING="${SLKCFLAGS} $DEBUG_CMAKE_OPT" \
      -DCMAKE_INSTALL_PREFIX=${PREFIX} \
      -DLIB_SUFFIX=${LIBDIRSUFFIX} \
      -DMAN_INSTALL_DIR=${MANDIR} \
      -DQT_VERSION=3 \
      -DSYSCONF_INSTALL_DIR=${SYSCONFDIR} \
      -DBUILD_ALL=ON

A compressed archive containing the SlackBuild script and the related configuration files can be downloaded from the following link.

Conclusions

The present paper presented and discussed the procedure to build Prerequisites packages for the Trinity Desktop Environment. Some general rules common to the whole project were described along with options specific to packages. Finally links for all of the used SlackBuild scripts were provided in the hope for them to be useful to Slackware Linux users wishing to give a try at building the desktop environment from scratch.


For any feedback, questions, errors and such, please e-mail me at studiosg [at] giustetti [dot] net


External links





Languages: English - Italiano