{"comment":{"created_at":"2011-10-11T19:49:34Z","body":"I had a similar experience. Replace the line\r\n\r\n    def install\r\n\r\nwith\r\n\r\n    def install\r\n    ENV.x11\r\n    \r\n    ENV.append \"CFLAGS\", \"-I/usr/X11/include\" # env.x11 does not add this line\r\n    # ENV.append \"CPPFLAGS\", \"-I/usr/X11/include\"\r\n    ENV.append \"CXXFLAGS\", \"-I/usr/X11/include\" # env.x11 does not add this line\r\n    \r\n    args = std_cmake_parameters.split\r\n    args << \" -DOPENCV_EXTRA_C_FLAGS='-arch i386 -m32'\" if ARGV.include? \"--with-x --build32\"\r\n\r\ngot it building correctly (it seems) for me as well...","updated_at":"2011-10-11T19:49:34Z","url":"https://api.github.com/repos/mxcl/homebrew/issues/comments/2370305","id":2370305,"user":{"avatar_url":"https://secure.gravatar.com/avatar/5da11e8edf3d30d6d774fb9cb79440c6?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/stonemirror","id":412480,"login":"stonemirror"}},"action":"created","issue":{"number":6424,"created_at":"2011-07-14T16:32:08Z","pull_request":{"diff_url":"https://github.com/mxcl/homebrew/pull/6424.diff","patch_url":"https://github.com/mxcl/homebrew/pull/6424.patch","html_url":"https://github.com/mxcl/homebrew/pull/6424"},"body":"This one should be correct.  It prevents OpenCV from building the included libpng or using the included PNG headers so that linking with other libraries (FLTK in my case) does not produce conflicting header/library versions for libpng.\r\n\r\nVerified both 1) loading a PNG with FLTK's routine and 2) loading a PNG with OpenCV's routine in a test app, and both now work.","comments":10,"title":"Make opencv use system libpng","updated_at":"2011-10-11T19:49:34Z","url":"https://api.github.com/repos/mxcl/homebrew/issues/6424","id":1224296,"assignee":null,"milestone":null,"closed_at":null,"user":{"avatar_url":"https://secure.gravatar.com/avatar/34db93d7376124cb58ce091aa15bd1b8?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/eraserhd","id":147284,"login":"eraserhd"},"html_url":"https://github.com/mxcl/homebrew/issues/6424","labels":[{"name":"opencv","url":"https://api.github.com/repos/mxcl/homebrew/labels/opencv","color":"02e10c"}],"state":"open"},"legacy":{"issue_id":1224296,"comment_id":2370305}}