agiliopadua / homebrew-extras

Some Homebrew formulae.
11 stars 6 forks source link

`depends_on :x11` is now deprecated. #4

Open Chengcheng-Xiao opened 3 years ago

Chengcheng-Xiao commented 3 years ago

Brew complains:

Warning: Calling depends_on :x11 is deprecated! Use depends_on specific X11 formula(e) instead.
Please report this issue to the agiliopadua/extras tap (not Homebrew/brew or Homebrew/core), or even better, submit a PR to fix it:
  /usr/local/Homebrew/Library/Taps/agiliopadua/homebrew-extras/xcrysden.rb:11

And building xcrysden yeilds:

gcc -O2 -fPIC -DTOGL_USE_FONTS -DHAVE_NO_GETLINE -DUSE_INTERP_RESULT  -DUSE_FONTS -I/usr/local/include  -I/usr/local/opt/tcl-tk-x11/include -I/usr/local/opt/tcl-tk-x11/include -I/usr/X11/include -I/usr/X11/include  -c xcviewport.c
xcviewport.c:21:10: fatal error: 'GL/glu.h' file not found
#include <GL/glu.h>
         ^~~~~~~~~~
1 error generated.
make[2]: *** [xcviewport.o] Error 1
make[1]: *** [compile] Error 2
make: *** [src-C] Error 2

even though I have Xquratz installed and /usr/X11/include included.

Chengcheng-Xiao commented 3 years ago

Okay, so calling depends_on :x11 now adds

CMAKE_INCLUDE_PATH: /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers

and not the usual GL from Xquratz.

Simply changing gcc to /usr/bin/gcc fixes this issue.