[PATCH] pkg-config support for SDL_ttf and SDL_image (repost)

Hello!

News on these patches?
No one with svn access to SDL_ttf or SDL_image would like to
comment/submit?

It’s really a matter of minutes, they only deal with the build system,
but I’m sure they will help a lot users of those libraries.
(I submitted the same kind of patch to SDL_gfx and it has been accepted
immediately).

Thank you,

luca

----- Forwarded message from Luca Bigliardi <@Luca_Bigliardi> -----Subject: [PATCH] pkg-config support for SDL_ttf and SDL_image
From: @Luca_Bigliardi (Luca Bigliardi)
Date: Sun, 21 Jun 2009 11:07:16 +0100
To: SDL at lists.libsdl.org
User-Agent: Mutt/1.5.18 (2008-05-17)
Message-ID: <20090621100716.GL16538 at pintsize>

Hi,
I’m attaching two patches to add pkg-config support to SDL_ttf and
SDL_image.

pkg-config is used to retrieve information about installed libraries and
it’s well integrated with build configurators (for instance
PKG_CHECK_MODULES autoconf macro).

PS: I’m not subscribed to the list so please CC me

Thank you,

Luca


Beware of programmers who carry screwdrivers.
– Leonard Brandwein

http://shammash.homelinux.org/ - http://www.artha.org/ - http://www.yue.it/

— configure.in_ORIG 2009-02-08 01:47:51.000000000 +0100
+++ configure.in 2009-02-08 02:10:52.000000000 +0100
@@ -126,6 +126,7 @@

dnl Check for SDL
SDL_VERSION=1.2.4
+AC_SUBST(SDL_VERSION)
AM_PATH_SDL($SDL_VERSION,
:,
AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
@@ -189,4 +190,5 @@
AC_OUTPUT([
Makefile
SDL_ttf.spec
+SDL_ttf.pc
])
— Makefile.am_ORIG 2009-02-08 01:48:38.000000000 +0100
+++ Makefile.am 2009-02-08 01:50:41.000000000 +0100
@@ -34,6 +34,9 @@
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
endif

+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = SDL_ttf.pc
+
%.o : %.rc
$(WINDRES) $< $@

— SDL_ttf.pc.in_ORIG 2009-02-08 01:47:43.000000000 +0100
+++ SDL_ttf.pc.in 2009-02-08 02:08:40.000000000 +0100
@@ -0,0 +1,12 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: SDL_ttf
+Description: ttf library for Simple DirectMedia Layer with FreeType 2 support
+Version: @VERSION@
+Requires: sdl >= @SDL_VERSION@
+Libs: -L${libdir} -lSDL_ttf
+Cflags: -I${includedir}/SDL
+

— configure.in_ORIG 2009-02-08 02:42:51.000000000 +0100
+++ configure.in 2009-02-08 02:43:26.000000000 +0100
@@ -80,6 +80,7 @@

dnl Check for SDL
SDL_VERSION=1.2.10
+AC_SUBST(SDL_VERSION)
AM_PATH_SDL($SDL_VERSION,
:,
AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
@@ -293,4 +294,5 @@
Makefile
SDL_image.spec
SDL_image.qpg
+SDL_image.pc
])
— Makefile.am_ORIG 2009-02-08 02:41:16.000000000 +0100
+++ Makefile.am 2009-02-08 02:42:11.000000000 +0100
@@ -49,6 +49,9 @@
libSDL_image_la_LIBADD = $(IMG_LIBS)
endif

+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = SDL_image.pc
+
%.o : %.rc
$(WINDRES) $< $@

— SDL_image.pc.in_ORIG 2009-02-08 02:37:46.000000000 +0100
+++ SDL_image.pc.in 2009-02-08 02:40:35.000000000 +0100
@@ -0,0 +1,12 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: SDL_image
+Description: image loading library for Simple DirectMedia Layer
+Version: @VERSION@
+Requires: sdl >= @SDL_VERSION@
+Libs: -L${libdir} -lSDL_image
+Cflags: -I${includedir}/SDL
+

----- End forwarded message -----


Beware of programmers who carry screwdrivers.
– Leonard Brandwein

http://shammash.homelinux.org/ - http://www.artha.org/ - http://www.yue.it/

Luca Bigliardi skrev:

News on these patches?

Please include a link to the tracker item (bugzilla.libsdl.org) where
you have reported the problem that you are trying to fix and attached
your patch when you send this kind of reminder.

Hi again,

sorry for the scrambled thread but I’m not subscribed to the list and I’ve
seen Erik’s reply on the web archive.

I didn’t see the bugtracker, sorry. I’ve just created bug #767 and #768
with the patches.

Thank you,

luca–
Beware of programmers who carry screwdrivers.
– Leonard Brandwein

http://shammash.homelinux.org/ - http://www.artha.org/ - http://www.yue.it/