Many thanks to hrs who kept track of my emergency call, and to

Benjamin Lutz whom he got to solve my latex PDF vs. DVI generation
problem, and who supplied a fix that makes simulavr's documentation
build again.  That way, I could reenable the doc generation for the
port I just turned off about a day ago in order to unbreak the port.

Submitted by:	Benjamin Lutz <benlutz@datacomm.ch>
This commit is contained in:
Joerg Wunsch 2005-08-01 06:28:20 +00:00
parent 8d02757c31
commit c8694fab91
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=140605
5 changed files with 353 additions and 33 deletions

View File

@ -18,7 +18,10 @@ MAINTAINER= joerg@FreeBSD.org
COMMENT= A simulator for AVR microcontrollers
BUILD_DEPENDS= ${LOCALBASE}/avr/include/avr/io.h:${PORTSDIR}/devel/avr-libc \
avr-ld:${PORTSDIR}/devel/avr-binutils
avr-ld:${PORTSDIR}/devel/avr-binutils \
doxygen:${PORTSDIR}/devel/doxygen \
latex:${PORTSDIR}/print/teTeX
#USE_BZIP2= yes
USE_GMAKE= yes

View File

@ -1,15 +1,5 @@
--- configure.orig Thu Feb 17 00:00:18 2005
+++ configure Sat Jul 30 23:49:51 2005
@@ -7166,7 +7166,8 @@
echo "$as_me:$LINENO: checking for doxygen" >&5
echo $ECHO_N "checking for doxygen... $ECHO_C" >&6
-dox_ver=`doxygen --version 2>/dev/null`
+#dox_ver=`doxygen --version 2>/dev/null`
+dox_ver=
if test "x$dox_ver" = "x"; then
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
@@ -7223,7 +7224,7 @@
# If we are compiling with gcc, enable all warning and make warnings errors.

View File

@ -0,0 +1,259 @@
--- doc/texinfo.tex.orig Mon Feb 11 02:59:02 2002
+++ doc/texinfo.tex Mon Aug 1 04:10:42 2005
@@ -864,80 +864,146 @@
\newif\ifpdf
\newif\ifpdfmakepagedest
+% when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1
+% can be set). So we test for \relax and 0 as well as \undefined,
+% borrowed from ifpdf.sty.
\ifx\pdfoutput\undefined
- \pdffalse
- \let\pdfmkdest = \gobble
- \let\pdfurl = \gobble
- \let\endlink = \relax
- \let\linkcolor = \relax
- \let\pdfmakeoutlines = \relax
\else
- \pdftrue
- \pdfoutput = 1
+ \ifx\pdfoutput\relax
+ \else
+ \ifcase\pdfoutput
+ \else
+ \pdftrue
+ \fi
+ \fi
+\fi
+%
+\ifpdf
\input pdfcolor
+ \pdfcatalog{/PageMode /UseOutlines}%
\def\dopdfimage#1#2#3{%
\def\imagewidth{#2}%
\def\imageheight{#3}%
+ % without \immediate, pdftex seg faults when the same image is
+ % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.)
\ifnum\pdftexversion < 14
- \pdfimage
+ \immediate\pdfimage
\else
- \pdfximage
+ \immediate\pdfximage
\fi
\ifx\empty\imagewidth\else width \imagewidth \fi
\ifx\empty\imageheight\else height \imageheight \fi
- {#1.pdf}%
+ \ifnum\pdftexversion<13
+ #1.pdf%
+ \else
+ {#1.pdf}%
+ \fi
\ifnum\pdftexversion < 14 \else
\pdfrefximage \pdflastximage
\fi}
- \def\pdfmkdest#1{\pdfdest name{#1@} xyz}
- \def\pdfmkpgn#1{#1@}
- \let\linkcolor = \Cyan
+ \def\pdfmkdest#1{{%
+ % We have to set dummies so commands such as @code in a section title
+ % aren't expanded.
+ \atdummies
+ \normalturnoffactive
+ \pdfdest name{#1} xyz%
+ }}
+ \def\pdfmkpgn#1{#1}
+ \let\linkcolor = \Blue % was Cyan, but that seems light?
\def\endlink{\Black\pdfendlink}
% Adding outlines to PDF; macros for calculating structure of outlines
% come from Petr Olsak
\def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0%
\else \csname#1\endcsname \fi}
\def\advancenumber#1{\tempnum=\expnumber{#1}\relax
- \advance\tempnum by1
+ \advance\tempnum by 1
\expandafter\xdef\csname#1\endcsname{\the\tempnum}}
- \def\pdfmakeoutlines{{%
- \openin 1 \jobname.toc
- \ifeof 1\else\bgroup
- \closein 1
- \indexnofonts
- \def\tt{}
- % thanh's hack / proper braces in bookmarks
+ %
+ % #1 is the section text. #2 is the pdf expression for the number
+ % of subentries (or empty, for subsubsections). #3 is the node
+ % text, which might be empty if this toc entry had no
+ % corresponding node. #4 is the page number.
+ %
+ \def\dopdfoutline#1#2#3#4{%
+ % Generate a link to the node text if that exists; else, use the
+ % page number. We could generate a destination for the section
+ % text in the case where a section has no node, but it doesn't
+ % seem worthwhile, since most documents are normally structured.
+ \def\pdfoutlinedest{#3}%
+ \ifx\pdfoutlinedest\empty \def\pdfoutlinedest{#4}\fi
+ %
+ \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{#1}%
+ }
+ %
+ \def\pdfmakeoutlines{%
+ \begingroup
+ % Thanh's hack / proper braces in bookmarks
\edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace
\edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace
%
- \def\chapentry ##1##2##3{}
- \def\unnumbchapentry ##1##2{}
- \def\secentry ##1##2##3##4{\advancenumber{chap##2}}
- \def\unnumbsecentry ##1##2{}
- \def\subsecentry ##1##2##3##4##5{\advancenumber{sec##2.##3}}
- \def\unnumbsubsecentry ##1##2{}
- \def\subsubsecentry ##1##2##3##4##5##6{\advancenumber{subsec##2.##3.##4}}
- \def\unnumbsubsubsecentry ##1##2{}
+ % Read toc silently, to get counts of subentries for \pdfoutline.
+ \def\numchapentry##1##2##3##4{%
+ \def\thischapnum{##2}%
+ \def\thissecnum{0}%
+ \def\thissubsecnum{0}%
+ }%
+ \def\numsecentry##1##2##3##4{%
+ \advancenumber{chap\thischapnum}%
+ \def\thissecnum{##2}%
+ \def\thissubsecnum{0}%
+ }%
+ \def\numsubsecentry##1##2##3##4{%
+ \advancenumber{sec\thissecnum}%
+ \def\thissubsecnum{##2}%
+ }%
+ \def\numsubsubsecentry##1##2##3##4{%
+ \advancenumber{subsec\thissubsecnum}%
+ }%
+ \def\thischapnum{0}%
+ \def\thissecnum{0}%
+ \def\thissubsecnum{0}%
+ %
+ % use \def rather than \let here because we redefine \chapentry et
+ % al. a second time, below.
+ \def\appentry{\numchapentry}%
+ \def\appsecentry{\numsecentry}%
+ \def\appsubsecentry{\numsubsecentry}%
+ \def\appsubsubsecentry{\numsubsubsecentry}%
+ \def\unnchapentry{\numchapentry}%
+ \def\unnsecentry{\numsecentry}%
+ \def\unnsubsecentry{\numsubsecentry}%
+ \def\unnsubsubsecentry{\numsubsubsecentry}%
\input \jobname.toc
- \def\chapentry ##1##2##3{%
- \pdfoutline goto name{\pdfmkpgn{##3}}count-\expnumber{chap##2}{##1}}
- \def\unnumbchapentry ##1##2{%
- \pdfoutline goto name{\pdfmkpgn{##2}}{##1}}
- \def\secentry ##1##2##3##4{%
- \pdfoutline goto name{\pdfmkpgn{##4}}count-\expnumber{sec##2.##3}{##1}}
- \def\unnumbsecentry ##1##2{%
- \pdfoutline goto name{\pdfmkpgn{##2}}{##1}}
- \def\subsecentry ##1##2##3##4##5{%
- \pdfoutline goto name{\pdfmkpgn{##5}}count-\expnumber{subsec##2.##3.##4}{##1}}
- \def\unnumbsubsecentry ##1##2{%
- \pdfoutline goto name{\pdfmkpgn{##2}}{##1}}
- \def\subsubsecentry ##1##2##3##4##5##6{%
- \pdfoutline goto name{\pdfmkpgn{##6}}{##1}}
- \def\unnumbsubsubsecentry ##1##2{%
- \pdfoutline goto name{\pdfmkpgn{##2}}{##1}}
+ %
+ % Read toc second time, this time actually producing the outlines.
+ % The `-' means take the \expnumber as the absolute number of
+ % subentries, which we calculated on our first read of the .toc above.
+ %
+ % We use the node names as the destinations.
+ \def\numchapentry##1##2##3##4{%
+ \dopdfoutline{##1}{count-\expnumber{chap##2}}{##3}{##4}}%
+ \def\numsecentry##1##2##3##4{%
+ \dopdfoutline{##1}{count-\expnumber{sec##2}}{##3}{##4}}%
+ \def\numsubsecentry##1##2##3##4{%
+ \dopdfoutline{##1}{count-\expnumber{subsec##2}}{##3}{##4}}%
+ \def\numsubsubsecentry##1##2##3##4{% count is always zero
+ \dopdfoutline{##1}{}{##3}{##4}}%
+ %
+ % PDF outlines are displayed using system fonts, instead of
+ % document fonts. Therefore we cannot use special characters,
+ % since the encoding is unknown. For example, the eogonek from
+ % Latin 2 (0xea) gets translated to a | character. Info from
+ % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100.
+ %
+ % xx to do this right, we have to translate 8-bit characters to
+ % their "best" equivalent, based on the @documentencoding. Right
+ % now, I guess we'll just let the pdf reader have its way.
+ \indexnofonts
+ \turnoffactive
\input \jobname.toc
- \egroup\fi
- }}
+ \endgroup
+ }
+ %
\def\makelinks #1,{%
\def\params{#1}\def\E{END}%
\ifx\params\E
@@ -946,7 +1012,7 @@
\let\nextmakelinks=\makelinks
\ifnum\lnkcount>0,\fi
\picknum{#1}%
- \startlink attr{/Border [0 0 0]}
+ \startlink attr{/Border [0 0 0]}
goto name{\pdfmkpgn{\the\pgn}}%
\linkcolor #1%
\advance\lnkcount by 1%
@@ -968,7 +1034,6 @@
\def\ppn#1{\pgn=#1\gobble}
\def\ppnn{\pgn=\first}
\def\pdfmklnk#1{\lnkcount=0\makelinks #1,END,}
- \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks}
\def\skipspaces#1{\def\PP{#1}\def\D{|}%
\ifx\PP\D\let\nextsp\relax
\else\let\nextsp\skipspaces
@@ -986,21 +1051,21 @@
\def\pdfurl#1{%
\begingroup
\normalturnoffactive\def\@{@}%
+ \makevalueexpandable
\leavevmode\Red
\startlink attr{/Border [0 0 0]}%
user{/Subtype /Link /A << /S /URI /URI (#1) >>}%
- % #1
\endgroup}
\def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}}
\def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks}
\def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks}
\def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}}
\def\maketoks{%
- \expandafter\poptoks\the\toksA|ENDTOKS|
+ \expandafter\poptoks\the\toksA|ENDTOKS|\relax
\ifx\first0\adn0
\else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3
\else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6
- \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9
+ \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9
\else
\ifnum0=\countA\else\makelink\fi
\ifx\first.\let\next=\done\else
@@ -1013,11 +1078,16 @@
\def\makelink{\addtokens{\toksB}%
{\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0}
\def\pdflink#1{%
- \startlink attr{/Border [0 0 0]} goto name{\mkpgn{#1}}
+ \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}}
\linkcolor #1\endlink}
- \def\mkpgn#1{#1@}
\def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
-\fi % \ifx\pdfoutput
+\else
+ \let\pdfmkdest = \gobble
+ \let\pdfurl = \gobble
+ \let\endlink = \relax
+ \let\linkcolor = \relax
+ \let\pdfmakeoutlines = \relax
+\fi % \ifx\pdfoutput
\message{fonts,}

View File

@ -1,22 +0,0 @@
--- doc/Makefile.in.orig Thu Feb 17 00:00:19 2005
+++ doc/Makefile.in Sat Jul 30 23:54:10 2005
@@ -516,7 +516,8 @@
uninstall-local
-all-local: html $(TARGET_PS) $(TARGET_PDF)
+#all-local: html $(TARGET_PS) $(TARGET_PDF)
+all-local:
# Rule for generating postscript output.
ps: simulavr.ps $(TARGET_DOX_PS)
@@ -547,7 +548,8 @@
done
# General rule for installing documentation
-install-data-local: install-html install-ps $(INSTALL_PDF)
+#install-data-local: install-html install-ps $(INSTALL_PDF)
+install-data-local:
uninstall-local:
rm -rf $(DOC_INST_DIR)

View File

@ -13,4 +13,94 @@ share/doc/simulavr/README
share/doc/simulavr/README.gdb
share/doc/simulavr/README.opcodes
share/doc/simulavr/TODO
share/doc/simulavr/html/index.html
share/doc/simulavr/html/simulavr.html
share/doc/simulavr/html/simulavr_1.html
share/doc/simulavr/html/simulavr_2.html
share/doc/simulavr/html/simulavr_3.html
share/doc/simulavr/html/simulavr_4.html
share/doc/simulavr/html/simulavr_5.html
share/doc/simulavr/html/simulavr_6.html
share/doc/simulavr/html/simulavr_7.html
share/doc/simulavr/html/simulavr_8.html
share/doc/simulavr/html/simulavr_9.html
share/doc/simulavr/html/simulavr_10.html
share/doc/simulavr/html/simulavr_11.html
share/doc/simulavr/html/simulavr_abt.html
share/doc/simulavr/html/simulavr_ovr.html
share/doc/simulavr/html/simulavr_toc.html
share/doc/simulavr/internals_html/adc_8c-source.html
share/doc/simulavr/internals_html/adc_8c.html
share/doc/simulavr/internals_html/avrclass_8c-source.html
share/doc/simulavr/internals_html/avrclass_8c.html
share/doc/simulavr/internals_html/avrcore_8c-source.html
share/doc/simulavr/internals_html/avrcore_8c.html
share/doc/simulavr/internals_html/avrerror_8c-source.html
share/doc/simulavr/internals_html/avrerror_8c.html
share/doc/simulavr/internals_html/avrmalloc_8c-source.html
share/doc/simulavr/internals_html/avrmalloc_8c.html
share/doc/simulavr/internals_html/break_watch_pts.html
share/doc/simulavr/internals_html/callback_8c-source.html
share/doc/simulavr/internals_html/decoder_8c-source.html
share/doc/simulavr/internals_html/decoder_8c.html
share/doc/simulavr/internals_html/deprecated.html
share/doc/simulavr/internals_html/device_8c-source.html
share/doc/simulavr/internals_html/device_8c.html
share/doc/simulavr/internals_html/devsupp_8c-source.html
share/doc/simulavr/internals_html/devsupp_8c.html
share/doc/simulavr/internals_html/dir_000000.html
share/doc/simulavr/internals_html/dirs.html
share/doc/simulavr/internals_html/display_8c-source.html
share/doc/simulavr/internals_html/display_8c.html
share/doc/simulavr/internals_html/dox.css
share/doc/simulavr/internals_html/eeprom_8c-source.html
share/doc/simulavr/internals_html/ext_devs.html
share/doc/simulavr/internals_html/files.html
share/doc/simulavr/internals_html/flash_8c-source.html
share/doc/simulavr/internals_html/flash_8c.html
share/doc/simulavr/internals_html/gdbserver_8c-source.html
share/doc/simulavr/internals_html/gdbserver_8c.html
share/doc/simulavr/internals_html/globals.html
share/doc/simulavr/internals_html/globals_defs.html
share/doc/simulavr/internals_html/globals_enum.html
share/doc/simulavr/internals_html/globals_eval.html
share/doc/simulavr/internals_html/globals_func.html
share/doc/simulavr/internals_html/globals_vars.html
share/doc/simulavr/internals_html/index.html
share/doc/simulavr/internals_html/insn_decoder.html
share/doc/simulavr/internals_html/interrupts.html
share/doc/simulavr/internals_html/intvects_8c-source.html
share/doc/simulavr/internals_html/main.html
share/doc/simulavr/internals_html/main_8c-source.html
share/doc/simulavr/internals_html/memory_8c-source.html
share/doc/simulavr/internals_html/memory_8c.html
share/doc/simulavr/internals_html/memory_management.html
share/doc/simulavr/internals_html/object_system.html
share/doc/simulavr/internals_html/op__names_8c-source.html
share/doc/simulavr/internals_html/pages.html
share/doc/simulavr/internals_html/ports_8c-source.html
share/doc/simulavr/internals_html/ports_8c.html
share/doc/simulavr/internals_html/register_8c-source.html
share/doc/simulavr/internals_html/sig_8c-source.html
share/doc/simulavr/internals_html/sig_8c.html
share/doc/simulavr/internals_html/spi_8c-source.html
share/doc/simulavr/internals_html/spi_8c.html
share/doc/simulavr/internals_html/sram_8c-source.html
share/doc/simulavr/internals_html/stack_8c-source.html
share/doc/simulavr/internals_html/stack_8c.html
share/doc/simulavr/internals_html/storage_8c-source.html
share/doc/simulavr/internals_html/timers_8c-source.html
share/doc/simulavr/internals_html/timers_8c.html
share/doc/simulavr/internals_html/todo.html
share/doc/simulavr/internals_html/tree.html
share/doc/simulavr/internals_html/uart_8c-source.html
share/doc/simulavr/internals_html/uart_8c.html
share/doc/simulavr/internals_html/usb_8c-source.html
share/doc/simulavr/internals_html/usb_8c.html
share/doc/simulavr/internals_html/utils_8c-source.html
share/doc/simulavr/internals_html/utils_8c.html
share/doc/simulavr/internals_html/virtual_devs.html
share/doc/simulavr/simulavr.ps
@dirrm share/doc/simulavr/html
@dirrm share/doc/simulavr/internals_html
@dirrm share/doc/simulavr