config 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. # vim: filetype=yaml sw=2
  2. version: '[% c("abbrev") %]'
  3. git_url: https://github.com/keroserene/go-webrtc.git
  4. git_hash: 90ac15ae07cc6e820cd922a239dd892598986622
  5. filename: '[% project %]-[% c("version") %]-[% c("var/osname") %]-[% c("var/build_id") %].tar.gz'
  6. build: '[% c("projects/go/var/build_go_lib") %]'
  7. var:
  8. container:
  9. use_container: 1
  10. go_lib: github.com/keroserene/go-webrtc
  11. build_go_lib_pre: |
  12. [% pc(c('var/compiler'), 'var/setup', { compiler_tarfile => c('input_files_by_name/' _ c('var/compiler')) }) %]
  13. [% IF c("var/linux") %]
  14. tar -C /var/tmp/dist -xf $rootdir/[% c('input_files_by_name/binutils') %]
  15. export PATH="/var/tmp/dist/binutils/bin:$PATH"
  16. [% END -%]
  17. tar -C /var/tmp/dist -xf $rootdir/[% c('input_files_by_name/webrtc') %]
  18. # Replace the prebuilt webrtc library with our own one.
  19. rm -rf include/ lib/
  20. cp -a /var/tmp/dist/webrtc/{include,lib} .
  21. [% IF c("var/linux") -%]
  22. # The go-webrtc package sets _GLIBCXX_USE_CXX11_ABI=0 for compatibility with
  23. # the prebuilt libwebrtc-magic.a libraries. Since we build our own
  24. # libwebrtc-magic.a with the C++11 ABI, we have to undo that setting here,
  25. # using CGO_CXXFLAGS.
  26. # __STDC_FORMAT_MACROS is needed for a definition of PRIxPTR from inttypes.h.
  27. export CGO_CXXFLAGS="-D_GLIBCXX_USE_CXX11_ABI=1 -D__STDC_FORMAT_MACROS=1"
  28. export CGO_LDFLAGS=-latomic
  29. [% END -%]
  30. [% IF c("var/osx") -%]
  31. export CGO_ENABLED=1
  32. export CGO_CFLAGS="[% c("var/FLAGS") %] -mmacosx-version-min=10.7"
  33. export CGO_CXXFLAGS="[% c("var/FLAGS") %] -stdlib=libc++ -mmacosx-version-min=10.7"
  34. export CGO_LDFLAGS="[% c("var/FLAGS") %] -stdlib=libc++ -mmacosx-version-min=10.7"
  35. export CC="$clangdir/bin/clang"
  36. export CXX="$clangdir/bin/clang++"
  37. [% END -%]
  38. targets:
  39. master:
  40. git_hash: master
  41. linux:
  42. var:
  43. arch_deps:
  44. - pkg-config
  45. - libx11-dev
  46. osx-x86_64:
  47. var:
  48. arch_deps:
  49. - pkg-config
  50. input_files:
  51. - project: container-image
  52. - name: go
  53. project: go
  54. - name: webrtc
  55. project: webrtc
  56. - name: '[% c("var/compiler") %]'
  57. project: '[% c("var/compiler") %]'
  58. - name: binutils
  59. project: binutils
  60. enable: '[% c("var/linux") %]'