Created attachment 219906 [details] patch to go into files dir of asciidoc asciidoc 9.0.2 used \n in asciidoc.py 9.0.4 uses \r\n This caused compiler errors in comms/fldigi (which I worked around for now)
Created attachment 219917 [details] Alternative patch to the lineend problem with comms/fldigi Hi Diane, I just looked into the github sources and it seems, that this changes with DEFAULT_NEWLINE [1] were introduced, because Python 3 has universal newlines mode enabled. Eventually there is an alternive way to circumstance your build problem with comms/fldigi. There was another change in asciidoc.py [2], observed with Windows. Unix systems seem not to be affected, but let's try. Could you please try my attached patch instead of yours, rebuild and reinstall textproc/asciidoc, then try to build comms/fldigi and report back? Thanks in advance, Rainer (DH6BAG) [1] https://github.com/asciidoc/asciidoc-py3/commit/fba22e4d8e7adf414aca34272f6b6938b6797cb6 [2] https://github.com/asciidoc/asciidoc-py3/commit/9b9dc0dba2f17bfd2c57c92dde29b5ca4d3d46c7
Your fix does not work. I've narrowed it down to the use of -a toc e.g. ascidoc -a toc file.txt The bug is in template processing: ... elif name == 'template': if args not in config.sections: message.warning('%s: template does not exist' % syntax) else: result = [] for line in config.sections[args]: line = subs_attrs(line) if line is not None: result.append(line) result = '\n'.join(result) # result = DEFAULT_NEWLINE. This hack works but is obviously the wrong fix. ;)
Any luck with this?
(In reply to Diane Bruce from comment #3) Sorry for the late answer. We are very busy at work :( I am not sure, it a patch is needed any more? comms/fldigi builds and installs fine for me without patching asciidoc.py. Perhaps because of commit r557365?
(In reply to Rainer Hurling from comment #4) The only reason fldigi compiles is I hacked in a sed to remove the extra \r which is not in the original Makefiles from vendor. It's a bug in asciidoc.
(In reply to Diane Bruce from comment #5) Ahh, ok. Seems I missed this hacking. Thanks for explanation. So if I temporarily remove r556026, I can test your patch from comment #2 with textproc/asciidoc. I will test it this weekend.
(In reply to Diane Bruce from comment #5) Could you please try if [1][2] work for you? From my point of view, I do not want to change the default behavior of asciidoc. And it's OK to patch fldigi 's Makefile to work with newer asciidoc. That can be submitted to upstream. [1] https://github.com/asciidoc/asciidoc-py3/issues/154 [2] https://github.com/hoadlck/asciidoc-py3/commit/89ac0f48affb054226467b58f5af524ae0760d62
Created attachment 220462 [details] patch with newest (In reply to Sunpoet Po-Chuan Hsieh from comment #7) > Could you please try if [1][2] work for you? > > From my point of view, I do not want to change the default > behavior of asciidoc. And it's OK to patch fldigi 's > Makefile to work with newer asciidoc. That can be submitted > to upstream. > > [1] https://github.com/asciidoc/asciidoc-py3/issues/154 > [2] https://github.com/hoadlck/asciidoc-py3/commit/89ac0f48affb054226467b58f5af524ae0760d62 Hi Sunpoet, After patching textproce/asciidoc as suggested with [1][2], I rebuild this port and afterwards comms/fldigi. Both build and install fine, fldigi produces correct documentation output (tested with the beginners guide in html). I attached the patched port textproc/asciidoc. HTH, Rainer
It looks perfect to me too ;) Yes I've been busy too so no worries!
Committed. Thanks!
A commit references this bug: Author: sunpoet Date: Sun Dec 20 19:48:54 UTC 2020 New revision: 558767 URL: https://svnweb.freebsd.org/changeset/ports/558767 Log: Use config newline setting in system attribute evaluation - Bump PORTREVISION for package change It fixes comms/fldigi build without extra \r removal. Problems seen with inconsistent newlines in the Table Of Contents HTML pulled in from the configuration file. While the rest of the contents in the resulting HTML file honored the newline style configured by the user, this specific snippet of HTML always used "\r\n". This root of this problem existed for some time, but in earlier versions, the newline style was always "\n". The symptoms changed as a side effect of the issue "Extra line padding in source and literal blocks". In this issue, the newline style changed to "\r\n", and was noticed by users. Change the System Attribute Evaluation function to use the newline setting from the global "config" instead of using the default newline. PR: 251329 Reported by: db Obtained from: https://github.com/asciidoc/asciidoc-py3/commit/8313e45cc78af30bb8df5d33311a7f2fdc50595c Changes: head/textproc/asciidoc/Makefile head/textproc/asciidoc/files/patch-asciidoc.py