Main page...           Popular tags: Linux (8), Hack (7), DIY (4), Debian (4), Electronics (4), Other (4), Retrocomputing (3), Curiosities (1)


Building Ted under Debian Jessie

2016-11-25 21:30:22,  In: Linux, Debian

Ted is a Linux rich text editor which has one significant good side: It is not bloated. It is written in pure C/C++ and offers everything a simple word processor may offer: Pages and margins, choosing font, attributes (bold, italic etc.), saving to text files, RTF and even simple HTML format. But the most important thing in TED is that it is not wasting memory and CPU cycles for useless things. Editors which need GTK require few GB of libraries. AbiWord likes to pull significant part of Gnome from repo. Ted is just working on basic libraries. It is possible to have a program to write being focused on writing without gigabytes of libraries! However, the biggest problem with Ted is that it is not supported anymore in Debian, as well as in many other distributions.

Unfortunately Linux is a system for programmers, and programmers like to write code. WYSIWYG software has no chance here to be maintained. So Ted became difficult to build. In this text I'll show how to build Ted in modern Debian Jessie system. It is verified for 64-bit Jessie in November 2016.
First of all, forget about binary packages. They are not useful at all and usually they will not go. We will build from source. You need autoconf, make, gcc and all of these build-essentials. More, you need the following libraries:
- libtiff5-dev
- libpcre3-dev
- libx11-dev
- libxpm-dev
- libjpeg62-turbo-dev (or anything equivalent)
- libpng12-dev
- libgtk2.0-dev
- libpaper-dev (not compulsory)
- libfreetype6-dev
- fakeroot
So having a nice code:
sudo aptitude install build-essentials libtiff5-dev libpcre3-dev libx11-dev libxpm-dev libjpeg62-turbo-dev libpng12-dev libgtk2.0-dev libpaper-dev libfreetype6-dev fakeroot
After installation of packages, get a source code from project page. The latest tar.gz file is version 2.23. Download it to some directory and get there with console. Unpack it (tar xvf ted-2.23.src.tar.gz) and we can start modifying build. The problem is that Ted is not made for newest Debian or Ubuntu. It's quite old editor. So first of all, we have to mod a bit our environment:
sudo ln -s /usr/include/freetype2/ /usr/include/freetype
This command will make freetype2 libraries directory available in directory of older Freetype programming library. Although not recommended for everyday use, it will save us much time editing makefiles. Now head to Ted-2.23/Ted directory and edit makefile.in file. Replace:

IMG_STATIC_LIBS= \
                @LIBTIFF_LIBS@          \
                @LIBJPEG_LIBS@          \
                @LIBPNG_LIBS@           \
                @ZLIB_LIBS@
IMG_SHARED_LIBS= \
                @LIBTIFF_LIBS@          \
                @LIBJPEG_LIBS@          \
                @LIBPNG_LIBS@           \
                @ZLIB_LIBS@
with:
IMG_STATIC_LIBS= \
                @LIBTIFF_LIBS@          \
                @LIBJPEG_LIBS@          \
                @LIBPNG_LIBS@           \
                @ZLIB_LIBS@             \
                -ltiff
IMG_SHARED_LIBS= \
                @LIBTIFF_LIBS@          \
                @LIBJPEG_LIBS@          \
                @LIBPNG_LIBS@           \
                @ZLIB_LIBS@             \
                -ltiff

So you can see that the only thing is adding backslash to the last line and "-ltiff" to make linker know that we're using Libtiff.
Then you can go .. and make the program. There is no configure - it just configures as it needs. If you finally built it you can sudo make install it to copy needed files to their directories. After successful installation just type Ted to launch the editor.


Older post...       Main page       Newer post...