upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / solfege / trunk / itstool.patch
blob755ed1f77e7d57beeb3c12d98e1da77bb98dbd23
1 diff --git a/Makefile.in b/Makefile.in
2 index 5de799b..9851380 100644
3 --- a/Makefile.in
4 +++ b/Makefile.in
5 @@ -39,10 +39,9 @@ export MAKEINFO:=@MAKEINFO@
6 export MSGFMT:=@MSGFMT@
7 export MSGGREP:=@MSGGREP@
8 export MSGMERGE:=@MSGMERGE@
9 -export XML2PO:=@XML2PO@
10 +export ITSTOOL:=@ITSTOOL@
11 export XSLTPROC:=@XSLTPROC@
12 export STYLESHEET:=@STYLESHEET@
13 -export HAVE_STYLESHEET:=@HAVE_STYLESHEET@
14 export PYTHON:=@PYTHON@
15 export PYTHON_VERSION:=@PYTHON_VERSION@
16 export PYTHON_PREFIX:=@PYTHON_PREFIX@
17 @@ -288,7 +287,7 @@ help:
18 @echo "set skipmanual=yes Don't rebuild the music theory images"
19 @echo "make po-update Update po/solfege.pot and msgmerge with po/*.po"
20 @echo "make manual-po-update Update help/*/solfege.pot and msgmerge with help/*/*.po"
21 - @echo "make update-manual Rebuild the manual, requiring xml2po etc."
22 + @echo "make update-manual Rebuild the manual, requiring itstool etc."
23 @echo "make test-screenshots See which screenshots are missing in the user manual"
24 @echo "make help Display this message."
25 @echo "help/C/one-big-page.html Make documentation in on big html file."
26 diff --git a/configure.ac b/configure.ac
27 index 323eb27..7751792 100644
28 --- a/configure.ac
29 +++ b/configure.ac
30 @@ -92,23 +92,12 @@ MY_PATH_PROG(CAT, cat)
32 # FIXME we had to comment out this to run on win32
33 # PKG_CHECK_MODULES(XML2PO, xml2po >= 0.4)
34 -AC_PATH_PROG(XML2PO, xml2po)
35 -AC_SUBST(XML2PO)
36 +AC_PATH_PROG(ITSTOOL, itstool)
37 +AC_SUBST(ITSTOOL)
39 AC_PATH_PROG(XSLTPROC, xsltproc)
40 AC_SUBST(XSLTPROC)
42 -AC_ARG_ENABLE(docbook-stylesheet,
43 - AC_HELP_STRING([--enable-docbook-stylesheet=PATH],
44 - [PATH is filename including full path to the html/chunk.xsl
45 - stylesheet.]),
46 - [STYLESHEET=$enableval],
47 - [STYLESHEET=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/chunk.xsl])
49 -AC_CHECK_FILE($STYLESHEET, HAVE_STYLESHEET=yes, HAVE_STYLESHEET=no)
50 -AC_SUBST(STYLESHEET)
51 -AC_SUBST(HAVE_STYLESHEET)
53 AC_CHECK_HEADER(sys/soundcard.h, HAVE_SOUNDCARD_H=yes, HAVE_SOUNDCARD_H=no)
54 AC_SUBST(HAVE_SOUNDCARD_H)
56 @@ -178,9 +167,9 @@ AC_OUTPUT
58 AC_MSG_NOTICE
59 AC_MSG_NOTICE([Please remember to rerun configure if you change swig versions!])
60 -if test -z "$XML2PO"; then
61 +if test -z "$ITSTOOL"; then
62 AC_MSG_NOTICE
63 -AC_MSG_NOTICE([xml2po was not found. This is no big deal, but it mean that the])
64 +AC_MSG_NOTICE([itstool was not found. This is no big deal, but it mean that the])
65 AC_MSG_NOTICE([translated user manuals will not be updated if you make changes])
66 AC_MSG_NOTICE([to the english manual.])
68 diff --git a/help/C/Makefile b/help/C/Makefile
69 index c14c3c8..f169682 100644
70 --- a/help/C/Makefile
71 +++ b/help/C/Makefile
72 @@ -38,13 +38,13 @@ dist_files += help/C/solfege.pot \
73 $(wildcard help/C/scales/images/modes/scales/*.png) \
75 help/C/solfege.pot: $(USER_MANUAL_SOURCES)
76 -ifndef XML2PO
77 +ifndef ITSTOOL
78 @echo
79 - @echo "You need to install xml2po to update help/C/solfege.pot"
80 + @echo "You need to install itstool to update help/C/solfege.pot"
81 @echo
82 @exit 64
83 else
84 - $(XML2PO) --keep-entities $(USER_MANUAL_SOURCES) | $(MSGGREP) -v -K -e "@@image:" -e "^Tom" -e "^Amundsen" -e "^tca@gnu.org" -e "^bug-solfege@gnu.org" -e "^solfege-devel@lists.sourceforge.net" -e "^solfege-announce@lists.sourceforge.net" -o help/C/solfege.pot
85 + $(ITSTOOL) $(USER_MANUAL_SOURCES) | $(MSGGREP) -v -K -e "@@image:" -e "^Tom" -e "^Amundsen" -e "^tca@gnu.org" -e "^bug-solfege@gnu.org" -e "^solfege-devel@lists.sourceforge.net" -e "^solfege-announce@lists.sourceforge.net" -o help/C/solfege.pot
86 endif
88 help/C/index.html: $(USER_MANUAL_SOURCES) $(NOT_TRANSLATED_SOURCES)
89 diff --git a/help/Makefile b/help/Makefile
90 index f333161..a712266 100644
91 --- a/help/Makefile
92 +++ b/help/Makefile
93 @@ -13,6 +13,7 @@ XSLTPARAMS:= \
94 --param callout.graphics 0 \
95 --param xref.with.number.and.title 0 \
96 --xinclude \
97 +--nonet \
98 --stringparam html.stylesheet "../style.css"
100 dist_files += help/Makefile help/README \
101 @@ -65,12 +66,11 @@ help/ru/solfege.xml: help/C/solfege.pot help/ru/ru.po $(USER_MANUAL_SOURCES)
102 help/tr/solfege.xml: help/C/solfege.pot help/tr/tr.po $(USER_MANUAL_SOURCES)
104 help/%/solfege.xml:
105 -ifdef XML2PO
106 +ifdef ITSTOOL
107 ifneq "$(skipmanual)" "yes"
108 - for filename in $(notdir $(USER_MANUAL_SOURCES)); do \
109 - $(XML2PO) --keep-entities -p $(patsubst help/%/solfege.xml, help/%, $@)/$(patsubst help/%/solfege.xml,%,$@).po -o $(dir $@)/$$filename help/C/$$filename; \
110 - done
111 - rm -f .xml2po.mo
112 + msgfmt $(patsubst help/%/solfege.xml, help/%, $@)/$(patsubst help/%/solfege.xml,%,$@).po -o $(patsubst help/%/solfege.xml, help/%, $@)/$(patsubst help/%/solfege.xml,%,$@).mo;
113 + $(ITSTOOL) -m $(patsubst help/%/solfege.xml, help/%, $@)/$(patsubst help/%/solfege.xml,%,$@).mo -o help/$(patsubst help/%/solfege.xml,%,$@) $(USER_MANUAL_SOURCES);
114 + rm -f $(patsubst help/%/solfege.xml, help/%, $@)/$(patsubst help/%/solfege.xml,%,$@).mo
115 endif
116 endif
118 @@ -113,13 +113,12 @@ help/C/rhythmtable.xml: tools/gen_rhythms_table.py
119 $(PYTHON) tools/gen_rhythms_table.py
121 %/one-big-page.html: %/solfege.xml
122 - (cd $(dir $<); $(XSLTPROC) $(I18NDEFS) --xinclude --stringparam html.stylesheet "../style.css" --stringparam root.filename "one-big-page" --param onechunk 1 $(subst chunk,onechunk,$(STYLESHEET)) $(notdir $<) )
123 + (cd $(dir $<); $(XSLTPROC) $(I18NDEFS) --xinclude --stringparam html.stylesheet "../style.css" --stringparam root.filename "one-big-page" --param onechunk 1 "http://docbook.sourceforge.net/release/xsl/current/html/onechunk.xsl" $(notdir $<) )
125 %/index.html: %/solfege.xml
126 ifneq "$(skipmanual)" "yes"
127 -ifeq "$(HAVE_STYLESHEET)" "yes"
128 ifneq "$(XSLTPROC)" ""
129 - (cd $(dir $<); $(XSLTPROC) $(I18NDEFS) $(XSLTPARAMS) $(STYLESHEET) $(notdir $<))
130 + (cd $(dir $<); $(XSLTPROC) $(I18NDEFS) $(XSLTPARAMS) "http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl" $(notdir $<))
131 else
132 ifneq "$(skipmanual)" "yes"
133 @echo "*** Cannot rebuild the user manual because you don't have xsltproc installed."
134 @@ -127,25 +126,17 @@ ifeq "$(HAVE_STYLESHEET)" "yes"
135 exit 64
136 endif
137 endif
138 -else
139 - ifneq "$(skipmanual)" "yes"
140 - @echo "*** Cannot rebuild html docs because we are missing the docbook stylesheet."
141 - @echo "*** Try to install the missing software and reconfigure."
142 - @echo "*** Run make as 'make skipmanual=yes' to ignore the problem and don't build the docs"
143 - exit 64
144 - endif
145 -endif
146 endif
147 ifeq "$(skipmanual)" "yes"
148 @echo "*** Not building manual because nomanual=yes"
149 endif
151 .PHONY: update-manual
152 -ifdef XML2PO
153 +ifdef ITSTOOL
154 update-manual: $(addsuffix /index.html,$(addprefix help/,C $(USER_MANUAL_LANGUAGES)))
155 else
156 update-manual:
157 - @echo "You have to install xml2po to run 'make update-manual'"
158 + @echo "You have to install itstool to run 'make update-manual'"
159 endif
161 %.png:%.ly