Compile on Slackware
Building OpenCPN package in Slackware
Building a package in Slackware is a bit more intricate than the way
described above (see: http://www.slackwiki.com/Building_A_Package ).
A simplified way is to use src2pkg.
You can build a Slackware package using src2pkg, that’s what the sketch
below is about.
-Please note that Slackware, unlike Debian-apt-get, Fedora-yum and
OpenSuSE-zypper, does not solve dependencies.
You have to take care of that yourself and build and install the
packages in correct order.
Concerning the Slackbuilds below, we present them in that order.
First, as for the other distributions, uninstall any previous
installation:
bash-4.2# removepkg opencpn
1. Dependencies:
Provided a full Slackware installation(the ordinary "Slackware way" and presumed by the scripts from Slackbuilds.org):
Install src2pkg from
http://distro.ibiblio.org/amigolinux/download/src2pkg/
After installation it takes you through a guided setup, default values
are usually good enough.
Then build and install:
Either: gpsd tinyxml wxPython portaudio from Slackbuilds.org*
Or better: gpsd tinyxml libmspack portaudio wxGTK from Slackbuilds.org
If you choose wxGTK you must edit the Slackbuildscript for wxGTK and add
–enable-graphics_ctx
under .configure according to the following:
./configure \ --prefix=/usr \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --sysconfdir=/etc \ --enable-shared \ --enable-graphics_ctx \ # **add this**. --enable-mediactrl \ --with-opengl \ --${_do_unicode}able-unicode \ --build=$ARCH-slackware-linux
2. Download and pack source code
Get the current beta sourcecode by
bash-4.2$ git clone git://github.com/OpenCPN/OpenCPN.git
bash-4.2$ git clone -b release32_stablehttps://github.com/OpenCPN/OpenCPN.git
lowercase letters and add it’s version number (you can read it from
OpenCPN/VERSION.cmake) opencpn-3.2.2 (or version-number of your
download)
pack it to a .tar.gz //
bash-4.2$ tar czf opencpn-3.2.2.tar.gz opencpn-3.2.2/
3. Build package
Go superuser and use src2pkg
bash-4.2$ su Password: ******* bash-4.2# src2pkg opencpn-3.2.2.tar.gz
the package goes to /tmp
4. Install it:
bash-4.2# installpkg /tmp/opencpn-3.2.2-x86_64-1.txz (-i486 for x86 arch)
Built in this way it installs in /usr/
In XFCE it goes to Applications Menu "Education".
Notes about the dependencies
*/wxPython -ca 20MB- is a heavy package and includes among other things
python-bindings that are not needed by OpenCPN.
wxGTK -ca 4MB- is -according to Slackbuilds.org a part of wxPython and
conflict if both are installed. See wxGTK-README.
WxGTK + libmspack are enough for OpenCPN provided the Slackbuildscript
is edited as suggested above.