Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save luckypapa/64dc5ea15698720a63fb to your computer and use it in GitHub Desktop.
Save luckypapa/64dc5ea15698720a63fb to your computer and use it in GitHub Desktop.

OSX gstreamer개발자를 위한 homebrew 활용 팁

이 페이지를 읽는 개발자는 homebrew를 알고 있다고 가정한다. 최신 gstreamer git master를 homebrew로 빌드하는 방법과 로컬 git을 사용하여 빌드하는 방법을 공유하고자 한다.

git master 빌드하기

$ brew install --HEAD gstreamer

homebrew에서 --HEAD 옵션으로 git master로 패키지를 설치할 수 있는 기능을 제공한다. 물론 해당 패키지의 recipe가 git으로 빌드할 수 있도록 head 항목이 recipe에 기술되어 있는 경우에 가능하다. (gstreamer 관련 패키지는 모두 등록되어 있다)

local git 빌드하기

--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 시 해당 내역이 반영되지 않는다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment