Mercurial > gub
changeset 5167:087b8fc6b8d8
LIBRESTRICT_ALLOW cleanups.
author | Jan Nieuwenhuizen <janneke@gnu.org> |
---|---|
date | Tue, 17 Feb 2009 16:22:58 +0100 |
parents | dd11858b78e9 |
children | abbf5a86ec69 |
files | gub/misc.py gub/specs/freetype.py gub/specs/python.py gub/specs/rebase.py |
diffstat | 4 files changed, 14 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/gub/misc.py Tue Feb 17 16:22:21 2009 +0100 +++ b/gub/misc.py Tue Feb 17 16:22:58 2009 +0100 @@ -626,6 +626,16 @@ return list (sorted (os.environ.get ('LIBRESTRICT', 'open').replace (':', ' ').split (' '))) +def librestrict_allow (): + if not 'stat' in librestrict (): + return '' + bin = ['egrep', 'fgrep', 'grep', 'sed'] + usr_bin = ['awk', 'mawk', 'nawk'] + return (' LIBRESTRICT_ALLOW=' + + ':'.join (['/bin/' + x for x in bin] + + ['/usr/bin/' + x for x in usr_bin]) + + ':${LIBRESTRICT_ALLOW-/foo} ') + def test (): printf (forall (x for x in [1, 1])) printf (dissect_url ('git://anongit.freedesktop.org/git/fontconfig?revision=1234'))
--- a/gub/specs/freetype.py Tue Feb 17 16:22:21 2009 +0100 +++ b/gub/specs/freetype.py Tue Feb 17 16:22:58 2009 +0100 @@ -17,7 +17,7 @@ # build system is unix?? # target.append_target_dict (self, {'LIBRESTRICT_ALLOW': '/sbin:/usr/sbin:/hurd'}) if 'stat' in misc.librestrict (): - target.add_target_dict (self, {'LIBRESTRICT_ALLOW': '/usr/lib/gcc:/usr/libexec/gcc:/sbin:/usr/sbin:/hurd'}) + target.add_target_dict (self, {'LIBRESTRICT_ALLOW': '/usr/lib/gcc:/usr/libexec/gcc:/sbin:/usr/sbin:/hurd:${LIBRESTRICT_ALLOW-/foo}'}) def license_files (self): return ['%(srcdir)s/docs/LICENSE.TXT'] def _get_build_dependencies (self):
--- a/gub/specs/python.py Tue Feb 17 16:22:21 2009 +0100 +++ b/gub/specs/python.py Tue Feb 17 16:22:58 2009 +0100 @@ -56,7 +56,7 @@ def install_command (self): relax = '' if 'stat' in misc.librestrict (): - relax = 'LIBRESTRICT_ALLOW=/usr/lib/python2.4/lib-dynload:$LIBRESTRICT_ALLOW ' + relax = 'LIBRESTRICT_ALLOW=/usr/lib/python2.4/lib-dynload:${LIBRESTRICT_ALLOW-/foo} ' return (relax + target.AutoBuild.install_command (self)) def install (self): @@ -147,7 +147,7 @@ def install_command (self): relax = '' if 'stat' in misc.librestrict (): - relax = 'LIBRESTRICT_ALLOW=/usr/lib/python2.4/lib-dynload:$LIBRESTRICT_ALLOW ' + relax = 'LIBRESTRICT_ALLOW=/usr/lib/python2.4/lib-dynload:${LIBRESTRICT_ALLOW-/foo} ' return (relax + tools.AutoBuild.install_command (self)) def wrap_executables (self):
--- a/gub/specs/rebase.py Tue Feb 17 16:22:21 2009 +0100 +++ b/gub/specs/rebase.py Tue Feb 17 16:22:58 2009 +0100 @@ -16,7 +16,7 @@ CC=i686-mingw32-gcc CXX=i686-mingw32-g++ AR=i686-mingw32-ar -LIBRESTRICT_ALLOW=%(targetdir)s +LIBRESTRICT_ALLOW=%(targetdir)s:${LIBRESTRICT_ALLOW-/foo} PREFIX=%(system_prefix)s ''') # C&P from nsis. Should move to mingw.