ttmkfdir without freetype1 installing

Erika Pacholleck pchllck at nexgo.de
Thu Oct 17 17:19:29 PDT 2002


not subscribed to any list at the moment, so just a throw-in

*If* nothing else needs the freetype1 libraries (did not run into
something yet), ttmkfdir can be linked statically to the built
libraries. I do it this way at the moment (too lazy to optimize it)

pkg=freetype-1.3.1
---------------------------------
# optimize for size, only static, no interpreter
# sed delimiter is ° (no doubt about character)
# then create the libttf.a, no installing
cd $pkg                       \
&& CFLAGS=-Os ./configure     \
--prefix=/usr                 \
--enable-static               \
--disable-shared              \
--disable-nls                 \
&& cp ft_conf.h ft_conf.h.bak \
&& sed -e                     \
 '\°_NO_INTERPRETER°{s°/\* #undef°#define°;s° \*/°°;}' \
 ft_conf.h.bak >ft_conf.h     \
&& make                       \
&& cd lib                     \
&& ar cru libttf.a freetype.o \
&& ranlib libttf.a            \
&& cd ../..

pkg=ttmkfdir
srcdir=/usr/src
sources=/mnt/tmp/lfs-x
---------------------------------
# (un_pack is a function)
# patch (for cleaness) see down
cd $srcdir/ && mkdir $pkg            \
&& cd $pkg && un_pack $sources/$pkg* \
&& patch -Np1 -i ../reo.$pkg.patch   \
&& make                              \
&& install -m 555 ttmkfdir /usr/bin

reo.ttmkfdir.patch:
# change version number of freetype dir
# eliminate .libs directory
# optimize for size, link static
---------------------------------
diff -Naur ttmkfdir/Makefile ttmkfdir.reo/Makefile
--- ttmkfdir/Makefile	1998-09-10 18:54:26.000000000 +0200
+++ ttmkfdir.reo/Makefile	2002-10-12 15:15:35.000000000 +0200
@@ -1,10 +1,10 @@
-FREETYPE_BASE=../freetype-1.1
+FREETYPE_BASE=../freetype-1.3.1
 FREETYPE_INCL=$(FREETYPE_BASE)/lib
-FREETYPE_LIB=-L$(FREETYPE_BASE)/lib/.libs -lttf
+FREETYPE_LIB=-L$(FREETYPE_BASE)/lib -lttf
 
 CC=gcc
-CFLAGS=-Wall -pedantic -I$(FREETYPE_INCL)
-LDFALGS=$(FREETYPE_LIB) -s
+CFLAGS=-Os -Wall -pedantic -I$(FREETYPE_INCL)
+LDFALGS=$(FREETYPE_LIB) -s -static
 
 all: ttmkfdir
---------------------------------

By changing the freetype Makefile, it should be possible to avoid
the make process is deleting the lib/.libs directory after it
is ready. This dir already contains the libttf.a file we need,
so we would only need to sed the version number in ttmkfdir and set
the other two with variables. But I did not look into that closer,
cause it was just the fastest way of trying.

result: 427816 /usr/bin/ttmkfdir

Just an idea, if freetype1 libs are not needed. Works here.
-- 
Erika ...---...: pacholleck at nexgo dot de
-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe blfs-dev' in the subject header of the message



More information about the blfs-dev mailing list