Difference between revisions of "En/TDE tdebindings"

From Studiosg
Jump to navigationJump to search
(Added page about Tdebindings, TDE and Slackware 14.0)
 
(Page updated to new template)
Line 1: Line 1:
Welcome to Simone Giustetti's wiki pages.
+
{{header_en|title=Building a Bindings package for TDE| keyword={{Template:keyword_en_tde}}| description=Building, installing and configuring a working Bindings package for TDE and Slackware Linux | link_page=TDE_tdebindings}}
 
 
 
 
Languages: '''English''' - [http://www.giustetti.net/wiki/index.php?title=TDE_tdebindings Italiano]
 
 
 
----
 
  
 
== TDEBINDINGS ==
 
== TDEBINDINGS ==
[[En/trinity_desktop_environment#Base_Packages]]
+
[[En/trinity_desktop_environment#Base_Packages | TDE - 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:  
 
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:  
Line 17: Line 12:
 
* Ruby
 
* Ruby
 
The '''tdebindings''' package contains the libraries binding the listed languages to the desktop environment.
 
The '''tdebindings''' package contains the libraries binding the listed languages to the desktop environment.
 +
  
 
== Tdebindings and Slackware ==
 
== Tdebindings and Slackware ==
Line 46: Line 42:
 
=== Prerequisites (Ruby) ===
 
=== Prerequisites (Ruby) ===
 
To write code in the [https://www.ruby-lang.org/en '''Ruby'''] programming language You need to install the related package before building tdebindings.
 
To write code in the [https://www.ruby-lang.org/en '''Ruby'''] programming language You need to install the related package before building tdebindings.
 +
  
 
== Configuring ==
 
== 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.
+
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:
 
Some required configuration scripts are not present after decompressing the source code archive. They must be created by running the proper command:
 +
<syntaxhighlight lang="bash">
 
   # Prepare the package for building (Create the configure script).
 
   # Prepare the package for building (Create the configure script).
 
   echo "(II) admin makefile run here" >> ${OUTPUT}/${PRGNAM}_configure.log
 
   echo "(II) admin makefile run here" >> ${OUTPUT}/${PRGNAM}_configure.log
 
   make -f admin/Makefile.common \
 
   make -f admin/Makefile.common \
 
   2>&1 | tee -a ${OUTPUT}/${PRGNAM}_configure.log
 
   2>&1 | tee -a ${OUTPUT}/${PRGNAM}_configure.log
 +
</syntaxhighlight>
 
The source code needs some patching in order to recognize the installed '''libtool''' package version: 2.4.2, instead of 2.2.6.
 
The source code needs some patching in order to recognize the installed '''libtool''' package version: 2.4.2, instead of 2.2.6.
 +
<syntaxhighlight lang="bash">
 
   # Patch the admin/ltmain.sh script in order to solve a version mismatch.
 
   # Patch the admin/ltmain.sh script in order to solve a version mismatch.
 
   patch -p0 -i ${SRCDIR}/ltmain_version_update.patch
 
   patch -p0 -i ${SRCDIR}/ltmain_version_update.patch
 +
</syntaxhighlight>
 
'''The script specifically sets Qt libraries paths''' in order for other scripts to find them at build time:
 
'''The script specifically sets Qt libraries paths''' in order for other scripts to find them at build time:
 +
<syntaxhighlight lang="bash">
 
   # Add temporary paths to handle new libraries during build
 
   # Add temporary paths to handle new libraries during build
 
   export QTDIR=/opt/trinity
 
   export QTDIR=/opt/trinity
Line 66: Line 68:
 
   export LD_LIBRARY_PATH=/usr/lib${LIBDIRSUFFIX}:/opt/trinity/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
 
   export PKG_CONFIG_PATH=:/usr/lib${LIBDIRSUFFIX}/pkgconfig:/opt/trinity/lib${LIBDIRSUFFIX}/pkgconfig:$PKG_CONFIG_PATH
 +
</syntaxhighlight>
 
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.
 
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.
 +
<syntaxhighlight lang="bash">
 
   # Configure the package
 
   # Configure the package
 
   LDFLAGS="${SLKLDFLAGS}" \
 
   LDFLAGS="${SLKLDFLAGS}" \
Line 80: Line 84:
 
       --with-qt-libraries=${PREFIX}/lib${LIBDIRSUFFIX} \
 
       --with-qt-libraries=${PREFIX}/lib${LIBDIRSUFFIX} \
 
       --disable-rpath \
 
       --disable-rpath \
       '''--enable-closure''' \
+
       --enable-closure \
 
       2>&1 | tee -a ${OUTPUT}/${PRGNAM}_configure.log
 
       2>&1 | tee -a ${OUTPUT}/${PRGNAM}_configure.log
 +
</syntaxhighlight>
 
Once the configuration successfully concludes, the script runs the make command then goes on with packaging the software.
 
Once the configuration successfully concludes, the script runs the make command then goes on with packaging the software.
  
Line 93: Line 98:
  
 
External Links
 
External Links
 +
 
----
 
----
 +
 
* [http://www.trinitydesktop.org/wiki/bin/view/Developers/HowToBuild TDE build guide]
 
* [http://www.trinitydesktop.org/wiki/bin/view/Developers/HowToBuild TDE build guide]
 
* [http://techbase.kde.org/Development/Languages KDE.org programming languages relate page]
 
* [http://techbase.kde.org/Development/Languages KDE.org programming languages relate page]
Line 100: Line 107:
 
----
 
----
  
Languages: '''English''' - [http://www.giustetti.net/wiki/index.php?title=TDE_tdebindings Italiano]
+
{{footer_en | link_page=TDE_tdebindings}}

Revision as of 15:06, 21 December 2016

Welcome to Simone Giustetti's wiki pages.


Languages: English - Italiano


TDEBINDINGS

TDE - 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