# vim: ft=make ts=4 sw=4 noet
.DEFAULT_GOAL := all
NAME    = flex
VERSION = 2.6.4
GARTYPE = v2

# GitHub release tarball
MASTER_SITES =
DYNURLS = https://github.com/westes/flex/releases/download/v$(VERSION)/$(DISTNAME).tar.gz
DISTFILES   += $(DISTNAME).tar.gz

LICENSE = COPYING

BUILD_DEP_PKGS += OZSWgm4 OZSWbison

PACKAGES             += OZSWflex
SPKG_DESC_OZSWflex   = Fast lexical analyser generator
CATALOGNAME_OZSWflex = flex

# Fix libtool ECHO="print -r --" (ksh93 builtin, fails under bash)
post-configure:
	@if [ -f $(WORKSRC)/libtool ]; then \
	    find $(WORKSRC) -name "libtool" -type f -exec \
	        gsed -i 's/ECHO="print -r --"/ECHO="printf %s\\n"/g' {} \; ; \
	fi
	@$(MAKECOOKIE)

include gar/category.mk
