config 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # vim: filetype=yaml sw=2
  2. version: '[% c("abbrev") %]'
  3. git_url: https://github.com/keroserene/go-webrtc.git
  4. git_hash: ed20e74ef428d6149a95bab8e63afb47af55c204
  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. # __STDC_FORMAT_MACROS is needed for a definition of PRIxPTR from inttypes.h.
  23. export CGO_CXXFLAGS="-D__STDC_FORMAT_MACROS=1"
  24. export CGO_LDFLAGS=-latomic
  25. [% END -%]
  26. [% IF c("var/osx") -%]
  27. export CGO_ENABLED=1
  28. export CGO_CFLAGS="[% c("var/FLAGS") %] -mmacosx-version-min=10.7"
  29. export CGO_CXXFLAGS="[% c("var/FLAGS") %] -stdlib=libc++ -mmacosx-version-min=10.7"
  30. export CGO_LDFLAGS="[% c("var/FLAGS") %] -stdlib=libc++ -mmacosx-version-min=10.7"
  31. export CC="$clangdir/bin/clang"
  32. export CXX="$clangdir/bin/clang++"
  33. [% END -%]
  34. targets:
  35. linux-i686:
  36. var:
  37. arch_deps:
  38. - pkg-config
  39. - libx11-dev:i386
  40. linux-x86_64:
  41. var:
  42. arch_deps:
  43. - pkg-config
  44. - libx11-dev
  45. osx-x86_64:
  46. var:
  47. arch_deps:
  48. - pkg-config
  49. input_files:
  50. - project: container-image
  51. - name: go
  52. project: go
  53. - name: webrtc
  54. project: webrtc
  55. - name: '[% c("var/compiler") %]'
  56. project: '[% c("var/compiler") %]'
  57. - name: binutils
  58. project: binutils
  59. enable: '[% c("var/linux") %]'