Commit 5e4e0bd7 authored by David Flynn's avatar David Flynn Committed by Konstantin Pavlov

Patch to fix liboil build when --disable-shared

Without --enable-shared, libtool doesn't generate symbol lists.  Use
some autogenerated-libtool-internals to sort it out.

Tested with: gcc on linux-amd64, mingw crosscompile, apple-os10.5
Signed-off-by: Konstantin Pavlov's avatarPavlov Konstantin <thresh@videolan.org>
parent 10d809da
......@@ -2424,6 +2424,7 @@ liboil-$(OIL_VERSION).tar.gz:
liboil: liboil-$(OIL_VERSION).tar.gz
$(EXTRACT_GZ)
patch -d liboil -p1 < Patches/liboil-noshared.patch
.liboil: liboil
(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) && make && make install)
......
--- liboil-0.3.15/liboil/Makefile.in 2008-07-01 04:46:08.000000000 +0000
+++ liboil/liboil/Makefile.in 2008-07-04 23:09:27.518585545 +0000
@@ -1207,25 +1207,30 @@
liboilarray.c: liboiltmp1.la Makefile
+ ../libtool --config > .libs/libtoolcfg
echo '/* This file is autogenerated. Do not edit */' >liboilarray.c.tmp
echo >>liboilarray.c.tmp
echo '#include <liboil/liboilfunction.h>' >>liboilarray.c.tmp
echo >>liboilarray.c.tmp
- grep '^_oil_function_class_' .libs/liboiltmp1.exp | \
- sed -e 's/ .*//' -e 's/.*/extern OilFunctionClass &;/' >>liboilarray.c.tmp
+ . .libs/libtoolcfg; eval "$$NM .libs/liboiltmp1.a | $$global_symbol_pipe " | \
+ sed -e /^[^D]/D -e 's/^. [^ ]* \([^ ]*\)/\1/' | grep ^_oil_function_class_ | \
+ sed -e 's/.*/extern OilFunctionClass &;/' >>liboilarray.c.tmp
echo >>liboilarray.c.tmp
echo 'OilFunctionClass *_oil_function_class_array[] = {' >>liboilarray.c.tmp
- grep '^_oil_function_class_' .libs/liboiltmp1.exp | \
- sed -e 's/ .*//' -e 's/.*/ \&&,/' >>liboilarray.c.tmp
+ . .libs/libtoolcfg; eval "$$NM .libs/liboiltmp1.a | $$global_symbol_pipe " | \
+ sed -e /^[^D]/D -e 's/^. [^ ]* \([^ ]*\)/\1/' | grep ^_oil_function_class_ | \
+ sed -e 's/.*/ \&&,/' >>liboilarray.c.tmp
echo ' NULL' >>liboilarray.c.tmp
echo '};' >>liboilarray.c.tmp
echo >>liboilarray.c.tmp
- grep '^_oil_function_impl_' .libs/liboiltmp1.exp | \
- sed -e 's/ .*//' -e 's/.*/extern OilFunctionImpl &;/' >>liboilarray.c.tmp
+ . .libs/libtoolcfg; eval "$$NM .libs/liboiltmp1.a | $$global_symbol_pipe " | \
+ sed -e /^[^D]/D -e 's/^. [^ ]* \([^ ]*\)/\1/' | grep ^_oil_function_impl_ | \
+ sed -e 's/.*/extern OilFunctionImpl &;/' >>liboilarray.c.tmp
echo >>liboilarray.c.tmp
echo 'OilFunctionImpl *_oil_function_impl_array[] = {' >>liboilarray.c.tmp
- grep '^_oil_function_impl_' .libs/liboiltmp1.exp | \
- sed -e 's/ .*//' -e 's/.*/ \&&,/' >>liboilarray.c.tmp
+ . .libs/libtoolcfg; eval "$$NM .libs/liboiltmp1.a | $$global_symbol_pipe " | \
+ sed -e /^[^D]/D -e 's/^. [^ ]* \([^ ]*\)/\1/' | grep ^_oil_function_impl_ | \
+ sed -e 's/.*/ \&&,/' >>liboilarray.c.tmp
echo ' NULL' >>liboilarray.c.tmp
echo '};' >>liboilarray.c.tmp
echo >>liboilarray.c.tmp
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment