The calculix source builds it’s own glut-3.5. Glut wants to link to GL3, but 
the calculix source links to GL.

So I patched the Makefile to link to /opt/local/include, /opt/local/include/GL 
and /opt/local/lib and installed libGLU. I was able to build and install the 
program but it doesn’t render any OpenGL graphics in XQuartz. Not sure what’s 
broke but there were some "function is deprecated …” statements in the build 
log.

Mark Brethen
mark.bret...@gmail.com



> On Nov 14, 2018, at 8:08 PM, Ryan Schmidt <ryandes...@macports.org> wrote:
> 
> 
> 
> On Nov 12, 2018, at 13:17, Mark Brethen wrote:
> 
>> Per the attached Calculix-cgx Makefile, I needed to modify it to indicate 
>> the OpenGL framework. I tried this:
>> 
>> CFLAGS = -O2 -Wall -Wno-narrowing \
>> -I./ \
>> -I/usr/include \
>> -I../../libSNL/src \
>> -I../../glut-3.5/src \
>> -I/usr/X11/include 
>> 
>> LFLAGS = \
>> -framework OpenGL -lGL -lGLU \
>> -lX11 -lXi -lXmu -lXext -lXt -lSM -lICE \
>> -lm -lpthread
>> 
>> .
>> .
>> .
>> 
>> cgx: $(OLIB) $(OUTIL) $(OULIB)
>>      g++  $(OULIB)  $(OLIB) $(OUTIL)  $(CFLAGS) $(LFLAGS) -o  $@
>> 
>> This didn’t work. Is LDFlags appropriate here? There isn’t a config file so 
>> in the portfile I pass the following @ pre-build:
>> 
>>   pre-build {
>>       build.args          CC=${configure.cc} \
>>                           CXX=${configure.cxx}
>>   }
> 
> In what way didn't it work? Did you get an error? What error?
> 
> Certainly "-I/usr/include" in the CFLAGS is unnecessary because the compiler 
> will look there automatically, and "-I/usr/X11/include" is inappropriate 
> because we don't want to find anything there (we want to find X11 stuff in 
> the MacPorts prefix).
> 
> That hardcoded "g++" in the Makefile will need to be replaced with "$(CXX)" 
> in order for your build.args to work for that.
> 

Reply via email to