Hi *! 

While looking through the sourcecode of alpha19, I found verbatim copies of 
SDL_tff.c and SDL_ttf.h from SDL's upstream which are compiled and linked 
statically into the glob2 binary via libgag.

Since the Wiki at [1] lists SDL_ttf as a requirement - and I am in favor of 
using external libs instead of local copies, I tried to remove the two and 
replace them with a link against libsdl_ttf and it worked without problems. 
The patch is attached. Someone with more auto* foo than me should probably 
improve on the -lSDL_ttf in src/Makefile.am

This also trades a (packaging) dependency on libfreetype's ABI against one on 
libsdl_ttf's. 


Alternatively I could change the wiki to refer to freetype instead of SDL_ttf.


Regards, David

[1] http://globulation2.org/wiki/Download_and_Install#Compile_from_Sources
-- 
- hallo... wie gehts heute?
- *hust* gut *rotz* *keuch*
- gott sei dank kommunizieren wir über ein septisches medium ;)
 -- Matthias Leeb, Uni f. angewandte Kunst, 2005-02-15
diff -urwbd glob2-0.8.19.orig/configure.in glob2-0.8.19/configure.in
--- glob2-0.8.19.orig/configure.in	2006-03-12 17:24:02.000000000 +0100
+++ glob2-0.8.19/configure.in	2006-05-09 12:32:22.000000000 +0200
@@ -59,7 +59,7 @@
 AC_CHECK_LIB(SDL_net, SDLNet_UDP_Open, SDL_LIBS="$SDL_LIBS -lSDL_net", AC_MSG_ERROR([*** SDL_net library not found !]), $SDL_LIBS)
 
 dnl Check for FT2
-AC_CHECK_FT2
+dnl AC_CHECK_FT2
 
 dnl Check for libvorbis
 XIPH_PATH_VORBIS
diff -urwbd glob2-0.8.19.orig/libgag/src/Makefile.am glob2-0.8.19/libgag/src/Makefile.am
--- glob2-0.8.19.orig/libgag/src/Makefile.am	2006-01-31 21:20:49.000000000 +0100
+++ glob2-0.8.19/libgag/src/Makefile.am	2006-05-09 12:32:41.000000000 +0200
@@ -14,8 +14,6 @@
 	StringTable.cpp\
 	CursorManager.cpp\
 	SupportFunctions.cpp\
-	SDL_ttf.c\
-	SDL_ttf.h\
 	GUIBase.cpp\
 	GUIList.cpp\
 	GUIFileList.cpp\
@@ -36,4 +34,4 @@
 	TextStream.cpp\
 	$(libgag_a_EXTRA_SRC)
 
-INCLUDES = @FT2_CFLAGS@ @SDL_CFLAGS@ [EMAIL PROTECTED]@/../include/
+INCLUDES = @SDL_CFLAGS@ [EMAIL PROTECTED]@/../include/
diff -urwbd glob2-0.8.19.orig/src/Makefile.am glob2-0.8.19/src/Makefile.am
--- glob2-0.8.19.orig/src/Makefile.am	2006-01-15 18:53:12.000000000 +0100
+++ glob2-0.8.19/src/Makefile.am	2006-05-09 12:31:47.000000000 +0200
@@ -192,6 +192,6 @@
 glob2_LDADD = ../libgag/src/libgag.a -lGL -lGLU -lpthread $(glob2_static_lib)
 LIBS = 
 else
-glob2_LDADD = ../libgag/src/libgag.a @LIBS@ @FT2_LIBS@ @SDL_LIBS@ @VORBISFILE_LIBS@ @VORBIS_LIBS@ $(glob2_static_lib)
+glob2_LDADD = ../libgag/src/libgag.a @LIBS@ @SDL_LIBS@ @VORBISFILE_LIBS@ @VORBIS_LIBS@ -lSDL_ttf $(glob2_static_lib)
 endif
-INCLUDES = @FT2_CFLAGS@ @SDL_CFLAGS@ @VORBIS_CFLAGS@ [EMAIL PROTECTED]@/../libgag/include
+INCLUDES = @SDL_CFLAGS@ @VORBIS_CFLAGS@ [EMAIL PROTECTED]@/../libgag/include
_______________________________________________
glob2-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/glob2-devel

Reply via email to