NAME    = intltool
VERSION = 0.51.0

CATEGORIES = utils

DESCRIPTION = Internationalization tool collection
define BLURB
intltool is a set of tools to centralize translation of many different
file formats using GNU gettext-compatible PO files.
endef

MASTER_SITES = https://launchpad.net/intltool/trunk/$(VERSION)/+download/
DISTFILES    = $(DISTNAME).tar.gz

LICENSE = COPYING

PACKAGES             = OZSWintltool
SPKG_DESC_OZSWintltool = Internationalization tool collection
SPKG_CLASSES         = cswdictconf
RUNTIME_DEP_PKGS_OZSWintltool =

# Use system perl (/usr/bin/perl) which has XML::Parser for the configure check.
# Then patch shebangs to OZSWperl (which has Encode) for runtime use.
CONFIGURE_ARGS = $(DIRPATHS)
CONFIGURE_ARGS += PERL=/usr/bin/perl

include gar/category.mk

post-install:
	# Patch intltool script shebangs to use OZSWperl (which has Encode compiled in)
	for f in $(DESTDIR)$(BUILD_PREFIX)/bin/intltool-*; do \
	    /usr/bin/gsed -i '1s|^#!/usr/bin/perl|#!/opt/ozsw/bin/perl|' "$$f"; \
	done
	@$(MAKECOOKIE)
