이 페이지를 읽는 개발자는 homebrew를 알고 있다고 가정한다. 최신 gstreamer git master를 homebrew로 빌드하는 방법과 로컬 git을 사용하여 빌드하는 방법을 공유하고자 한다.
$ brew install --HEAD gstreamer
homebrew에서 --HEAD
옵션으로 git master
로 패키지를 설치할 수 있는 기능을 제공한다. 물론 해당 패키지의 recipe가 git으로 빌드할 수 있도록 head 항목이 recipe에 기술되어 있는 경우에 가능하다. (gstreamer 관련 패키지는 모두 등록되어 있다)
--HEAD
옵션을 사용한 git master
빌드 외에도 local로 받아둔 git repo를 이용하여 빌드할 수 있다.
이 경우 recipe를 아래와 같이 수정해야 한다.
$ brew edit gstreamer
head do
url "git://anongit.freedesktop.org/gstreamer/gstreamer"
를 아래와 같이 head의 url을 local git 위치로 수정하고 :using => :git 을 추가해준다.
head do
url "/Users/chul/github/gstreamer", :using => :git
각자의 목적에 따라 local git을 사용할 수 있겠지만, 여기서는 local 수정 사항을 빌드하여 동작하기 위함이다. 이 때 주의해야 할 점은, local 수정 사항을 commit으로 만들어 두고 설치해야 된다. commit으로 만들지 않아 stage 상태로 패치가 존재하는 경우 brew install 시 해당 내역이 반영되지 않는다.
- Formula Cookbook에 관련 내용이 잘 설명되어 있다. https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Formula-Cookbook.md
homebrew에서 설치하려는 패키지 FORMULA name 앞에 info option을 사용하면 optional package를 포함하여 build할 수 있는 option 정보 및 dependency가 있는 library 의 설치 유무를 확인 할 수 있다.
$ brew info gst-plugins-base
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/gst-plugins-base.rb
==> Dependencies
Build: xz ✔, pkg-config ✔
Required: gettext ✔, gstreamer ✔, gobject-introspection ✔
Optional: orc ✘, gtk+ ✘, libogg ✔, pango ✘, theora ✘, libvorbis ✔
==> Options
--with-gtk+
Build with gtk+ support
--with-libogg
Build with libogg support
--with-libvorbis
Build with libvorbis support
--with-orc
Build with orc support
--with-pango
Build with pango support
--with-theora
Build with theora support
--HEAD
Install HEAD version
위 정보를 통해 gst-plugins-base 를 homebrew를 통해 설치할 때 libogg를 build에 포함시켜 libgstogg 를 deploy시키려면 아래 방법으로 설치를 한다.
$ brew install --HEAD --with-libogg gst-plugins-base
homebrew를 통한 gstreamer plugin 설치 시 (base/good/bad....etc)
optional package(oggdemux, vorbisdeocder ....etc) 에 대해서는 dependency 가 있는 library 가 설치되어 있어도 build가 되지 않습니다. 아래 내용은 gstreamer plugin의 optional package들을 homebrew를 통해 build 하는 방법 입니다. 내용 review 후 page update 부탁 드립니다.
gstreamer plugin optional package 빌드하기
homebrew에서 설치하려는 패키지 FORMULA name 앞에 info option을 사용하면 optional package를 포함하여 build할 수 있는 option 정보 및 dependency가 있는 library 의 설치 유무를 확인 할 수 있다.
$ brew info gst-plugins-base
위 정보를 통해 gst-plugins-base 를 homebrew를 통해 설치할 때 libogg를 build에 포함시켜 libgstogg 를 deploy시키려면 아래 방법으로 설치를 한다.
$ brew install --HEAD --with-libogg gst-plugins-base