#34423: gnuplot: patch for using -framework AquaTerm instead of -laquaterm --------------------------------------------+------------------------------- Reporter: mojca.miklavec.lists@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.4 Keywords: haspatch | Port: gnuplot --------------------------------------------+------------------------------- Comment(by mojca.miklavec.lists@…): Here's an explanation in pseudocode of what exactly the attached patch does: {{{ /* * User can set one of the following flags <with_aquaterm_flag>: * --without-aquaterm / --with-aquaterm=no * --with-aquaterm[=yes] (default; uses either /Library/Frameworks/AquaTerm.framework or simply considers CFLAGS/LDFLAGS) * --with-aquaterm=/opt/local/Library/Frameworks */ if (this_is_apple) { // may be {"yes", "no", <arbitrary string that means yes, but specifies PATH>} if (with_aquaterm_flag != NULL) { with_aquaterm = "yes"; } else { with_aquaterm = with_aquaterm_flag; } if (with_aquaterm != "no") { aquaterm_libs = ""; if (with_aquaterm == "yes") { aquaterm_framework_path = "/Library/Frameworks"; } else { aquaterm_framework_path = with_aquaterm_flag; aquaterm_libs = "-F" + aquaterm_framework_path; } if (!file_exists(aquaterm_framework_path + "/AquaTerm.framework")) { warn("Framework '" + aquaterm_framework_path + "/AquaTerm.framework' doesn't exist."); aquaterm_libs = ""; } // now check if the following program compiles: // // #import <AquaTerm/AQTAdapter.h> // int main() { return 0; } // // $CC -c $CFLAGS -ObjC $aquaterm_libs hello.c if (program_compiles) { header_aquaterm_aqtadapter_h = "yes"; } else { header_aquaterm_aqtadapter_h = "no"; } if (header_aquaterm_aqtadapter_h == "no") { with_aquaterm = "no"; } else { // now check if an empty program compiles with: // // $CC $CFLAGS $LIBS -framework AquaTerm $aquaterm_libs hello.c if (program_compiles) { with_aquaterm = "yes"; CFLAGS += "-ObjC " + aquaterm_libs; LIBS += "-framework Foundation -framework AquaTerm " + aquaterm_libs; } else { with_aquaterm = "no"; } } } } }}} -- Ticket URL: <https://trac.macports.org/ticket/34423#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS