Port net/cgit has an error in the file /usr/local/lib/cgit/filters/syntax-highlighting.py The first line (shebang) lists an incorrect python-interpreter. syntax-highlighting.py needs pyhton3.6 but pyhton2.7 is listed. First line of the file syntax-highlighting.py from the port: #!/usr/local/bin/pyhton2.7 It should be I think: #!/usr/local/bin/python3.6 Otherwise syntax-highlighting with pygments doesn't not work and you will see no text in cgit.
Created attachment 202778 [details] possible patch with changed python version
Hi Frank, can you test the attached patch? I changed the python version to 3. Since python is not used as a dependency it shouldn't affect anything other than these shebangs. Thanks. BR/Marko
Hi Mark, the patch works and fix the problem with the shebang. I started a new jail and installed the ports: nginx, fgciwrap, git and cgit. In order to run the file /usr/local/lib/cgit/filters/syntax-highlighting.py /ports/lang/python3 and /ports/textproc/py-gments with the flag FLAVOR=py36 must be installed. These are the first lines of the file syntax-highlighting.py: #!/usr/local/bin/python3.6 # This script uses Pygments and Python3. You must have both installed # for this to work. # # http://pygments.org/ # http://python.org/ # # It may be used with the source-filter or repo.source-filter settings # in cgitrc. You see the shebang is correct. Thank you!
Sorry Marko, i forgot the "o".
A commit references this bug: Author: zi Date: Thu Mar 14 20:02:05 UTC 2019 New revision: 495730 URL: https://svnweb.freebsd.org/changeset/ports/495730 Log: - Shebang fix for cgit filters - Bump PORTREVISION PR: 236420 Submitted by: Frank van den Boom <frank@am-knie.de> Approved by: Marko Turk <mt@markoturk.info> (maintainer) Changes: head/devel/cgit/Makefile