[MacPorts] #66953: cmake @3.24.3: Does not compile with SDK 10.12

MacPorts noreply at macports.org
Sat Jun 29 11:29:01 UTC 2024


#66953: cmake @3.24.3: Does not compile with SDK 10.12
---------------------+-----------------------
  Reporter:  lukaso  |      Owner:  michaelld
      Type:  defect  |     Status:  assigned
  Priority:  Normal  |  Milestone:
 Component:  ports   |    Version:  2.8.1
Resolution:          |   Keywords:
      Port:  cmake   |
---------------------+-----------------------

Comment (by lukaso):

 This bug affects 10.13 as well, and `cmake-bootstrap` as well. My
 workaround since these are build time dependencies is to build against the
 latest SDK after installing dependencies (which might be used in the
 runtime executable of GIMP).

 {{{
 function port_clean_and_install() {
   echo "cleaning and installing $*"
   port clean "$@"
   port_install "$@"
 }

 # Must be verbose because otherwise times out on circle ci
 function port_long_clean_and_install() {
   port clean "$@"
   port -v -N install "$@"
 }

   sed -i -e 's/buildfromsource always/buildfromsource ifneeded/g'
 ${PREFIX}/etc/macports/macports.conf
   sed -i -e 's/macosx_deployment_target/#macosx_deployment_target/g'
 ${PREFIX}/etc/macports/macports.conf
   sed -i -e 's/macosx_sdk_version/#macosx_sdk_version/g'
 ${PREFIX}/etc/macports/macports.conf
   (
     # temporarily unset deployment targets since cmake does not build with
 10.13 SDK
     # and we don't really care since only used at build time
     unset MACOSX_DEPLOYMENT_TARGET
     unset SDKROOT
     echo "clean cmake-bootstrap****"
     port_clean_and_install cmake-bootstrap
   )
   sed -i -e 's/buildfromsource ifneeded/buildfromsource always/g'
 ${PREFIX}/etc/macports/macports.conf
   sed -i -e 's/#macosx_deployment_target/macosx_deployment_target/g'
 ${PREFIX}/etc/macports/macports.conf
   sed -i -e 's/#macosx_sdk_version/macosx_sdk_version/g'
 ${PREFIX}/etc/macports/macports.conf
 }}}

 {{{
   echo "build cmake dependencies in case they are needed for gimp"
   port_clean_and_install libcxx \
     curl \
     expat \
     zlib \
     bzip2 \
     libarchive \
     ncurses \
     libuv

   port_long_clean_and_install llvm-18

   echo "cmake-bootstrap being installed since won't build from source with
 10.13 SDK"
   sed -i -e 's/buildfromsource always/buildfromsource ifneeded/g'
 ${PREFIX}/etc/macports/macports.conf
   sed -i -e 's/macosx_deployment_target/#macosx_deployment_target/g'
 ${PREFIX}/etc/macports/macports.conf
   sed -i -e 's/macosx_sdk_version/#macosx_sdk_version/g'
 ${PREFIX}/etc/macports/macports.conf
   (
     # temporarily unset deployment targets since cmake does not build with
 10.13 SDK
     # and we don't really care since only used at build time
     # Can be removed once https://trac.macports.org/ticket/66953 is fixed
     unset MACOSX_DEPLOYMENT_TARGET
     unset SDKROOT
     echo "clean cmake****"
     port_clean_and_install cmake
   )
   sed -i -e 's/buildfromsource ifneeded/buildfromsource always/g'
 ${PREFIX}/etc/macports/macports.conf
   sed -i -e 's/#macosx_deployment_target/macosx_deployment_target/g'
 ${PREFIX}/etc/macports/macports.conf
   sed -i -e 's/#macosx_sdk_version/macosx_sdk_version/g'
 ${PREFIX}/etc/macports/macports.conf
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/66953#comment:11>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list