~cypheon/elfelli

ae3f0b9dd27951e133cf714c889193f2f0d834a0 — Johann Rudloff 2 years ago bd0b8f1
Propagate $PATH to SCons files to make gettext binaries available under macOS.
3 files changed, 5 insertions(+), 3 deletions(-)

M .travis.yml
M SConstruct
M tools/gettext.py
M .travis.yml => .travis.yml +1 -1
@@ 11,6 11,6 @@ addons:

before_install:
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install gtkmm scons; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install gettext gtkmm scons; fi

script: scons -j3

M SConstruct => SConstruct +3 -1
@@ 1,5 1,7 @@
# -*- Python -*-

import os

def DefQuote(str):
        return r'\"%s\"' % str



@@ 16,7 18,7 @@ def PkgConfig(context, pkg, version, version_op='>='):
	context.Result(True)
	return True

env = Environment(toolpath=['tools'], tools=['default', 'gettext'])
env = Environment(toolpath=['tools'], tools=['default', 'gettext'], ENV={'PATH': os.environ['PATH']})

opts = Variables('elfelli.conf')
opts.Add(BoolVariable('debug', 'Set to build debug version', 0))

M tools/gettext.py => tools/gettext.py +1 -1
@@ 5,7 5,7 @@ def generate(env, **kw):

    env['MSGFMT'] = env.Detect('msgfmt') or 'msgfmt'

    GettextMOBuilder = Builder(action='msgfmt -o $TARGET $SOURCE',
    GettextMOBuilder = Builder(action=env['MSGFMT'] + ' -o $TARGET $SOURCE',
                               suffix='.mo', src_suffix='.po')
    env['BUILDERS']['MO'] = GettextMOBuilder