Difference between revisions of "En/TDE tdebindings"

From Studiosg
Jump to navigationJump to search
(Added page about Tdebindings, TDE and Slackware 14.0)
(No difference)

Revision as of 10:17, 23 January 2014

Welcome to Simone Giustetti's wiki pages.


Languages: English - Italiano


TDEBINDINGS

En/trinity_desktop_environment#Base_Packages

The Trinity Desktop Environment provides support for writing applications, modules and programs with many programming languages. Some well known and widely used programming languages are included:

  • C++
  • Java
  • JavaScript (ECMAScript)
  • Perl
  • Python
  • Ruby

The tdebindings package contains the libraries binding the listed languages to the desktop environment.

Tdebindings and Slackware

A build script based on release 3.5.X of kdebindings exists for tdebindings. Some other TDE packages were ported to cmake, but that is not the case for tdebindings which still relies on Autotools to build. For proper configuration the package needs programming languages to be installed before running the configure command:

Prerequisites (Java)

Were You willing to write code using the Java programming language a recent JRE (Java Runtime Engine) or JDK (Java Development Kit) must be installed before building tdebindings. Oracle recently changed some terms of the Java license and consequently it is no more possible for Linux distributions to provide their own Java package. Slackware is no exception to the rule. To create a standard package follow some easy steps:

  • Download a JRE or JDK archive from the official Oracle download page. Please be careful to choose the desired architecture: i486 or x86_64 and correct archive file format: .tar.gz.
  • Update parameters in the java.SlackBuild script to match the downloaded archive. The script can be found in the /extra/source/java/ directory in the installation Cd / Dvd.
  • Run the packaging procedure as in the example below:
  ./java.SlackBuild /tmp/jre-7u5-linux-x64.tar.gz
  • The package will be created in the /tmp directory. Install it with command:
  installpkg <java_package>

or

  upgradepkg --install-new <java_package>

Java is optional therefore tdebindings can be built without if You have no need for it.

Prerequisites (Perl)

To write code in the Perl programming language You need to install the related package before building tdebindings.

Prerequisites (Python)

To write code in the Python programming language not only its related packages need to be installed, but some TDE specific ones are needed too:

  • python-tqt
  • pytdeextensions
  • python-trinity

I could not manage to build a working python-tqt package: the tdebindings package will be built without Python support.

Prerequisites (Ruby)

To write code in the Ruby programming language You need to install the related package before building tdebindings.

Configuring

After the programming language of choice is installed it is possible to go on with the configuration procedure. Directory /opt/trinity was configured as the package root directory in accordance to the project guidelines. Some precautions were taken to ensure a successful package configuration. Precautions born out of reading the official documentation and a study of the old Trinity build kit for Slackware. Some script lines of code and related comments follow.

Some required configuration scripts are not present after decompressing the source code archive. They must be created by running the proper command:

  # Prepare the package for building (Create the configure script).
  echo "(II) admin makefile run here" >> ${OUTPUT}/${PRGNAM}_configure.log
  make -f admin/Makefile.common \
  2>&1 | tee -a ${OUTPUT}/${PRGNAM}_configure.log

The source code needs some patching in order to recognize the installed libtool package version: 2.4.2, instead of 2.2.6.

  # Patch the admin/ltmain.sh script in order to solve a version mismatch.
  patch -p0 -i ${SRCDIR}/ltmain_version_update.patch

The script specifically sets Qt libraries paths in order for other scripts to find them at build time:

  # Add temporary paths to handle new libraries during build
  export QTDIR=/opt/trinity
  export PATH=/opt/trinity/bin:/usr/bin:$PATH
  export LIBDIR=/usr/lib${LIBDIRSUFFIX}
  export LD_LIBRARY_PATH=/usr/lib${LIBDIRSUFFIX}:/opt/trinity/lib${LIBDIRSUFFIX}
  export PKG_CONFIG_PATH=:/usr/lib${LIBDIRSUFFIX}/pkgconfig:/opt/trinity/lib${LIBDIRSUFFIX}/pkgconfig:$PKG_CONFIG_PATH

Finally the script runs the ./configure command with the proper option list. Among them a special mention goes to --enable-closure, required by the package for not well documented reasons.

  # Configure the package
  LDFLAGS="${SLKLDFLAGS}" \
  CFLAGS="${SLKCFLAGS}" \
  CXXFLAGS="${SLKCFLAGS}" \
  ../${PRGNAM}-${VERSION}/configure \
     --prefix=${PREFIX} \
     --sysconfdir="/etc/trinity" \
     --libdir=${LIBDIR} \
     --mandir=${PREFIX}/man \
     --with-qt-dir=${QTDIR} \
     --with-qt-includes=${PREFIX}/include \
     --with-qt-libraries=${PREFIX}/lib${LIBDIRSUFFIX} \
     --disable-rpath \
     --enable-closure \
     2>&1 | tee -a ${OUTPUT}/${PRGNAM}_configure.log

Once the configuration successfully concludes, the script runs the make command then goes on with packaging the software.

A full script can be downloaded from the following link. The output package can be installed by mean of command installpkg as usual in Slackware Linux.

After installing tdebindings You'll be able to develop applications for the desktop environment or to simply run programs written in a language other than the native one.


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


External Links



Languages: English - Italiano