From cac282a9482b25f8ca015826eba5cfe5a06b1eb3 Mon Sep 17 00:00:00 2001 From: wolf Date: Sat, 20 Oct 2007 22:12:34 +0000 Subject: [PATCH] - fix shared library creation Changed files: crossmingw32-freetype.spec -> 1.9 --- crossmingw32-freetype.spec | 50 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/crossmingw32-freetype.spec b/crossmingw32-freetype.spec index 178df1a..8fde50a 100644 --- a/crossmingw32-freetype.spec +++ b/crossmingw32-freetype.spec @@ -110,14 +110,59 @@ CFLAGS="%{rpmcflags} \ %{__make} +# link shared library +cd objs/.libs +%{__cc} \ + --shared *.o -llualib50 -llua50 -lm -o libfreetype.dll \ + -Wl,--enable-auto-image-base -Wl,--out-implib,libfreetype.dll.a -lz +cd ../.. + +cat << "EOF" >> libfreetype.la +# libfreetype.la - a libtool library file +# Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) + +# The name that we can dlopen(3). +dlname='' + +# Names of this library. +library_names='libfreetype.dll.a' + +# The name of the static archive. +old_library='libfreetype.a' + +# Libraries that this one depends upon. +dependency_libs=' -lz' + +# Version information for libfreetype. +current=9 +age=3 +revision=16 + +# Is this an already installed library? +installed=yes + +# Should we warn about portability when linking against -modules? +shouldnotlink=no + +# Files to dlopen/dlpreopen +dlopen='' +dlpreopen='' + +# Directory that this library needs to be installed in: +libdir='%{_libdir}' +EOF + %install rm -rf $RPM_BUILD_ROOT %{__make} install \ DESTDIR=$RPM_BUILD_ROOT +install libfreetype.la $RPM_BUILD_ROOT%{_libdir} + install -d $RPM_BUILD_ROOT%{_dlldir} -mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir} +install objs/.libs/libfreetype.dll $RPM_BUILD_ROOT%{_dlldir} +install objs/.libs/libfreetype.dll.a $RPM_BUILD_ROOT%{_libdir} %if 0%{!?debug:1} %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll @@ -132,6 +177,7 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,root,755) %doc docs/{CHANGES,FTL.TXT,LICENSE.TXT,PATENTS,TODO,formats.txt,raster.txt} +%{_bindir}/freetype-config %{_libdir}/libfreetype.dll.a %{_libdir}/libfreetype.la %{_includedir}/freetype2 @@ -144,4 +190,4 @@ rm -rf $RPM_BUILD_ROOT %files dll %defattr(644,root,root,755) -%{_dlldir}/libfreetype-*.dll +%{_dlldir}/libfreetype.dll -- 2.43.0