Ticket #12174 (closed defect: fixed)
Unnecessary build.env in sqlite3 Portfile
| Reported by: | jmpp@… | Owned by: | mww@… |
|---|---|---|---|
| Priority: | Normal | Milestone: | Port Bugs |
| Component: | ports | Version: | 1.4.40 |
| Keywords: | Cc: | mww@…, jmpp@… | |
| Port: |
Description
The current SQLite3 Portfile defines the following build environment:
build.env CFLAGS="-I${prefix}/include/ -DSQLITE_ENABLE_LOCKING_STYLE=1" \
LDFLAGS="-L${prefix}/lib"
I tried building without the -I${prefix}/include/ and -L${prefix}/lib declarations and found linkage of the build results to be unaltered, so Id' say those can be safely removed (MacPorts now passes them by default out of the box). In doing that, I moved the remaining compiler macro to the configure environment following the new syntax:
configure.cflags-append -DSQLITE_ENABLE_LOCKING_STYLE=1
But also found that that's rather unnecessary, as SQLite3's build magic still passes that particular compiler macro to the build calls even if we don't list it explicitly in CFLAGS. The attached Portfile patch moves the macro to configure.env per the syntax above even if for safety, but I would say we're safe removing it altogether (the attached destroot.log file catches all the output of the destroot run and demonstrates the macro is being passed even though it's neither in configure.env, DEBUG: Environment: CXXFLAGS='-O2' CPPFLAGS='-I/opt/local/include' CFLAGS='-O2' LDFLAGS='-L/opt/local/lib', nor in build.env, DEBUG: Environment:).
-jmpp

