rpms/glyph-keeper/devel glyph-keeper-0.29.1-new-ft.patch, NONE, 1.1 glyph-keeper.spec, 1.2, 1.3

Hans de Goede (jwrdegoede) fedora-extras-commits at redhat.com
Mon Aug 28 12:59:34 UTC 2006


Author: jwrdegoede

Update of /cvs/extras/rpms/glyph-keeper/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv17136

Modified Files:
	glyph-keeper.spec 
Added Files:
	glyph-keeper-0.29.1-new-ft.patch 
Log Message:
* Mon Aug 28 2006 Hans de Goede <j.w.r.degoede at hhs.nl> 0.29.1-4
- Fix building with newer freetype
- Build .so files instead of a static lib


glyph-keeper-0.29.1-new-ft.patch:

--- NEW FILE glyph-keeper-0.29.1-new-ft.patch ---
--- glyph-keeper-0.29.1/src/glyph_face.c~	2006-08-28 14:35:57.000000000 +0200
+++ glyph-keeper-0.29.1/src/glyph_face.c	2006-08-28 14:35:57.000000000 +0200
@@ -38,8 +38,8 @@
 
 const char* gk_face_driver_name(const GLYPH_FACE* const f)
 {
-    return (f && f->face && f->face->driver && f->face->driver->root.clazz && f->face->driver->root.clazz->module_name) ?
-        f->face->driver->root.clazz->module_name : na;
+    /* This info is not exported from newer FreeType versions */
+    return na;
 }
 
 
--- glyph-keeper-0.29.1/src/glyph_internal.h~	2006-08-28 14:38:38.000000000 +0200
+++ glyph-keeper-0.29.1/src/glyph_internal.h	2006-08-28 14:38:38.000000000 +0200
@@ -20,7 +20,8 @@
 
 #include <ft2build.h>
 #include FT_FREETYPE_H
-#include FT_INTERNAL_OBJECTS_H
+#include FT_SIZES_H
+#include FT_GLYPH_H
 #include FT_BITMAP_H
 #include FT_SYNTHESIS_H
 
--- glyph-keeper-0.29.1/src/glyph_rend.c~	2006-08-28 14:51:34.000000000 +0200
+++ glyph-keeper-0.29.1/src/glyph_rend.c	2006-08-28 14:51:34.000000000 +0200
@@ -541,16 +541,15 @@
 
     if (!error)
     {
+        unsigned load_flags = rend->load_flags;
         /* Preparing for glyph loading: setting transformation matrix for rotation */
         if (rend->do_matrix_transform)
-        {
-            actual_face->face->internal->transform_matrix = rend->matrix;
-            actual_face->face->internal->transform_flags = 1;
-        }
-        else actual_face->face->internal->transform_flags = 0;
+            FT_Set_Transform(actual_face->face, &(rend->matrix), NULL);
+        else
+            load_flags |= FT_LOAD_IGNORE_TRANSFORM;
 
         /* loading glyph */
-        error = FT_Load_Glyph(actual_face->face,glyph_index,rend->load_flags);
+        error = FT_Load_Glyph(actual_face->face, glyph_index, load_flags);
         if (error) _gk_msg("Error: %s: FreeType can't load glyph (#%d) for character U+%04X\n",funcname,glyph_index,unicode);
     }
 


Index: glyph-keeper.spec
===================================================================
RCS file: /cvs/extras/rpms/glyph-keeper/devel/glyph-keeper.spec,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- glyph-keeper.spec	28 Aug 2006 11:29:39 -0000	1.2
+++ glyph-keeper.spec	28 Aug 2006 12:59:34 -0000	1.3
@@ -1,12 +1,13 @@
 Name:           glyph-keeper
 Version:        0.29.1
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        Library for text rendering
 Group:          System Environment/Libraries
 License:        zlib License
 URL:            http://kd.lab.nig.ac.jp/glyph-keeper/
 Source0:        http://kd.lab.nig.ac.jp/%{name}/files/%{name}-%{version}-no-freetype.zip
 Patch0:         glyph-keeper-0.29.1-fixes.patch
+Patch1:         glyph-keeper-0.29.1-new-ft.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:  freetype-devel >= 2.1.10
 BuildRequires:  SDL-devel allegro-devel
@@ -20,36 +21,41 @@
 
 
 %package devel
-Summary:        Library for text rendering
+Summary:        Development files for %{name}
 Group:          Development/Libraries
-Requires:	allegro-devel SDL-devel
+Requires:       allegro-devel SDL-devel
+Requires:       %{name} = %{version}-%{release}
 
-%description devel
-Glyph Keeper is a library for text rendering. It is written in C and can be 
-used by C or C++ code. Glyph Keeper helps your program to load a font, render
-character glyphs and write them to the target surface. Right now only Allegro
-and SDL targets are supported, but there will be more in future. Glyph Keeper
-uses FreeType as a font engine.
+%description    devel
+The %{name}-devel package contains libraries and header files for
+developing applications that use %{name}.
 
 
 %prep
 %setup -q
-%patch -p1
+%patch0 -p1 -z .fix
+%patch1 -p1 -z .new-ft
+sed -i 's/\r//' docs/*.html
 
 
 %build
 make %{?_smp_mflags} -f Makefile.GNU.all TARGET=ALLEGRO FT_LIB=-lfreetype \
-  CFLAGS="$RPM_OPT_FLAGS -I/usr/include/freetype2" lib
+  CFLAGS="$RPM_OPT_FLAGS -fpic -I/usr/include/freetype2" lib
+gcc -shared -o libglyph-alleg.so.0 -Wl,-soname,libglyph-alleg.so.0 \
+  obj/glyph-alleg.o
 
 make %{?_smp_mflags} -f Makefile.GNU.all TARGET=SDL FT_LIB=-lfreetype \
-  CFLAGS="$RPM_OPT_FLAGS -I/usr/include/freetype2" lib
+  CFLAGS="$RPM_OPT_FLAGS -fpic -I/usr/include/freetype2" lib
+gcc -shared -o libglyph-sdl.so.0 -Wl,-soname,libglyph-sdl.so.0 obj/glyph-sdl.o
 
 
 %install
 rm -rf $RPM_BUILD_ROOT
 mkdir -p $RPM_BUILD_ROOT%{_libdir}
 mkdir -p $RPM_BUILD_ROOT%{_includedir}
-install -m 644 obj/libglyph-*.a $RPM_BUILD_ROOT%{_libdir}
+install -m 755 libglyph-*.so.0 $RPM_BUILD_ROOT%{_libdir}
+ln -s libglyph-alleg.so.0 $RPM_BUILD_ROOT%{_libdir}/libglyph-alleg.so
+ln -s libglyph-sdl.so.0 $RPM_BUILD_ROOT%{_libdir}/libglyph-sdl.so
 install -m 644 include/glyph.h $RPM_BUILD_ROOT%{_includedir}
 
 
@@ -57,14 +63,27 @@
 rm -rf $RPM_BUILD_ROOT
 
 
-%files devel
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+
+%files
 %defattr(-,root,root,-)
 %doc license.txt changes.txt authors.txt docs/*
+%{_libdir}/libglyph-*.so.*
+
+%files devel
+%defattr(-,root,root,-)
 %{_includedir}/glyph.h
-%{_libdir}/libglyph-*.a
+%{_libdir}/libglyph-*.so
 
 
 %changelog
+* Mon Aug 28 2006 Hans de Goede <j.w.r.degoede at hhs.nl> 0.29.1-4
+- Fix building with newer freetype
+- Build .so files instead of a static lib
+
 * Mon Aug 28 2006 Hans de Goede <j.w.r.degoede at hhs.nl> 0.29.1-3
 - FE6 Rebuild
 




More information about the fedora-extras-commits mailing list