summaryrefslogtreecommitdiff
path: root/www/wml/patches/patch-ag
blob: ac63c25436c9dae68e61de5938175dc94ce0795c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
$NetBSD: patch-ag,v 1.3 2017/08/19 00:27:01 jlam Exp $

 DESTDIR support

 Substitute for @mandir@ to install manpages under ${PKGMANDIR}.

--- Makefile.in.orig	2005-12-01 17:50:13.000000000 +0000
+++ Makefile.in
@@ -28,7 +28,7 @@ exec_prefix     = $(prefix)
 bindir          = $(prefix)/bin
 libsubdir       = @libsubdir@
 libdir          = $(prefix)/lib$(libsubdir)
-mandir          = $(prefix)/man
+mandir          = @mandir@
 catdir          = @catdir@
 tmpdir          = @tmpdir@
 
@@ -98,118 +98,103 @@ install: install-dirs install-core insta
 install-dirs:
 	@[ -f .build-ok ] || $(MAKE) all
 	@echo "___ INSTALL: prepare directory structure ___"
-	$(MKDIR) $(bindir)
-	$(MKDIR) $(libdir)
-	$(MKDIR) $(libdir)/data
-	$(MKDIR) $(libdir)/exec
-	$(MKDIR) $(libdir)/include
-	$(MKDIR) $(libdir)/perl
-	$(MKDIR) $(mandir)
-	$(MKDIR) $(mandir)/man1
-	$(MKDIR) $(mandir)/man3
-	$(MKDIR) $(mandir)/man7
-	$(MKDIR) $(mandir)/$(catdir)1
-	$(MKDIR) $(mandir)/$(catdir)7
+	$(MKDIR) $(DESTDIR)$(bindir)
+	$(MKDIR) $(DESTDIR)$(libdir)
+	$(MKDIR) $(DESTDIR)$(libdir)/data
+	$(MKDIR) $(DESTDIR)$(libdir)/exec
+	$(MKDIR) $(DESTDIR)$(libdir)/include
+	$(MKDIR) $(DESTDIR)$(libdir)/perl
+	$(MKDIR) $(DESTDIR)$(mandir)
+	$(MKDIR) $(DESTDIR)$(mandir)/man1
+	$(MKDIR) $(DESTDIR)$(mandir)/man3
+	$(MKDIR) $(DESTDIR)$(mandir)/man7
 
 install-core:
 	@echo ""
 	@echo "___ INSTALL: core language programs and manpages ___"
-	$(INSTALL_SCRIPT) wml_frontend/wmk.pl $(bindir)/wmk
-	$(INSTALL_DATA) wml_frontend/wmk.1 $(mandir)/man1/wmk.1
-	$(INSTALL_SCRIPT) wml_frontend/wml.pl $(bindir)/wml
-	$(INSTALL_DATA) wml_frontend/wml.1 $(mandir)/man1/wml.1
-	$(INSTALL_SCRIPT) wml_frontend/wmd.pl $(bindir)/wmd
-	$(INSTALL_DATA) wml_frontend/wmd.1 $(mandir)/man1/wmd.1
-	$(INSTALL_DATA) wml_frontend/wmd.txt $(libdir)/data/wmd.txt
+	$(INSTALL_SCRIPT) wml_frontend/wmk.pl $(DESTDIR)$(bindir)/wmk
+	$(INSTALL_DATA) wml_frontend/wmk.1 $(DESTDIR)$(mandir)/man1/wmk.1
+	$(INSTALL_SCRIPT) wml_frontend/wml.pl $(DESTDIR)$(bindir)/wml
+	$(INSTALL_DATA) wml_frontend/wml.1 $(DESTDIR)$(mandir)/man1/wml.1
+	$(INSTALL_SCRIPT) wml_frontend/wmd.pl $(DESTDIR)$(bindir)/wmd
+	$(INSTALL_DATA) wml_frontend/wmd.1 $(DESTDIR)$(mandir)/man1/wmd.1
+	$(INSTALL_DATA) wml_frontend/wmd.txt $(DESTDIR)$(libdir)/data/wmd.txt
 	if [ -f wml_frontend/wmd.map ]; then \
-                $(INSTALL_DATA) wml_frontend/wmd.map $(libdir)/data/wmd.map; \
+                $(INSTALL_DATA) wml_frontend/wmd.map $(DESTDIR)$(libdir)/data/wmd.map; \
 	else :; fi
-	$(INSTALL_DATA) wml_frontend/wmd_missing.1 $(mandir)/man1/wmd_missing.1
-	$(INSTALL_SCRIPT) wml_frontend/wmb.pl $(bindir)/wmb
-	$(INSTALL_DATA) wml_frontend/wmb.1 $(mandir)/man1/wmb.1
-	$(INSTALL_SCRIPT) wml_frontend/wmu.pl $(bindir)/wmu
-	$(INSTALL_DATA) wml_frontend/wmu.1 $(mandir)/man1/wmu.1
-	$(INSTALL_SCRIPT) wml_backend/p1_ipp/ipp.pl $(libdir)/exec/wml_p1_ipp
-	$(INSTALL_DATA) wml_backend/p1_ipp/ipp.1 $(mandir)/man1/wml_p1_ipp.1
-	$(INSTALL_PROGRAM) wml_backend/p2_mp4h/src/mp4h@EXEEXT@ $(libdir)/exec/wml_p2_mp4h@EXEEXT@
-	$(INSTALL_DATA) wml_backend/p2_mp4h/doc/mp4h.1 $(mandir)/man1/wml_p2_mp4h.1
-	$(INSTALL_PROGRAM) wml_backend/p3_eperl/eperl@EXEEXT@ $(libdir)/exec/wml_p3_eperl@EXEEXT@
-	$(INSTALL_DATA) wml_backend/p3_eperl/eperl.1 $(mandir)/man1/wml_p3_eperl.1
-	$(INSTALL_PROGRAM) wml_backend/p4_gm4/src/m4@EXEEXT@ $(libdir)/exec/wml_p4_gm4@EXEEXT@
-	$(INSTALL_DATA) wml_backend/p4_gm4/doc/m4.txt $(mandir)/$(catdir)1/wml_p4_gm4.1
-	$(INSTALL_SCRIPT) wml_backend/p5_divert/divert.pl $(libdir)/exec/wml_p5_divert
-	$(INSTALL_DATA) wml_backend/p5_divert/divert.1 $(mandir)/man1/wml_p5_divert.1
-	$(INSTALL_SCRIPT) wml_backend/p6_asubst/asubst.pl $(libdir)/exec/wml_p6_asubst
-	$(INSTALL_DATA) wml_backend/p6_asubst/asubst.1 $(mandir)/man1/wml_p6_asubst.1
-	$(INSTALL_SCRIPT) wml_backend/p7_htmlfix/htmlfix.pl $(libdir)/exec/wml_p7_htmlfix
-	$(INSTALL_DATA) wml_backend/p7_htmlfix/htmlfix.1 $(mandir)/man1/wml_p7_htmlfix.1
-	$(INSTALL_SCRIPT) wml_backend/p8_htmlstrip/htmlstrip.pl $(libdir)/exec/wml_p8_htmlstrip
-	$(INSTALL_DATA) wml_backend/p8_htmlstrip/htmlstrip.1 $(mandir)/man1/wml_p8_htmlstrip.1
-	$(INSTALL_SCRIPT) wml_backend/p9_slice/slice $(libdir)/exec/wml_p9_slice
-	$(INSTALL_DATA) wml_backend/p9_slice/slice.1 $(mandir)/man1/wml_p9_slice.1
+	$(INSTALL_DATA) wml_frontend/wmd_missing.1 $(DESTDIR)$(mandir)/man1/wmd_missing.1
+	$(INSTALL_SCRIPT) wml_frontend/wmb.pl $(DESTDIR)$(bindir)/wmb
+	$(INSTALL_DATA) wml_frontend/wmb.1 $(DESTDIR)$(mandir)/man1/wmb.1
+	$(INSTALL_SCRIPT) wml_frontend/wmu.pl $(DESTDIR)$(bindir)/wmu
+	$(INSTALL_DATA) wml_frontend/wmu.1 $(DESTDIR)$(mandir)/man1/wmu.1
+	$(INSTALL_SCRIPT) wml_backend/p1_ipp/ipp.pl $(DESTDIR)$(libdir)/exec/wml_p1_ipp
+	$(INSTALL_DATA) wml_backend/p1_ipp/ipp.1 $(DESTDIR)$(mandir)/man1/wml_p1_ipp.1
+	$(INSTALL_PROGRAM) wml_backend/p2_mp4h/src/mp4h@EXEEXT@ $(DESTDIR)$(libdir)/exec/wml_p2_mp4h@EXEEXT@
+	$(INSTALL_DATA) wml_backend/p2_mp4h/doc/mp4h.1 $(DESTDIR)$(mandir)/man1/wml_p2_mp4h.1
+	$(INSTALL_PROGRAM) wml_backend/p3_eperl/eperl@EXEEXT@ $(DESTDIR)$(libdir)/exec/wml_p3_eperl@EXEEXT@
+	$(INSTALL_DATA) wml_backend/p3_eperl/eperl.1 $(DESTDIR)$(mandir)/man1/wml_p3_eperl.1
+	$(INSTALL_PROGRAM) wml_backend/p4_gm4/src/m4@EXEEXT@ $(DESTDIR)$(libdir)/exec/wml_p4_gm4@EXEEXT@
+	$(INSTALL_SCRIPT) wml_backend/p5_divert/divert.pl $(DESTDIR)$(libdir)/exec/wml_p5_divert
+	$(INSTALL_DATA) wml_backend/p5_divert/divert.1 $(DESTDIR)$(mandir)/man1/wml_p5_divert.1
+	$(INSTALL_SCRIPT) wml_backend/p6_asubst/asubst.pl $(DESTDIR)$(libdir)/exec/wml_p6_asubst
+	$(INSTALL_DATA) wml_backend/p6_asubst/asubst.1 $(DESTDIR)$(mandir)/man1/wml_p6_asubst.1
+	$(INSTALL_SCRIPT) wml_backend/p7_htmlfix/htmlfix.pl $(DESTDIR)$(libdir)/exec/wml_p7_htmlfix
+	$(INSTALL_DATA) wml_backend/p7_htmlfix/htmlfix.1 $(DESTDIR)$(mandir)/man1/wml_p7_htmlfix.1
+	$(INSTALL_SCRIPT) wml_backend/p8_htmlstrip/htmlstrip.pl $(DESTDIR)$(libdir)/exec/wml_p8_htmlstrip
+	$(INSTALL_DATA) wml_backend/p8_htmlstrip/htmlstrip.1 $(DESTDIR)$(mandir)/man1/wml_p8_htmlstrip.1
+	$(INSTALL_SCRIPT) wml_backend/p9_slice/slice $(DESTDIR)$(libdir)/exec/wml_p9_slice
+	$(INSTALL_DATA) wml_backend/p9_slice/slice.1 $(DESTDIR)$(mandir)/man1/wml_p9_slice.1
 
 install-perl:
 	@echo ""
 	@echo "___ INSTALL: commonly used Perl 5 modules ___"
 	-@set dummy $(MAKEFLAGS); amf=$$2; \
-	(cd wml_common && $(MAKE) install prefix=$(prefix)) \
+	(cd wml_common && $(MAKE) install prefix=$(prefix) DESTDIR=$(DESTDIR)) \
 	    || case "$$amf" in *=*) exit 1;; *k*) ;; *) exit 1;; esac
 
 install-doc:
 	@echo ""
 	@echo "___ INSTALL: general documentation ___"
-	$(INSTALL_DATA) wml_docs/wml_intro.7 $(mandir)/man7/wml_intro.7
-	$(INSTALL_DATA) wml_docs/wml_tutorial.7 $(mandir)/man7/wml_tutorial.7
-	$(INSTALL_DATA) wml_docs/wml_macros.7 $(mandir)/man7/wml_macros.7
-	$(INSTALL_DATA) wml_docs/wml_faq.7 $(mandir)/man7/wml_faq.7
-	$(INSTALL_DATA) wml_docs/wml_tags.7 $(mandir)/man7/wml_tags.7
-	$(INSTALL_DATA) wml_docs/wml_std_html20.txt $(mandir)/$(catdir)7/wml_std_html20.7
-	$(INSTALL_DATA) wml_docs/wml_std_html32.txt $(mandir)/$(catdir)7/wml_std_html32.7
-	$(INSTALL_DATA) wml_docs/wml_std_html40.txt $(mandir)/$(catdir)7/wml_std_html40.7
-	$(INSTALL_DATA) wml_docs/wml_std_html401.txt $(mandir)/$(catdir)7/wml_std_html401.7
-	$(INSTALL_DATA) wml_docs/wml_std_xhtml10.txt $(mandir)/$(catdir)7/wml_std_xhtml10.7
-	$(INSTALL_DATA) wml_docs/wml_std_css1.txt $(mandir)/$(catdir)7/wml_std_css1.7
-	$(INSTALL_DATA) wml_docs/wml_std_css2.txt $(mandir)/$(catdir)7/wml_std_css2.7
-	$(INSTALL_DATA) wml_docs/wml_std_csspos.txt $(mandir)/$(catdir)7/wml_std_csspos.7
-	$(INSTALL_DATA) wml_docs/wml_std_wai10.txt $(mandir)/$(catdir)7/wml_std_wai10.7
-	$(INSTALL_DATA) wml_docs/wml_barebone.txt $(mandir)/$(catdir)7/wml_barebone.7
+	$(INSTALL_DATA) wml_docs/wml_intro.7 $(DESTDIR)$(mandir)/man7/wml_intro.7
+	$(INSTALL_DATA) wml_docs/wml_tutorial.7 $(DESTDIR)$(mandir)/man7/wml_tutorial.7
+	$(INSTALL_DATA) wml_docs/wml_macros.7 $(DESTDIR)$(mandir)/man7/wml_macros.7
+	$(INSTALL_DATA) wml_docs/wml_faq.7 $(DESTDIR)$(mandir)/man7/wml_faq.7
+	$(INSTALL_DATA) wml_docs/wml_tags.7 $(DESTDIR)$(mandir)/man7/wml_tags.7
 
 install-aux:
 	@echo ""
 	@echo "___ INSTALL: auxiliary programs and manpages ___"
-	$(INSTALL_SCRIPT) wml_aux/htmlclean/htmlclean.pl $(libdir)/exec/wml_aux_htmlclean
-	$(INSTALL_DATA) wml_aux/htmlclean/htmlclean.1 $(mandir)/man1/wml_aux_htmlclean.1
-	$(INSTALL_PROGRAM) wml_aux/iselect/iselect@EXEEXT@ $(libdir)/exec/wml_aux_iselect@EXEEXT@
-	$(INSTALL_DATA) wml_aux/iselect/iselect.1 $(mandir)/man1/wml_aux_iselect.1
-	$(INSTALL_SCRIPT) wml_aux/map2html/map2html.pl $(libdir)/exec/wml_aux_map2html
-	$(INSTALL_DATA) wml_aux/map2html/map2html.1 $(mandir)/man1/wml_aux_map2html.1
-	$(INSTALL_SCRIPT) wml_aux/txt2html/txt2html.pl $(libdir)/exec/wml_aux_txt2html
-	$(INSTALL_DATA) wml_aux/txt2html/txt2html.txt $(mandir)/$(catdir)1/wml_aux_txt2html.1
-	$(INSTALL_DATA) wml_aux/txt2html/txt2html.dict $(libdir)/data/txt2html.dict
-	$(INSTALL_PROGRAM) wml_aux/tidy/tidy@EXEEXT@ $(libdir)/exec/wml_aux_tidy@EXEEXT@
-	$(INSTALL_DATA) wml_aux/tidy/tidy.txt $(mandir)/$(catdir)1/wml_aux_tidy.1
-	$(INSTALL_SCRIPT) wml_aux/htmlinfo/htmlinfo.pl $(libdir)/exec/wml_aux_htmlinfo
-	$(INSTALL_DATA) wml_aux/htmlinfo/htmlinfo.1 $(mandir)/man1/wml_aux_htmlinfo.1
-	$(INSTALL_SCRIPT) wml_aux/linklint/linklint.pl $(libdir)/exec/wml_aux_linklint
-	$(INSTALL_DATA) wml_aux/linklint/linklint.1 $(mandir)/man1/wml_aux_linklint.1
-	$(INSTALL_SCRIPT) wml_aux/weblint/weblint.pl $(libdir)/exec/wml_aux_weblint
-	$(INSTALL_DATA) wml_aux/weblint/weblint.1 $(mandir)/man1/wml_aux_weblint.1
-	$(INSTALL_DATA) wml_aux/weblint/weblintrc $(libdir)/data/weblintrc
-	$(INSTALL_SCRIPT) wml_aux/freetable/freetable.pl $(libdir)/exec/wml_aux_freetable
-	$(INSTALL_DATA) wml_aux/freetable/freetable.1 $(mandir)/man1/wml_aux_freetable.1
+	$(INSTALL_SCRIPT) wml_aux/htmlclean/htmlclean.pl $(DESTDIR)$(libdir)/exec/wml_aux_htmlclean
+	$(INSTALL_DATA) wml_aux/htmlclean/htmlclean.1 $(DESTDIR)$(mandir)/man1/wml_aux_htmlclean.1
+	$(INSTALL_PROGRAM) wml_aux/iselect/iselect@EXEEXT@ $(DESTDIR)$(libdir)/exec/wml_aux_iselect@EXEEXT@
+	$(INSTALL_DATA) wml_aux/iselect/iselect.1 $(DESTDIR)$(mandir)/man1/wml_aux_iselect.1
+	$(INSTALL_SCRIPT) wml_aux/map2html/map2html.pl $(DESTDIR)$(libdir)/exec/wml_aux_map2html
+	$(INSTALL_DATA) wml_aux/map2html/map2html.1 $(DESTDIR)$(mandir)/man1/wml_aux_map2html.1
+	$(INSTALL_SCRIPT) wml_aux/txt2html/txt2html.pl $(DESTDIR)$(libdir)/exec/wml_aux_txt2html
+	$(INSTALL_DATA) wml_aux/txt2html/txt2html.dict $(DESTDIR)$(libdir)/data/txt2html.dict
+	$(INSTALL_PROGRAM) wml_aux/tidy/tidy@EXEEXT@ $(DESTDIR)$(libdir)/exec/wml_aux_tidy@EXEEXT@
+	$(INSTALL_SCRIPT) wml_aux/htmlinfo/htmlinfo.pl $(DESTDIR)$(libdir)/exec/wml_aux_htmlinfo
+	$(INSTALL_DATA) wml_aux/htmlinfo/htmlinfo.1 $(DESTDIR)$(mandir)/man1/wml_aux_htmlinfo.1
+	$(INSTALL_SCRIPT) wml_aux/linklint/linklint.pl $(DESTDIR)$(libdir)/exec/wml_aux_linklint
+	$(INSTALL_DATA) wml_aux/linklint/linklint.1 $(DESTDIR)$(mandir)/man1/wml_aux_linklint.1
+	$(INSTALL_SCRIPT) wml_aux/weblint/weblint.pl $(DESTDIR)$(libdir)/exec/wml_aux_weblint
+	$(INSTALL_DATA) wml_aux/weblint/weblint.1 $(DESTDIR)$(mandir)/man1/wml_aux_weblint.1
+	$(INSTALL_DATA) wml_aux/weblint/weblintrc $(DESTDIR)$(libdir)/data/weblintrc
+	$(INSTALL_SCRIPT) wml_aux/freetable/freetable.pl $(DESTDIR)$(libdir)/exec/wml_aux_freetable
+	$(INSTALL_DATA) wml_aux/freetable/freetable.1 $(DESTDIR)$(mandir)/man1/wml_aux_freetable.1
 
 install-misc:
 	@echo ""
 	@echo "___ INSTALL: miscellaneous files ___"
 	-@set dummy $(MAKEFLAGS); amf=$$2; \
-	(cd wml_misc && $(MAKE) install prefix=$(prefix)) \
+	(cd wml_misc && $(MAKE) install prefix=$(prefix) DESTDIR=$(DESTDIR)) \
 	    || case "$$amf" in *=*) exit 1;; *k*) ;; *) exit 1;; esac
 
 install-tags:
 	@echo ""
 	@echo "___ INSTALL: include files and manpages ___"
 	-@set dummy $(MAKEFLAGS); amf=$$2; \
-	(cd wml_include && $(MAKE) install prefix=$(prefix)) \
+	(cd wml_include && $(MAKE) install prefix=$(prefix) DESTDIR=$(DESTDIR)) \
 	    || case "$$amf" in *=*) exit 1;; *k*) ;; *) exit 1;; esac
 
 # ------------------------------------------------