# HG changeset patch # User Jan Nieuwenhuizen # Date 1250793232 -7200 # Node ID b4c4a5def857750d0a067f1d782678b90caf31a5 # Parent 82d782f62ab137e7627a941238bc7828dc331282 coreutils: RPATH build fixes. diff -r 82d782f62ab1 -r b4c4a5def857 gub/specs/coreutils.py --- a/gub/specs/coreutils.py Thu Aug 20 20:05:34 2009 +0200 +++ b/gub/specs/coreutils.py Thu Aug 20 20:33:52 2009 +0200 @@ -1,5 +1,6 @@ import os # +from gub import misc from gub import tools ''' @@ -24,8 +25,8 @@ self.file_sub ([('noinst_LIBRARIES', 'lib_LIBRARIES')], '%(srcdir)s/lib/gnulib.mk') self.file_sub ([ - ('libcoreutils[.]a', 'libcoreutils.so'), - ('([(]LIBINTL[)]) ../lib/libcoreutils.so', r'\1'), + (r'libcoreutils[.]a', 'libcoreutils.so'), + ('[.][.]/lib/libcoreutils.so ([$][(]LIBINTL[)]) [.][.]/lib/libcoreutils.so', r'-L../lib -lcoreutils \1'), ], '%(srcdir)s/src/Makefile.in') def _get_build_dependencies (self): if 'BOOTSTRAP' in os.environ.keys () or no_patch: @@ -43,10 +44,13 @@ return (tools.AutoBuild.configure_command (self) + ' CFLAGS=-fPIC') def makeflags (self): - return ''' LDFLAGS='%(rpath)s' LIBS='$(cp_LDADD) $(ls_LDADD) -lm' RANLIB='mvaso () { test $$(basename $$1) == libcoreutils.a && mv $$1 $$(dirname $$1)/$$(basename $$1 .a).so || : ; }; mvaso ' libcoreutils_a_AR='gcc -shared -o' ''' - def wrap_executables (self): - # using rpath - pass + return misc.join_lines (''' +V=1 +LDFLAGS='%(rpath)s' +LIBS='$(cp_LDADD) $(ls_LDADD) -lm' +RANLIB='mvaso () { test $$(basename $$1) == libcoreutils.a && mv $$1 $$(dirname $$1)/$$(basename $$1 .a).so || : ; }; mvaso ' +libcoreutils_a_AR='gcc -shared -o' +''') def install (self): # The RANLIB/mvaso trick needs libcoreutils.a to exist at install time. self.system ('cd %(builddir)s/lib && ln -f libcoreutils.so libcoreutils.a') @@ -55,3 +59,6 @@ if 'BOOTSTRAP' in os.environ.keys () or no_patch: self.system ('mkdir -p %(install_prefix)s/lib') self.system ('cp -pv %(builddir)s/lib/libcoreutils* %(install_prefix)s/lib') + def wrap_executables (self): + # using rpath + pass