# vim: ft=make ts=4 sw=4 noet

NAME    = hello
VERSION = 2.12.1
GARTYPE = v2

DESCRIPTION = GNU Hello, the friendly greeting program
define BLURB
  GNU Hello prints a friendly greeting. It serves as a minimal example of a
  standard GNU autoconf/automake package and is a useful build system template.
endef

MASTER_SITES = http://ftp.gnu.org/gnu/hello/
DISTFILES   += $(DISTNAME).tar.gz

LICENSE = COPYING

PACKAGES               += OZSWhello
SPKG_DESC_OZSWhello    = GNU Hello, the friendly greeting program
CATALOGNAME_OZSWhello  = hello
# Catch-all: leave PKGFILES_OZSWhello unset (GAR uses exclude-other-pkgs mechanism).

RUNTIME_DEP_PKGS_OZSWhello += OZSWgettext OZSWlibiconv
BUILD_DEP_PKGS += OZSWgettext OZSWlibiconv

# Enable Solaris extension macros (wprintf, mbstowcs, pthreads, etc.)
EXTENSIONS = 1

# GNU ld requires all DSO dependencies to be explicit; libintl.so uses
# libiconv internally, so we must add it to the link line.
EXTRA_LD_FLAGS += -liconv

# Patch libtool scripts to replace ksh93 "print -r --" with printf
# so they work under bash (our SHELL override).
post-configure:
	@echo "==> Patching libtool scripts for bash compatibility"
	@find $(WORKSRC) -name "libtool" -type f -exec \
	    gsed -i 's/ECHO="print -r --"/ECHO="printf %s\\\\n"/g' {} \;
	@$(MAKECOOKIE)

include gar/category.mk
