]> git.pld-linux.org Git - packages/fontforge.git/blame - fontforge-sonames.patch
- fixed locale name for Mayalayam, rel. 2
[packages/fontforge.git] / fontforge-sonames.patch
CommitLineData
2adc59ac
JB
1--- fontforge-20040404/fontforge/freetype.c.orig 2003-07-01 22:38:00.000000000 +0200
2+++ fontforge-20040404/fontforge/freetype.c 2003-08-08 23:03:00.000000000 +0200
3@@ -132,7 +132,7 @@
4 # endif
5
6 static int freetype_init_base() {
7- libfreetype = dlopen("libfreetype" SO_EXT,RTLD_LAZY);
8+ libfreetype = dlopen(LIBFREETYPE_SONAME,RTLD_LAZY);
9 if ( libfreetype==NULL )
10 return( false );
11
10c1b495
JB
12--- fontforge-20050310/fontforge/start.c.orig 2005-02-18 05:32:53.000000000 +0100
13+++ fontforge-20050310/fontforge/start.c 2005-04-30 15:04:22.807032552 +0200
14@@ -100,9 +100,9 @@
15
16 # ifdef LIBDIR
17 # if !defined(_NO_SNPRINTF) && !defined(VMS)
18- snprintf( full, sizeof(full), "%s/%s", LIBDIR, buf );
19+ snprintf( full, sizeof(full), "%s/%s%s", LIBDIR, buf, LIBUNINAMESLIST_SOEXT );
20 # else
21- sprintf( full, "%s/%s", LIBDIR, buf );
22+ sprintf( full, "%s/%s%s", LIBDIR, buf, LIBUNINAMESLIST_SOEXT );
23 # endif
24 libuninames = dlopen( full,RTLD_LAZY);
25 # endif
cfe21fb1
KK
26--- fontforge-20051205/fontforge/svg.c.orig 2005-10-18 06:44:21.000000000 +0200
27+++ fontforge-20051205/fontforge/svg.c 2005-12-25 01:55:05.000000000 +0100
28@@ -773,7 +773,7 @@
2adc59ac
JB
29 if ( xmltested )
30 return( libxml!=NULL );
31
cfe21fb1 32- libxml = dlopen( "libxml2" SO_EXT,RTLD_LAZY);
2adc59ac
JB
33+ libxml = dlopen(LIBXML2_SONAME,RTLD_LAZY);
34 xmltested = true;
35 if ( libxml==NULL )
36 return( false );
59a83397
JB
37--- fontforge-20051028/gdraw/gchardlg.c.orig 2005-09-30 03:19:49.000000000 +0200
38+++ fontforge-20051028/gdraw/gchardlg.c 2005-10-29 21:25:59.401142888 +0200
2adc59ac
JB
39@@ -345,10 +345,10 @@
40 #else
41 DL_CONST void *libuninames=NULL;
42 # ifdef LIBDIR
59a83397
JB
43- libuninames = dlopen( LIBDIR "/" "libuninameslist" SO_EXT,RTLD_LAZY);
44+ libuninames = dlopen( LIBDIR "/" "libuninameslist" LIBUNINAMESLIST_SOEXT,RTLD_LAZY);
2adc59ac
JB
45 # endif
46 if ( libuninames==NULL )
47- libuninames = dlopen( "libuninameslist" SO_EXT,RTLD_LAZY);
10c1b495 48+ libuninames = dlopen( "libuninameslist" LIBUNINAMESLIST_SOEXT,RTLD_LAZY);
2adc59ac
JB
49 if ( libuninames!=NULL )
50 _UnicodeNameAnnot = dlsym(libuninames,"UnicodeNameAnnot");
51 #endif
52--- pfaedit-030803/gdraw/gimagereadgif.c.orig 2003-03-11 00:37:19.000000000 +0100
53+++ pfaedit-030803/gdraw/gimagereadgif.c 2003-08-08 22:55:56.000000000 +0200
54@@ -48,9 +48,7 @@
55 static int loadgif() {
56 char *err;
57
58- libgif = dlopen("libungif" SO_EXT,RTLD_LAZY);
59- if ( libgif==NULL )
60- libgif = dlopen("libgif" SO_EXT,RTLD_LAZY);
61+ libgif = dlopen(LIBUNGIF_SONAME,RTLD_LAZY);
62 if ( libgif==NULL ) {
63 GDrawIError("%s", dlerror());
64 return( 0 );
65--- pfaedit-030803/gdraw/gimagereadjpeg.c.orig 2003-03-11 00:37:19.000000000 +0100
66+++ pfaedit-030803/gdraw/gimagereadjpeg.c 2003-08-08 22:56:50.000000000 +0200
67@@ -52,7 +52,7 @@
68 static int loadjpeg() {
69 char *err;
70
71- libjpeg = dlopen("libjpeg" SO_EXT,RTLD_LAZY);
72+ libjpeg = dlopen(LIBJPEG_SONAME,RTLD_LAZY);
73 if ( libjpeg==NULL ) {
74 GDrawIError("%s", dlerror());
75 return( 0 );
76--- pfaedit-030803/gdraw/gimagereadpng.c.orig 2003-03-11 00:37:19.000000000 +0100
77+++ pfaedit-030803/gdraw/gimagereadpng.c 2003-08-08 23:35:01.000000000 +0200
78@@ -59,9 +59,9 @@
79
80 static int loadpng() {
81 # if !defined(_LIBPNG12)
82- libpng = dlopen("libpng" SO_EXT,RTLD_LAZY);
83+ libpng = dlopen(LIBPNG_SONAME,RTLD_LAZY);
84 # else /* After version 1.2.1 (I think) dynamic libpng is called libpng12 */
85- libpng = dlopen("libpng12" SO_EXT,RTLD_LAZY);
86+ libpng = dlopen(LIBPNG12_SONAME,RTLD_LAZY);
87 # endif
88 if ( libpng==NULL ) {
89 GDrawIError("%s", dlerror());
90--- pfaedit-030803/gdraw/gimagereadtiff.c.orig 2003-03-11 00:37:19.000000000 +0100
91+++ pfaedit-030803/gdraw/gimagereadtiff.c 2003-08-08 22:57:41.000000000 +0200
92@@ -47,7 +47,7 @@
93 static int (*_TIFFClose)(TIFF *);
94
95 static int loadtiff() {
96- libtiff = dlopen("libtiff" SO_EXT,RTLD_LAZY);
97+ libtiff = dlopen(LIBTIFF_SONAME,RTLD_LAZY);
98 if ( libtiff==NULL ) {
99 GDrawIError("%s", dlerror());
100 return( 0 );
101--- pfaedit-030803/gdraw/gimagewritejpeg.c.orig 2003-03-11 00:37:19.000000000 +0100
102+++ pfaedit-030803/gdraw/gimagewritejpeg.c 2003-08-08 22:58:06.000000000 +0200
103@@ -55,7 +55,7 @@
104 static int loadjpeg() {
105 char *err;
106
107- libjpeg = dlopen("libjpeg" SO_EXT,RTLD_LAZY);
108+ libjpeg = dlopen(LIBJPEG_SONAME,RTLD_LAZY);
109 if ( libjpeg==NULL ) {
110 GDrawIError("%s", dlerror());
111 return( 0 );
112--- pfaedit-030803/gdraw/gimagewritepng.c.orig 2003-03-11 00:37:19.000000000 +0100
113+++ pfaedit-030803/gdraw/gimagewritepng.c 2003-08-08 23:35:28.000000000 +0200
114@@ -53,9 +53,9 @@
115
116 static int loadpng() {
117 # if !defined(_LIBPNG12)
118- libpng = dlopen("libpng" SO_EXT,RTLD_LAZY);
119+ libpng = dlopen(LIBPNG_SONAME,RTLD_LAZY);
120 # else /* After version 1.2.1 (I think) dynamic libpng is called libpng12 */
121- libpng = dlopen("libpng12" SO_EXT,RTLD_LAZY);
122+ libpng = dlopen(LIBPNG12_SONAME,RTLD_LAZY);
123 # endif
124 if ( libpng==NULL ) {
125 GDrawIError("%s", dlerror());
bf6c489f
JB
126--- fontforge-20060822/configure.in.orig 2006-08-18 21:33:41.000000000 +0200
127+++ fontforge-20060822/configure.in 2006-09-16 13:59:22.074816500 +0200
128@@ -165,13 +165,31 @@
10c1b495
JB
129 AC_CHECK_FILE(/usr/local/include/libxml2/libxml,[CFLAGS="$CFLAGS -I/usr/local/include -I/usr/local/include/libxml2/"],
130 AC_DEFINE(_NO_LIBXML))])
131
132+AC_DEFUN([CHECK_SONAME], [
133+ dir=NONE
134+ libname=lib[$1]
135+ for d in /lib64 /lib /usr/lib64 /usr/lib /usr/X11R6/lib64 /usr/X11R6/lib ; do
136+ if test -f $d/${libname}.so ; then
137+ dir=$d
138+ fi
139+ done
140+ if test "$dir" = "NONE"; then
141+ libsoname=${libname}.so
142+ else
143+ libsoname="`objdump -p ${dir}/${libname}.so | awk '/SONAME/ { print $[]2 }'`"
144+ fi
145+ AC_DEFINE_UNQUOTED([AS_TR_CPP([lib$1]_SONAME)], ["$libsoname"], [$1 SONAME])
146+])
147+
148 dnl Some old versions of lib(un)gif don't work for us, they've got the
bf6c489f
JB
149 dnl Function argument in the wrong place. So check the header files.
150 dnl check for both libgif and libungif, I think they use the same args.
10c1b495 151
bf6c489f 152 AC_CHECK_LIB(gif, DGifOpenFileName, [
10c1b495
JB
153 echo -n checking for ExtensionBlock.Function in gif_lib.h...
154-AC_TRY_COMPILE([#include <gif_lib.h>], [ ExtensionBlock foo; foo.Function=3; ], echo " " yes , [echo " " no
155+AC_TRY_COMPILE([#include <gif_lib.h>], [ ExtensionBlock foo; foo.Function=3; ],
156+ [ echo " " yes
157+ CHECK_SONAME(ungif)], , [echo " " no
158 ac_cv_lib_ungif_DGifOpenFileName=no
159 AC_DEFINE(_NO_LIBUNGIF)])
bf6c489f
JB
160 ] , [
161@@ -187,19 +205,20 @@
10c1b495
JB
162 dnl zlib.h because we never use it directly, only used inside libpng)
163
164 AC_CHECK_LIB(z, deflateEnd, : ,AC_DEFINE(_NO_LIBPNG), -lm)
165-AC_CHECK_LIB(png, png_create_read_struct, : ,[
166- AC_CHECK_LIB(png12, png_create_read_struct, AC_DEFINE(_LIBPNG12), AC_DEFINE(_NO_LIBPNG), -lz -lm)], -lz -lm)
167+AC_CHECK_LIB(png, png_create_read_struct, [CHECK_SONAME(png)] ,[
59a83397
JB
168+ AC_CHECK_LIB(png12, png_create_read_struct, [AC_DEFINE(_LIBPNG12)
169+ CHECK_SONAME(png12)], AC_DEFINE(_NO_LIBPNG), -lz -lm)], -lz -lm)
10c1b495
JB
170 AC_CHECK_HEADER(png.h, : , AC_DEFINE(_NO_LIBPNG))
171-AC_CHECK_LIB(jpeg, jpeg_CreateDecompress, : ,AC_DEFINE(_NO_LIBJPEG))
172+AC_CHECK_LIB(jpeg, jpeg_CreateDecompress, [CHECK_SONAME(jpeg)] ,AC_DEFINE(_NO_LIBJPEG))
173 AC_CHECK_HEADER(jpeglib.h, : , AC_DEFINE(_NO_LIBJPEG))
174-AC_CHECK_LIB(tiff, TIFFOpen, : , AC_DEFINE(_NO_LIBTIFF), -lm )
175+AC_CHECK_LIB(tiff, TIFFOpen, [CHECK_SONAME(tiff)] , AC_DEFINE(_NO_LIBTIFF), -lm )
176 AC_CHECK_HEADER(tiffio.h, : , AC_DEFINE(_NO_LIBTIFF))
59a83397
JB
177 case "$host" in
178 *-pc-cygwin*)
179 AC_CHECK_LIB(xml2, xmlParseFile, : , AC_DEFINE(_NO_LIBXML), [-liconv -lz])
180 ;;
181 *)
182- AC_CHECK_LIB(xml2, xmlParseFile, : , AC_DEFINE(_NO_LIBXML))
183+ AC_CHECK_LIB(xml2, xmlParseFile, [CHECK_SONAME(xml2)] , AC_DEFINE(_NO_LIBXML))
184 ;;
185 esac
10c1b495 186
bf6c489f 187@@ -247,7 +266,7 @@
10c1b495
JB
188 if test "$gww_hasbytecode" = "yes" ; then
189 AC_CHECK_LIB(pthread, pthread_create, LIBS="$LIBS -lpthread", gww_hasbytecode="no")
190 fi
191-
192+CHECK_SONAME(freetype)
193 if test \( "$gww_hasbytecode" = "yes" \) -a \( "$FreeType2_IncRoot" != "" \); then
194 gww_hasbytecode="no"
195 AC_ARG_WITH(freetype-src,
bf6c489f 196@@ -374,6 +393,7 @@
10c1b495
JB
197 STATIC_LIBS="$STATIC_LIBS -luninameslist"
198 AC_DEFINE(_STATIC_LIBUNINAMESLIST) ] , AC_DEFINE(_NO_LIBUNINAMESLIST))
199 fi
200+AC_DEFINE_UNQUOTED([LIBUNINAMESLIST_SOEXT],[".so.0"],[libuninameslist ext])
59a83397 201
bf6c489f
JB
202 dnl used to check for gettext here, but we require a version with b_t_c
203 dnl and not all libintls have that. So check for it instead.
This page took 0.164994 seconds and 4 git commands to generate.