aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/libiconv/libiconv-1.12/preload.patch
blob: 3b818149512ed9cfade1f6f1b9c14fccfaf47dfc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
Index: libiconv-1.12/Makefile.in
===================================================================
--- libiconv-1.12.orig/Makefile.in	2007-03-20 02:50:46.000000000 +0100
+++ libiconv-1.12/Makefile.in	2008-06-07 00:29:42.753386009 +0200
@@ -31,6 +31,7 @@
 
 all : lib/localcharset.h force
 	cd lib && $(MAKE) all
+	cd preload && $(MAKE) all
 	cd srclib && $(MAKE) all
 	cd src && $(MAKE) all
 	cd po && $(MAKE) all
@@ -50,6 +51,7 @@
 install : lib/localcharset.h force
 	cd libcharset && $(MAKE) install prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
 	cd lib && $(MAKE) install prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
+	cd preload && $(MAKE) install prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
 	cd srclib && $(MAKE) install prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
 	cd src && $(MAKE) install prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
 	if [ ! -d $(DESTDIR)$(includedir) ] ; then $(mkinstalldirs) $(DESTDIR)$(includedir) ; fi
@@ -60,6 +62,7 @@
 installdirs : force
 	cd libcharset && $(MAKE) installdirs prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
 	cd lib && $(MAKE) installdirs prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
+	cd preload && $(MAKE) installdirs prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
 	cd srclib && $(MAKE) installdirs prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
 	cd src && $(MAKE) installdirs prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
 	if [ ! -d $(DESTDIR)$(includedir) ] ; then $(mkinstalldirs) $(DESTDIR)$(includedir) ; fi
@@ -69,6 +72,7 @@
 uninstall : force
 	cd libcharset && $(MAKE) uninstall prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
 	cd lib && $(MAKE) uninstall prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
+	cd preload && $(MAKE) uninstall prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
 	cd srclib && $(MAKE) uninstall prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
 	cd src && $(MAKE) uninstall prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
 	$(RM) $(DESTDIR)$(includedir)/iconv.h
@@ -78,6 +82,7 @@
 check : all force
 	cd libcharset && $(MAKE) check
 	cd lib && $(MAKE) check
+	cd preload && $(MAKE) check
 	cd srclib && $(MAKE) check
 	cd src && $(MAKE) check
 	cd po && $(MAKE) check
@@ -88,6 +93,7 @@
 	cd libcharset && $(MAKE) mostlyclean
 	$(RM) lib/charset.alias lib/libcharset.* lib/localcharset.h
 	cd lib && $(MAKE) mostlyclean
+	cd preload && $(MAKE) mostlyclean
 	cd srclib && $(MAKE) mostlyclean
 	cd src && $(MAKE) mostlyclean
 	cd po && $(MAKE) mostlyclean
@@ -99,6 +105,7 @@
 	cd libcharset && $(MAKE) clean
 	$(RM) lib/charset.alias lib/libcharset.* lib/localcharset.h
 	cd lib && $(MAKE) clean
+	cd preload && $(MAKE) clean
 	cd srclib && $(MAKE) clean
 	cd src && $(MAKE) clean
 	cd po && $(MAKE) clean
@@ -110,6 +117,7 @@
 	cd libcharset && if test -f Makefile; then $(MAKE) distclean; fi
 	$(RM) lib/charset.alias lib/libcharset.* lib/localcharset.h
 	cd lib && if test -f Makefile; then $(MAKE) distclean; fi
+	cd preload && if test -f Makefile; then $(MAKE) distclean; fi
 	cd srclib && if test -f Makefile; then $(MAKE) distclean; fi
 	cd src && if test -f Makefile; then $(MAKE) distclean; fi
 	cd po && if test -f Makefile; then $(MAKE) distclean; fi
@@ -124,6 +132,7 @@
 	cd libcharset && if test -f Makefile; then $(MAKE) maintainer-clean; fi
 	$(RM) lib/charset.alias lib/libcharset.* lib/localcharset.h
 	cd lib && if test -f Makefile; then $(MAKE) maintainer-clean; fi
+	cd preload && if test -f Makefile; then $(MAKE) maintainer-clean; fi
 	cd srclib && if test -f Makefile; then $(MAKE) maintainer-clean; fi
 	cd src && if test -f Makefile; then $(MAKE) maintainer-clean; fi
 	cd po && if test -f Makefile; then $(MAKE) maintainer-clean; fi
Index: libiconv-1.12/lib/Makefile.in
===================================================================
--- libiconv-1.12.orig/lib/Makefile.in	2007-05-28 00:15:31.000000000 +0200
+++ libiconv-1.12/lib/Makefile.in	2008-06-07 00:29:42.753386009 +0200
@@ -64,41 +64,11 @@
 OBJECTS_RES_yes = libiconv.res
 OBJECTS_RES_no =
 
-all : @PLUGLIB@ libiconv.la
+all : libiconv.la
 
 libiconv.la : $(OBJECTS)
 	$(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(CFLAGS) -o libiconv.la -rpath $(libdir) -version-info $(LIBICONV_VERSION_INFO) -no-undefined $(OBJECTS)
 
-preloadable_libiconv.so : preloadable_libiconv_@OS@.so
-	$(RM) preloadable_libiconv.so
-	$(LN_S) preloadable_libiconv_@OS@.so preloadable_libiconv.so
-
-preloadable_libiconv_linux.so : $(SOURCES)
-	if test -n "@GCC@"; then \
-	  $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(DEFS) -fPIC -DPIC -DLIBICONV_PLUG $(SOURCES) -shared -o preloadable_libiconv_linux.so; \
-	else \
-	  $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(DEFS) -KPIC -DPIC -DLIBICONV_PLUG $(SOURCES) -shared -o preloadable_libiconv_linux.so; \
-	fi
-
-preloadable_libiconv_solaris.so : $(SOURCES)
-	if test -n "@GCC@"; then \
-	  $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(DEFS) -fPIC -DPIC -DLIBICONV_PLUG $(SOURCES) -shared -o preloadable_libiconv_solaris.so; \
-	else \
-	  $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(DEFS) -KPIC -DPIC -DLIBICONV_PLUG $(SOURCES) -G -o preloadable_libiconv_solaris.so; \
-	fi
-
-preloadable_libiconv_osf.so : $(SOURCES)
-	if test -n "@GCC@"; then \
-	  $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(DEFS) -fPIC -DPIC -DLIBICONV_PLUG $(SOURCES) -shared -o preloadable_libiconv_osf.so; \
-	else \
-	  mkdir objects; \
-	  for f in $(SOURCES); do \
-	    $(CC) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(DEFS) -DPIC -DLIBICONV_PLUG -c $$f -o objects/`basename $$f | sed -e 's,\.c$$,.o,'`; \
-	  done; \
-	  /bin/ld -shared -expect_unresolved \* -o preloadable_libiconv_osf.so objects/*.o; \
-	  rm -rf objects; \
-	fi
-
 iconv.lo : $(srcdir)/iconv.c $(srcdir)/converters.h $(srcdir)/encodings.def $(srcdir)/encodings_aix.def $(srcdir)/encodings_osf1.def $(srcdir)/encodings_dos.def $(srcdir)/encodings_local.def $(srcdir)/aliases.h $(srcdir)/aliases_aix.h $(srcdir)/aliases_osf1.h $(srcdir)/aliases_dos.h $(srcdir)/flags.h
 	$(LIBTOOL_COMPILE) $(CC) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(DEFS) -c $(srcdir)/iconv.c
 
@@ -134,21 +104,19 @@
 	         rm -f $$objects && \
 	         mv -f libiconv.new.a libiconv.a) ;; \
 	esac
-	if test -n "@PLUGLIB@"; then $(INSTALL_DATA) @PLUGLIB@ $(DESTDIR)$(libdir)/@PLUGLIB@.new && mv $(DESTDIR)$(libdir)/@PLUGLIB@.new $(DESTDIR)$(libdir)/@PLUGLIB@ ; fi
 
 installdirs : force
 	if [ ! -d $(DESTDIR)$(libdir) ] ; then $(mkinstalldirs) $(DESTDIR)$(libdir) ; fi
 
 uninstall : force
 	$(LIBTOOL_UNINSTALL) $(RM) $(DESTDIR)$(libdir)/libiconv.la
-	if test -n "@PLUGLIB@"; then $(RM) $(DESTDIR)$(libdir)/@PLUGLIB@ ; fi
 
 check : all
 
 mostlyclean : clean
 
 clean : force
-	$(RM) *.o *.lo libiconv.res *.a *.la preloadable_libiconv* core *.stackdump so_locations
+	$(RM) *.o *.lo libiconv.res *.a *.la core *.stackdump so_locations
 	$(RM) -r .libs _libs
 
 distclean : clean
Index: libiconv-1.12/preload/configure.ac
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ libiconv-1.12/preload/configure.ac	2008-06-07 00:29:42.753386009 +0200
@@ -0,0 +1,78 @@
+dnl Copyright (C) 1999-2008 Free Software Foundation, Inc.
+dnl This file is part of the GNU LIBICONV Library.
+dnl
+dnl The GNU LIBICONV Library is free software; you can redistribute it and/or
+dnl modify it under the terms of the GNU Library General Public License as
+dnl published by the Free Software Foundation; either version 2 of the
+dnl License, or (at your option) any later version.
+dnl
+dnl The GNU LIBICONV Library is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl Library General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU Library General Public License
+dnl along with the GNU LIBICONV Library; see the file COPYING.LIB.  If not,
+dnl write to the Free Software Foundation, Inc., 51 Franklin Street,
+dnl Fifth Floor, Boston, MA 02110-1301, USA.
+
+AC_PREREQ([2.60])
+
+PACKAGE=libiconv
+VERSION=0
+
+AC_INIT(configure.ac)
+AC_CONFIG_AUX_DIR(../build-aux)
+AC_PROG_MAKE_SET
+AC_SUBST(PACKAGE)
+AC_SUBST(VERSION)
+
+dnl           checks for basic programs
+
+AC_PROG_CC
+AC_PROG_CPP
+AC_PROG_INSTALL
+
+dnl           check for host type
+
+AC_CANONICAL_HOST
+
+dnl           checks for installer options
+
+gl_RELOCATABLE_LIBRARY
+
+dnl           checks for programs
+
+AC_PROG_LN_S
+
+dnl           checks for UNIX variants that set DEFS
+
+AC_USE_SYSTEM_EXTENSIONS
+
+dnl           checks for compiler output filename suffixes
+
+AC_OBJEXT
+AC_EXEEXT
+
+dnl           check for build configuration
+
+dnl Here we need to build shared object files, regardless whether the user
+dnl wants to the libiconv library itself to be installed shared or static or
+dnl both.
+enable_shared=yes
+enable_static=no
+LT_INIT([win32-dll])
+gl_VISIBILITY
+
+dnl           check whether OS supports plug libraries
+
+case "$host_os" in
+  linux* | solaris* | osf*)
+    PLUGLIB="preloadable_libiconv.so" ;;
+  *)
+    PLUGLIB=""
+esac
+AC_SUBST(PLUGLIB)
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
Index: libiconv-1.12/preload/Makefile.devel
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ libiconv-1.12/preload/Makefile.devel	2008-06-07 00:29:42.753386009 +0200
@@ -0,0 +1,21 @@
+# This is the developer's makefile, not the user's makefile.
+# Don't use it unless you know exactly what you do!
+
+SHELL = /bin/sh
+MAKE = make
+AUTOCONF = autoconf-2.62
+ACLOCAL = aclocal-1.10
+CP = cp
+RM = rm -f
+
+all : configures
+
+aclocal.m4 : $(wildcard ../m4/*.m4)
+	$(ACLOCAL) -I ../m4 -I ../srcm4 --output=$@
+
+configures : configure
+
+configure : configure.ac aclocal.m4
+	$(AUTOCONF)
+
+force :
Index: libiconv-1.12/preload/Makefile.in
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ libiconv-1.12/preload/Makefile.in	2008-06-07 00:29:42.756717414 +0200
@@ -0,0 +1,83 @@
+# Makefile for libiconv/preload
+
+#### Start of system configuration section. ####
+
+# Directories used by "make":
+srcdir = @srcdir@
+
+# Directories used by "make install":
+prefix = @prefix@
+local_prefix = /usr/local
+exec_prefix = @exec_prefix@
+libdir = @libdir@
+
+# Programs used by "make":
+CC = @CC@
+CFLAGS = @CFLAGS@ @CFLAG_VISIBILITY@
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+INCLUDES = -I../lib -I$(srcdir)/../lib -I../include -I$(srcdir)/../include -I.. -I$(srcdir)/..
+# -DBUILDING_LIBICONV: Change expansion of LIBICONV_DLL_EXPORTED macro.
+# -DBUILDING_DLL: Change expansion of RELOCATABLE_DLL_EXPORTED macro.
+DEFS = -DLIBDIR=\"$(libdir)\" -DBUILDING_LIBICONV -DBUILDING_DLL \
+-DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"$(libdir)\" -DNO_XMALLOC \
+-Dset_relocation_prefix=libiconv_set_relocation_prefix \
+-Drelocate=libiconv_relocate @DEFS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_COMPILE = $(LIBTOOL) --mode=compile
+LIBTOOL_LINK = $(LIBTOOL) --mode=link
+LN_S = @LN_S@
+RM = rm -f
+
+# Programs used by "make install":
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+mkinstalldirs = $(SHELL) @top_srcdir@/build-aux/mkinstalldirs
+
+#### End of system configuration section. ####
+
+SHELL = /bin/sh
+
+# Needed by $(LIBTOOL).
+top_builddir = .
+
+SOURCES = $(srcdir)/../lib/iconv.c $(srcdir)/../libcharset/lib/localcharset.c $(srcdir)/../lib/relocatable.c
+
+all : @PLUGLIB@
+
+preloadable_libiconv.so : $(SOURCES)
+	$(RM) -r objects
+	mkdir objects && \
+	for f in $(SOURCES); do \
+	  $(LIBTOOL_COMPILE) $(CC) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(DEFS) -DLIBICONV_PLUG -c $$f -o objects/`basename $$f | sed -e 's,\.c$$,.o,'` || exit 1; \
+	done && \
+	$(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(CFLAGS) -o libiconv.la -rpath $(libdir) -no-undefined objects/*.lo && \
+	$(RM) -r objects
+	cp .libs/libiconv.so preloadable_libiconv.so
+
+install : all force
+	if [ ! -d $(DESTDIR)$(libdir) ] ; then $(mkinstalldirs) $(DESTDIR)$(libdir) ; fi
+	if test -n "@PLUGLIB@"; then $(INSTALL_DATA) @PLUGLIB@ $(DESTDIR)$(libdir)/@PLUGLIB@.new && mv $(DESTDIR)$(libdir)/@PLUGLIB@.new $(DESTDIR)$(libdir)/@PLUGLIB@ ; fi
+
+installdirs : force
+	if [ ! -d $(DESTDIR)$(libdir) ] ; then $(mkinstalldirs) $(DESTDIR)$(libdir) ; fi
+
+uninstall : force
+	if test -n "@PLUGLIB@"; then $(RM) $(DESTDIR)$(libdir)/@PLUGLIB@ ; fi
+
+check : all
+
+mostlyclean : clean
+
+clean : force
+	$(RM) *.o *.lo *.a *.la preloadable_libiconv* core *.stackdump so_locations
+	$(RM) -r .libs _libs objects
+
+distclean : clean
+	$(RM) config.status config.log config.cache Makefile libtool
+
+maintainer-clean : distclean
+
+force :
+
Index: libiconv-1.12/configure.ac
===================================================================
--- libiconv-1.12.orig/configure.ac	2008-06-07 00:35:12.706686714 +0200
+++ libiconv-1.12/configure.ac	2008-06-07 00:36:05.351174592 +0200
@@ -121,23 +121,6 @@
 m4_popdef([AC_LIBOBJ])
 AC_SUBST([SRCLIBOBJS])
 
-dnl           check whether OS supports plug libraries
-
-OS=""
-case "$host_os" in
-  linux*)   OS="linux" ;;
-  solaris*) OS="solaris" ;;
-  osf*)     OS="osf" ;;
-esac
-if test -n "$OS"; then
-  AC_SUBST(OS)
-  AC_SUBST(GCC)
-  PLUGLIB="preloadable_libiconv.so"
-else
-  PLUGLIB=""
-fi
-AC_SUBST(PLUGLIB)
-
 dnl Compilation on mingw and Cygwin needs special Makefile rules, because
 dnl 1. when we install a shared library, we must arrange to export
 dnl    auxiliary pointer variables for every exported variable,
@@ -185,6 +168,7 @@
 ])
 
 AC_CONFIG_SUBDIRS(libcharset)
+AC_CONFIG_SUBDIRS(preload)
 AC_CONFIG_FILES([Makefile])
 AC_CONFIG_FILES([lib/Makefile])
 AC_CONFIG_FILES([srclib/Makefile])