ced_py_utils.verify_absence_of_fink() ced_py_utils.verify_absence_of_homebrew() ced_py_utils.enforce_dir_exists(gtest_binaries_dir + os.path.sep + relpath_to_reach_gtest_src_from_our_output_dir) ced_py_utils.enforce_dir_exists(gtest_binaries_dir) ced_py_utils.enforce_dir_exists(gtest_include_dir) conf_cmd = relpath_to_reach_gtest_src_from_our_output_dir + os.path.sep + 'configure ' conf_cmd += str(' CXX="clang++ -std=c++11 -stdlib=libc++" ' + ' LDFLAGS="-stdlib=libc++" LINKFLAGS="-stdlib=libc++" ' + ' LINKERFLAGS="-stdlib=libc++" DYLDFLAGS="-stdlib=libc++" ') # note that we are SETTING CWD TO THE OUTPUT directory before running 'configure'. # (in other words, we are NOT running configure from the dir where configure resides.) # This causes all the build artifacts from running configure and make to go into the OUTPUT (binaries) dir. ced_py_utils.exec_command_using_given_cwd(conf_cmd, gtest_binaries_dir) ced_py_utils.exec_command_using_given_cwd('make', gtest_binaries_dir) # there is no 'make install' for gtest # this symlink is needed so that our builds can find the gtest header files: os.symlink(gtest_include_dir, gtest_binaries_dir + '/include') shutil.copy2(gtest_binaries_dir + '/lib/.libs/libgtest.0.dylib', gtest_binaries_dir + '/lib/') # fix mac install id for dylib install_id_cmd = 'install_name_tool -id @executable_path/libgtest.0.dylib libgtest.0.dylib' ced_py_utils.exec_command_using_given_cwd(install_id_cmd, gtest_binaries_dir + '/lib/')
# if anything in this section fails, you need to: # 1. go into the boost_src_dir directory. # 2. run the command: git submodule init # 3. run the command: git submodule update --init submod_msg = "If this fails, you need to GO INTO YOUR checked-out boost.org repo and do: {git submodule update --init}" ced_py_utils.enforce_dir_exists(boost_src_dir + "/libs/asio/include", submod_msg) ced_py_utils.enforce_dir_exists(boost_src_dir + "/libs/lambda/include", submod_msg) ced_py_utils.enforce_dir_exists(boost_src_dir + "/libs/function/include", submod_msg) ced_py_utils.enforce_dir_exists(boost_src_dir + "/libs/smart_ptr/include", submod_msg) # ------------ End 2nd section: make sure SUBMODULES inside boost were populated!! ------- # Third section: begin actual work towards building boost binaries print("about to set the boost git repo to a specific tag.") ced_py_utils.git_repo_checkout_revision(boost_src_dir, "boost-1.58.0") print("about to sync boost submodules (one per boost lib)." + "This could take a minute...") ced_py_utils.git_submodule_update(boost_src_dir) shutil.copy2(cedrus_build_script, boost_src_dir) shutil.copy2(cedrus_boost_patch, boost_src_dir + "/tools/build") # if applying the patch FAILS, it could just mean that you already applied it. reset to a clean revision and try again. ced_py_utils.git_repo_apply_patch(boost_src_dir + "/tools/build", "patch_submodule_tools_build_1_58.patch") ced_py_utils.exec_command_using_given_cwd("./cedrus_build_boost.sh", boost_src_dir) print("reached the end of cedrus_build_boost.py")
ced_py_utils.enforce_dir_exists(boost_src_dir + '/libs/asio/include', submod_msg) ced_py_utils.enforce_dir_exists(boost_src_dir + '/libs/lambda/include', submod_msg) ced_py_utils.enforce_dir_exists(boost_src_dir + '/libs/function/include', submod_msg) ced_py_utils.enforce_dir_exists(boost_src_dir + '/libs/smart_ptr/include', submod_msg) # ------------ End 2nd section: make sure SUBMODULES inside boost were populated!! ------- # Third section: begin actual work towards building boost binaries print('about to set the boost git repo to a specific tag.') ced_py_utils.git_repo_checkout_revision(boost_src_dir, 'boost-1.58.0') print('about to sync boost submodules (one per boost lib).' + 'This could take a minute...') ced_py_utils.git_submodule_update(boost_src_dir) shutil.copy2(cedrus_build_script, boost_src_dir) shutil.copy2(cedrus_boost_patch, boost_src_dir + '/tools/build') # if applying the patch FAILS, it could just mean that you already applied it. reset to a clean revision and try again. ced_py_utils.git_repo_apply_patch(boost_src_dir + '/tools/build', 'patch_submodule_tools_build_1_58.patch') ced_py_utils.exec_command_using_given_cwd('./cedrus_build_boost.sh', boost_src_dir) print("reached the end of cedrus_build_boost.py")
ced_py_utils.verify_absence_of_fink() ced_py_utils.verify_absence_of_homebrew() ced_py_utils.enforce_dir_exists(gtest_binaries_dir + os.path.sep + relpath_to_reach_gtest_src_from_our_output_dir) ced_py_utils.enforce_dir_exists(gtest_binaries_dir) ced_py_utils.enforce_dir_exists(gtest_include_dir) conf_cmd = relpath_to_reach_gtest_src_from_our_output_dir + os.path.sep + 'configure ' conf_cmd += str(' CXX="clang++ -std=c++11 -stdlib=libc++" ' + ' LDFLAGS="-stdlib=libc++" LINKFLAGS="-stdlib=libc++" ' + ' LINKERFLAGS="-stdlib=libc++" DYLDFLAGS="-stdlib=libc++" ') # note that we are SETTING CWD TO THE OUTPUT directory before running 'configure'. # (in other words, we are NOT running configure from the dir where configure resides.) # This causes all the build artifacts from running configure and make to go into the OUTPUT (binaries) dir. ced_py_utils.exec_command_using_given_cwd(conf_cmd, gtest_binaries_dir) ced_py_utils.exec_command_using_given_cwd('make', gtest_binaries_dir) # there is no 'make install' for gtest # this symlink is needed so that our builds can find the gtest header files: os.symlink(gtest_include_dir, gtest_binaries_dir + '/include') shutil.copy2(gtest_binaries_dir + '/lib/.libs/libgtest.0.dylib', gtest_binaries_dir + '/lib/') # fix mac install id for dylib install_id_cmd = 'install_name_tool -id @executable_path/libgtest.0.dylib libgtest.0.dylib' ced_py_utils.exec_command_using_given_cwd(install_id_cmd, gtest_binaries_dir + '/lib/')
conf_cmd += ' CXX=clang++ ' conf_cmd += ' LDFLAGS="-stdlib=libc++ -mmacosx-version-min=10.7 -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk" ' conf_cmd += ' CXXFLAGS="-std=c++11 -stdlib=libc++ -mmacosx-version-min=10.7 -DMAC_OS_X_VERSION_MIN_REQUIRED=1070 -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk" ' conf_cmd += ' CFLAGS="-mmacosx-version-min=10.7 -DMAC_OS_X_VERSION_MIN_REQUIRED=1070 -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk" ' conf_cmd += ' CPPFLAGS="-mmacosx-version-min=10.7 -DMAC_OS_X_VERSION_MIN_REQUIRED=1070 -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk" ' conf_cmd += ' --enable-shared --disable-static ' prefix_dir = portaudio_binaries_dir + os.path.sep + 'tmp' conf_cmd += ' --prefix=' + prefix_dir # note that we are SETTING CWD TO THE OUTPUT directory before running 'configure'. # (in other words, we are NOT running configure from the dir where configure resides.) # This causes all the build artifacts from running configure and make to go into the OUTPUT (binaries) dir. ced_py_utils.exec_command_using_given_cwd(conf_cmd, portaudio_conf_tmp_dir) ced_py_utils.exec_command_using_given_cwd('make', portaudio_conf_tmp_dir) ced_py_utils.exec_command_using_given_cwd('make install', portaudio_conf_tmp_dir) shutil.copy2(portaudio_binaries_dir + '/tmp/lib/libportaudio.2.dylib', portaudio_binaries_dir + '/lib/') ced_py_utils.exec_command_using_given_cwd( 'install_name_tool -id @executable_path/../Frameworks/libportaudio.2.dylib libportaudio.2.dylib', portaudio_binaries_dir + '/lib/') shutil.copy2(portaudio_binaries_dir + '/tmp/include/portaudio.h', portaudio_binaries_dir + '/include/mac/pa_stable_v19_20110326/')
conf_cmd += ' CXX=clang++ ' conf_cmd += ' LDFLAGS="-stdlib=libc++ -mmacosx-version-min=10.11 -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk" ' conf_cmd += ' CXXFLAGS="-std=c++11 -stdlib=libc++ -mmacosx-version-min=10.11 -DMAC_OS_X_VERSION_MIN_REQUIRED=101100 -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk" ' conf_cmd += ' CFLAGS="-mmacosx-version-min=10.11 -DMAC_OS_X_VERSION_MIN_REQUIRED=101100 -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk" ' conf_cmd += ' CPPFLAGS="-mmacosx-version-min=10.11 -DMAC_OS_X_VERSION_MIN_REQUIRED=101100 -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk" ' conf_cmd += ' --enable-shared --disable-static ' prefix_dir = portaudio_binaries_dir + os.path.sep + 'tmp' conf_cmd += ' --prefix=' + prefix_dir # note that we are SETTING CWD TO THE OUTPUT directory before running 'configure'. # (in other words, we are NOT running configure from the dir where configure resides.) # This causes all the build artifacts from running configure and make to go into the OUTPUT (binaries) dir. ced_py_utils.exec_command_using_given_cwd(conf_cmd, portaudio_conf_tmp_dir) ced_py_utils.exec_command_using_given_cwd('make', portaudio_conf_tmp_dir) ced_py_utils.exec_command_using_given_cwd('make install', portaudio_conf_tmp_dir) shutil.copy2(portaudio_binaries_dir + '/tmp/lib/libportaudio.2.dylib', portaudio_binaries_dir + '/lib/') ced_py_utils.exec_command_using_given_cwd( 'install_name_tool -id @executable_path/../Frameworks/libportaudio.2.dylib libportaudio.2.dylib', portaudio_binaries_dir + '/lib/') shutil.copy2( portaudio_binaries_dir + '/tmp/include/portaudio.h',
ced_py_utils.verify_absence_of_fink() ced_py_utils.verify_absence_of_homebrew() ced_py_utils.enforce_dir_exists(wx_src_dir) ced_py_utils.enforce_dir_exists(binaries_wx_dir) # Second section: begin actual work towards building wx binaries ced_py_utils.git_repo_checkout_revision(wx_src_dir, '2d853161ef87fe623') shutil.copy2(cedrus_build_script, wx_src_dir) shutil.copy2(cedrus_dylib_script, wx_src_dir) shutil.copy2(cedrus_wx_patch, wx_src_dir) shutil.copy2(cedrus_wx_patch2, wx_src_dir) shutil.copy2(cedrus_wx_patch3, wx_src_dir) # if applying the patch FAILS, it could just mean that you already applied it. reset to a clean revision and try again. ced_py_utils.git_repo_apply_patch(wx_src_dir, 'cedrus_patch_for_wx_v3.0.2.patch') ced_py_utils.git_repo_apply_patch(wx_src_dir, 'fix_from_http_trac.wxwidgets.org_changeset_78144.patch') ced_py_utils.git_repo_apply_patch(wx_src_dir, 'cedrus_patch_for_less_wxStackWalker.patch') ced_py_utils.exec_command_using_given_cwd('./cedrus_build_wx.sh', wx_src_dir) # this symlink is needed so that 'wxrc' can launch after we ran install_name_tool on the wx dylibs: os.symlink(binaries_wx_dir + '/built_libs/bin/wxrc', binaries_wx_dir + '/built_libs/lib/wxrc') print("reached the end of cedrus_build_wx.py")
conf_cmd += ' FLAC_CFLAGS=" ' + flac_inc_dir + '" ' conf_cmd += ' FLAC_LIBS="-L' + flac_lib_dir + ' -lFLAC.8" ' conf_cmd += ' OGG_CFLAGS=" ' + ogg_inc_dir + '" ' conf_cmd += ' OGG_LIBS="-L' + ogg_lib_dir + ' -logg.0" ' conf_cmd += ' VORBIS_CFLAGS=" ' + vorbis_inc_dir + '" ' conf_cmd += ' VORBIS_LIBS="-L' + vorbis_lib_dir + ' -lvorbis.0" ' conf_cmd += ' VORBISENC_CFLAGS=" ' + vorbis_inc_dir + '" ' conf_cmd += ' VORBISENC_LIBS="-L' + vorbis_lib_dir + ' -lvorbisenc.2 -lvorbisfile.3" ' conf_cmd += ' --enable-external-libs --disable-static --enable-shared --disable-sqlite --disable-dependency-tracking ' # note that we are SETTING CWD TO THE OUTPUT directory before running 'configure'. # (in other words, we are NOT running configure from the dir where configure resides.) # This causes all the build artifacts from running configure and make to go into the OUTPUT (binaries) dir. ced_py_utils.exec_command_using_given_cwd(conf_cmd, sndfile_conf_tmp_dir) ced_py_utils.exec_command_using_given_cwd('make', sndfile_conf_tmp_dir) shutil.copy2( sndfile_binaries_dir + '/tmp/sndfile/src/.libs/libsndfile.1.dylib', sndfile_binaries_dir + '/lib/') ced_py_utils.exec_command_using_given_cwd( 'install_name_tool -id @executable_path/../Frameworks/libsndfile.1.dylib libsndfile.1.dylib', sndfile_binaries_dir + '/lib/') shutil.copy2(sndfile_binaries_dir + '/tmp/sndfile/src/sndfile.h', sndfile_binaries_dir + '/include/mac/libsndfile-1.0.28/') shutil.copy2(flac_lib_dir + '/libFLAC.8.dylib', sndfile_binaries_dir + '/lib/')
ced_py_utils.verify_absence_of_fink() ced_py_utils.verify_absence_of_homebrew() ced_py_utils.enforce_dir_exists(wx_src_dir) ced_py_utils.enforce_dir_exists(binaries_wx_dir) # Second section: begin actual work towards building wx binaries ced_py_utils.git_repo_checkout_revision(wx_src_dir, 'f5977dee2123a342601250b9a87bc2549c13cdd0') shutil.copy2(cedrus_build_script, wx_src_dir) shutil.copy2(cedrus_dylib_script, wx_src_dir) #shutil.copy2(cedrus_wx_patch, wx_src_dir) #shutil.copy2(cedrus_wx_patch2, wx_src_dir) #shutil.copy2(cedrus_wx_patch3, wx_src_dir) # if applying the patch FAILS, it could just mean that you already applied it. reset to a clean revision and try again. #ced_py_utils.git_repo_apply_patch(wx_src_dir, # 'cedrus_patch_for_wx_v3.0.2.patch') #ced_py_utils.git_repo_apply_patch(wx_src_dir, # 'fix_from_http_trac.wxwidgets.org_changeset_78144.patch') #ced_py_utils.git_repo_apply_patch(wx_src_dir, # 'cedrus_patch_for_less_wxStackWalker.patch') ced_py_utils.exec_command_using_given_cwd('./cedrus_build_wx.sh', wx_src_dir) # this symlink is needed so that 'wxrc' can launch after we ran install_name_tool on the wx dylibs: os.symlink(binaries_wx_dir + '/built_libs/bin/wxrc', binaries_wx_dir + '/built_libs/lib/wxrc') print("reached the end of cedrus_build_wx.py")
conf_cmd += ' FLAC_CFLAGS="-I' + flac_inc_dir + '" ' conf_cmd += ' FLAC_LIBS="-L' + flac_lib_dir + ' -lFLAC.8" ' conf_cmd += ' OGG_CFLAGS="-I' + ogg_inc_dir + '" ' conf_cmd += ' OGG_LIBS="-L' + ogg_lib_dir + ' -logg.0" ' conf_cmd += ' VORBIS_CFLAGS="-I' + vorbis_inc_dir + '" ' conf_cmd += ' VORBIS_LIBS="-L' + vorbis_lib_dir + ' -lvorbis.0" ' conf_cmd += ' VORBISENC_CFLAGS="-I' + vorbis_inc_dir + '" ' conf_cmd += ' VORBISENC_LIBS="-L' + vorbis_lib_dir + ' -lvorbisenc.2 -lvorbisfile.3" ' conf_cmd += ' --enable-external-libs --disable-static --enable-shared --disable-sqlite --disable-dependency-tracking ' # note that we are SETTING CWD TO THE OUTPUT directory before running 'configure'. # (in other words, we are NOT running configure from the dir where configure resides.) # This causes all the build artifacts from running configure and make to go into the OUTPUT (binaries) dir. ced_py_utils.exec_command_using_given_cwd(conf_cmd, sndfile_conf_tmp_dir) ced_py_utils.exec_command_using_given_cwd('make', sndfile_conf_tmp_dir) shutil.copy2( sndfile_binaries_dir + '/tmp/sndfile/src/.libs/libsndfile.1.dylib', sndfile_binaries_dir + '/lib/') ced_py_utils.exec_command_using_given_cwd( 'install_name_tool -id @executable_path/../Frameworks/libsndfile.1.dylib libsndfile.1.dylib', sndfile_binaries_dir + '/lib/') shutil.copy2(sndfile_binaries_dir + '/tmp/sndfile/src/sndfile.h', sndfile_binaries_dir + '/include/mac/libsndfile-1.0.24/') shutil.copy2(flac_lib_dir + '/libFLAC.8.dylib', sndfile_binaries_dir + '/lib/')