freebsd-ports/devel/stfl/Makefile
Baptiste Daroussin 8d27ddb9bd Add a new macro to deal with conflict between ncurses from base and ncurses from ports.
If a ports is linked against ncurses from base or from the ports, it should then add:
USE_NCURSES=yes

it is also possible to specify the hard dependency on the ports ncurses or one the base one adding the following macros:
WITH_NCURSES_PORT=yes or WITH_NCURSES_BASE=yes

PR:		ports/155269
Submitted by:	me
Reviwed by:	pav@
Approved by:	portmgr (pav@)
Exp-run by:	portmgr (pav@)
2011-04-11 08:34:17 +00:00

58 lines
1.6 KiB
Makefile

# New ports collection makefile for: stfl
# Date created: 28 March 2007
# Whom: Andrew Pantyukhin <infofarmer@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME= stfl
PORTVERSION= 0.21
PORTREVISION= 1
CATEGORIES= devel
MASTER_SITES= http://www.clifford.at/stfl/
MAINTAINER= arved@FreeBSD.org
COMMENT= Structured Terminal Forms Language/Library
LICENSE= GPLv3
LICENSE_FILE= ${WRKSRC}/COPYING
USE_LDCONFIG= yes
USE_GMAKE= yes
USE_ICONV= yes
USE_NCURSES= yes
MAKE_JOBS_SAFE= yes
ALL_TARGET= libstfl.so
PLIST_FILES= lib/libstfl.so.1 lib/libstfl.so include/stfl.h \
libdata/pkgconfig/stfl.pc
CFLAGS+= -I${LOCALBASE}/include
LDLIBS+= -L${LOCALBASE}/lib
MAKE_ENV= LDLIBS="${LDLIBS}"
.include <bsd.port.pre.mk>
post-patch:
@${REINPLACE_CMD} -e 's|\.a|.so|g;/ranlib/d;\
s|ar qc|$${CC} $${CFLAGS} ${PTHREAD_LIBS} $${LDLIBS} -shared -fPIC -o|;\
s|sed -r|sed -E|;s|-Os||;/gcc/d;/-MM/s|-I.|$${CFLAGS}|'\
${WRKSRC}/Makefile
@${REINPLACE_CMD} -e 's|alloca.h|stdlib.h|' ${WRKSRC}/widgets/*.c
@${REINPLACE_CMD} -e 's|ncursesw/|${NCURSESINC}/|'\
${WRKSRC}/stfl_internals.h
@${ECHO_CMD} 'prefix = ${PREFIX}' > ${WRKSRC}/Makefile.cfg
pre-build:
@cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV}\
${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} Makefile.deps
post-build:
@cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV}\
${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} stfl.pc
do-install:
@${INSTALL_PROGRAM} ${WRKSRC}/libstfl.so ${PREFIX}/lib/libstfl.so.1
@${LN} -sf ${PREFIX}/lib/libstfl.so.1 ${PREFIX}/lib/libstfl.so
@${INSTALL_DATA} ${WRKSRC}/stfl.h ${PREFIX}/include/
@${INSTALL_DATA} ${WRKSRC}/stfl.pc ${PREFIX}/libdata/pkgconfig/
.include <bsd.port.post.mk>