freebsd-ports/textproc/msort/Makefile
Tijl Coosemans 02f27a83b4 The output of tools like awk, date, sort, tr,... depends on the current
locale set by the user.  Add LANG=C and LC_ALL=C at the beginning of
bsd.port.mk and export them so all commands are executed with the C locale.
LC_ALL=C overrides all other LC_* variables.  LANG is used by setlocale(3)
as default value for LC_* variables, so normally it isn't used when LC_ALL
is set, but there's code out there that looks at LANG directly so it's safer
to set it as well.  The only commands not captured by this are !=
assignments before any inclusion of bsd.port.*mk.

Introduce USE_LOCALE=<locale> that adds LANG=<locale> and LC_ALL=<locale> to
CONFIGURE_ENV and MAKE_ENV so upstream build systems can be executed with a
different locale (e.g. USE_LOCALE=en_US.UTF-8).

PR:		215882
Exp-run by:	antoine
Approved by:	portmgr (antoine)
2017-01-18 13:20:31 +00:00

39 lines
1.0 KiB
Makefile

# Created by: Gea-Suan Lin <gslin@gslin.org>
# $FreeBSD$
PORTNAME= msort
PORTVERSION= 8.53
PORTREVISION= 3
CATEGORIES= textproc
MASTER_SITES= http://billposer.org/Software/Downloads/
MAINTAINER= ports@FreeBSD.org
COMMENT= Sorting files in sophisticated ways
LICENSE= GPLv3
LICENSE_FILE= ${WRKSRC}/COPYING
LIB_DEPENDS= libtre.so:textproc/libtre \
libuninum.so:devel/libuninum \
libutf8proc.so:textproc/utf8proc
RUN_DEPENDS= iwidgets>=0:x11-toolkits/iwidgets
TEST_DEPENDS= ${LOCALBASE}/bin/bash:shells/bash
BROKEN_aarch64= Fails to link: missing sbrk
CONFIGURE_ENV= ac_cv_lib_tre_regwcomp=yes
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
MAKE_ENV+= INCLUDES="-I${LOCALBASE}/include"
GNU_CONFIGURE= yes
USES= gettext tk:wrapper,run
TEST_TARGET= test
PLIST_FILES= bin/msg bin/msort man/man1/msort.1.gz
post-patch:
@${REINPLACE_CMD} -e "s|bash|${LOCALBASE}/bin/bash|g" ${WRKSRC}/RegressionTests/Makefile
@${REINPLACE_CMD} -e "s|msort|../&|g" ${WRKSRC}/RegressionTests/RunTests.sh \
.include <bsd.port.mk>