#50342: doxygen @1.8.10_2 does not build on PPC Tiger, Mac OS X 10.4.11, because of Python code error? ------------------------------+-------------------------------- Reporter: Peter_Dyballa@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: doxygen | ------------------------------+-------------------------------- Comment (by Peter_Dyballa@…): Replying to [comment:3 cal@…]:
The file does `from __future__ import print_function`, which enables this usage of print but only works with Python >= 2.6. Additionally, it specifies a shebang of `/usr/bin/python`, which is probably too old on your system. Replacing the shebang of `src/res2cc_cmd.py` with `#!/usr/bin/env python` would probably fix this if you had python 2.7 installed.
Applying that patch leads to another error: {{{ make[2]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_textproc_doxygen/doxygen/work/doxygen-1.8.10' [ 26%] Generating /opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_textproc_doxygen/doxygen/work/doxygen-1.8.10/generated_src/resources.cpp cd /opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_textproc_doxygen/doxygen/work/doxygen-1.8.10/src && /opt/local/bin/python /opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_textproc_doxygen/doxygen/work/doxygen-1.8.10/src/res2cc_cmd.py /opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_textproc_doxygen/doxygen/work/doxygen-1.8.10/templates /opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_textproc_doxygen/doxygen/work/doxygen-1.8.10/generated_src/resources.cpp File "/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_textproc_doxygen/doxygen/work/doxygen-1.8.10/src/res2cc_cmd.py", line 40 print("static const unsigned char %s_data[] = " % self.bareName,file=outputFile) ^ SyntaxError: invalid syntax }}} What finally helped building doxygen is changing the setting of `python` from {{{ Name Selected Options ==== ======== ======= clang none mp-clang-3.4 none cython cython27 cython27 none db none db48 none gcc apple-gcc42 apple-gcc42 gcc33 gcc40 mp-gcc48 mp-gcc49 mp-gcc5 none llvm none mp-llvm-3.3 mp-llvm-3.4 none nosetests none nosetests27 none python python25 python23-apple python25 python27 python34 none python2 python27 python23-apple python27 none python3 python34 python34 none }}} to {{{ python python27 python23-apple python25 python27 python34 none }}} -- Ticket URL: <https://trac.macports.org/ticket/50342#comment:4> MacPorts <https://www.macports.org/> Ports system for OS X