[MacPorts] #65561: Need help with Port - unalz

MacPorts noreply at macports.org
Fri Jul 29 09:41:34 UTC 2022


#65561: Need help with Port - unalz
---------------------+----------------------
  Reporter:  RobK88  |      Owner:  RobK88
      Type:  defect  |     Status:  assigned
  Priority:  Normal  |  Milestone:
 Component:  ports   |    Version:  2.7.2
Resolution:          |   Keywords:
      Port:  unalz   |
---------------------+----------------------

Comment (by ryandesign):

 > {{{
 > build.args       CPP="${configure.cxx}" \
 >                      CXX="${configure.cxx}" \
 >                      CC="${configure.cc}"
 > }}}

 Normally `CPP` is used for the C preprocessor and `CXX` is used for the
 C++ compiler. However this Makefile does appear to misuse `CPP` as the C++
 compiler and does not use `CXX`. As such there's no need to set `CXX` and
 you should add a comment noting the misuse of `CPP` so that others don't
 look at it and think it's a typo.

 It doesn't patch for me:

 {{{
 --->  Patching UnAlz.cpp: s|register ||
 DEBUG: Executing reinplace: /usr/bin/sed {s|register ||}
 </opt/local/var/macports/build/_private_tmp_a/unalz/work/unalz/UnAlz.cpp
 >@file11
 sed: RE error: illegal byte sequence
 }}}

 Since this only affects two instances, as does the next reinplace which
 has the same problem, there's no reason not to use a patchfile instead of
 a reinplace. Alternately, add `-locale C` to tell `sed` to treat the file
 as ASCII bytes instead of UTF-8. (I think the file is actually in some
 Chinese charset but since you're just replacing ASCII characters it's fine
 to treat the whole file as ASCII for this.)

 After fixing that it builds fine for me on macOS 12.

 If you are on OS X 10.8 or earlier and it doesn't link due to missing
 symbols, you may also need the `-stdlib` flag (or, for simplicity, all
 `CXXFLAGS`) everywhere `CPP` is used to link, where currently only
 `LDFLAGS` are used.

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


More information about the macports-tickets mailing list