Todd Zullinger 3492e3
diff -up asciidoc-8.4.5/asciidoc.py.datadir asciidoc-8.4.5/asciidoc.py
Ville Skyttä 6cba39
--- asciidoc-8.4.5/asciidoc.py.datadir	2009-05-26 05:12:38.000000000 +0300
Ville Skyttä 6cba39
+++ asciidoc-8.4.5/asciidoc.py	2009-09-08 00:25:23.000000000 +0300
Todd Zullinger 3492e3
@@ -651,6 +651,8 @@ def filter_lines(filter_cmd, lines, attr
Todd Zullinger 3492e3
         if not found:
Todd Zullinger 3492e3
             found = findfilter(filtername, CONF_DIR, cmd)
Todd Zullinger 3492e3
         if not found:
Todd Zullinger 3492e3
+            found = findfilter(filtername, DATA_DIR, cmd)
Todd Zullinger 3492e3
+        if not found:
Todd Zullinger 3492e3
             found = findfilter(filtername, APP_DIR, cmd)
Todd Zullinger 3492e3
     else:
Todd Zullinger 3492e3
         if os.path.isfile(cmd):
Todd Zullinger 3492e3
@@ -4997,6 +4999,7 @@ APP_DIR = None              # This file'
Todd Zullinger 3492e3
 USER_DIR = None             # ~/.asciidoc
Todd Zullinger 3492e3
 # Global configuration files directory (set by Makefile build target).
Todd Zullinger 3492e3
 CONF_DIR = '/etc/asciidoc'
Todd Zullinger 3492e3
+DATA_DIR = '/usr/share/asciidoc'
Todd Zullinger 3492e3
 HELP_FILE = 'help.conf'     # Default (English) help file.
Todd Zullinger 3492e3
 
Todd Zullinger 3492e3
 # Globals
Todd Zullinger 3492e3
diff -up asciidoc-8.4.5/Makefile.in.datadir asciidoc-8.4.5/Makefile.in
Ville Skyttä 6cba39
--- asciidoc-8.4.5/Makefile.in.datadir	2009-04-24 01:49:43.000000000 +0300
Ville Skyttä 6cba39
+++ asciidoc-8.4.5/Makefile.in	2009-09-08 00:28:23.000000000 +0300
Todd Zullinger 3492e3
@@ -23,6 +23,7 @@ srcdir = @srcdir@
Todd Zullinger 3492e3
 VPATH = @srcdir@
Todd Zullinger 3492e3
 
Todd Zullinger 3492e3
 ASCIIDOCCONF = $(sysconfdir)/asciidoc
Todd Zullinger 3492e3
+ASCIIDOCDATA = $(datadir)/asciidoc
Todd Zullinger 3492e3
 
Todd Zullinger 3492e3
 prog = asciidoc.py a2x
Todd Zullinger 3492e3
 progdir = $(bindir)
Ville Skyttä 6cba39
@@ -35,25 +36,26 @@ manpdir = $(mandir)/man1
Ville Skyttä 6cba39
 conf = $(wildcard *.conf)
Ville Skyttä 6cba39
 confdir = $(ASCIIDOCCONF)
Ville Skyttä 6cba39
 
Ville Skyttä 6cba39
-filtersdir = $(ASCIIDOCCONF)/filters
Ville Skyttä 6cba39
+filtersdir = $(ASCIIDOCDATA)/filters
Ville Skyttä 6cba39
+filtersconfdir = $(ASCIIDOCCONF)/filters
Ville Skyttä 6cba39
 
Ville Skyttä 6cba39
 codefilter = filters/code/code-filter.py
Ville Skyttä 6cba39
 codefilterdir = $(filtersdir)/code
Ville Skyttä 6cba39
 codefilterconf = filters/code/code-filter.conf
Ville Skyttä 6cba39
-codefilterconfdir = $(filtersdir)/code
Ville Skyttä 6cba39
+codefilterconfdir = $(filtersconfdir)/code
Ville Skyttä 6cba39
 
Ville Skyttä 6cba39
 graphvizfilter = filters/graphviz/graphviz2png.py
Ville Skyttä 6cba39
 graphvizfilterdir = $(filtersdir)/graphviz
Ville Skyttä 6cba39
 graphvizfilterconf = filters/graphviz/graphviz-filter.conf
Ville Skyttä 6cba39
-graphvizfilterconfdir = $(filtersdir)/graphviz
Ville Skyttä 6cba39
+graphvizfilterconfdir = $(filtersconfdir)/graphviz
Ville Skyttä 6cba39
 
Ville Skyttä 6cba39
 musicfilter = filters/music/music2png.py
Ville Skyttä 6cba39
 musicfilterdir = $(filtersdir)/music
Ville Skyttä 6cba39
 musicfilterconf = filters/music/music-filter.conf
Ville Skyttä 6cba39
-musicfilterconfdir = $(filtersdir)/music
Ville Skyttä 6cba39
+musicfilterconfdir = $(filtersconfdir)/music
Ville Skyttä 6cba39
 
Ville Skyttä 6cba39
 sourcefilterconf = filters/source/source-highlight-filter.conf
Ville Skyttä 6cba39
-sourcefilterconfdir = $(filtersdir)/source
Ville Skyttä 6cba39
+sourcefilterconfdir = $(filtersconfdir)/source
Ville Skyttä 6cba39
 
Ville Skyttä 6cba39
 docbook = $(wildcard docbook-xsl/*.xsl)
Ville Skyttä 6cba39
 docbookdir = $(ASCIIDOCCONF)/docbook-xsl
Ville Skyttä 6cba39
@@ -126,6 +128,13 @@ fixconfpath:
Todd Zullinger 3492e3
 		mv $$f.out $$f; \
Todd Zullinger 3492e3
 	done
Todd Zullinger 3492e3
 
Todd Zullinger 3492e3
+fixdatapath:
Todd Zullinger 3492e3
+	@for f in $(prog); do \
Todd Zullinger 3492e3
+		echo "Fixing DATA_DIR in $$f"; \
Todd Zullinger 3492e3
+		$(SED) "s#^DATA_DIR = '.*'#DATA_DIR = '$(ASCIIDOCDATA)'#; s#^DATA_DIR=.*#DATA_DIR=$(ASCIIDOCDATA)#" $$f > $$f.out; \
Todd Zullinger 3492e3
+		mv $$f.out $$f; \
Todd Zullinger 3492e3
+	done
Todd Zullinger 3492e3
+
Todd Zullinger 3492e3
 install-vim:
Todd Zullinger 3492e3
 	@for d in $(DESTDIR)/$(vimdir) /etc/vim; do \
Todd Zullinger 3492e3
 		if ! test -d $$d; then continue; fi ; \
Ville Skyttä 6cba39
@@ -145,7 +154,7 @@ uninstall-vim:
Todd Zullinger 3492e3
 	done
Todd Zullinger 3492e3
 
Todd Zullinger 3492e3
 
Todd Zullinger 3492e3
-build: fixconfpath
Todd Zullinger 3492e3
+build: fixconfpath fixdatapath
Todd Zullinger 3492e3
 
Todd Zullinger 3492e3
 install: all $(PROGTARGETS) $(DATATARGETS) progsymlink install-vim
Todd Zullinger 3492e3