1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-27 05:10:36 +00:00
freebsd-ports/misc/getopt/Makefile
Tijl Coosemans 1ee4da6dd1 Let USES=localbase add -L${LOCALBASE}/lib to LIBS instead of LDFLAGS.
USES=localbase:ldflags can be used to set LDFLAGS.  Normally LDFLAGS
appears too early on the command line causing some ports to link with
their own libraries in LOCALBASE (if installed) instead of WRKSRC.

Also make use of _USES_POST so -L${LOCALBASE}/lib is added as late as
possible after anything a port Makefile might set.  Use _USES_POST
instead of .include in libedit.mk and libarchive.mk so things like
'USES=libedit localbase:ldflags' work correctly.

Fix some issues with LIBS in some ports.

Switch ports that don't support LIBS to localbase:ldflags.

PR:		212987
Exp-run by:	antoine
Approved by:	portmgr (antoine)
2016-09-30 19:24:30 +00:00

40 lines
849 B
Makefile

# Created by: Sergei Kolobov <sergei@kolobov.com>
# $FreeBSD$
PORTNAME= getopt
PORTVERSION= 1.1.6
CATEGORIES= misc
MASTER_SITES= http://frodo.looijaard.name/system/files/software/getopt/ \
LOCAL/sunpoet
MAINTAINER= sunpoet@FreeBSD.org
COMMENT= Replacement for getopt(1) that supports GNU-style long options
LICENSE= GPLv2 GPLv3
LICENSE_COMB= dual
OPTIONS_DEFINE= DOCS NLS
OPTIONS_SUB= yes
MAKE_ARGS= CC=${CC} LIBCGETOPT=0
USES= gmake
PORTDOCS= Changelog README
NLS_MAKE_ARGS= WITHOUT_GETTEXT=0
NLS_MAKE_ARGS_OFF= WITHOUT_GETTEXT=1
NLS_LDFLAGS= -lintl
NLS_USES= gettext localbase:ldflags
post-patch:
@${RM} ${WRKSRC}/gnu/*.o
post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/getopt
post-install-DOCS-on:
${MKDIR} ${STAGEDIR}${DOCSDIR}/
cd ${WRKSRC}/ && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}/
.include <bsd.port.mk>