Author: mordante
Date: Tue Mar 4 19:24:15 2008
New Revision: 24305
URL: http://svn.gna.org/viewcvs/wesnoth?rev=24305&view=rev
Log:
Changed the buildin SDL_ttf to a dependency on the library version >= 2.0.8.
Removed:
trunk/src/sdl_ttf/
Modified:
trunk/Doxyfile
trunk/INSTALL
trunk/RELEASE_NOTES
trunk/changelog
trunk/configure.ac
trunk/src/Makefile.am
trunk/src/construct_dialog.cpp
trunk/src/font.cpp
trunk/src/font.hpp
trunk/src/show_dialog.cpp
trunk/src/titlescreen.cpp
Modified: trunk/Doxyfile
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/Doxyfile?rev=24305&r1=24304&r2=24305&view=diff
==============================================================================
--- trunk/Doxyfile (original)
+++ trunk/Doxyfile Tue Mar 4 19:24:15 2008
@@ -473,7 +473,7 @@
# like "myfile.cpp" or directories like "/usr/src/myproject".
# Separate the files or directories with spaces.
-INPUT = src src/campaign_server src/editor src/serialization
src/server src/sdl_ttf src/tools src/widgets doc/doxygen/doxygen.cpp
src/animated.i
+INPUT = src src/campaign_server src/editor src/serialization
src/server src/tools src/widgets doc/doxygen/doxygen.cpp src/animated.i
# If the value of the INPUT tag contains directories, you can use the
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
Modified: trunk/INSTALL
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/INSTALL?rev=24305&r1=24304&r2=24305&view=diff
==============================================================================
--- trunk/INSTALL (original)
+++ trunk/INSTALL Tue Mar 4 19:24:15 2008
@@ -6,6 +6,7 @@
libsdl-image1.2 (with png support)
libsdl-mixer1.2 (with Vorbis support)
libsdl-net
+ libsdl-ttf2.0.8
libfreetype2
libz
boost_iostreams >= 1.33.0
Modified: trunk/RELEASE_NOTES
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/RELEASE_NOTES?rev=24305&r1=24304&r2=24305&view=diff
==============================================================================
--- trunk/RELEASE_NOTES (original)
+++ trunk/RELEASE_NOTES Tue Mar 4 19:24:15 2008
@@ -14,3 +14,4 @@
Notes for packagers (not sure whether needed in normal notes as well)
* We now depend on boost_regex >= 1.33.0
+* We now depend on libsdl-ttf >= 2.0.8
Modified: trunk/changelog
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/changelog?rev=24305&r1=24304&r2=24305&view=diff
==============================================================================
--- trunk/changelog (original)
+++ trunk/changelog Tue Mar 4 19:24:15 2008
@@ -12,6 +12,7 @@
* miscellaneous and bug fixes:
* remove an ancient wml update program which has been obsoleted by wmllint
* added the boost regex dependency
+ * added the sdl-ttf dependency
Version 1.4:
* language and i18n:
Modified: trunk/configure.ac
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/configure.ac?rev=24305&r1=24304&r2=24305&view=diff
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Tue Mar 4 19:24:15 2008
@@ -551,7 +551,8 @@
[enable_sdltest=yes])
min_sdl_version=1.2.7
-AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
+min_sdl_ttf_version=2.0.8
+AC_MSG_CHECKING(for SDL - version >= $min_sdl_version and SDL_ttf - version >=
$min_sdl_ttf_version)
SDL_CFLAGS=`$SDL_CONFIG --cflags`
SDL_LIBS=`$SDL_CONFIG --libs`
@@ -562,6 +563,14 @@
sdl_micro_version=`$SDL_CONFIG --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+sdl_ttf_major_version=`echo $min_sdl_ttf_version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+sdl_ttf_minor_version=`echo $min_sdl_ttf_version| \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+sdl_ttf_micro_version=`echo $min_sdl_ttf_version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+
+
if test "x$enable_sdltest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
@@ -577,6 +586,7 @@
#include <stdlib.h>
#include <string.h>
#include "SDL.h"
+#include "SDL_ttf.h"
char*
my_strdup (char *str)
@@ -615,7 +625,21 @@
(($sdl_major_version == major) && ($sdl_minor_version > minor)) ||
(($sdl_major_version == major) && ($sdl_minor_version == minor) &&
($sdl_micro_version >= micro)))
{
- return 0;
+ SDL_version compile_version, *link_version;
+ TTF_VERSION(&compile_version);
+ if (($sdl_ttf_major_version > compile_version.major) ||
+ (($sdl_ttf_major_version == compile_version.major)
+ && ($sdl_ttf_minor_version > compile_version.minor)) ||
+ (($sdl_ttf_major_version == compile_version.major)
+ && ($sdl_ttf_minor_version == compile_version.minor)
+ && ($sdl_ttf_micro_version == compile_version.patch)))
+ {
+ return 0;
+ } else {
+ printf("\n*** TTF_VERSION returned %d.%d.%d, but the minimum
version\n",compile_version.major, compile_version.minor, compile_version.patch);
+ printf("*** required version is %d.%d.%d. Please update your
library.\n",$sdl_ttf_major_version,$sdl_ttf_minor_version,$sdl_ttf_micro_version);
+ return 1;
+ }
}
else
{
@@ -732,12 +756,22 @@
[AC_MSG_ERROR([*** SDL_net lib not found! Get SDL_net from
http://www.libsdl.org/projects/SDL_net/index.html])])
+AC_CHECK_LIB([SDL_ttf],
+ [TTF_Init],
+ [if test -n "$LDPREFIX" -a -r `$SDL_CONFIG
--prefix`/lib/libSDL_ttf.la
+then SDL_TTF_LIBS=`$SDL_CONFIG --prefix`/lib/libSDL_ttf.la
+else SDL_TTF_LIBS=-lSDL_ttf
+fi],
+ [AC_MSG_ERROR([*** SDL_ttf lib not found! Get SDL_ttf from
+http://www.libsdl.org/projects/SDL_ttf/index.html])])
+
LIBS=$OLD_LIBS
AC_SUBST([SDL_LIBS])
AC_SUBST([SDL_IMAGE_LIBS])
AC_SUBST([SDL_MIXER_LIBS])
AC_SUBST([SDL_NET_LIBS])
+AC_SUBST([SDL_TTF_LIBS])
# Checking for the freetype library. This was copied from the
# config script of SDL_ttf, modified for CPPFLAGS
Modified: trunk/src/Makefile.am
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/Makefile.am?rev=24305&r1=24304&r2=24305&view=diff
==============================================================================
--- trunk/src/Makefile.am (original)
+++ trunk/src/Makefile.am Tue Mar 4 19:24:15 2008
@@ -360,7 +360,6 @@
variable.hpp \
video.hpp \
wml_separators.hpp \
- sdl_ttf/SDL_ttf.h \
wesconfig.h \
wml_exception.hpp
@@ -438,7 +437,6 @@
widgets/slider.cpp \
widgets/textbox.cpp \
widgets/widget.cpp \
- sdl_ttf/SDL_ttf.c \
wml_exception.cpp
if USESVN
@@ -454,10 +452,10 @@
FORCE:
endif
-AM_CXXFLAGS = -I $(srcdir)/sdl_ttf -I../intl -I$(top_srcdir)/intl @SDL_CFLAGS@
-DWESNOTH_PATH=\"$(pkgdatadir)\" \
+AM_CXXFLAGS = -I../intl -I$(top_srcdir)/intl @SDL_CFLAGS@
-DWESNOTH_PATH=\"$(pkgdatadir)\" \
-DLOCALEDIR=\"$(LOCALEDIR)\"
-DHAS_RELATIVE_LOCALEDIR=$(HAS_RELATIVE_LOCALEDIR) -DFIFODIR=\"$(fifodir)\"
-AM_CFLAGS = -I $(srcdir)/sdl_ttf -I../intl -I$(top_srcdir)/intl @SDL_CFLAGS@
-DWESNOTH_PATH=\"$(pkgdatadir)\" \
+AM_CFLAGS = -I../intl -I$(top_srcdir)/intl @SDL_CFLAGS@
-DWESNOTH_PATH=\"$(pkgdatadir)\" \
-DLOCALEDIR=\"$(LOCALEDIR)\"
-DHAS_RELATIVE_LOCALEDIR=$(HAS_RELATIVE_LOCALEDIR)
if PYTHON
Modified: trunk/src/construct_dialog.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/construct_dialog.cpp?rev=24305&r1=24304&r2=24305&view=diff
==============================================================================
--- trunk/src/construct_dialog.cpp (original)
+++ trunk/src/construct_dialog.cpp Tue Mar 4 19:24:15 2008
@@ -39,7 +39,7 @@
#include "widgets/progressbar.hpp"
#include "widgets/textbox.hpp"
-#include "sdl_ttf/SDL_ttf.h"
+#include "SDL_ttf.h"
#include <iostream>
#include <numeric>
Modified: trunk/src/font.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/font.cpp?rev=24305&r1=24304&r2=24305&view=diff
==============================================================================
--- trunk/src/font.cpp (original)
+++ trunk/src/font.cpp Tue Mar 4 19:24:15 2008
@@ -44,15 +44,6 @@
#define LOG_FT LOG_STREAM(info, display)
#define WRN_FT LOG_STREAM(warn, display)
#define ERR_FT LOG_STREAM(err, display)
-
-//Deliberately breaking compilation with the original SDL_ttf library. Remove
-//the lines below to be able to do this anyway, however this is buggy and may
-//cause random memory corruption errors depending on the OS / Version of
-//Freetype / Language you are using!
-//
-#ifndef SDL_TTF_WESNOTH
-#error Please use the SDL_ttf files in the sdl_ttf directory, and not the
original SDL_ttf library.
-#endif
#ifdef HAVE_FRIBIDI
#include <fribidi/fribidi.h>
Modified: trunk/src/font.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/font.hpp?rev=24305&r1=24304&r2=24305&view=diff
==============================================================================
--- trunk/src/font.hpp (original)
+++ trunk/src/font.hpp Tue Mar 4 19:24:15 2008
@@ -15,7 +15,7 @@
#define FONT_HPP_INCLUDED
#include "SDL.h"
-#include "sdl_ttf/SDL_ttf.h"
+#include "SDL_ttf.h"
class CVideo;
#include "sdl_utils.hpp"
Modified: trunk/src/show_dialog.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/show_dialog.cpp?rev=24305&r1=24304&r2=24305&view=diff
==============================================================================
--- trunk/src/show_dialog.cpp (original)
+++ trunk/src/show_dialog.cpp Tue Mar 4 19:24:15 2008
@@ -38,7 +38,7 @@
#include "widgets/progressbar.hpp"
#include "widgets/textbox.hpp"
-#include "sdl_ttf/SDL_ttf.h"
+#include "SDL_ttf.h"
#include <iostream>
#include <numeric>
Modified: trunk/src/titlescreen.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/titlescreen.cpp?rev=24305&r1=24304&r2=24305&view=diff
==============================================================================
--- trunk/src/titlescreen.cpp (original)
+++ trunk/src/titlescreen.cpp Tue Mar 4 19:24:15 2008
@@ -43,7 +43,7 @@
#include "wesconfig.h"
#include <algorithm>
-#include "sdl_ttf/SDL_ttf.h"
+#include "SDL_ttf.h"
//! Log info-messages to stdout during the game, mainly for debugging
#define LOG_DP LOG_STREAM(info, display)
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits