From dd6a107c2a92a5999a6c0e7154133977fb05b061 Mon Sep 17 00:00:00 2001 From: Uwe Meier Date: Fri, 30 Jan 2015 14:16:51 -0500 Subject: [PATCH 01/21] started adding support for MacOS and iOS builds --- bru.sh | 7 +++- bru_common.gypi | 33 +++++++++++++++-- brulib/make.py | 67 ++++++++++++++++++++++++++++++++++ library/boost-regex/1.57.0.gyp | 18 ++++++--- 4 files changed, 116 insertions(+), 9 deletions(-) diff --git a/bru.sh b/bru.sh index 4670235..3197c41 100755 --- a/bru.sh +++ b/bru.sh @@ -10,9 +10,14 @@ # http://unix.stackexchange.com/questions/17499/get-path-of-current-script-when-executed-through-a-symlink # This is brittle & frowned upon, I might change this some time... -script_dir="$(dirname "$(readlink -f "$0")")" +if [ "$(uname)" == "Darwin" ]; then +script_dir="$(dirname "$(readlink "$0")")" +else +script_dir="$(dirname "$(readlink -f "$0")")" +fi $script_dir/autoupdate.py --hours 24 + # after the autoupdate run bru.py, forwarding all cmd line params $script_dir/bru.py $@ diff --git a/bru_common.gypi b/bru_common.gypi index 2e93d34..3647364 100644 --- a/bru_common.gypi +++ b/bru_common.gypi @@ -35,6 +35,19 @@ ["target_arch=='x64'", { "msvs_configuration_platform": "x64", }], + + ['OS=="iOS"', { + 'xcode_settings': { + 'SDKROOT': 'iphoneos', + 'TARGETED_DEVICE_FAMILY': '1,2', + 'CODE_SIGN_IDENTITY': 'iPhone Developer', + 'IPHONEOS_DEPLOYMENT_TARGET': '6.0', + 'ARCHS': '$(ARCHS_STANDARD_32_64_BIT) armv7s', + 'CLANG_CXX_LANGUAGE_STANDARD' : 'gnu++0x', + 'CLANG_CXX_LIBRARY' : 'libstdc++', + 'OTHER_CFLAGS' : '-fvisibility=hidden', + }, # xcode_settings + }] ], "msvs_settings": { "VCCLCompilerTool": { @@ -49,7 +62,8 @@ }, }, "xcode_settings": { - "GCC_OPTIMIZATION_LEVEL": "0", #stop gyp from defaulting to - Os + "GCC_OPTIMIZATION_LEVEL ": "0", #stop gyp from defaulting to - Os + "CONFIGURATION_BUILD_DIR" : "../../lib/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)" }, }, "Release": { @@ -69,7 +83,20 @@ "conditions": [ ["target_arch=='x64'", { "msvs_configuration_platform": "x64", - }] + }], + ['OS=="iOS"', { + 'xcode_settings': { + 'SDKROOT': 'iphoneos', + 'TARGETED_DEVICE_FAMILY': '1,2', + 'CODE_SIGN_IDENTITY': 'iPhone Developer', + 'IPHONEOS_DEPLOYMENT_TARGET': '6.0', + 'ARCHS': '$(ARCHS_STANDARD_32_64_BIT) armv7s', + 'CLANG_CXX_LANGUAGE_STANDARD' : 'gnu++0x', + 'CLANG_CXX_LIBRARY' : 'libstdc++', + 'OTHER_CFLAGS' : '-fvisibility=hidden', + }, # xcode_settings + }] + ], "msvs_settings": { "VCCLCompilerTool": { @@ -93,7 +120,7 @@ "OptimizeReferences": 2, # /OPT:REF "EnableCOMDATFolding": 2, # /OPT:ICF "LinkIncremental": 1 # disable incremental linking - } + }, } }, diff --git a/brulib/make.py b/brulib/make.py index 1f269cc..5c83ecd 100644 --- a/brulib/make.py +++ b/brulib/make.py @@ -42,6 +42,9 @@ def cmd_make(config, verbose): cmd_make_win(gyp_file, config) elif system == 'Linux': cmd_make_linux(gyp_file, config, verbose) + elif system == 'Darwin': + cmd_make_macos(gyp_file, config, verbose) + cmd_make_ios(gyp_file, config, verbose) else: raise Exception('no idea how to invoke gyp & toolchain on platform {}'\ .format(system)) @@ -167,3 +170,67 @@ def cmd_make_linux(gyp_filename, config, verbose): if returncode != 0: raise Exception('Build failed: make returned', returncode) print('Build complete.') + +def cmd_make_macos(gyp_filename, config, verbose): + # Here we could check if ninja or some such is installed to generate ninja + # project files. But for simplicity's sake let's just use whatever gyp + # defaults to. + + # For some odd reason passing './package.gyp' as a param to gyp will + # generate garbage, instead you gotta pass 'package.gyp'. Se let's + # explicitly remove a leading ./ + dirname = os.path.dirname(gyp_filename) + assert dirname == '.' or len(dirname) == 0 + gyp_filename = os.path.basename(gyp_filename) + + gyp_cmdline = 'gyp --depth=. -f xcode {} --generator-output=./xcode-macos'.format(gyp_filename) + run_gyp(gyp_cmdline) + if not os.path.exists('xcode-macos/package.xcodeproj'): + raise Exception('gyp did not generate ./xcode-macos/package.xcodeproj, no idea how to ' + 'build with your toolchain, please build manually') + xcode_cmdline = 'xCodeBuild -alltargets -project xcode-macos/package.xcodeproj -configuration {}'.format(config) + print("running '{}'".format(xcode_cmdline)) + returncode = os.system(xcode_cmdline) + if returncode != 0: + raise Exception('Build failed: make returned', returncode) + print('Build complete.') + +def cmd_make_ios(gyp_filename, config, verbose): + # Here we could check if ninja or some such is installed to generate ninja + # project files. But for simplicity's sake let's just use whatever gyp + # defaults to. + + # For some odd reason passing './package.gyp' as a param to gyp will + # generate garbage, instead you gotta pass 'package.gyp'. Se let's + # explicitly remove a leading ./ + dirname = os.path.dirname(gyp_filename) + assert dirname == '.' or len(dirname) == 0 + gyp_filename = os.path.basename(gyp_filename) + gyp_cmdline = 'gyp --depth=. -f xcode -DOS=iOS {} --generator-output=./xcode-ios'.format(gyp_filename) + run_gyp(gyp_cmdline) + if not os.path.exists('xcode-ios/package.xcodeproj'): + raise Exception('gyp did not generate ./xcode-ios/package.xcodeproj, no idea how to ' + 'build with your toolchain, please build manually') + xcode_cmdline = 'xCodeBuild -alltargets -project xcode-ios/package.xcodeproj -configuration {} -sdk iphonesimulator'.format(config) + print("running '{}'".format(xcode_cmdline)) + returncode = os.system(xcode_cmdline) + if returncode != 0: + raise Exception('Build failed: make for device returned', returncode) + xcode_cmdline = 'xCodeBuild -alltargets -project xcode-ios/package.xcodeproj -configuration {} -sdk iphoneos'.format(config) + print("running '{}'".format(xcode_cmdline)) + returncode = os.system(xcode_cmdline) + if returncode != 0: + raise Exception('Build failed: make for simulator returned', returncode) + mkdir_cmdline = 'mkdir lib/{}-Universial'.format(config) + returncode = os.system(mkdir_cmdline) + filepattern = './lib/{}-iphoneos/lib*.a'.format(config) + print (filepattern) + print (glob.glob(filepattern)) + for file in glob.glob(filepattern): + name = os.path.basename(os.path.normpath(file)) + command = 'lipo -create lib/{}-iphoneos/{} lib/{}-iphonesimulator/{} -output lib/{}-Universial/{}'.format(config,name,config,name,config,name) + print("running '{}'".format(command)) + returncode = os.system(command) + if returncode != 0: + raise Exception('Build failed: lipo returned', returncode) + print('Build complete.') diff --git a/library/boost-regex/1.57.0.gyp b/library/boost-regex/1.57.0.gyp index c9c56f1..60485eb 100644 --- a/library/boost-regex/1.57.0.gyp +++ b/library/boost-regex/1.57.0.gyp @@ -41,7 +41,7 @@ "../boost-core/boost-core.gyp:*", "../boost-functional/boost-functional.gyp:*" ] - }, + } # Adding this test will cause circular dep problems, since pulling # in boost-test will cause lots of additional deps, including to @@ -58,11 +58,16 @@ # "dependencies": [ # "boost-regex" # ] - #} - + #} + ], + "conditions": [ + ["OS!='iOS'", { + # more of an example than a test, better than nothing as long as # the unit test isnt being run: - { + + "targets": [ + { "target_name": "boost_regex_grep_example_3", "type": "executable", "test": { @@ -73,6 +78,9 @@ "1.57.0/regex-boost-1.57.0/example/snippets/regex_grep_example_3.cpp" ], "dependencies": [ "boost-regex" ] - } + } + ] + } + ] ] } From 824fe189a359065b3c036c884e5c8b0c8d896995 Mon Sep 17 00:00:00 2001 From: Uwe Meier Date: Fri, 30 Jan 2015 15:58:48 -0500 Subject: [PATCH 02/21] fixed build dir for iOS/Mac release builds --- bru_common.gypi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bru_common.gypi b/bru_common.gypi index 3647364..fe7a5ab 100644 --- a/bru_common.gypi +++ b/bru_common.gypi @@ -110,6 +110,9 @@ "EnableIntrinsicFunctions": "true" } }, + "xcode_settings": { + "CONFIGURATION_BUILD_DIR" : "../../lib/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)" + }, "VCLibrarianTool": { "AdditionalOptions": [ "/LTCG" # link time code generation From 2ff96b204d91e5ddb7e5a2bcf92b2fdd9655517e Mon Sep 17 00:00:00 2001 From: Uwe Meier Date: Fri, 30 Jan 2015 16:00:16 -0500 Subject: [PATCH 03/21] added command line argument to specify targetPlatform (needed for MacOS vs iOS builds on Macs) --- bru.py | 4 +++- brulib/make.py | 25 +++++++++++++++++++------ 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/bru.py b/bru.py index ad51e79..1a3c5cc 100755 --- a/bru.py +++ b/bru.py @@ -42,13 +42,15 @@ def main(): help = 'config Debug | Release') parser_make.add_argument('--verbose', '-v', default=0, action='count', help = 'enables verbose output in underlying build toolchain (e.g. make)') + parser_make.add_argument('--targetPlatform', default='Native', required=False, + help = 'targetPlatform Native | iOS') args = parser.parse_args() library = get_library() if args.command == 'install': brulib.install.cmd_install(library, args.installables) elif args.command == 'make': - brulib.make.cmd_make(args.config, args.verbose) + brulib.make.cmd_make(args.config, args.verbose, args.targetPlatform) elif args.command == 'test': brulib.runtests.cmd_test(args.testables) else: diff --git a/brulib/make.py b/brulib/make.py index 5c83ecd..2d06e0d 100644 --- a/brulib/make.py +++ b/brulib/make.py @@ -9,7 +9,7 @@ import platform import brulib.install -def cmd_make(config, verbose): +def cmd_make(config, verbose, targetPlatform): """ this command makes some educated guesses about which toolchain the user probably wants to run, then invokes gyp to create the makefiles for this toolchain and invokes the build. On Linux @@ -25,7 +25,7 @@ def cmd_make(config, verbose): param verbose 0 means not verbose, >= 1 means higher verbosity level (whatever that means in the underlying toolchain) """ - print("running 'bru make --config {}'".format(config)) + print("running 'bru make --config {} --os {}'".format(config,os)) # first locate the single gyp in the cwd bru_file = brulib.install.get_single_bru_file('.') @@ -39,12 +39,25 @@ def cmd_make(config, verbose): system = platform.system() if system == 'Windows': - cmd_make_win(gyp_file, config) + if targetPlatform == 'Native': + cmd_make_win(gyp_file, config) + else: + raise Exception('targetPlatform {} not supported on platform {}'\ + .format(targetPlatform, system)) elif system == 'Linux': - cmd_make_linux(gyp_file, config, verbose) + if targetPlatform == 'Native': + cmd_make_linux(gyp_file, config, verbose) + else: + raise Exception('targetPlatform {} not supported on platform {}'\ + .format(targetPlatform, system)) elif system == 'Darwin': - cmd_make_macos(gyp_file, config, verbose) - cmd_make_ios(gyp_file, config, verbose) + if targetPlatform == 'iOS': + cmd_make_ios(gyp_file, config, verbose) + elif targetPlatform == 'Native': + cmd_make_macos(gyp_file, config, verbose) + else: + raise Exception('targetPlatform {} not supported on platform {}'\ + .format(targetPlatform, system)) else: raise Exception('no idea how to invoke gyp & toolchain on platform {}'\ .format(system)) From 11d3584a7214be23578df74989c40abfdb28704b Mon Sep 17 00:00:00 2001 From: Uwe Meier Date: Fri, 30 Jan 2015 17:58:12 -0500 Subject: [PATCH 04/21] updated boost gyp files to exclude the executables for iOS builds --- library/boost-algorithm/1.57.0.gyp | 10 ++++++---- library/boost-any/1.57.0.gyp | 12 ++++++++---- library/boost-array/1.57.0.gyp | 12 ++++++++---- library/boost-chrono/1.57.0.gyp | 10 +++++++--- library/boost-circular_buffer/1.57.0.gyp | 12 ++++++++---- library/boost-container/1.57.0.gyp | 13 ++++++++----- library/boost-context/1.57.0.gyp | 8 ++++++-- library/boost-date_time/1.57.0.gyp | 12 ++++++++---- library/boost-filesystem/1.57.0.gyp | 11 +++++++---- library/boost-format/1.57.0.gyp | 14 +++++++++----- library/boost-fusion/1.57.0.gyp | 12 ++++++++---- library/boost-iostreams/1.57.0.gyp | 10 +++++++--- library/boost-multi_index/1.57.0.gyp | 13 ++++++++----- library/boost-parameter/1.57.0.gyp | 13 ++++++++----- library/boost-pool/1.57.0.gyp | 12 ++++++++---- library/boost-program_options/1.57.0.gyp | 12 ++++++++---- library/boost-property_tree/1.57.0.gyp | 12 ++++++++---- library/boost-proto/1.57.0.gyp | 12 ++++++++---- library/boost-ptr_container/1.57.0.gyp | 14 +++++++++----- library/boost-random/1.57.0.gyp | 17 ++++++++++++----- library/boost-rational/1.57.0.gyp | 13 ++++++++----- library/boost-serialization/1.57.0.gyp | 10 +++++++--- library/boost-signals/1.57.0.gyp | 12 ++++++++---- library/boost-system/1.57.0.gyp | 12 ++++++++---- library/boost-test/1.57.0.gyp | 13 ++++++++----- library/boost-thread/1.57.0.gyp | 8 +++++--- library/boost-timer/1.57.0.gyp | 13 ++++++++----- library/boost-tokenizer/1.57.0.gyp | 13 ++++++++----- library/boost-type_index/1.57.0.gyp | 13 ++++++++----- library/boost-unordered/1.57.0.gyp | 13 ++++++++----- library/boost-variant/1.57.0.gyp | 10 ++++++---- library/boost-xpressive/1.57.0.gyp | 18 ++++++++++-------- 32 files changed, 251 insertions(+), 138 deletions(-) diff --git a/library/boost-algorithm/1.57.0.gyp b/library/boost-algorithm/1.57.0.gyp index 2932541..2fad915 100644 --- a/library/boost-algorithm/1.57.0.gyp +++ b/library/boost-algorithm/1.57.0.gyp @@ -28,9 +28,12 @@ "../boost-exception/boost-exception.gyp:*", "../boost-iterator/boost-iterator.gyp:*" ] - }, + } + ], + + "conditions": [ + ["OS!='iOS'", { - { "target_name": "boost-algorithm_partition_copy_test1", "type": "executable", "test": {}, @@ -41,7 +44,6 @@ "boost-algorithm", "../boost-test/boost-test.gyp:*" ] - } - + }] ] } \ No newline at end of file diff --git a/library/boost-any/1.57.0.gyp b/library/boost-any/1.57.0.gyp index 048c56f..2224cf4 100644 --- a/library/boost-any/1.57.0.gyp +++ b/library/boost-any/1.57.0.gyp @@ -19,8 +19,10 @@ "../boost-mpl/boost-mpl.gyp:*", "../boost-type_index/boost-type_index.gyp:*" ] - }, - + } + ], + "conditions": [ + ["OS!='iOS'", { "target_name": "boost-any_test", "type": "executable", @@ -28,7 +30,9 @@ "sources": [ "1.57.0/any-boost-1.57.0/test/any_test.cpp" ], - "dependencies": [ "boost-any" ] + "dependencies": [ "boost-any" + ] } + ] ] -} \ No newline at end of file +} diff --git a/library/boost-array/1.57.0.gyp b/library/boost-array/1.57.0.gyp index e9cc096..ff6f9a2 100644 --- a/library/boost-array/1.57.0.gyp +++ b/library/boost-array/1.57.0.gyp @@ -18,14 +18,18 @@ "../boost-assert/boost-assert.gyp:*", "../boost-core/boost-core.gyp:*" ] - }, - + } + ], + "conditions": [ + ["OS!='iOS'", { "target_name": "boost-array_array2", "type": "executable", "test": {}, "sources": [ "1.57.0/array-boost-1.57.0/test/array2.cpp" ], - "dependencies": [ "boost-array" ] + "dependencies": [ "boost-array" + ] } + ] ] -} \ No newline at end of file +} diff --git a/library/boost-chrono/1.57.0.gyp b/library/boost-chrono/1.57.0.gyp index b26df0c..1d791af 100644 --- a/library/boost-chrono/1.57.0.gyp +++ b/library/boost-chrono/1.57.0.gyp @@ -36,8 +36,10 @@ "../boost-mpl/boost-mpl.gyp:*", "../boost-ratio/boost-ratio.gyp:*" ] - }, - + } + ], + "conditions": [ + ["OS!='iOS'", { "target_name": "boost-chrono_example_test_duration", "type": "executable", @@ -55,7 +57,9 @@ "sources": [ "1.57.0/chrono-boost-1.57.0/example/test_clock.cpp" ], - "dependencies": [ "boost-chrono" ] + "dependencies": [ "boost-chrono" + ] } + ] ] } diff --git a/library/boost-circular_buffer/1.57.0.gyp b/library/boost-circular_buffer/1.57.0.gyp index 56aa29a..72ec016 100644 --- a/library/boost-circular_buffer/1.57.0.gyp +++ b/library/boost-circular_buffer/1.57.0.gyp @@ -23,8 +23,10 @@ "../boost-mpl/boost-mpl.gyp:*", "../boost-iterator/boost-iterator.gyp:*" ] - }, - + } + ], + "conditions": [ + ["OS!='iOS'", { "target_name": "boost-circular_buffer_example", "type": "executable", @@ -32,7 +34,9 @@ "sources": [ "1.57.0/circular_buffer-boost-1.57.0/example/circular_buffer_example.cpp" ], - "dependencies": [ "boost-circular_buffer" ] + "dependencies": [ "boost-circular_buffer" + ] } + ] ] -} \ No newline at end of file +} diff --git a/library/boost-container/1.57.0.gyp b/library/boost-container/1.57.0.gyp index 0200a57..0b97bb5 100644 --- a/library/boost-container/1.57.0.gyp +++ b/library/boost-container/1.57.0.gyp @@ -31,8 +31,10 @@ "../boost-mpl/boost-mpl.gyp:*", "../boost-intrusive/boost-intrusive.gyp:*" ] - }, - + } + ], + "conditions": [ + ["OS!='iOS'", # this test compiles ridiculously slowly btw (about 1min) # So I disabled it for now. #{ @@ -48,8 +50,9 @@ "type": "executable", "test": {}, "sources": [ "1.57.0/container-boost-1.57.0/test/string_test.cpp" ], - "dependencies": [ "boost-container" ] + "dependencies": [ "boost-container" + ] } - + ] ] -} \ No newline at end of file +} diff --git a/library/boost-context/1.57.0.gyp b/library/boost-context/1.57.0.gyp index fc0c313..6111176 100644 --- a/library/boost-context/1.57.0.gyp +++ b/library/boost-context/1.57.0.gyp @@ -91,8 +91,10 @@ "dependencies": [ "../boost-config/boost-config.gyp:*" ] - }, - + } + ], + "conditions": [ + ["OS!='iOS'", { "target_name": "boost-context_test", "type": "executable", @@ -115,7 +117,9 @@ "boost-context", "../boost-assert/boost-assert.gyp:*", "../boost-array/boost-array.gyp:*" + ] } + ] ] } diff --git a/library/boost-date_time/1.57.0.gyp b/library/boost-date_time/1.57.0.gyp index 4c5efff..53e659f 100644 --- a/library/boost-date_time/1.57.0.gyp +++ b/library/boost-date_time/1.57.0.gyp @@ -28,8 +28,10 @@ "../boost-static_assert/boost-static_assert.gyp:*", "../boost-mpl/boost-mpl.gyp:*" ] - }, - + } + ], + "conditions": [ + ["OS!='iOS'", { "target_name": "gregorian_testparse_date", "type": "executable", @@ -37,7 +39,9 @@ "sources": [ "1.57.0/date_time-boost-1.57.0/test/gregorian/testparse_date.cpp" ], - "dependencies": [ "boost-date_time" ] + "dependencies": [ "boost-date_time" + ] } + ] ] -} \ No newline at end of file +} diff --git a/library/boost-filesystem/1.57.0.gyp b/library/boost-filesystem/1.57.0.gyp index 9d7df96..e3861c9 100644 --- a/library/boost-filesystem/1.57.0.gyp +++ b/library/boost-filesystem/1.57.0.gyp @@ -28,8 +28,10 @@ "../boost-mpl/boost-mpl.gyp:*", "../boost-iterator/boost-iterator.gyp:*" ] - }, - + } + ], + "conditions": [ + ["OS!='iOS'", { "target_name": "boost-filesystem_fstream_test", "type": "executable", @@ -51,8 +53,9 @@ ], "dependencies": [ "boost-filesystem" + ] } - + ] ] -} \ No newline at end of file +} diff --git a/library/boost-format/1.57.0.gyp b/library/boost-format/1.57.0.gyp index 8d4ea38..53b927a 100644 --- a/library/boost-format/1.57.0.gyp +++ b/library/boost-format/1.57.0.gyp @@ -19,16 +19,20 @@ "../boost-throw_exception/boost-throw_exception.gyp:*", "../boost-mpl/boost-mpl.gyp:*" ] - }, + } + # TODO: add tests once boost-test dependency cycles are sorted out + ], + "conditions": [ + ["OS!='iOS'", { "target_name": "boost-format_sample_formats", "type": "executable", "test": {}, "sources": [ "1.57.0/format-boost-1.57.0/example/sample_formats.cpp" ], - "dependencies": [ "boost-format" ] + "dependencies": [ "boost-format" + ] } - - # TODO: add tests once boost-test dependency cycles are sorted out + ] ] -} \ No newline at end of file +} diff --git a/library/boost-fusion/1.57.0.gyp b/library/boost-fusion/1.57.0.gyp index e859f88..b16b3af 100644 --- a/library/boost-fusion/1.57.0.gyp +++ b/library/boost-fusion/1.57.0.gyp @@ -21,8 +21,10 @@ "../boost-static_assert/boost-static_assert.gyp:*", "../boost-mpl/boost-mpl.gyp:*" ] - }, - + } + ], + "conditions": [ + ["OS!='iOS'", # this test fails for me with gcc 4.8.1 #{ # "target_name": "boost-fusion_invoke", @@ -37,7 +39,9 @@ "type": "executable", "test": {}, "sources": [ "1.57.0/fusion-boost-1.57.0/test/functional/make_fused.cpp" ], - "dependencies": [ "boost-fusion" ] + "dependencies": [ "boost-fusion" + ] } + ] ] -} \ No newline at end of file +} diff --git a/library/boost-iostreams/1.57.0.gyp b/library/boost-iostreams/1.57.0.gyp index 7c9978e..792e45e 100644 --- a/library/boost-iostreams/1.57.0.gyp +++ b/library/boost-iostreams/1.57.0.gyp @@ -40,14 +40,18 @@ "../boost-mpl/boost-mpl.gyp:*", "../zlib/zlib.gyp:*" ] - }, - + } + ], + "conditions": [ + ["OS!='iOS'", { "target_name": "boost-iostreams_back_inserter_example", "type": "executable", "test": {}, "sources": [ "1.57.0/iostreams-boost-1.57.0/example/boost_back_inserter_example.cpp" ], - "dependencies": [ "boost-iostreams" ] + "dependencies": [ "boost-iostreams" + ] } + ] ] } diff --git a/library/boost-multi_index/1.57.0.gyp b/library/boost-multi_index/1.57.0.gyp index 0f4ba8e..9cc448b 100644 --- a/library/boost-multi_index/1.57.0.gyp +++ b/library/boost-multi_index/1.57.0.gyp @@ -30,8 +30,10 @@ "../boost-mpl/boost-mpl.gyp:*", "../boost-foreach/boost-foreach.gyp:*" ] - }, - + } + ], + "conditions": [ + ["OS!='iOS'", { "target_name": "boost-multi_index_test_basic", "type": "executable", @@ -50,8 +52,9 @@ "sources": [ "1.57.0/multi_index-boost-1.57.0/example/basic.cpp" ], - "dependencies": [ "boost-multi_index" ] + "dependencies": [ "boost-multi_index" + ] } - + ] ] -} \ No newline at end of file +} diff --git a/library/boost-parameter/1.57.0.gyp b/library/boost-parameter/1.57.0.gyp index 1e5ba8f..f359228 100644 --- a/library/boost-parameter/1.57.0.gyp +++ b/library/boost-parameter/1.57.0.gyp @@ -20,8 +20,10 @@ "../boost-mpl/boost-mpl.gyp:*" #"../boost-python/boost-python.gyp:*" ] - }, - + } + ], + "conditions": [ + ["OS!='iOS'", { "target_name": "boost-parameter_test_deduced", "type": "executable", @@ -35,8 +37,9 @@ "type": "executable", "test": {}, "sources": [ "1.57.0/parameter-boost-1.57.0/test/tutorial.cpp" ], - "dependencies": [ "boost-parameter" ] + "dependencies": [ "boost-parameter" + ] } - + ] ] -} \ No newline at end of file +} diff --git a/library/boost-pool/1.57.0.gyp b/library/boost-pool/1.57.0.gyp index 37670e0..603f76b 100644 --- a/library/boost-pool/1.57.0.gyp +++ b/library/boost-pool/1.57.0.gyp @@ -19,14 +19,18 @@ "../boost-mpl/boost-mpl.gyp:*", "../boost-thread/boost-thread.gyp:*" ] - }, - + } + ], + "conditions": [ + ["OS!='iOS'", { "target_name": "boost-pool_time_pool_alloc", "type": "executable", "test": {}, "sources": ["1.57.0/pool-boost-1.57.0/example/time_pool_alloc.cpp"], - "dependencies": [ "boost-pool" ] + "dependencies": [ "boost-pool" + ] } + ] ] -} \ No newline at end of file +} diff --git a/library/boost-program_options/1.57.0.gyp b/library/boost-program_options/1.57.0.gyp index 245ba11..e4fcfb7 100644 --- a/library/boost-program_options/1.57.0.gyp +++ b/library/boost-program_options/1.57.0.gyp @@ -28,8 +28,10 @@ "../boost-any/boost-any.gyp:*", "../boost-iterator/boost-iterator.gyp:*" ] - }, - + } + ], + "conditions": [ + ["OS!='iOS'", { "target_name": "boost-program_options_positional_options_test", "type": "executable", @@ -37,7 +39,9 @@ "sources": [ "1.57.0/program_options-boost-1.57.0/test/positional_options_test.cpp" ], - "dependencies": [ "boost-program_options" ] + "dependencies": [ "boost-program_options" + ] } + ] ] -} \ No newline at end of file +} diff --git a/library/boost-property_tree/1.57.0.gyp b/library/boost-property_tree/1.57.0.gyp index 88a93ea..55cf397 100644 --- a/library/boost-property_tree/1.57.0.gyp +++ b/library/boost-property_tree/1.57.0.gyp @@ -25,8 +25,10 @@ "../boost-any/boost-any.gyp:*", "../boost-iterator/boost-iterator.gyp:*" ] - }, - + } + ], + "conditions": [ + ["OS!='iOS'", # note the json parser is the only part of boost-property_tree # using boost-spirit { @@ -34,7 +36,9 @@ "type": "executable", "test": {}, "sources": [ "1.57.0/property_tree-boost-1.57.0/test/test_json_parser.cpp" ], - "dependencies": [ "boost-property_tree" ] + "dependencies": [ "boost-property_tree" + ] } + ] ] -} \ No newline at end of file +} diff --git a/library/boost-proto/1.57.0.gyp b/library/boost-proto/1.57.0.gyp index f41fa9a..dd664d0 100644 --- a/library/boost-proto/1.57.0.gyp +++ b/library/boost-proto/1.57.0.gyp @@ -20,14 +20,18 @@ "../boost-static_assert/boost-static_assert.gyp:*", "../boost-mpl/boost-mpl.gyp:*" ] - }, - + } + ], + "conditions": [ + ["OS!='iOS'", { "target_name": "boost-proto_example_calc2", "type": "executable", "test": {}, "sources": [ "1.57.0/proto-boost-1.57.0/example/calc2.cpp" ], - "dependencies": [ "boost-proto" ] + "dependencies": [ "boost-proto" + ] } + ] ] -} \ No newline at end of file +} diff --git a/library/boost-ptr_container/1.57.0.gyp b/library/boost-ptr_container/1.57.0.gyp index 2c455b2..1c9a515 100644 --- a/library/boost-ptr_container/1.57.0.gyp +++ b/library/boost-ptr_container/1.57.0.gyp @@ -25,14 +25,18 @@ "../boost-unordered/boost-unordered.gyp:*", "../boost-iterator/boost-iterator.gyp:*" ] - }, - + } + ], + "conditions": [ + ["OS!='iOS'", { "target_name": "boost-ptr_container_tut1", "type": "executable", "test": {}, "sources": [ "1.57.0/ptr_container-boost-1.57.0/test/tut1.cpp" ], - "dependencies": [ "boost-ptr_container" ] - } + "dependencies": [ "boost-ptr_container" + ] + } + ] ] -} \ No newline at end of file +} diff --git a/library/boost-random/1.57.0.gyp b/library/boost-random/1.57.0.gyp index b9ec6de..53132f4 100644 --- a/library/boost-random/1.57.0.gyp +++ b/library/boost-random/1.57.0.gyp @@ -25,17 +25,21 @@ "../boost-static_assert/boost-static_assert.gyp:*", "../boost-mpl/boost-mpl.gyp:*" ] - }, + } + ], + "conditions": [ + ["OS!='iOS'", { "target_name": "boost-random_test_histogram", "type": "executable", "test": {}, "sources": [ "1.57.0/random-boost-1.57.0/test/histogram.cpp" ], - "dependencies" : [ "boost-random" ] + "dependencies" : [ "boost-random" + ] } - - # this test requires boost-test, which is a pretty heavy-weight + + # this test requires boost-test, which is a pretty heavy-weight # dependency, so not enabling this test by default #{ # "target_name": "boost-random_test_normal_distribution", @@ -47,5 +51,8 @@ # "../boost-test/boost-test.gyp:*" # ] #} + + ] ] -} \ No newline at end of file +} + diff --git a/library/boost-rational/1.57.0.gyp b/library/boost-rational/1.57.0.gyp index 059fac5..e140a59 100644 --- a/library/boost-rational/1.57.0.gyp +++ b/library/boost-rational/1.57.0.gyp @@ -18,8 +18,10 @@ "../boost-math/boost-math.gyp:*", "../boost-mpl/boost-mpl.gyp:*" ] - }, - + } + ], + "conditions": [ + ["OS!='iOS'", { "target_name": "boost-rational_example", "type": "executable", @@ -27,8 +29,9 @@ "sources": [ "1.57.0/rational-boost-1.57.0/test/rational_example.cpp" ], - "dependencies": [ "boost-rational" ] + "dependencies": [ "boost-rational" + ] } - + ] ] -} \ No newline at end of file +} diff --git a/library/boost-serialization/1.57.0.gyp b/library/boost-serialization/1.57.0.gyp index 2ad08c4..22ecb41 100644 --- a/library/boost-serialization/1.57.0.gyp +++ b/library/boost-serialization/1.57.0.gyp @@ -37,8 +37,10 @@ "../boost-core/boost-core.gyp:*", "../boost-mpl/boost-mpl.gyp:*" ] - }, - + } + ], + "conditions": [ + ["OS!='iOS'", # fails on Windows with # "filesystem::unique_path: The profile for the user is a temporary profile" # Probably should fix my profile... @@ -59,7 +61,9 @@ "1.57.0/serialization-boost-1.57.0/example/portable_binary_oarchive.cpp", "1.57.0/serialization-boost-1.57.0/example/portable_binary_iarchive.cpp" ], - "dependencies": [ "boost-serialization" ] + "dependencies": [ "boost-serialization" + ] } + ] ] } diff --git a/library/boost-signals/1.57.0.gyp b/library/boost-signals/1.57.0.gyp index cd8d686..a554e90 100644 --- a/library/boost-signals/1.57.0.gyp +++ b/library/boost-signals/1.57.0.gyp @@ -24,14 +24,18 @@ "../boost-any/boost-any.gyp:*", "../boost-iterator/boost-iterator.gyp:*" ] - }, - + } + ], + "conditions": [ + ["OS!='iOS'", { "target_name": "boost-signals_example_disconnect_all", "type": "executable", "test": {}, "sources": [ "1.57.0/signals-boost-1.57.0/example/disconnect_all.cpp" ], - "dependencies": ["boost-signals"] + "dependencies": ["boost-signals" + ] } + ] ] -} \ No newline at end of file +} diff --git a/library/boost-system/1.57.0.gyp b/library/boost-system/1.57.0.gyp index 2262dc4..e14c60e 100644 --- a/library/boost-system/1.57.0.gyp +++ b/library/boost-system/1.57.0.gyp @@ -20,8 +20,10 @@ "../boost-assert/boost-assert.gyp:*", "../boost-core/boost-core.gyp:*" ] - }, - + } + ], + "conditions": [ + ["OS!='iOS'", { "target_name": "boost-system_error_test", "type": "executable", @@ -29,7 +31,9 @@ "sources": [ "1.57.0/system-boost-1.57.0/test/system_error_test.cpp" ], - "dependencies": [ "boost-system" ] + "dependencies": [ "boost-system" + ] } + ] ] -} \ No newline at end of file +} diff --git a/library/boost-test/1.57.0.gyp b/library/boost-test/1.57.0.gyp index 337ea18..aa6301e 100644 --- a/library/boost-test/1.57.0.gyp +++ b/library/boost-test/1.57.0.gyp @@ -40,8 +40,10 @@ "../boost-exception/boost-exception.gyp:*", "../boost-iterator/boost-iterator.gyp:*" ] - }, - + } + ], + "conditions": [ + ["OS!='iOS'", { "target_name": "boost-test_unit_test_example_01", "type": "executable", @@ -84,8 +86,9 @@ "sources": [ "1.57.0/test-boost-1.57.0/test/test_case_template_test.cpp" ], - "dependencies": [ "boost-test" ] + "dependencies": [ "boost-test" + ] } - + ] ] -} \ No newline at end of file +} diff --git a/library/boost-thread/1.57.0.gyp b/library/boost-thread/1.57.0.gyp index 9f25349..22efe14 100644 --- a/library/boost-thread/1.57.0.gyp +++ b/library/boost-thread/1.57.0.gyp @@ -60,8 +60,10 @@ "../boost-intrusive/boost-intrusive.gyp:*", "../boost-date_time/boost-date_time.gyp:*" ] - }, - + } + ], + "conditions": [ + ["OS!='iOS'", { "target_name": "boost-thread_test_futures", "type": "executable", @@ -88,6 +90,6 @@ "boost-thread" ] } - + ] ] } diff --git a/library/boost-timer/1.57.0.gyp b/library/boost-timer/1.57.0.gyp index 9c3581b..aab194d 100644 --- a/library/boost-timer/1.57.0.gyp +++ b/library/boost-timer/1.57.0.gyp @@ -21,8 +21,10 @@ "../boost-system/boost-system.gyp:*", "../boost-core/boost-core.gyp:*" ] - }, - + } + ], + "conditions": [ + ["OS!='iOS'", { "target_name": "boost-timer_cpu_timer_test", "type": "executable", @@ -42,8 +44,9 @@ "sources": [ "1.57.0/timer-boost-1.57.0/example/timex.cpp" ], - "dependencies": [ "boost-timer" ] + "dependencies": [ "boost-timer" + ] } - + ] ] -} \ No newline at end of file +} diff --git a/library/boost-tokenizer/1.57.0.gyp b/library/boost-tokenizer/1.57.0.gyp index 4c5b550..d92a185 100644 --- a/library/boost-tokenizer/1.57.0.gyp +++ b/library/boost-tokenizer/1.57.0.gyp @@ -17,16 +17,19 @@ "../boost-mpl/boost-mpl.gyp:*", "../boost-iterator/boost-iterator.gyp:*" ] - }, - - { + } + ], + "conditions": [ + ["OS!='iOS'", { "target_name": "boost-tokenizer_simple_example_1", "type": "executable", "test": {}, "sources": [ "1.57.0/tokenizer-boost-1.57.0/test/simple_example_1.cpp" ], - "dependencies": [ "boost-tokenizer" ] + "dependencies": [ "boost-tokenizer" + ] } + ] ] -} \ No newline at end of file +} diff --git a/library/boost-type_index/1.57.0.gyp b/library/boost-type_index/1.57.0.gyp index 2e652bc..31cc342 100644 --- a/library/boost-type_index/1.57.0.gyp +++ b/library/boost-type_index/1.57.0.gyp @@ -20,16 +20,19 @@ "../boost-static_assert/boost-static_assert.gyp:*", "../boost-mpl/boost-mpl.gyp:*" ] - }, - - { + } + ], + "conditions": [ + ["OS!='iOS'", { "target_name": "boost-type_index_ctti_print_name", "type": "executable", "test": {}, "sources": [ "1.57.0/type_index-boost-1.57.0/test/ctti_print_name.cpp" ], - "dependencies": [ "boost-type_index" ] + "dependencies": [ "boost-type_index" + ] } + ] ] -} \ No newline at end of file +} diff --git a/library/boost-unordered/1.57.0.gyp b/library/boost-unordered/1.57.0.gyp index c79305a..8ceb300 100644 --- a/library/boost-unordered/1.57.0.gyp +++ b/library/boost-unordered/1.57.0.gyp @@ -26,16 +26,19 @@ "../boost-mpl/boost-mpl.gyp:*", "../boost-iterator/boost-iterator.gyp:*" ] - }, - - { + } + ], + "conditions": [ + ["OS!='iOS'", { "target_name": "boost-unordered_erase_tests", "type": "executable", "test": {}, "sources": [ "1.57.0/unordered-boost-1.57.0/test/unordered/erase_tests.cpp" ], - "dependencies": [ "boost-unordered" ] + "dependencies": [ "boost-unordered" + ] } + ] ] -} \ No newline at end of file +} diff --git a/library/boost-variant/1.57.0.gyp b/library/boost-variant/1.57.0.gyp index 6fe1362..1623cae 100644 --- a/library/boost-variant/1.57.0.gyp +++ b/library/boost-variant/1.57.0.gyp @@ -26,9 +26,10 @@ "../boost-mpl/boost-mpl.gyp:*", "../boost-type_index/boost-type_index.gyp:*" ] - }, - - { + } + ], + "conditions": [ + ["OS!='iOS'", { "target_name": "boost-variant_recursive_variant_test", "type": "executable", "test": {}, @@ -40,5 +41,6 @@ "../boost-test/boost-test.gyp:*" ] } + ] ] -} \ No newline at end of file +} diff --git a/library/boost-xpressive/1.57.0.gyp b/library/boost-xpressive/1.57.0.gyp index f219faa..cd6a9a6 100644 --- a/library/boost-xpressive/1.57.0.gyp +++ b/library/boost-xpressive/1.57.0.gyp @@ -30,20 +30,22 @@ "../boost-mpl/boost-mpl.gyp:*", "../boost-exception/boost-exception.gyp:*" ] - }, - + } + ], + "conditions": [ + ["OS!='iOS'", { # This requires an additional dep to boost-assign. # The test also compiles pretty slowly (30secs), so I was tempted # to disable it again. - { + "target_name": "boost-xpressive_example_numbers", "type": "executable", "test": {}, "sources": [ "1.57.0/xpressive-boost-1.57.0/example/numbers.cpp" ], "dependencies": [ "boost-xpressive" , - "../boost-assign/boost-assign.gyp:*" - ] - } - ] -} \ No newline at end of file + "../boost-assign/boost-assign.gyp:*"] + } + ] + ] +} From 466d9201b83c13fad9f2b5a98aaf289d18bc0812 Mon Sep 17 00:00:00 2001 From: Uwe Meier Date: Tue, 3 Feb 2015 11:53:26 -0500 Subject: [PATCH 05/21] fixed boost executable targets for none iOS builds (were disabled by accident) --- library/boost-multi_index/1.57.0.gyp | 12 ++++++---- library/boost-parameter/1.57.0.gyp | 12 ++++++---- library/boost-pool/1.57.0.gyp | 12 ++++++---- library/boost-program_options/1.57.0.gyp | 12 ++++++---- library/boost-property_tree/1.57.0.gyp | 29 ++++++++++++++---------- library/boost-proto/1.57.0.gyp | 15 ++++++------ library/boost-ptr_container/1.57.0.gyp | 14 +++++++----- library/boost-random/1.57.0.gyp | 10 ++++---- library/boost-rational/1.57.0.gyp | 14 +++++++----- library/boost-regex/1.57.0.gyp | 7 +++--- library/boost-serialization/1.57.0.gyp | 12 ++++++---- library/boost-signals/1.57.0.gyp | 12 ++++++---- library/boost-system/1.57.0.gyp | 14 +++++++----- library/boost-test/1.57.0.gyp | 15 +++++++----- library/boost-thread/1.57.0.gyp | 15 +++++++----- library/boost-timer/1.57.0.gyp | 12 ++++++---- library/boost-tokenizer/1.57.0.gyp | 13 +++++++---- library/boost-type_index/1.57.0.gyp | 11 +++++---- library/boost-unordered/1.57.0.gyp | 13 +++++++---- library/boost-variant/1.57.0.gyp | 11 +++++---- library/boost-xpressive/1.57.0.gyp | 4 ++++ 21 files changed, 159 insertions(+), 110 deletions(-) diff --git a/library/boost-multi_index/1.57.0.gyp b/library/boost-multi_index/1.57.0.gyp index 9cc448b..bc114bf 100644 --- a/library/boost-multi_index/1.57.0.gyp +++ b/library/boost-multi_index/1.57.0.gyp @@ -33,7 +33,8 @@ } ], "conditions": [ - ["OS!='iOS'", + ["OS!='iOS'", { + "targets": [ { "target_name": "boost-multi_index_test_basic", "type": "executable", @@ -52,9 +53,10 @@ "sources": [ "1.57.0/multi_index-boost-1.57.0/example/basic.cpp" ], - "dependencies": [ "boost-multi_index" - ] - } - ] + "dependencies": [ "boost-multi_index" ] + } + ] + } + ] ] } diff --git a/library/boost-parameter/1.57.0.gyp b/library/boost-parameter/1.57.0.gyp index f359228..7f91035 100644 --- a/library/boost-parameter/1.57.0.gyp +++ b/library/boost-parameter/1.57.0.gyp @@ -23,7 +23,8 @@ } ], "conditions": [ - ["OS!='iOS'", + ["OS!='iOS'", { + "targets": [ { "target_name": "boost-parameter_test_deduced", "type": "executable", @@ -37,9 +38,10 @@ "type": "executable", "test": {}, "sources": [ "1.57.0/parameter-boost-1.57.0/test/tutorial.cpp" ], - "dependencies": [ "boost-parameter" - ] - } - ] + "dependencies": [ "boost-parameter"] + } + ] + } + ] ] } diff --git a/library/boost-pool/1.57.0.gyp b/library/boost-pool/1.57.0.gyp index 603f76b..22f105a 100644 --- a/library/boost-pool/1.57.0.gyp +++ b/library/boost-pool/1.57.0.gyp @@ -22,15 +22,17 @@ } ], "conditions": [ - ["OS!='iOS'", + ["OS!='iOS'", { + "targets": [ { "target_name": "boost-pool_time_pool_alloc", "type": "executable", "test": {}, "sources": ["1.57.0/pool-boost-1.57.0/example/time_pool_alloc.cpp"], - "dependencies": [ "boost-pool" - ] - } - ] + "dependencies": [ "boost-pool" ] + } + ] + } + ] ] } diff --git a/library/boost-program_options/1.57.0.gyp b/library/boost-program_options/1.57.0.gyp index e4fcfb7..a177c78 100644 --- a/library/boost-program_options/1.57.0.gyp +++ b/library/boost-program_options/1.57.0.gyp @@ -31,7 +31,8 @@ } ], "conditions": [ - ["OS!='iOS'", + ["OS!='iOS'", { + "targets": [ { "target_name": "boost-program_options_positional_options_test", "type": "executable", @@ -39,9 +40,10 @@ "sources": [ "1.57.0/program_options-boost-1.57.0/test/positional_options_test.cpp" ], - "dependencies": [ "boost-program_options" - ] - } - ] + "dependencies": [ "boost-program_options" ] + } + ] + } + ] ] } diff --git a/library/boost-property_tree/1.57.0.gyp b/library/boost-property_tree/1.57.0.gyp index 55cf397..4ae43d9 100644 --- a/library/boost-property_tree/1.57.0.gyp +++ b/library/boost-property_tree/1.57.0.gyp @@ -28,17 +28,22 @@ } ], "conditions": [ - ["OS!='iOS'", - # note the json parser is the only part of boost-property_tree - # using boost-spirit - { - "target_name": "boost-property_tree_test_json_parser", - "type": "executable", - "test": {}, - "sources": [ "1.57.0/property_tree-boost-1.57.0/test/test_json_parser.cpp" ], - "dependencies": [ "boost-property_tree" - ] - } - ] + ["OS!='iOS'", { + "conditions": [ + ["OS!='mac'", { + "targets": [ + # note the json parser is the only part of boost-property_tree + # using boost-spirit + { + "target_name": "boost-property_tree_test_json_parser", + "type": "executable", + "test": {}, + "sources": [ "1.57.0/property_tree-boost-1.57.0/test/test_json_parser.cpp" ], + "dependencies": [ "boost-property_tree"] + } + ] + }]] + } + ] ] } diff --git a/library/boost-proto/1.57.0.gyp b/library/boost-proto/1.57.0.gyp index dd664d0..7f9dfba 100644 --- a/library/boost-proto/1.57.0.gyp +++ b/library/boost-proto/1.57.0.gyp @@ -22,16 +22,17 @@ ] } ], - "conditions": [ - ["OS!='iOS'", - { + "conditions": [ + ["OS!='iOS'", { + "targets": [ { "target_name": "boost-proto_example_calc2", "type": "executable", "test": {}, "sources": [ "1.57.0/proto-boost-1.57.0/example/calc2.cpp" ], - "dependencies": [ "boost-proto" - ] - } - ] + "dependencies": [ "boost-proto"] + } + ] + } + ] ] } diff --git a/library/boost-ptr_container/1.57.0.gyp b/library/boost-ptr_container/1.57.0.gyp index 1c9a515..86ebc46 100644 --- a/library/boost-ptr_container/1.57.0.gyp +++ b/library/boost-ptr_container/1.57.0.gyp @@ -27,16 +27,18 @@ ] } ], - "conditions": [ - ["OS!='iOS'", + "conditions": [ + ["OS!='iOS'", { + "targets": [ { "target_name": "boost-ptr_container_tut1", "type": "executable", "test": {}, "sources": [ "1.57.0/ptr_container-boost-1.57.0/test/tut1.cpp" ], - "dependencies": [ "boost-ptr_container" - ] - } - ] + "dependencies": [ "boost-ptr_container" ] + } + ] + } + ] ] } diff --git a/library/boost-random/1.57.0.gyp b/library/boost-random/1.57.0.gyp index 53132f4..f3a9c59 100644 --- a/library/boost-random/1.57.0.gyp +++ b/library/boost-random/1.57.0.gyp @@ -28,8 +28,9 @@ } ], - "conditions": [ - ["OS!='iOS'", + "conditions": [ + ["OS!='iOS'", { + "targets": [ { "target_name": "boost-random_test_histogram", "type": "executable", @@ -52,7 +53,8 @@ # ] #} - ] + ] + } + ] ] } - diff --git a/library/boost-rational/1.57.0.gyp b/library/boost-rational/1.57.0.gyp index e140a59..a8febf8 100644 --- a/library/boost-rational/1.57.0.gyp +++ b/library/boost-rational/1.57.0.gyp @@ -20,8 +20,9 @@ ] } ], - "conditions": [ - ["OS!='iOS'", + "conditions": [ + ["OS!='iOS'", { + "targets": [ { "target_name": "boost-rational_example", "type": "executable", @@ -29,9 +30,10 @@ "sources": [ "1.57.0/rational-boost-1.57.0/test/rational_example.cpp" ], - "dependencies": [ "boost-rational" - ] - } - ] + "dependencies": [ "boost-rational"] + } + ] + } + ] ] } diff --git a/library/boost-regex/1.57.0.gyp b/library/boost-regex/1.57.0.gyp index 60485eb..442615c 100644 --- a/library/boost-regex/1.57.0.gyp +++ b/library/boost-regex/1.57.0.gyp @@ -62,12 +62,11 @@ ], "conditions": [ ["OS!='iOS'", { - - # more of an example than a test, better than nothing as long as - # the unit test isnt being run: - "targets": [ { + # more of an example than a test, better than nothing as long as + # the unit test isnt being run: + "target_name": "boost_regex_grep_example_3", "type": "executable", "test": { diff --git a/library/boost-serialization/1.57.0.gyp b/library/boost-serialization/1.57.0.gyp index 22ecb41..2bf3791 100644 --- a/library/boost-serialization/1.57.0.gyp +++ b/library/boost-serialization/1.57.0.gyp @@ -40,7 +40,8 @@ } ], "conditions": [ - ["OS!='iOS'", + ["OS!='iOS'", { + "targets": [ # fails on Windows with # "filesystem::unique_path: The profile for the user is a temporary profile" # Probably should fix my profile... @@ -61,9 +62,10 @@ "1.57.0/serialization-boost-1.57.0/example/portable_binary_oarchive.cpp", "1.57.0/serialization-boost-1.57.0/example/portable_binary_iarchive.cpp" ], - "dependencies": [ "boost-serialization" - ] - } - ] + "dependencies": [ "boost-serialization"] + } + ] + } + ] ] } diff --git a/library/boost-signals/1.57.0.gyp b/library/boost-signals/1.57.0.gyp index a554e90..315145f 100644 --- a/library/boost-signals/1.57.0.gyp +++ b/library/boost-signals/1.57.0.gyp @@ -27,15 +27,17 @@ } ], "conditions": [ - ["OS!='iOS'", + ["OS!='iOS'", { + "targets": [ { "target_name": "boost-signals_example_disconnect_all", "type": "executable", "test": {}, "sources": [ "1.57.0/signals-boost-1.57.0/example/disconnect_all.cpp" ], - "dependencies": ["boost-signals" - ] - } - ] + "dependencies": ["boost-signals"] + } + ] + } + ] ] } diff --git a/library/boost-system/1.57.0.gyp b/library/boost-system/1.57.0.gyp index e14c60e..a7290e9 100644 --- a/library/boost-system/1.57.0.gyp +++ b/library/boost-system/1.57.0.gyp @@ -23,7 +23,8 @@ } ], "conditions": [ - ["OS!='iOS'", + ["OS!='iOS'", { + "targets": [ { "target_name": "boost-system_error_test", "type": "executable", @@ -31,9 +32,10 @@ "sources": [ "1.57.0/system-boost-1.57.0/test/system_error_test.cpp" ], - "dependencies": [ "boost-system" - ] - } - ] + "dependencies": [ "boost-system" ] + } + ] + } + ] ] -} +} \ No newline at end of file diff --git a/library/boost-test/1.57.0.gyp b/library/boost-test/1.57.0.gyp index aa6301e..93f3ba8 100644 --- a/library/boost-test/1.57.0.gyp +++ b/library/boost-test/1.57.0.gyp @@ -43,7 +43,9 @@ } ], "conditions": [ - ["OS!='iOS'", + ["OS!='iOS'", { + "targets": [ + { "target_name": "boost-test_unit_test_example_01", "type": "executable", @@ -86,9 +88,10 @@ "sources": [ "1.57.0/test-boost-1.57.0/test/test_case_template_test.cpp" ], - "dependencies": [ "boost-test" - ] - } - ] + "dependencies": [ "boost-test" ] + } + ] + } + ] ] -} +} \ No newline at end of file diff --git a/library/boost-thread/1.57.0.gyp b/library/boost-thread/1.57.0.gyp index 22efe14..87f7915 100644 --- a/library/boost-thread/1.57.0.gyp +++ b/library/boost-thread/1.57.0.gyp @@ -62,8 +62,10 @@ ] } ], - "conditions": [ - ["OS!='iOS'", + "conditions": [ + ["OS!='iOS'", { + "targets": [ + { "target_name": "boost-thread_test_futures", "type": "executable", @@ -87,9 +89,10 @@ ], "dependencies": [ "../boost-test/boost-test.gyp:*", - "boost-thread" - ] - } - ] + "boost-thread"] + } + ] + } + ] ] } diff --git a/library/boost-timer/1.57.0.gyp b/library/boost-timer/1.57.0.gyp index aab194d..1fff423 100644 --- a/library/boost-timer/1.57.0.gyp +++ b/library/boost-timer/1.57.0.gyp @@ -24,7 +24,8 @@ } ], "conditions": [ - ["OS!='iOS'", + ["OS!='iOS'", { + "targets": [ { "target_name": "boost-timer_cpu_timer_test", "type": "executable", @@ -44,9 +45,10 @@ "sources": [ "1.57.0/timer-boost-1.57.0/example/timex.cpp" ], - "dependencies": [ "boost-timer" - ] - } - ] + "dependencies": [ "boost-timer"] + } + ] + } + ] ] } diff --git a/library/boost-tokenizer/1.57.0.gyp b/library/boost-tokenizer/1.57.0.gyp index d92a185..807a5b3 100644 --- a/library/boost-tokenizer/1.57.0.gyp +++ b/library/boost-tokenizer/1.57.0.gyp @@ -19,17 +19,20 @@ ] } ], - "conditions": [ + "conditions": [ ["OS!='iOS'", { + "targets": [ + { "target_name": "boost-tokenizer_simple_example_1", "type": "executable", "test": {}, "sources": [ "1.57.0/tokenizer-boost-1.57.0/test/simple_example_1.cpp" ], - "dependencies": [ "boost-tokenizer" - ] - } - ] + "dependencies": [ "boost-tokenizer" ] + } + ] + } + ] ] } diff --git a/library/boost-type_index/1.57.0.gyp b/library/boost-type_index/1.57.0.gyp index 31cc342..7fd53d4 100644 --- a/library/boost-type_index/1.57.0.gyp +++ b/library/boost-type_index/1.57.0.gyp @@ -24,15 +24,18 @@ ], "conditions": [ ["OS!='iOS'", { + "targets": [ + { "target_name": "boost-type_index_ctti_print_name", "type": "executable", "test": {}, "sources": [ "1.57.0/type_index-boost-1.57.0/test/ctti_print_name.cpp" ], - "dependencies": [ "boost-type_index" - ] - } - ] + "dependencies": [ "boost-type_index" ] + } + ] + } + ] ] } diff --git a/library/boost-unordered/1.57.0.gyp b/library/boost-unordered/1.57.0.gyp index 8ceb300..075e9ee 100644 --- a/library/boost-unordered/1.57.0.gyp +++ b/library/boost-unordered/1.57.0.gyp @@ -28,17 +28,20 @@ ] } ], - "conditions": [ + "conditions": [ ["OS!='iOS'", { + "targets": [ + { "target_name": "boost-unordered_erase_tests", "type": "executable", "test": {}, "sources": [ "1.57.0/unordered-boost-1.57.0/test/unordered/erase_tests.cpp" ], - "dependencies": [ "boost-unordered" - ] - } - ] + "dependencies": [ "boost-unordered"] + } + ] + } + ] ] } diff --git a/library/boost-variant/1.57.0.gyp b/library/boost-variant/1.57.0.gyp index 1623cae..cdb2e1b 100644 --- a/library/boost-variant/1.57.0.gyp +++ b/library/boost-variant/1.57.0.gyp @@ -30,6 +30,8 @@ ], "conditions": [ ["OS!='iOS'", { + "targets": [ + { "target_name": "boost-variant_recursive_variant_test", "type": "executable", "test": {}, @@ -38,9 +40,10 @@ ], "dependencies": [ "boost-variant", - "../boost-test/boost-test.gyp:*" - ] - } - ] + "../boost-test/boost-test.gyp:*"] + } + ] + } + ] ] } diff --git a/library/boost-xpressive/1.57.0.gyp b/library/boost-xpressive/1.57.0.gyp index cd6a9a6..61f12f1 100644 --- a/library/boost-xpressive/1.57.0.gyp +++ b/library/boost-xpressive/1.57.0.gyp @@ -34,6 +34,8 @@ ], "conditions": [ ["OS!='iOS'", { + "targets": [ + { # This requires an additional dep to boost-assign. # The test also compiles pretty slowly (30secs), so I was tempted # to disable it again. @@ -47,5 +49,7 @@ "../boost-assign/boost-assign.gyp:*"] } ] + } ] + ] } From bf032a959a30af94cb117a31493db731ec4203a4 Mon Sep 17 00:00:00 2001 From: Uwe Meier Date: Tue, 3 Feb 2015 11:53:54 -0500 Subject: [PATCH 06/21] updated Xcode build settings for iOS/MacOS --- bru_common.gypi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bru_common.gypi b/bru_common.gypi index fe7a5ab..eae7e4f 100644 --- a/bru_common.gypi +++ b/bru_common.gypi @@ -44,7 +44,7 @@ 'IPHONEOS_DEPLOYMENT_TARGET': '6.0', 'ARCHS': '$(ARCHS_STANDARD_32_64_BIT) armv7s', 'CLANG_CXX_LANGUAGE_STANDARD' : 'gnu++0x', - 'CLANG_CXX_LIBRARY' : 'libstdc++', + 'CLANG_CXX_LIBRARY' : 'libc++', 'OTHER_CFLAGS' : '-fvisibility=hidden', }, # xcode_settings }] @@ -92,7 +92,7 @@ 'IPHONEOS_DEPLOYMENT_TARGET': '6.0', 'ARCHS': '$(ARCHS_STANDARD_32_64_BIT) armv7s', 'CLANG_CXX_LANGUAGE_STANDARD' : 'gnu++0x', - 'CLANG_CXX_LIBRARY' : 'libstdc++', + 'CLANG_CXX_LIBRARY' : 'libc++', 'OTHER_CFLAGS' : '-fvisibility=hidden', }, # xcode_settings }] From b162e6f8e1738ba2ca9fe1e7a8393e5ba1e2aa32 Mon Sep 17 00:00:00 2001 From: Uwe Meier Date: Tue, 3 Feb 2015 11:56:33 -0500 Subject: [PATCH 07/21] updated libraries to build on MacOS --- library/googlemock/1.7.0.gyp | 16 +++++++++----- library/googletest/1.7.0.gyp | 16 +++++++++----- library/opus/1.1.gyp | 34 +++++++++++++++++------------- library/sndfile/1.0.25.bru | 1 + library/sndfile/1.0.25.gyp | 15 ++++++++----- library/speex/1.2rc1.gyp | 15 ++++++++++--- library/speex/1.2rc2.gyp | 18 +++++++++++----- library/tiny-js/rev81.gyp | 18 ++++++++++++---- library/xerces/3.1.1.bru | 1 + library/xerces/3.1.1.gyp | 41 ++++++++++++++++++++++++++++++++---- 10 files changed, 129 insertions(+), 46 deletions(-) diff --git a/library/googlemock/1.7.0.gyp b/library/googlemock/1.7.0.gyp index adcb621..d4265bf 100644 --- a/library/googlemock/1.7.0.gyp +++ b/library/googlemock/1.7.0.gyp @@ -26,9 +26,12 @@ # since gmock #includes refer to gtest #includes: "../googletest/googletest.gyp:googletest" ] - }, - - { + } + ], + "conditions": [ + ["OS!='iOS'", { + "targets": [ + { "target_name": "googlemock_test", "type": "executable", "test": {}, @@ -42,7 +45,10 @@ "dependencies": [ "googlemock", "../googletest/googletest.gyp:*" - ] - } + ] + } + ] + } + ] ] } diff --git a/library/googletest/1.7.0.gyp b/library/googletest/1.7.0.gyp index 07eb054..0fae306 100644 --- a/library/googletest/1.7.0.gyp +++ b/library/googletest/1.7.0.gyp @@ -62,7 +62,7 @@ } }] ] - }, + } # This is one of the lib's own tests, it compiles but has # one failure 'OutputFileHelpersTest.GetCurrentExecutableName' @@ -82,8 +82,11 @@ # ] #} - # one of the googletest samples also can serve as a rudimentary test: - { + ], + "conditions": [ + ["OS!='iOS'", { + "targets": [ + { "target_name": "googletest_sample1", "type" : "executable", "test": {}, @@ -96,7 +99,10 @@ ], "dependencies" : [ "googletest" - ] - } + ] + } + ] + } + ] ] } diff --git a/library/opus/1.1.gyp b/library/opus/1.1.gyp index b2414d2..ccf5d83 100644 --- a/library/opus/1.1.gyp +++ b/library/opus/1.1.gyp @@ -82,8 +82,13 @@ "silk", "celt" ] - }, + } + ], + "conditions": [ + ["OS!='iOS'", { + "targets": [ + # opus has multiple tests, the encode one here is pretty slow (runs # several minutes) { @@ -121,30 +126,29 @@ "opus" ] }, - + + # test needs cmd line args, in fact it's not much of a test, it's + # doing a speexenc/speexdec equivalent, encoding pcm as opus and + # back. Format is 16bit PCM LittleEndian aka ffmpeg's s16le. + # Not much of a test, only verifies the codec won't crash/hang. + # Listen to output PCM to gauge codec quality 'manually'. + # Since the opus tar.gz doesn't include PCM files afaik we pretend + # some arbitrary file from this repo is s16le (terribly noisy :) PCM. { "target_name" : "opus_trivial_example", "type" : "executable", - - # test needs cmd line args, in fact it's not much of a test, it's - # doing a speexenc/speexdec equivalent, encoding pcm as opus and - # back. Format is 16bit PCM LittleEndian aka ffmpeg's s16le. - # Not much of a test, only verifies the codec won't crash/hang. - # Listen to output PCM to gauge codec quality 'manually'. - # Since the opus tar.gz doesn't include PCM files afaik we pretend - # some arbitrary file from this repo is s16le (terribly noisy :) PCM. "test": { "cwd": "1.1/opus-1.1", "args": ["configure", "configure.pretend.s16le.pcm"] }, - "sources" : [ "1.1/opus-1.1/doc/trivial_example.c" ], "dependencies": [ - "opus" - ] - } - + "opus" ] + } + ] + } + ] ] } diff --git a/library/sndfile/1.0.25.bru b/library/sndfile/1.0.25.bru index b53ed50..7eeaab2 100644 --- a/library/sndfile/1.0.25.bru +++ b/library/sndfile/1.0.25.bru @@ -29,6 +29,7 @@ # which uses a minimal tar.gz containing captured ./configure output, or # the openssl build which uses configure+make. "Linux": "cd libsndfile-1.0.25; ./configure --disable-shared --disable-external-libs", + "Darwin": "cd libsndfile-1.0.25; ./configure --disable-shared --disable-external-libs", # About compiling on Windows: # http://www.mega-nerd.com/libsndfile/win32.html says msvc is not diff --git a/library/sndfile/1.0.25.gyp b/library/sndfile/1.0.25.gyp index 195c3cf..6e8ff63 100644 --- a/library/sndfile/1.0.25.gyp +++ b/library/sndfile/1.0.25.gyp @@ -79,8 +79,11 @@ "1.0.25/libsndfile-1.0.25/src" ] } - }, - + } + ], + "conditions": [ + ["OS!='iOS'", { + "targets": [ { "target_name": "sndfile-ulaw-test", "type": "executable", @@ -91,8 +94,10 @@ "1.0.25/libsndfile-1.0.25/tests/ulaw_test.c", "1.0.25/libsndfile-1.0.25/tests/utils.c" ], - "dependencies": [ "sndfile" ] - } - + "dependencies": [ "sndfile" ] + } + ] + } + ] ] } diff --git a/library/speex/1.2rc1.gyp b/library/speex/1.2rc1.gyp index 38b433d..f381671 100644 --- a/library/speex/1.2rc1.gyp +++ b/library/speex/1.2rc1.gyp @@ -43,7 +43,11 @@ "1.2rc1/speex-1.2rc1/include" ] } - }, + } + ], + "conditions": [ + ["OS!='iOS'", { + "targets": [ # this is one of speex's sample apps, is not exactly a unit test suite # P.S.: I can't get this to link on Windows, getting link errors @@ -76,7 +80,12 @@ "sources": [ "1.2rc1/speex-1.2rc1/libspeex/testenc.c" ], - "dependencies": [ "speex" ] - } + "dependencies": [ "speex" + + ] + } + ] + } + ] ] } diff --git a/library/speex/1.2rc2.gyp b/library/speex/1.2rc2.gyp index d9ca7ec..18338b9 100644 --- a/library/speex/1.2rc2.gyp +++ b/library/speex/1.2rc2.gyp @@ -20,10 +20,14 @@ "1.2rc2/speex-1.2rc2/include" ] } - }, + } + ], + "conditions": [ + ["OS!='iOS'", { + "targets": [ + { + # this is one of speex's sample apps, is not exactly a unit test suite - # this is one of speex's sample apps, is not exactly a unit test suite - { "target_name": "speexenc", "type": "executable", @@ -40,7 +44,11 @@ # libspeex itself has no dependency on ogg, but this sample # app here has "../ogg/ogg.gyp:*" - ] - } + + ] + } + ] + } + ] ] } diff --git a/library/tiny-js/rev81.gyp b/library/tiny-js/rev81.gyp index bf2ea72..2d03ab9 100644 --- a/library/tiny-js/rev81.gyp +++ b/library/tiny-js/rev81.gyp @@ -16,8 +16,13 @@ "rev81/clone" ] } - }, - + } + ], + "conditions": [ + ["OS!='iOS'", { + "targets": [ + + # interactive repl { "target_name": "tiny-js-script", @@ -26,6 +31,7 @@ "dependencies": [ "tiny-js" ] }, + # must be run from rev81/clone dir { "target_name": "tiny-js-test", @@ -34,7 +40,11 @@ }, "type": "executable", "sources": [ "rev81/clone/run_tests.cpp" ], - "dependencies": [ "tiny-js" ] - } + "dependencies": [ "tiny-js" + ] + } + ] + } + ] ] } diff --git a/library/xerces/3.1.1.bru b/library/xerces/3.1.1.bru index d29ae9a..ae3c2d1 100644 --- a/library/xerces/3.1.1.bru +++ b/library/xerces/3.1.1.bru @@ -6,6 +6,7 @@ "make_command": { # generates xercesc/util/Xerces_autoconf_config.hpp and ... "Linux": "cd xerces-c-3.1.1; ./configure --disable-shared --disable-transcoder-icu", + "Darwin": "cd xerces-c-3.1.1; ./configure --disable-shared --disable-transcoder-icu", # On Windows build config 'Static Debug' or 'Static Release' in # via VC10 vcproj. The vcproj has this same copy step here: diff --git a/library/xerces/3.1.1.gyp b/library/xerces/3.1.1.gyp index fef8844..9fff679 100644 --- a/library/xerces/3.1.1.gyp +++ b/library/xerces/3.1.1.gyp @@ -375,6 +375,31 @@ } }], + ["OS=='mac'", { + "defines": [ + "HAVE_CONFIG_H" + ], + "sources": [ + "3.1.1/xerces-c-3.1.1/src/stricmp.c", + "3.1.1/xerces-c-3.1.1/src/strnicmp.c", + "3.1.1/xerces-c-3.1.1/src/xercesc/util/FileManagers/PosixFileMgr.cpp", + "3.1.1/xerces-c-3.1.1/src/xercesc/util/MutexManagers/PosixMutexMgr.cpp", + "3.1.1/xerces-c-3.1.1/src/xercesc/util/NetAccessors/Curl/CurlNetAccessor.cpp", + "3.1.1/xerces-c-3.1.1/src/xercesc/util/NetAccessors/Curl/CurlURLInputStream.cpp", + "3.1.1/xerces-c-3.1.1/src/xercesc/util/Transcoders/MacOSUnicodeConverter/MacOSUnicodeConverter.cpp" + ], + "direct_dependent_settings": { + "xcode_settings": { + "OTHER_LDFLAGS" : [ "-lpthread", + "-lcurl", + "-framework CoreFoundation", + "-framework CoreServices" + ] + } + } + }], + + ["OS=='linux'", { "defines": [ "HAVE_CONFIG_H" @@ -397,10 +422,13 @@ ] } }] - ] - }, - + } + ], + + "conditions": [ + ["OS!='iOS'", { + "targets": [ { "target_name": "xerces_sample_PParse", "type": "executable", @@ -408,10 +436,15 @@ "cwd": "3.1.1/xerces-c-3.1.1/samples", "args": [ "data/personal.xml" ] }, - "sources": [ "3.1.1/xerces-c-3.1.1/samples/src/PParse/*.cpp" ], + "sources": [ "3.1.1/xerces-c-3.1.1/samples/src/PParse/PParse.cpp", + "3.1.1/xerces-c-3.1.1/samples/src/PParse/PParseHandlers.cpp" + ], "dependencies": [ "xerces" ] } + + ] + }] ] } From 0bf4319fce48070bb92c5967f5a5c66b3e848410 Mon Sep 17 00:00:00 2001 From: Uwe Meier Date: Tue, 3 Feb 2015 11:56:55 -0500 Subject: [PATCH 08/21] fixed print command --- brulib/make.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/brulib/make.py b/brulib/make.py index 2d06e0d..1d86bd2 100644 --- a/brulib/make.py +++ b/brulib/make.py @@ -25,7 +25,7 @@ def cmd_make(config, verbose, targetPlatform): param verbose 0 means not verbose, >= 1 means higher verbosity level (whatever that means in the underlying toolchain) """ - print("running 'bru make --config {} --os {}'".format(config,os)) + print("running 'bru make --config {} --targetPlatform {}'".format(config,targetPlatform)) # first locate the single gyp in the cwd bru_file = brulib.install.get_single_bru_file('.') From 3bfeb2cd86a69ed42ffffca9532ca39a04e79d3d Mon Sep 17 00:00:00 2001 From: Uwe Meier Date: Tue, 3 Feb 2015 12:54:05 -0500 Subject: [PATCH 09/21] openssl builds now for MacOS --- library/openssl/1.0.1j.bru | 1 + library/openssl/1.0.1j.gyp | 23 +++++++++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/library/openssl/1.0.1j.bru b/library/openssl/1.0.1j.bru index d8bec60..c4ea25d 100644 --- a/library/openssl/1.0.1j.bru +++ b/library/openssl/1.0.1j.bru @@ -16,6 +16,7 @@ # the same options ./configure had configured. TODO: revisit this process. "make_command": { "Linux": "cd openssl-1.0.1j; ./config no-asm no-shared no-ssl2 no-ssl3 no-hw no-zlib no-threads", + "Darwin":"cd openssl-1.0.1j; ./Configure darwin64-x86_64-cc no-asm no-shared no-ssl2 no-ssl3 no-hw no-zlib no-threads -Wno-c++11-narrowing -stdlib=libc++ ", # Why no-asm? Because otherwise you need to install yet another # buildtool for compiling openssl (see INSTALL.W32). I'm not sure diff --git a/library/openssl/1.0.1j.gyp b/library/openssl/1.0.1j.gyp index 84e74bd..c5844b0 100644 --- a/library/openssl/1.0.1j.gyp +++ b/library/openssl/1.0.1j.gyp @@ -718,6 +718,22 @@ "-luser32.lib" ] } + }], + ["OS=='mac'", { + "defines": [ + "OPENSSL_NO_EC_NISTP_64_GCC_128", + "OPENSSL_NO_GMP", + "OPENSSL_NO_JPAKE", + "OPENSSL_NO_MD2", + "OPENSSL_NO_RC5", + "OPENSSL_NO_RFC3779", + "OPENSSL_NO_SCTP", + "OPENSSL_NO_SSL2", + "OPENSSL_NO_SSL3", + "OPENSSL_NO_STORE", + "OPENSSL_NO_UNIT_TEST", + "NO_WINDOWS_BRAINDEATH" + ] }, # OS!='win' @@ -743,8 +759,10 @@ } }] ] - }, - + } + ], + "conditions": [ + ["OS!='iOS'", # openssl has code for many separate test executables in the /test # dir, let's build a small subset of these via gyp to verify the # correctness of link_settings specified in the openssl gyp target. @@ -798,5 +816,6 @@ # ], # "dependencies": [ "openssl" ] #} + ] ] } From fa7b1db16bd3278860fadebb9ca1c3537d8fdfb2 Mon Sep 17 00:00:00 2001 From: Uwe Meier Date: Tue, 3 Feb 2015 12:54:41 -0500 Subject: [PATCH 10/21] zlib builds now for MacOS/iOS (required patch for includes) --- library/zlib/1.2.8.bru | 5 ++++- library/zlib/1.2.8.gyp | 7 +++++-- library/zlib/zlib-1.2.8-config.tar.gz | Bin 0 -> 3058 bytes 3 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 library/zlib/zlib-1.2.8-config.tar.gz diff --git a/library/zlib/1.2.8.bru b/library/zlib/1.2.8.bru index e3ca8cb..ddd5827 100644 --- a/library/zlib/1.2.8.bru +++ b/library/zlib/1.2.8.bru @@ -1,6 +1,9 @@ { "homepage": "http://www.zlib.net/", - "url": "http://zlib.net/zlib-1.2.8.tar.gz", + "url": [ + "http://zlib.net/zlib-1.2.8.tar.gz", + "file://zlib-1.2.8-config.tar.gz" + ], "md5": "44d667c142d7cda120332623eab69f40", "module": "zlib", "version": "1.2.8" diff --git a/library/zlib/1.2.8.gyp b/library/zlib/1.2.8.gyp index 596d120..48b35fa 100644 --- a/library/zlib/1.2.8.gyp +++ b/library/zlib/1.2.8.gyp @@ -39,7 +39,10 @@ "1.2.8/zlib-1.2.8/include" ] } - }, + } + ], + "conditions": [ + ["OS!='iOS'", # this is one of zlib's tests { @@ -54,5 +57,5 @@ # there's also a minigzip in the test dir, but that's more of an # interactive test, I only care about automated tests here - ] + ]] } diff --git a/library/zlib/zlib-1.2.8-config.tar.gz b/library/zlib/zlib-1.2.8-config.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..217f54612602a111f4ff4d9976dab51951a4afe4 GIT binary patch literal 3058 zcmVkT<7V6}QB1sQ)Fn zm*rQwIW-heKmi35P(T5n53I@I!Eb(AF$yT4fX@&pKQJ}EP~$r}uBr8VYP_GJd8kIF z#usXQC&x8~cTbJ?)%ZY-57o%j_(F~EH{rf6rqv<&Q5kw_ zha=`WW+rkeHqtG?=J?HF@ASOi84OmcjEwp8snAS$l^VbLilvY2`8TXOYc{KuOpFO% zeKj~c@58H(asjryv=kZ{+Z}#?3|(W>yJvnnX!i!A`sdkGd&)-e+sviXJmaN*>Y9dORWAeR5D_5ny$-U+wKnP zKzc4aVEVOgJNl)=As`D!NG`7DZne$^-3^v9PGyA+zlcqiEDL)j(^-isk}6M^3;*(p ztUx}l9@y8c)k`4I18f5#PdU}U(U&K zPi@2Z0?!KB*z-C3K}Qn+F$}aL%+b-Ed{NnCTCx$jvS2ifbYDmJ!kHU64zU96*mgyy zLVX3fmd}I838~u|c~gFk1}7XrM*MlMGp9~N$T<|{&0y0J_qkw|(vrs_kmy9A$1Fq> z2xvW+=x9kMzISb#SR{8<3RRAjNy4e$q*`4_4vuH&PKHE0Lvc8d5hFwKD*k2O-)c)N zxcc0SsC&DNhC`gv&=Kws7TuKOz=HYs(sKgQH;G0N#UyeK*@fxORG$Z=4hBW|xhy?@!9~B*@AvvDNyQrqk=1r9H%z_?Op#<_<}2|x zL^sCd>C0%Hg;z@Ajg_&fT$0An3+EFqTY2~_>>NPL9cKh%giIaEUCVeP~W63yt~s z1R2MPReIX`PCMc|c3Aw?hgSw);x ziG2L#;N{Vv`=-O5)SlK=(y=E<^Ck~AkzWEY@l+jYCk!1fuA@Vr`dVYejVo$?DAi7o zfw@Qmkr5&l=l9XhdS@N@US_7>X|>s2y|I^_eBJM&m)@z>nmgHP+{rp;ZB~nWY!VRH z&yWt9Q0Z1EiU-HpNzOp@{xa>0&P{hB9$%R?%DJ3MPFB#9Uhl80nzZtc=UoYWUFt<$ zz%vAgz4PytSWIO8$s7tIqnRkMMu-BI(?j>1)e~$~P*e)kupr)ma*95V1x_yhVoe-M zN^R<)p4T*)mXe;FWdB@`yCSgRvx!HhK?H}~4Py-;c^k-GV;#kvSP-@%mqDWiY_^|p z*_dqz!kC+)xCuZp+aBrH{26Nh_!3$}xxbu;Jl9-?Kyp!cZpDod!Hv*WUZ@p;RB`E{zQ=J%6_7Tk?+PFG z6P~)iygj`-Nka`m>s|9KnPn~#$-5=_00<1508|P?$k%A^kFP0QpmZ&k# zrVn`#(?TGrrs!HOmSL`4jW53 zBN}Fr7KOv9+@Vu{zo|r`4s1av?pdpZLVnb@D|{Eqf{kJ@r#OnA<63ROnA?Luv1J?_I3 z%liH*%Ssx93TrN_jDz8_hI46TVRQA)+M2hwySx>yCq?f{(9?{FT>B$=dxk`-6D3yUt)jRcld4a(b(ImuF z5gm_8BV%I>?&Ue0`YmwCcXnEhgmWy zctJbKrB*2X$8DW3l~+(kpnw7jD4>7>3Mim}0zP~AFYF=;jsQ>q026Hp A;Q#;t literal 0 HcmV?d00001 From 26ea9937f46fdc737da251b3b8b201cb5d08d5a2 Mon Sep 17 00:00:00 2001 From: Uwe Meier Date: Wed, 4 Feb 2015 12:06:21 -0500 Subject: [PATCH 11/21] updated compiler setting for iOS --- brulib/make.py | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/brulib/make.py b/brulib/make.py index 1d86bd2..cd258ba 100644 --- a/brulib/make.py +++ b/brulib/make.py @@ -195,13 +195,16 @@ def cmd_make_macos(gyp_filename, config, verbose): dirname = os.path.dirname(gyp_filename) assert dirname == '.' or len(dirname) == 0 gyp_filename = os.path.basename(gyp_filename) - gyp_cmdline = 'gyp --depth=. -f xcode {} --generator-output=./xcode-macos'.format(gyp_filename) run_gyp(gyp_cmdline) - if not os.path.exists('xcode-macos/package.xcodeproj'): - raise Exception('gyp did not generate ./xcode-macos/package.xcodeproj, no idea how to ' - 'build with your toolchain, please build manually') - xcode_cmdline = 'xCodeBuild -alltargets -project xcode-macos/package.xcodeproj -configuration {}'.format(config) + filepattern = './xcode-macos/*.xcodeproj' + files = glob.glob(filepattern) + print(filepattern) + print(files) + if len(files) == 0: + raise Exception('gyp did not generate {}, no idea how to ' + 'build with your toolchain, please build manually').format(filepattern) + xcode_cmdline = 'xCodeBuild -alltargets -project {} -configuration {}'.format(files[0],config) print("running '{}'".format(xcode_cmdline)) returncode = os.system(xcode_cmdline) if returncode != 0: @@ -221,15 +224,18 @@ def cmd_make_ios(gyp_filename, config, verbose): gyp_filename = os.path.basename(gyp_filename) gyp_cmdline = 'gyp --depth=. -f xcode -DOS=iOS {} --generator-output=./xcode-ios'.format(gyp_filename) run_gyp(gyp_cmdline) - if not os.path.exists('xcode-ios/package.xcodeproj'): - raise Exception('gyp did not generate ./xcode-ios/package.xcodeproj, no idea how to ' - 'build with your toolchain, please build manually') - xcode_cmdline = 'xCodeBuild -alltargets -project xcode-ios/package.xcodeproj -configuration {} -sdk iphonesimulator'.format(config) + + filepattern = './xcode-ios/*.xcodeproj' + files = glob.glob(filepattern) + if len(files) == 0: + raise Exception('gyp did not generate {}, no idea how to ' + 'build with your toolchain, please build manually').format(filepattern) + xcode_cmdline = 'xCodeBuild -alltargets -project {} -configuration {} -sdk iphonesimulator'.format(files[0],config) print("running '{}'".format(xcode_cmdline)) returncode = os.system(xcode_cmdline) if returncode != 0: raise Exception('Build failed: make for device returned', returncode) - xcode_cmdline = 'xCodeBuild -alltargets -project xcode-ios/package.xcodeproj -configuration {} -sdk iphoneos'.format(config) + xcode_cmdline = 'xCodeBuild -alltargets -project {} -configuration {} -sdk iphoneos'.format(files[0],config) print("running '{}'".format(xcode_cmdline)) returncode = os.system(xcode_cmdline) if returncode != 0: @@ -237,8 +243,6 @@ def cmd_make_ios(gyp_filename, config, verbose): mkdir_cmdline = 'mkdir lib/{}-Universial'.format(config) returncode = os.system(mkdir_cmdline) filepattern = './lib/{}-iphoneos/lib*.a'.format(config) - print (filepattern) - print (glob.glob(filepattern)) for file in glob.glob(filepattern): name = os.path.basename(os.path.normpath(file)) command = 'lipo -create lib/{}-iphoneos/{} lib/{}-iphonesimulator/{} -output lib/{}-Universial/{}'.format(config,name,config,name,config,name) From aa1365943c5f7ef19b86bddf52ecb91c5c319e3c Mon Sep 17 00:00:00 2001 From: Uwe Meier Date: Wed, 4 Feb 2015 12:06:43 -0500 Subject: [PATCH 12/21] updated compiler setting for iOS --- bru_common.gypi | 4 ++-- library/openssl/1.0.1j.gyp | 16 ++++++++++++++++ library/xerces/3.1.1.gyp | 23 +++++++++++++++++++++++ library/zlib/zlib-1.2.8-config.tar.gz | Bin 3058 -> 3052 bytes 4 files changed, 41 insertions(+), 2 deletions(-) diff --git a/bru_common.gypi b/bru_common.gypi index eae7e4f..f5f9c59 100644 --- a/bru_common.gypi +++ b/bru_common.gypi @@ -43,7 +43,7 @@ 'CODE_SIGN_IDENTITY': 'iPhone Developer', 'IPHONEOS_DEPLOYMENT_TARGET': '6.0', 'ARCHS': '$(ARCHS_STANDARD_32_64_BIT) armv7s', - 'CLANG_CXX_LANGUAGE_STANDARD' : 'gnu++0x', + 'CLANG_CXX_LANGUAGE_STANDARD' : 'c++0x', 'CLANG_CXX_LIBRARY' : 'libc++', 'OTHER_CFLAGS' : '-fvisibility=hidden', }, # xcode_settings @@ -91,7 +91,7 @@ 'CODE_SIGN_IDENTITY': 'iPhone Developer', 'IPHONEOS_DEPLOYMENT_TARGET': '6.0', 'ARCHS': '$(ARCHS_STANDARD_32_64_BIT) armv7s', - 'CLANG_CXX_LANGUAGE_STANDARD' : 'gnu++0x', + 'CLANG_CXX_LANGUAGE_STANDARD' : 'c++0x', 'CLANG_CXX_LIBRARY' : 'libc++', 'OTHER_CFLAGS' : '-fvisibility=hidden', }, # xcode_settings diff --git a/library/openssl/1.0.1j.gyp b/library/openssl/1.0.1j.gyp index c5844b0..7741fa9 100644 --- a/library/openssl/1.0.1j.gyp +++ b/library/openssl/1.0.1j.gyp @@ -735,6 +735,22 @@ "NO_WINDOWS_BRAINDEATH" ] }, + ["OS=='iOS'", { + "defines": [ + "OPENSSL_NO_EC_NISTP_64_GCC_128", + "OPENSSL_NO_GMP", + "OPENSSL_NO_JPAKE", + "OPENSSL_NO_MD2", + "OPENSSL_NO_RC5", + "OPENSSL_NO_RFC3779", + "OPENSSL_NO_SCTP", + "OPENSSL_NO_SSL2", + "OPENSSL_NO_SSL3", + "OPENSSL_NO_STORE", + "OPENSSL_NO_UNIT_TEST", + "NO_WINDOWS_BRAINDEATH" + ] + }, # OS!='win' { diff --git a/library/xerces/3.1.1.gyp b/library/xerces/3.1.1.gyp index 9fff679..c2afb3c 100644 --- a/library/xerces/3.1.1.gyp +++ b/library/xerces/3.1.1.gyp @@ -398,6 +398,29 @@ } } }], + ["OS=='iOS'", { + "defines": [ + "HAVE_CONFIG_H" + ], + "sources": [ + "3.1.1/xerces-c-3.1.1/src/stricmp.c", + "3.1.1/xerces-c-3.1.1/src/strnicmp.c", + "3.1.1/xerces-c-3.1.1/src/xercesc/util/FileManagers/PosixFileMgr.cpp", + "3.1.1/xerces-c-3.1.1/src/xercesc/util/MutexManagers/PosixMutexMgr.cpp", + "3.1.1/xerces-c-3.1.1/src/xercesc/util/NetAccessors/Curl/CurlNetAccessor.cpp", + "3.1.1/xerces-c-3.1.1/src/xercesc/util/NetAccessors/Curl/CurlURLInputStream.cpp", + "3.1.1/xerces-c-3.1.1/src/xercesc/util/Transcoders/MacOSUnicodeConverter/MacOSUnicodeConverter.cpp" + ], + "direct_dependent_settings": { + "xcode_settings": { + "OTHER_LDFLAGS" : [ "-lpthread", + "-lcurl", + "-framework CoreFoundation", + "-framework CoreServices" + ] + } + } + }], ["OS=='linux'", { diff --git a/library/zlib/zlib-1.2.8-config.tar.gz b/library/zlib/zlib-1.2.8-config.tar.gz index 217f54612602a111f4ff4d9976dab51951a4afe4..c90f0e552c6e59fb4aa9d737ccdd69a5e6567908 100644 GIT binary patch literal 3052 zcmV{EPO1eR4V(81{33+94ocD92Kx?t-e>U*Y_H=Dy!gOw^3k?k0wzHLO;+wh!W2D zTk(K49KK~;og*IqN8oj0{~c|oHP8lu>%CnQ?+wrgYef4!7 zQRVP?LOT9GPV~Pk{;Ty$rM?{h)#_dz|DOmp4nwnA5aE2UAjiTV*Q4H3|0{4O&988C zYRDmn9CFAZha5g1*pS1$-~6;<Ksz4O)kV_(HIXfd9XxzP~Bl+yvZ_FAM*WqGf7)rp7mN%o~9m za>yZvPYs#h|3|M!Vc_qKKky#!`u)Gw*iC-_t5x#f|34+%=J)?aL00zv+>T}H_kW`J zH~xRSgtC#$|K4yXJNk5L^PLMm58965nwB%dVi*j!A01S8>$U3s<45%$f7TpUAQk@~ zDf-|2`~QBWu^j(+%;W!4z{3YDvOC+}X5$rwmzmEw@S?38H?Ry2X@%4~V{m%7x%s6vguF~UY4(rX zo$g6{udWSx&-+L1%`X|VhE8@hwZ`N@`RXdG(mIELL&-$&5D2|aXVAXT4!aiv$s=@b zTvQC?5DTg`&(DFYVZt%&(B$mv(82M|o$=FUR;ztR43)gEPP&I$_w1tG zKWm>X)ZiT&_HGJQHY(q6Rt*-62?l;N%pp0x$=n&(}u(>(2-e4kPzBEw-CeWoTo zL=w~JGc`H$tN`97hSaoSyFRAHu)OJ6PiwV1C(Vnts?&(yp@^Qz6yc~0J+p!_b8Ryf zxfC187GQJy>Zo^m-fs^EYgI%l~O9kgs;9BoSpaK zRh>+LtuC#EM#^?a-ycKQ*!06QKOMAs196ySyTe}pqU{Bwja3F01OIY7RF7;Wl^_S!G^FNo$n~(%4Ksblv z&e)8zzoXPK-SF6uyXF3V^7 zwQkw^rOhEA3&uz;j_YhU&j#HsmM~6ag$=)mOcpN-d&SdfiAs_xOP2}%;+m{LKCT|v z*R0w=S&tbdCr{3i)c`@Ph1Ay-eGZy~qxaF}i_^jT8LT&`S1RvkFHJjrF}NLx@@LpK zbZqO2vsfR++1N71WL}T|BeXnjQn5x_DYFF+m>*cSO;w!v;dJVH0oE@UGn)t_@oX7MR>Zmz!b3-x=iro z8J)NTfMd+5e`MFLWlkBg7E!TYr&tWT4vcNR=B3g>77ywjdN3Okc!F}srh!L@DGwXL zZMf$-uILHTU*N&@mdjj{;Mw!DR=cmM-Y+WWGpN9w`Kkp`s(l@CE0&-L4NpLm6UElc zUcXg3=D~^X2W^Rz>Y&u=5g&t#e!JiA^;MFJHWVVO?bdD>e-)S_$wbW8;%|v=jLFj% z(K-vSl*C(WV^g^#je#31rd+o2@LAXwF7BXOSTP+L;I^G%avLJd_&iu4OKBgP)5$^;J~=_gu_Kk9 zHowzO+o#$|`$hYNx~NAfk3^%FT70z9v1iw_yw+`QJ#=B@;Si~SVvrJ`>4sEuMgAjq zfW@aUy6^{TR>>WTVioZwa^Q@vTw-QI?ZhPtw%`zFL8R)?@vRX>ANg5HoK=Z@{Oa&| zXV87sW{;|mYbxnjQ>1y5`(@-8-;F(0N7@Mjn~Uq{$fLg27<1!_njcEFQ)FN+l0aw# zNX6NGw6oq>8@`vC>9?CLwqL97rzc=qfOT9^e8dw=HTMAfCL$ z-G&{G@q`(n=Rqe753*oc6fcoka7?j9iXHV;G*7CybWz`(WH01-8h%Zz4d`?8Fv=j6UqKkauA^_e^K~FnP<020yC3cOKBU(2wu@>g*1SyXh4Z%Y%*gRIRLW(x?QxK z!lSZ2BQASnfXH1^`ydCc7@PKaBKj+tbFje^kzLBH_9UG+6rZFH()-gyXz&pYvq+1= z;Z*L>slP8Pk*EV(5{kRSbwVLOa5^c<83nX7gYZfm4E4ZF^FT=m*7$zJL%f7Z+=8$L z-y1ZyCb(=W-UlliM9QIfwxjwU(ICaaYe$QNn`t7HB}u5GiR4|Q_bY39kmjgQ+|Usf zik4VWx9PwOQa2V%(!ix|T+MXP^fP`(`@BVM88N0jV>yK?qug?!wuv6~;jv{sZ=Gc& zjX{MqlT{}EXjQ|RG_th0dS^YPiy@P@0r54dZBlXS8N(!-DUtai(`|bE#z3wTqasSBZ&CG5d|zH*@I*8*F;zs{rP2u5 zQ7#mdQtBEG&1h(pQ(bg?XjY{3><)``RiKNDdW?6KuLFVjG-4Co0pr80m=wIAo%m8K u6#nD3j+x3Us4(77{UcHiIpmN-4msqILk>CQkV6iiJ^U9p-?kV4PyhhB;RG50 literal 3058 zcmVkT<7V6}QB1sQ)Fn zm*rQwIW-heKmi35P(T5n53I@I!Eb(AF$yT4fX@&pKQJ}EP~$r}uBr8VYP_GJd8kIF z#usXQC&x8~cTbJ?)%ZY-57o%j_(F~EH{rf6rqv<&Q5kw_ zha=`WW+rkeHqtG?=J?HF@ASOi84OmcjEwp8snAS$l^VbLilvY2`8TXOYc{KuOpFO% zeKj~c@58H(asjryv=kZ{+Z}#?3|(W>yJvnnX!i!A`sdkGd&)-e+sviXJmaN*>Y9dORWAeR5D_5ny$-U+wKnP zKzc4aVEVOgJNl)=As`D!NG`7DZne$^-3^v9PGyA+zlcqiEDL)j(^-isk}6M^3;*(p ztUx}l9@y8c)k`4I18f5#PdU}U(U&K zPi@2Z0?!KB*z-C3K}Qn+F$}aL%+b-Ed{NnCTCx$jvS2ifbYDmJ!kHU64zU96*mgyy zLVX3fmd}I838~u|c~gFk1}7XrM*MlMGp9~N$T<|{&0y0J_qkw|(vrs_kmy9A$1Fq> z2xvW+=x9kMzISb#SR{8<3RRAjNy4e$q*`4_4vuH&PKHE0Lvc8d5hFwKD*k2O-)c)N zxcc0SsC&DNhC`gv&=Kws7TuKOz=HYs(sKgQH;G0N#UyeK*@fxORG$Z=4hBW|xhy?@!9~B*@AvvDNyQrqk=1r9H%z_?Op#<_<}2|x zL^sCd>C0%Hg;z@Ajg_&fT$0An3+EFqTY2~_>>NPL9cKh%giIaEUCVeP~W63yt~s z1R2MPReIX`PCMc|c3Aw?hgSw);x ziG2L#;N{Vv`=-O5)SlK=(y=E<^Ck~AkzWEY@l+jYCk!1fuA@Vr`dVYejVo$?DAi7o zfw@Qmkr5&l=l9XhdS@N@US_7>X|>s2y|I^_eBJM&m)@z>nmgHP+{rp;ZB~nWY!VRH z&yWt9Q0Z1EiU-HpNzOp@{xa>0&P{hB9$%R?%DJ3MPFB#9Uhl80nzZtc=UoYWUFt<$ zz%vAgz4PytSWIO8$s7tIqnRkMMu-BI(?j>1)e~$~P*e)kupr)ma*95V1x_yhVoe-M zN^R<)p4T*)mXe;FWdB@`yCSgRvx!HhK?H}~4Py-;c^k-GV;#kvSP-@%mqDWiY_^|p z*_dqz!kC+)xCuZp+aBrH{26Nh_!3$}xxbu;Jl9-?Kyp!cZpDod!Hv*WUZ@p;RB`E{zQ=J%6_7Tk?+PFG z6P~)iygj`-Nka`m>s|9KnPn~#$-5=_00<1508|P?$k%A^kFP0QpmZ&k# zrVn`#(?TGrrs!HOmSL`4jW53 zBN}Fr7KOv9+@Vu{zo|r`4s1av?pdpZLVnb@D|{Eqf{kJ@r#OnA<63ROnA?Luv1J?_I3 z%liH*%Ssx93TrN_jDz8_hI46TVRQA)+M2hwySx>yCq?f{(9?{FT>B$=dxk`-6D3yUt)jRcld4a(b(ImuF z5gm_8BV%I>?&Ue0`YmwCcXnEhgmWy zctJbKrB*2X$8DW3l~+(kpnw7jD4>7>3Mim}0zP~AFYF=;jsQ>q026Hp A;Q#;t From bd2957ff311cb3b5f42357d225969384068f6794 Mon Sep 17 00:00:00 2001 From: Uwe Meier Date: Thu, 5 Feb 2015 13:25:52 -0500 Subject: [PATCH 13/21] fixed openssl MacOS compile problem --- library/openssl/1.0.1j.bru | 3 ++- library/openssl/1.0.1j.gyp | 7 +++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/library/openssl/1.0.1j.bru b/library/openssl/1.0.1j.bru index c4ea25d..503d4d2 100644 --- a/library/openssl/1.0.1j.bru +++ b/library/openssl/1.0.1j.bru @@ -17,7 +17,8 @@ "make_command": { "Linux": "cd openssl-1.0.1j; ./config no-asm no-shared no-ssl2 no-ssl3 no-hw no-zlib no-threads", "Darwin":"cd openssl-1.0.1j; ./Configure darwin64-x86_64-cc no-asm no-shared no-ssl2 no-ssl3 no-hw no-zlib no-threads -Wno-c++11-narrowing -stdlib=libc++ ", - + "iOS":" cd openssl-1.0.1j; ./Configure darwin64-x86_64-cc no-asm no-shared no-ssl2 no-ssl3 no-hw no-zlib no-threads -Wno-c++11-narrowing -stdlib=libc++ ", + #"iOS":"cd openssl-1.0.1j; ./config --host=arm-apple-darwin CXX=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++ CXXFLAGS=-Wno-c++11-narrowing -arch armv7 -arch armv7s -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -fvisibility=hidden -miphoneos-version-min=6.0 CC=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc CFLAGS=-Wno-c++11-narrowing -arch armv7 -arch armv7s -arch arm64 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -fmessage-length=0 -fvisibility=hidden -miphoneos-version-min=6.0 -gdwarf-2 -mthumb -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk LIBTOOL=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/libtool STRIP=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/strip", # Why no-asm? Because otherwise you need to install yet another # buildtool for compiling openssl (see INSTALL.W32). I'm not sure # how much performance we sacrifice by not using asm, hopefully diff --git a/library/openssl/1.0.1j.gyp b/library/openssl/1.0.1j.gyp index 7741fa9..d486b02 100644 --- a/library/openssl/1.0.1j.gyp +++ b/library/openssl/1.0.1j.gyp @@ -734,7 +734,7 @@ "OPENSSL_NO_UNIT_TEST", "NO_WINDOWS_BRAINDEATH" ] - }, + }], ["OS=='iOS'", { "defines": [ "OPENSSL_NO_EC_NISTP_64_GCC_128", @@ -750,10 +750,9 @@ "OPENSSL_NO_UNIT_TEST", "NO_WINDOWS_BRAINDEATH" ] - }, + }], - # OS!='win' - { + ["OS=='linux'", { "defines": [ # from Linux Makefile after ./configure "DSO_DLFCN", From e91af3b7247f65b43a2c6a3760cfe9fa1ebf176b Mon Sep 17 00:00:00 2001 From: Uwe Meier Date: Thu, 5 Feb 2015 13:26:23 -0500 Subject: [PATCH 14/21] fixed xerces MacOS compile problem --- library/xerces/3.1.1.bru | 1 + library/xerces/3.1.1.gyp | 11 +++++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/library/xerces/3.1.1.bru b/library/xerces/3.1.1.bru index ae3c2d1..ee6b7c5 100644 --- a/library/xerces/3.1.1.bru +++ b/library/xerces/3.1.1.bru @@ -7,6 +7,7 @@ # generates xercesc/util/Xerces_autoconf_config.hpp and ... "Linux": "cd xerces-c-3.1.1; ./configure --disable-shared --disable-transcoder-icu", "Darwin": "cd xerces-c-3.1.1; ./configure --disable-shared --disable-transcoder-icu", + #"iOS" : "cd xerces-c-3.1.1; ./configure --disable-shared --disable-transcoder-icu --host=arm-apple-darwin --disable-shared CXX=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++ CXXFLAGS=\”-I../opus/opus/include/ -I ../libogg-1.3.1/include/ -I../openssl-1.0.1e/include -Wno-c++11-narrowing -std=c++11 -stdlib=libc++ -arch armv7 -arch armv7s -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk -fvisibility=hidden -miphoneos-version-min=6.0\” CC=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc CFLAGS=\”-I../opus/opus/include/ -I ../libogg-1.3.1/include/ -I../openssl-1.0.1e/include -Wno-c++11-narrowing -std=c++11 -stdlib=libc++ -arch armv7 -arch armv7s -arch arm64 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 Wreturn-type -Wunused-variable -fmessage-length=0 -fvisibility=hidden -miphoneos-version-min=6.0 -gdwarf-2 -mthumb -I/Library/iPhone/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk\” LIBTOOL=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/libtool STRIP=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/strip", # On Windows build config 'Static Debug' or 'Static Release' in # via VC10 vcproj. The vcproj has this same copy step here: diff --git a/library/xerces/3.1.1.gyp b/library/xerces/3.1.1.gyp index c2afb3c..7a3e5cb 100644 --- a/library/xerces/3.1.1.gyp +++ b/library/xerces/3.1.1.gyp @@ -406,17 +406,16 @@ "3.1.1/xerces-c-3.1.1/src/stricmp.c", "3.1.1/xerces-c-3.1.1/src/strnicmp.c", "3.1.1/xerces-c-3.1.1/src/xercesc/util/FileManagers/PosixFileMgr.cpp", - "3.1.1/xerces-c-3.1.1/src/xercesc/util/MutexManagers/PosixMutexMgr.cpp", - "3.1.1/xerces-c-3.1.1/src/xercesc/util/NetAccessors/Curl/CurlNetAccessor.cpp", - "3.1.1/xerces-c-3.1.1/src/xercesc/util/NetAccessors/Curl/CurlURLInputStream.cpp", - "3.1.1/xerces-c-3.1.1/src/xercesc/util/Transcoders/MacOSUnicodeConverter/MacOSUnicodeConverter.cpp" + "3.1.1/xerces-c-3.1.1/src/xercesc/util/MutexManagers/NoThreadMutexMgr.cpp", + "3.1.1/xerces-c-3.1.1/src/xercesc/util/NetAccessors/Socket/SocketNetAccessor.cpp", + "3.1.1/xerces-c-3.1.1/src/xercesc/util/NetAccessors/Socket/UnixHTTPURLInputStream.cpp", + "3.1.1/xerces-c-3.1.1/src/xercesc/util/Transcoders/Iconv/IconvTransService.cpp" ], "direct_dependent_settings": { "xcode_settings": { "OTHER_LDFLAGS" : [ "-lpthread", "-lcurl", - "-framework CoreFoundation", - "-framework CoreServices" + "-framework CoreFoundation" ] } } From 47821ade076c754a33d3148d05e518fd38d46787 Mon Sep 17 00:00:00 2001 From: Uwe Meier Date: Thu, 5 Feb 2015 13:26:58 -0500 Subject: [PATCH 15/21] fixed MacOS and iOS build settings --- bru_common.gypi | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/bru_common.gypi b/bru_common.gypi index f5f9c59..eaf308c 100644 --- a/bru_common.gypi +++ b/bru_common.gypi @@ -35,7 +35,13 @@ ["target_arch=='x64'", { "msvs_configuration_platform": "x64", }], - + ['OS=="mac"', { + 'xcode_settings': { + 'CLANG_CXX_LANGUAGE_STANDARD' : 'c++0x', + 'CLANG_CXX_LIBRARY' : 'libc++', + 'OTHER_CFLAGS' : '-Wno-c++11-narrowing -fvisibility=hidden', + }, # xcode_settings + }], ['OS=="iOS"', { 'xcode_settings': { 'SDKROOT': 'iphoneos', @@ -45,7 +51,7 @@ 'ARCHS': '$(ARCHS_STANDARD_32_64_BIT) armv7s', 'CLANG_CXX_LANGUAGE_STANDARD' : 'c++0x', 'CLANG_CXX_LIBRARY' : 'libc++', - 'OTHER_CFLAGS' : '-fvisibility=hidden', + 'OTHER_CFLAGS' : '-Wno-c++11-narrowing -fvisibility=hidden', }, # xcode_settings }] ], @@ -84,6 +90,13 @@ ["target_arch=='x64'", { "msvs_configuration_platform": "x64", }], + ['OS=="mac"', { + 'xcode_settings': { + 'CLANG_CXX_LANGUAGE_STANDARD' : 'c++0x', + 'CLANG_CXX_LIBRARY' : 'libc++', + 'OTHER_CFLAGS' : '-Wno-c++11-narrowing -fvisibility=hidden', + }, # xcode_settings + }], ['OS=="iOS"', { 'xcode_settings': { 'SDKROOT': 'iphoneos', @@ -93,10 +106,9 @@ 'ARCHS': '$(ARCHS_STANDARD_32_64_BIT) armv7s', 'CLANG_CXX_LANGUAGE_STANDARD' : 'c++0x', 'CLANG_CXX_LIBRARY' : 'libc++', - 'OTHER_CFLAGS' : '-fvisibility=hidden', + 'OTHER_CFLAGS' : '-Wno-c++11-narrowing -fvisibility=hidden', }, # xcode_settings }] - ], "msvs_settings": { "VCCLCompilerTool": { From 0d2d287794a7719461e5a90373bf522e57e30dff Mon Sep 17 00:00:00 2001 From: Uwe Meier Date: Thu, 5 Feb 2015 13:27:37 -0500 Subject: [PATCH 16/21] added support for --targetPlatform flag for "brut install" --- bru.py | 4 +++- brulib/install.py | 19 +++++++++++-------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/bru.py b/bru.py index 1a3c5cc..d8c7c6b 100755 --- a/bru.py +++ b/bru.py @@ -29,6 +29,8 @@ def main(): parser_install = subparsers.add_parser('install') parser_install.add_argument("installables", default = [], nargs = '*', help = 'e.g. googlemock@1.7.0') + parser_install.add_argument('--targetPlatform', default='Native', required=False, + help = 'targetPlatform Native | iOS') parser_test = subparsers.add_parser('test') parser_test.add_argument("testables", default = [], nargs = '*', @@ -48,7 +50,7 @@ def main(): args = parser.parse_args() library = get_library() if args.command == 'install': - brulib.install.cmd_install(library, args.installables) + brulib.install.cmd_install(library, args.installables, args.targetPlatform) elif args.command == 'make': brulib.make.cmd_make(args.config, args.verbose, args.targetPlatform) elif args.command == 'test': diff --git a/brulib/install.py b/brulib/install.py index 720a56e..618f276 100644 --- a/brulib/install.py +++ b/brulib/install.py @@ -219,12 +219,15 @@ def exec_make_command(formula, bru_modules_root, system): raise ValueError("build failed with error code {}".format(error_code)) touch(make_done_file) -def download_module(library, module_name, module_version): +def download_module(library, module_name, module_version, targetPlatform): bru_modules_root = "./bru_modules" formula = library.load_formula(module_name, module_version) brulib.module_downloader.get_urls(library, formula, bru_modules_root) - exec_make_command(formula, bru_modules_root, platform.system()) - + if targetPlatform == 'Native': + exec_make_command(formula, bru_modules_root, platform.system()) + else: + exec_make_command(formula, bru_modules_root, targetPlatform) + def verify_resolved_dependencies(formula, target, resolved_dependencies): """ param formula is the formula with a bunch of desired(!) dependencies which after conflict resolution across the whole set of diverse deps @@ -448,7 +451,7 @@ def resolve_conflicts(library, dependencies, root_requestor): return [(module, resolved['version'], resolved['requestor']) for (module, resolved) in recursive_deps.items()] -def install_from_bru_file(bru_filename, library): +def install_from_bru_file(bru_filename, library, targetPlatform): """ this gets executed when you 'bru install': it looks for a *.bru file in cwd and downloads the listed deps """ package_jso = brulib.jsonc.loadfile(bru_filename) @@ -459,7 +462,7 @@ def install_from_bru_file(bru_filename, library): print('processing dependency {} version {} requested by {}' .format(module_name, module_version, requestor)) formula = library.load_formula(module_name, module_version) - download_module(library, module_name, module_version) + download_module(library, module_name, module_version, targetPlatform) copy_gyp(library, formula, resolved_dependencies) # copy common.gypi which is referenced by module.gyp files and usually @@ -495,7 +498,7 @@ def install_from_bru_file(bru_filename, library): # todo: clean up unused module dependencies from /bru_modules? -def cmd_install(library, installables): +def cmd_install(library, installables, targetPlatform): """ param installables: e.g. [] or ['googlemock@1.7.0', 'boost-regex'] This is supposed to mimic 'npm install' syntax, see https://docs.npmjs.com/cli/install. Examples: @@ -518,7 +521,7 @@ def cmd_install(library, installables): if bru_filename == None: raise Exception("no file *.bru in cwd") print('installing dependencies listed in', bru_filename) - install_from_bru_file(bru_filename, library) + install_from_bru_file(bru_filename, library, targetPlatform) else: # installables are ['googlemock', 'googlemock@1.7.0'] # In this case we simply add deps to the *.bru (and *.gyp) file in @@ -537,4 +540,4 @@ def cmd_install(library, installables): bru_filename, gyp_filename)) # now download the new dependency just like 'bru install' would do # after we added the dep to the bru & gyp file: - install_from_bru_file(bru_filename, library) + install_from_bru_file(bru_filename, library, targetPlatform) From d25c81550bad8ce4bc1a891f3b73f83c574889d0 Mon Sep 17 00:00:00 2001 From: Uwe Meier Date: Fri, 6 Feb 2015 11:08:17 -0500 Subject: [PATCH 17/21] updated for compatibility with iOS and generic Xcode installation --- library/openssl/1.0.1j.bru | 7 +++---- library/sndfile/1.0.25.bru | 3 ++- library/xerces/3.1.1.bru | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/library/openssl/1.0.1j.bru b/library/openssl/1.0.1j.bru index 503d4d2..6fde1c1 100644 --- a/library/openssl/1.0.1j.bru +++ b/library/openssl/1.0.1j.bru @@ -15,10 +15,9 @@ # compile with gyp. WARNING: the gyp file will not necessarily end up using # the same options ./configure had configured. TODO: revisit this process. "make_command": { - "Linux": "cd openssl-1.0.1j; ./config no-asm no-shared no-ssl2 no-ssl3 no-hw no-zlib no-threads", - "Darwin":"cd openssl-1.0.1j; ./Configure darwin64-x86_64-cc no-asm no-shared no-ssl2 no-ssl3 no-hw no-zlib no-threads -Wno-c++11-narrowing -stdlib=libc++ ", - "iOS":" cd openssl-1.0.1j; ./Configure darwin64-x86_64-cc no-asm no-shared no-ssl2 no-ssl3 no-hw no-zlib no-threads -Wno-c++11-narrowing -stdlib=libc++ ", - #"iOS":"cd openssl-1.0.1j; ./config --host=arm-apple-darwin CXX=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++ CXXFLAGS=-Wno-c++11-narrowing -arch armv7 -arch armv7s -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -fvisibility=hidden -miphoneos-version-min=6.0 CC=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc CFLAGS=-Wno-c++11-narrowing -arch armv7 -arch armv7s -arch arm64 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -fmessage-length=0 -fvisibility=hidden -miphoneos-version-min=6.0 -gdwarf-2 -mthumb -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk LIBTOOL=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/libtool STRIP=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/strip", + "Linux" : "cd openssl-1.0.1j; ./config no-asm no-shared no-ssl2 no-ssl3 no-hw no-zlib no-threads", + "Darwin": "cd openssl-1.0.1j; ./Configure darwin64-x86_64-cc no-asm no-shared no-ssl2 no-ssl3 no-hw no-zlib no-threads -Wno-c++11-narrowing -stdlib=libc++ -fvisibility=hidden ", + "iOS" : "cd openssl-1.0.1j; ./Configure iphoneos-cross no-asm no-shared no-ssl2 no-ssl3 no-hw no-zlib no-threads -Wno-c++11-narrowing -stdlib=libc++ -fvisibility=hidden", # Why no-asm? Because otherwise you need to install yet another # buildtool for compiling openssl (see INSTALL.W32). I'm not sure # how much performance we sacrifice by not using asm, hopefully diff --git a/library/sndfile/1.0.25.bru b/library/sndfile/1.0.25.bru index 7eeaab2..8cc8ed1 100644 --- a/library/sndfile/1.0.25.bru +++ b/library/sndfile/1.0.25.bru @@ -28,8 +28,9 @@ # Compare with the opus build that uses 100% gyp, or the speex build # which uses a minimal tar.gz containing captured ./configure output, or # the openssl build which uses configure+make. - "Linux": "cd libsndfile-1.0.25; ./configure --disable-shared --disable-external-libs", + "Linux": "cd libsndfile-1.0.25; ./configure --disable-shared --disable-external-libs", "Darwin": "cd libsndfile-1.0.25; ./configure --disable-shared --disable-external-libs", + "iOS" : "cd libsndfile-1.0.25; ./configure --host=arm-apple-darwin CXX=__BRU_XCODE__/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++ CXXFLAGS='-Wno-c++11-narrowing -std=c++11 -stdlib=libc++ -arch armv7 -arch armv7s -arch arm64 -isysroot __BRU_XCODE__/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS__BRU_IOS_VERSION__.sdk -fvisibility=hidden -miphoneos-version-min=6.0' CC=__BRU_XCODE__/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc CFLAGS='-Wno-c++11-narrowing -std=c++11 -stdlib=libc++ -arch armv7 -arch armv7s -arch arm64 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -fmessage-length=0 -fvisibility=hidden -miphoneos-version-min=6.0 -gdwarf-2 -mthumb -I/Library/iPhone/include -isysroot __BRU_XCODE__/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS__BRU_IOS_VERSION__.sdk' LIBTOOL=__BRU_XCODE__/Platforms/iPhoneOS.platform/Developer/usr/bin/libtool STRIP=__BRU_XCODE__/Platforms/iPhoneOS.platform/Developer/usr/bin/strip", # About compiling on Windows: # http://www.mega-nerd.com/libsndfile/win32.html says msvc is not diff --git a/library/xerces/3.1.1.bru b/library/xerces/3.1.1.bru index ee6b7c5..ef05194 100644 --- a/library/xerces/3.1.1.bru +++ b/library/xerces/3.1.1.bru @@ -7,7 +7,7 @@ # generates xercesc/util/Xerces_autoconf_config.hpp and ... "Linux": "cd xerces-c-3.1.1; ./configure --disable-shared --disable-transcoder-icu", "Darwin": "cd xerces-c-3.1.1; ./configure --disable-shared --disable-transcoder-icu", - #"iOS" : "cd xerces-c-3.1.1; ./configure --disable-shared --disable-transcoder-icu --host=arm-apple-darwin --disable-shared CXX=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++ CXXFLAGS=\”-I../opus/opus/include/ -I ../libogg-1.3.1/include/ -I../openssl-1.0.1e/include -Wno-c++11-narrowing -std=c++11 -stdlib=libc++ -arch armv7 -arch armv7s -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk -fvisibility=hidden -miphoneos-version-min=6.0\” CC=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc CFLAGS=\”-I../opus/opus/include/ -I ../libogg-1.3.1/include/ -I../openssl-1.0.1e/include -Wno-c++11-narrowing -std=c++11 -stdlib=libc++ -arch armv7 -arch armv7s -arch arm64 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 Wreturn-type -Wunused-variable -fmessage-length=0 -fvisibility=hidden -miphoneos-version-min=6.0 -gdwarf-2 -mthumb -I/Library/iPhone/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk\” LIBTOOL=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/libtool STRIP=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/strip", + "iOS" : "cd xerces-c-3.1.1; ./configure --host=arm-apple-darwin --disable-shared CXX=__BRU_XCODE__/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++ CXXFLAGS='-I../opus/opus/include/ -I ../libogg-1.3.1/include/ -I../openssl-1.0.1e/include -Wno-c++11-narrowing -std=c++11 -stdlib=libc++ -arch armv7 -arch armv7s -arch arm64 -isysroot __BRU_XCODE__/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS__BRU_IOS_VERSION__.sdk -fvisibility=hidden -miphoneos-version-min=6.0' CC=__BRU_XCODE__/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc CFLAGS='-I../opus/opus/include/ -I ../libogg-1.3.1/include/ -I../openssl-1.0.1e/include -Wno-c++11-narrowing -std=c++11 -stdlib=libc++ -arch armv7 -arch armv7s -arch arm64 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -fmessage-length=0 -fvisibility=hidden -miphoneos-version-min=6.0 -gdwarf-2 -mthumb -I/Library/iPhone/include -isysroot __BRU_XCODE__/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS__BRU_IOS_VERSION__.sdk' LIBTOOL=__BRU_XCODE__/Platforms/iPhoneOS.platform/Developer/usr/bin/libtool STRIP=__BRU_XCODE__/Platforms/iPhoneOS.platform/Developer/usr/bin/strip -disable-threads", # On Windows build config 'Static Debug' or 'Static Release' in # via VC10 vcproj. The vcproj has this same copy step here: From 595fef5790eeed15cfc28782fa257868479d2ecf Mon Sep 17 00:00:00 2001 From: Uwe Meier Date: Fri, 6 Feb 2015 11:09:32 -0500 Subject: [PATCH 18/21] added --targetPlatform for 'bru install' in order to support iOS added code to work with generic Xcode installation and iOS versions for the case of libraries that need to be configured with configure scripts. --- brulib/install.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/brulib/install.py b/brulib/install.py index 618f276..e4cf578 100644 --- a/brulib/install.py +++ b/brulib/install.py @@ -9,6 +9,7 @@ import filecmp import platform import collections +import subprocess import brulib.jsonc import brulib.make import brulib.module_downloader @@ -184,8 +185,19 @@ def exec_make_command(formula, bru_modules_root, system): make_commands = formula['make_command'] if not system in make_commands: raise Exception("no key {} in make_command".format(system)) + make_command = make_commands[system] + if system == 'iOS': + # xcode installation dir might vary -- we need to find the right location to pass to the config script + xcode_path=subprocess.check_output(['xcode-select', '-p'],universal_newlines=True).strip() + # the path that we need to pass to the config script depends on the latest supported iOS version of xcode + xcode_iOS=subprocess.check_output('xcodebuild -showsdks | grep iphoneos | cut -d " " -f 2', shell=True,universal_newlines=True).strip() + print ("Found xcode here: '{}'".format(xcode_path)) + print ("iOS Version from xcode: '{}'".format(xcode_iOS)) + # if the make command contains a placeholder for the xcode path and/or iOS version, we need to replace it. + make_command = make_command.replace("__BRU_XCODE__",xcode_path).replace("__BRU_IOS_VERSION__",xcode_iOS) + # On Windows msvs toolchain build tools are typically not in your # PATH, but are expected to be added to your PATH via # %VS110COMNTOOLS%\vsvars32.bat. Let's call this vsvars32.bat From cc4e5541cf66133c50f99e6290b0f6732d4b2216 Mon Sep 17 00:00:00 2001 From: Uwe Meier Date: Tue, 10 Feb 2015 10:31:07 -0500 Subject: [PATCH 19/21] updated libraries to compile for iOS/MacOS --- library/boost-context/1.57.0.gyp | 17 ++++++- library/cryptopp/5.6.2.gyp | 83 +++++++++++++++++++------------- library/iconv/1.14.bru | 4 +- library/iconv/1.14.gyp | 79 ++++++++++++++++-------------- library/libxml2/2.9.2.bru | 4 +- library/libxml2/2.9.2.gyp | 55 ++++++++++++--------- library/rcf/2.0.1.bru | 5 +- 7 files changed, 148 insertions(+), 99 deletions(-) diff --git a/library/boost-context/1.57.0.gyp b/library/boost-context/1.57.0.gyp index 6111176..4bae60c 100644 --- a/library/boost-context/1.57.0.gyp +++ b/library/boost-context/1.57.0.gyp @@ -76,8 +76,21 @@ #"1.57.0/context-boost-1.57.0/src/asm/jump_x86_64_ms_pe_masm.asm", #"1.57.0/context-boost-1.57.0/src/asm/make_x86_64_ms_pe_masm.asm" ] - }, { - # OS!='win' + }], + ["OS=='mac'", { + "sources": [ + "1.57.0/context-boost-1.57.0/src/asm/jump_x86_64_ms_pe_masm.asm", + "1.57.0/context-boost-1.57.0/src/asm/make_x86_64_ms_pe_masm.asm" + ] + }], + ["OS=='iOS'", { + "sources": [ + "1.57.0/context-boost-1.57.0/src/asm/jump_arm_aapcs_pe_armasm.asm", + "1.57.0/context-boost-1.57.0/src/asm/make_arm_aapcs_pe_armasm.asm" + ] + }], + + ["OS=='linux'", { "sources": [ # 64bit elf "1.57.0/context-boost-1.57.0/src/asm/jump_x86_64_sysv_elf_gas.S", diff --git a/library/cryptopp/5.6.2.gyp b/library/cryptopp/5.6.2.gyp index 9482e9c..986308c 100644 --- a/library/cryptopp/5.6.2.gyp +++ b/library/cryptopp/5.6.2.gyp @@ -49,7 +49,18 @@ ] } }], + ["OS=='mac'", { + "defines": [ + "CRYPTOPP_DISABLE_ASM" + ] + }], + ["OS=='iOS'", { + "defines": [ + "CRYPTOPP_DISABLE_ASM" + ] + + }], ["OS=='linux'", { # TODO: only for compilation with clang? # WARNING: I ran into these issues here with clang 3.4 on Centos: @@ -80,40 +91,46 @@ ] } - }, - - # 'cryptest v' runs a sort-of-quick set of tests: it's quick in - # release builds with asm enabled, but 1 min if you enable clangs - # address sanitizer and disable asm. - { - "target_name": "cryptest", - "type": "executable", - - # this single test executable bundles a lot of tests and tools: - # * v runs a 1min unit test suite: valuable, but slow - # * b runs benchmarks, even slower - # I couldn't find a faster test, so tempted to disable this for now. - "test": { - "cwd": "5.6.2", - "args": [ "v" ] - }, - - "sources": [ - "5.6.2/bench.cpp", - "5.6.2/bench2.cpp", - "5.6.2/datatest.cpp", - "5.6.2/dlltest.cpp", - "5.6.2/regtest.cpp", - "5.6.2/test.cpp", - "5.6.2/validat1.cpp", - "5.6.2/validat2.cpp", - "5.6.2/validat3.cpp", - "5.6.2/fipsalgt.cpp" - ], - "dependencies": [ - "cryptopp" - ] } + ], + "conditions": [ + ["OS!='iOS'", + { + "targets": [ + # 'cryptest v' runs a sort-of-quick set of tests: it's quick in + # release builds with asm enabled, but 1 min if you enable clangs + # address sanitizer and disable asm. + { + "target_name": "cryptest", + "type": "executable", + + # this single test executable bundles a lot of tests and tools: + # * v runs a 1min unit test suite: valuable, but slow + # * b runs benchmarks, even slower + # I couldn't find a faster test, so tempted to disable this for now. + "test": { + "cwd": "5.6.2", + "args": [ "v" ] + }, + "sources": [ + "5.6.2/bench.cpp", + "5.6.2/bench2.cpp", + "5.6.2/datatest.cpp", + "5.6.2/dlltest.cpp", + "5.6.2/regtest.cpp", + "5.6.2/test.cpp", + "5.6.2/validat1.cpp", + "5.6.2/validat2.cpp", + "5.6.2/validat3.cpp", + "5.6.2/fipsalgt.cpp" + ], + "dependencies": [ + "cryptopp" + ] + } + ] + } + ] ] } diff --git a/library/iconv/1.14.bru b/library/iconv/1.14.bru index 33a525e..d15f013 100644 --- a/library/iconv/1.14.bru +++ b/library/iconv/1.14.bru @@ -19,6 +19,8 @@ "make_command": { # had compiler error with default --with-threads "Linux": "cd libiconv-1.14 ; ./configure --disable-shared", - "Windows": "" + "Windows": "", + "Darwin": "cd libiconv-1.14 ; ./configure --disable-shared", + "iOS" : "cd libiconv-1.14 ; ./configure --host=arm-apple-darwin --disable-shared CXX=__BRU_XCODE__/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++ CXXFLAGS='-I../opus/opus/include/ -I ../libogg-1.3.1/include/ -I../openssl-1.0.1e/include -Wno-c++11-narrowing -std=c++11 -stdlib=libc++ -arch armv7 -arch armv7s -arch arm64 -isysroot __BRU_XCODE__/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS__BRU_IOS_VERSION__.sdk -fvisibility=hidden -miphoneos-version-min=6.0' CC=__BRU_XCODE__/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc CFLAGS='-I../opus/opus/include/ -I ../libogg-1.3.1/include/ -I../openssl-1.0.1e/include -Wno-c++11-narrowing -std=c++11 -stdlib=libc++ -arch armv7 -arch armv7s -arch arm64 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -fmessage-length=0 -fvisibility=hidden -miphoneos-version-min=6.0 -gdwarf-2 -mthumb -I/Library/iPhone/include -isysroot __BRU_XCODE__/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS__BRU_IOS_VERSION__.sdk' LIBTOOL=__BRU_XCODE__/Platforms/iPhoneOS.platform/Developer/usr/bin/libtool STRIP=__BRU_XCODE__/Platforms/iPhoneOS.platform/Developer/usr/bin/strip" } } diff --git a/library/iconv/1.14.gyp b/library/iconv/1.14.gyp index 1eafb85..9e43642 100644 --- a/library/iconv/1.14.gyp +++ b/library/iconv/1.14.gyp @@ -43,44 +43,49 @@ } }] ] - }, - - { - "target_name": "iconv_test-to-wchar", - "type": "executable", - "test": {}, - "include_dirs": [ - "1.14/libiconv-1.14", - "1.14/libiconv-1.14/windows/include_internal" # config.h - ], - "sources": [ "1.14/libiconv-1.14/tests/test-to-wchar.c" ], - "dependencies": [ "iconv" ] - }, - - { - "target_name": "iconv_test-shiftseq", - "type": "executable", - "test": {}, - "include_dirs": [ - "1.14/libiconv-1.14", - "1.14/libiconv-1.14/windows/include_internal" # config.h - ], - "sources": [ "1.14/libiconv-1.14/tests/test-shiftseq.c" ], - "dependencies": [ "iconv" ] } + ], + "conditions": [ + ["OS!='iOS'", + { + "targets": [ + { + "target_name": "iconv_test-to-wchar", + "type": "executable", + "test": {}, + "include_dirs": [ + "1.14/libiconv-1.14", + "1.14/libiconv-1.14/windows/include_internal" # config.h + ], + "sources": [ "1.14/libiconv-1.14/tests/test-to-wchar.c" ], + "dependencies": [ "iconv" ] + }, + { + "target_name": "iconv_test-shiftseq", + "type": "executable", + "test": {}, + "include_dirs": [ + "1.14/libiconv-1.14", + "1.14/libiconv-1.14/windows/include_internal" # config.h + ], + "sources": [ "1.14/libiconv-1.14/tests/test-shiftseq.c" ], + "dependencies": [ "iconv" ] + } - # prints too much, too slow - #{ - # "target_name": "iconv_test-genutf8", - # "type": "executable", - # "test": {}, - # "include_dirs": [ - # "1.14/libiconv-1.14", - # "1.14/libiconv-1.14/srclib" - # ], - # "sources": [ "1.14/libiconv-1.14/tests/genutf8.c" ], - # "dependencies": [ "iconv" ] - #} - + # prints too much, too slow + #{ + # "target_name": "iconv_test-genutf8", + # "type": "executable", + # "test": {}, + # "include_dirs": [ + # "1.14/libiconv-1.14", + # "1.14/libiconv-1.14/srclib" + # ], + # "sources": [ "1.14/libiconv-1.14/tests/genutf8.c" ], + # "dependencies": [ "iconv" ] + #} + ] + } + ] ] } diff --git a/library/libxml2/2.9.2.bru b/library/libxml2/2.9.2.bru index 20a6925..33ce6c1 100644 --- a/library/libxml2/2.9.2.bru +++ b/library/libxml2/2.9.2.bru @@ -7,7 +7,9 @@ "make_command": { # had compiler error with default --with-threads "Linux": "cd libxml2-2.9.2 ; ./configure --disable-shared --without-threads --without-python", - "Windows": "" + "Windows": "", + "Darwin": "cd libxml2-2.9.2 ; ./configure --disable-shared --without-threads --without-python", + "iOS": "cd libxml2-2.9.2 ; ./configure --host=arm-apple-darwin --disable-shared --without-threads --without-python CXX=__BRU_XCODE__/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++ CXXFLAGS='-I../opus/opus/include/ -I ../libogg-1.3.1/include/ -I../openssl-1.0.1e/include -Wno-c++11-narrowing -std=c++11 -stdlib=libc++ -arch armv7 -arch armv7s -arch arm64 -isysroot __BRU_XCODE__/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS__BRU_IOS_VERSION__.sdk -fvisibility=hidden -miphoneos-version-min=6.0' CC=__BRU_XCODE__/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc CFLAGS='-I../opus/opus/include/ -I ../libogg-1.3.1/include/ -I../openssl-1.0.1e/include -Wno-c++11-narrowing -std=c++11 -stdlib=libc++ -arch armv7 -arch armv7s -arch arm64 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -fmessage-length=0 -fvisibility=hidden -miphoneos-version-min=6.0 -gdwarf-2 -mthumb -I/Library/iPhone/include -isysroot __BRU_XCODE__/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS__BRU_IOS_VERSION__.sdk' LIBTOOL=__BRU_XCODE__/Platforms/iPhoneOS.platform/Developer/usr/bin/libtool STRIP=__BRU_XCODE__/Platforms/iPhoneOS.platform/Developer/usr/bin/strip" }, # deps are iconv and zlib according to http://www.zlatkovic.com/libxml.en.html diff --git a/library/libxml2/2.9.2.gyp b/library/libxml2/2.9.2.gyp index 88b9c3c..32a624a 100644 --- a/library/libxml2/2.9.2.gyp +++ b/library/libxml2/2.9.2.gyp @@ -71,30 +71,37 @@ "export_dependent_settings": [ "../iconv/iconv.gyp:iconv" ] - }, - - { - "target_name": "libxml2-testSAX", - "type": "executable", - "test": {}, - "sources": [ "2.9.2/libxml2-2.9.2/testSAX.c" ], - "dependencies": [ "libxml2" ] - }, - - { - "target_name": "libxml2-testXPath", - "type": "executable", - "test": {}, - "sources": [ "2.9.2/libxml2-2.9.2/testXPath.c" ], - "dependencies": [ "libxml2" ] - }, - - { - "target_name": "libxml2-example", - "type": "executable", - "test": {}, - "sources": [ "2.9.2/libxml2-2.9.2/example/gjobread.c" ], - "dependencies": [ "libxml2" ] } + ], + "conditions": [ + ["OS!='iOS'", + { + "targets": [ + { + "target_name": "libxml2-testSAX", + "type": "executable", + "test": {}, + "sources": [ "2.9.2/libxml2-2.9.2/testSAX.c" ], + "dependencies": [ "libxml2" ] + }, + + { + "target_name": "libxml2-testXPath", + "type": "executable", + "test": {}, + "sources": [ "2.9.2/libxml2-2.9.2/testXPath.c" ], + "dependencies": [ "libxml2" ] + }, + + { + "target_name": "libxml2-example", + "type": "executable", + "test": {}, + "sources": [ "2.9.2/libxml2-2.9.2/example/gjobread.c" ], + "dependencies": [ "libxml2" ] + } + ] + } + ] ] } diff --git a/library/rcf/2.0.1.bru b/library/rcf/2.0.1.bru index 59d2252..e0f6b6a 100644 --- a/library/rcf/2.0.1.bru +++ b/library/rcf/2.0.1.bru @@ -1,6 +1,9 @@ { "homepage": "http://www.deltavsoft.com/RCF.html", - "url": "http://www.deltavsoft.com/downloads/RCF-2.0.1.101.tar.gz", + "url": [ + "http://www.deltavsoft.com/downloads/RCF-2.0.1.101.tar.gz", + "file://RCF-2.0.1.101-config.tar.gz" + ], "module": "rcf", "version": "2.0.1", "dependencies": { From 42ca238ee6f5092b26986c942b8f7ec341e41058 Mon Sep 17 00:00:00 2001 From: Uwe Meier Date: Tue, 10 Feb 2015 11:02:15 -0500 Subject: [PATCH 20/21] added directory where mac/ios executables are stored --- brulib/runtests.py | 1 + 1 file changed, 1 insertion(+) diff --git a/brulib/runtests.py b/brulib/runtests.py index dc0ad15..201dfa2 100644 --- a/brulib/runtests.py +++ b/brulib/runtests.py @@ -53,6 +53,7 @@ def locate_executable(target_name): """ for config in ['Release', 'Debug']: candidates = [ + os.path.join('lib', config, target_name), os.path.join('out', config, target_name), os.path.join('out', config, target_name + '.exe'), os.path.join(config, target_name), From 45e8a570babbe2854e6e3e18f0d07a2573071acb Mon Sep 17 00:00:00 2001 From: Uwe Meier Date: Tue, 10 Feb 2015 11:02:44 -0500 Subject: [PATCH 21/21] new arguments to install and make are now optional --- brulib/install.py | 2 +- brulib/make.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/brulib/install.py b/brulib/install.py index e4cf578..7f058bd 100644 --- a/brulib/install.py +++ b/brulib/install.py @@ -510,7 +510,7 @@ def install_from_bru_file(bru_filename, library, targetPlatform): # todo: clean up unused module dependencies from /bru_modules? -def cmd_install(library, installables, targetPlatform): +def cmd_install(library, installables, targetPlatform="Native"): """ param installables: e.g. [] or ['googlemock@1.7.0', 'boost-regex'] This is supposed to mimic 'npm install' syntax, see https://docs.npmjs.com/cli/install. Examples: diff --git a/brulib/make.py b/brulib/make.py index cd258ba..babbf68 100644 --- a/brulib/make.py +++ b/brulib/make.py @@ -9,7 +9,7 @@ import platform import brulib.install -def cmd_make(config, verbose, targetPlatform): +def cmd_make(config, verbose, targetPlatform="Native"): """ this command makes some educated guesses about which toolchain the user probably wants to run, then invokes gyp to create the makefiles for this toolchain and invokes the build. On Linux