I tried setting CFLAGS in he pre-build before, which negates the includes in the patch, and the build fails.
:info:build Executing: cd "/opt/local/var/macports/build/_Users_marbre_ports_cad_CalculiX/CalculiX/work/CalculiX/cgx_2.18/src" && /usr/bin/make -j4 -w CXX=/usr/bin/clang++ CC=/usr/bin/clang CFLAGS="-Os -arch x86_64" LDFLAGS="-L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64" :info:build In file included from adjustMidsideNode.c:31: :info:build In file included from ./cgx.h:25: :info:build ./extUtil.h:40:12: fatal error: 'GL/glut_cgx.h' file not found :info:build #include <GL/glut_cgx.h> :info:build ^~~~~~~~~~~~~~~ Either I add those to the patch or put everything in the pre-build. Mark Brethen mark.bret...@gmail.com > On Jul 27, 2022, at 7:52 AM, Chris Jones <jon...@hep.phy.cam.ac.uk> wrote: > > Then you should at least set these as well pre-build > > CFLAGS="${configure.cflags} [get_canonical_archflags cc]" > > LDFLAGS="${configure.ldflags} [get_canonical_archflags ld]" > > The info in CXXFLAGS should also be passed in some way as well > > CXXFLAGS="${configure.cxxflags} [get_canonical_archflags cxx]" > > If the makefile currently does not use this, it should be added.