Last active
January 25, 2016 14:38
-
-
Save AbigailBuccaneer/54fe0d2d2ea11bc60162 to your computer and use it in GitHub Desktop.
Revisions
-
AbigailBuccaneer revised this gist
Jan 25, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -20,7 +20,7 @@ def build_protoc(root_dir): 'libprotobuf.so.6.0.0', 'libprotoc.so.6', 'libprotoc.so.6.0.0'] targets = [env['protoc']] + [File(os.path.join('usr', 'lib', x)) for x in lib_targets] env['protoc_depends'] = targets env.Command(targets, -
AbigailBuccaneer created this gist
Jan 25, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,30 @@ def glob_recursive(path, pattern, exclude=None): import SCons.Node.FS globbed = Dir(path).glob(pattern, exclude=exclude) sources = [] for source in globbed: if isinstance(source, SCons.Node.FS.Dir): childpath = os.path.join(path, os.path.basename(source.path)) sources += glob_recursive(childpath, pattern, exclude=exclude) else: sources += [source] return sources def build_protoc(root_dir): import os sources = glob_recursive(root_dir, '*', exclude=['*.cache', 'usr', '*.o', '*.lo']) env['protoc'] = File(os.path.join(root_dir, 'usr', 'bin', 'protoc')) lib_targets = [ 'libprotobuf.so.6', 'libprotobuf.so.6.0.0', 'libprotoc.so.6', 'libprotoc.so.6.0.0'] targets = [env['protoc']] + [File(x) for x in PathsIn(os.path.join(root_dir, 'usr', 'lib'), lib_targets)] env['protoc_depends'] = targets env.Command(targets, sources, "./autogen.sh && ./configure --prefix='%s' && make && make install" % Dir(os.path.join(root_dir, 'usr')).abspath, chdir=Dir(root_dir).abspath)