[MacPorts] #67366: libmamba fails to build on PPC: context.hpp: error: Unknown OSX platform

MacPorts noreply at macports.org
Wed May 3 08:15:57 UTC 2023


#67366: libmamba fails to build on PPC: context.hpp: error: Unknown OSX platform
---------------------------+----------------------
  Reporter:  barracuda156  |      Owner:  l2dy
      Type:  defect        |     Status:  assigned
  Priority:  Normal        |  Milestone:
 Component:  ports         |    Version:  2.8.1
Resolution:                |   Keywords:  powerpc
      Port:  libmamba      |
---------------------------+----------------------

Comment (by barracuda156):

 Well, that is trivially fixable, though I am not sure if it gonna work in
 result :)

 P. S. Does this in `link.cpp` needs a case for PPC?
 {{{
 #if defined(__APPLE__)
                     binary_changed = true;
 #endif
                     std::size_t end = pos +
 path_data.prefix_placeholder.size();
                     std::string suffix;

                     while (end < buffer.size() && buffer[end] != '\0')
                     {
                         suffix += buffer[end];
                         ++end;
                     }

                     std::string replacement = concat(new_prefix, suffix,
 padding);
                     buffer.replace(pos, end - pos, replacement);

                     pos = buffer.find(path_data.prefix_placeholder, pos +
 new_prefix.size());
                 }
 #endif
             }

             std::ofstream fo = open_ofstream(dst, std::ios::out |
 std::ios::binary);
             fo << buffer;
             fo.close();

             std::error_code lec;
             fs::permissions(dst, fs::status(src).permissions(), lec);
             if (lec)
             {
                 LOG_WARNING << "Could not set permissions on [" << dst <<
 "]: " << ec.message();
             }

 #if defined(__APPLE__)
             if (binary_changed && m_pkg_info.subdir == "osx-arm64")
             {
                 codesign(dst, Context::instance().output_params.verbosity
 > 1);
             }
 #endif
 }}}

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


More information about the macports-tickets mailing list