pkgsrc/www/lynx/patches/patch-af
tron af3d1b003f Restore code to preprocess ".po" files to make this build with older
"gettext" versions (e.g. under NetBSD-i386 3.1_STABLE).
2007-03-10 14:10:39 +00:00

37 lines
1.2 KiB
Text

$NetBSD: patch-af,v 1.5 2007/03/10 14:10:40 tron Exp $
--- po/makefile.inn.orig 2004-01-28 19:30:38.000000000 +0000
+++ po/makefile.inn
@@ -71,6 +71,11 @@ INSTOBJEXT = @INSTOBJEXT@
$(MSGFMT) -o $@ $<
.po.gmo:
+ @if [ `$(GMSGFMT) --version | head -1 | cut -d . -f 2` -lt 11 ]; then \
+ mv $< $<.bak; \
+ sed '/^msgstr/s/\([^\\]\)\(\\[^[:print:]]\)/\1\\\2/g' \
+ <$<.bak >$<; \
+ fi
file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
&& rm -f $$file && $(GMSGFMT) -o $$file $<
@@ -113,16 +118,16 @@ install-data: install-data-@USE_NLS@
install-data-no: all
install-data-yes: all
if test -r "$(MKINSTALLDIRS)"; then \
- $(MKINSTALLDIRS) $(datadir); \
+ $(MKINSTALLDIRS) $(DESTDIR)$(datadir); \
else \
- $(SHELL) $(top_srcdir)/mkdirs.sh $(datadir); \
+ $(SHELL) $(top_srcdir)/mkdirs.sh $(DESTDIR)$(datadir); \
fi
@catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
case "$$cat" in \
- *.gmo) destdir=$(gnulocaledir);; \
- *) destdir=$(localedir);; \
+ *.gmo) destdir=$(DESTDIR)$(gnulocaledir);; \
+ *) destdir=$(DESTDIR)$(localedir);; \
esac; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
dir=$$destdir/$$lang/LC_MESSAGES; \