aboutsummaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2011-04-11 08:34:17 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2011-04-11 08:34:17 +0000
commit8d27ddb9bd993385ce5d7a9b17e2fe231ec8c69f (patch)
tree82565381028ebd8b5a674bafdecce3a45c5c2e6d /devel
parent0a59b351f616abe849539bc2afbc8eba4abe8004 (diff)
downloadports-8d27ddb9bd993385ce5d7a9b17e2fe231ec8c69f.tar.gz
ports-8d27ddb9bd993385ce5d7a9b17e2fe231ec8c69f.zip
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@)
Notes
Notes: svn path=/head/; revision=272515
Diffstat (limited to 'devel')
-rw-r--r--devel/cdk/Makefile13
-rw-r--r--devel/stfl/Makefile8
2 files changed, 3 insertions, 18 deletions
diff --git a/devel/cdk/Makefile b/devel/cdk/Makefile
index 9fb7caea1cc2..c5c0412cf291 100644
--- a/devel/cdk/Makefile
+++ b/devel/cdk/Makefile
@@ -20,24 +20,13 @@ COMMENT= Curses Development Kit for speedy development of full screen programs
LICENSE= BSD
LICENSE_FILE= ${WRKSRC}/COPYING
USE_GMAKE= yes
+USE_NCURSES= yes
GNU_CONFIGURE= yes
PORTDOCS= COPYING EXPANDING INSTALL NOTES README TODO
MAKE_JOBS_UNSAFE= yes
.include <bsd.port.pre.mk>
-.if exists(${LOCALBASE}/include/ncurses/ncurses.h)
-TERMINFO= ${LOCALBASE}/share/misc/terminfo
-CPPFLAGS= -I${LOCALBASE}/include -I${LOCALBASE}/include/ncurses
-LIBS+= -L${LOCALBASE}/lib -lncurses
-LDFLAGS+= -Wl,-rpath,${LOCALBASE}/lib
-CONFIGURE_ENV+= TERMINFO="${TERMINFO}"\
- CPPFLAGS="${CPPFLAGS}"\
- LIBS="${LIBS}"\
- LDFLAGS="${LDFLAGS}"
-LIB_DEPENDS+= ncurses.5:${PORTSDIR}/devel/ncurses
-.endif # exists(${LOCALBASE}/include/ncurses/ncurses.h)
-
CONFIGURE_ARGS+=--with-ncurses
ALL_TARGET= default examples demos cli cdkshlib
INSTALL_TARGET= install installCDKSHLibrary
diff --git a/devel/stfl/Makefile b/devel/stfl/Makefile
index f4a7c22ac077..03b6b8c7138e 100644
--- a/devel/stfl/Makefile
+++ b/devel/stfl/Makefile
@@ -20,6 +20,7 @@ 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 \
@@ -30,18 +31,13 @@ MAKE_ENV= LDLIBS="${LDLIBS}"
.include <bsd.port.pre.mk>
-.if ${OSVERSION} < 602107 || (${OSVERSION} > 700000 && ${OSVERSION} < 700033)
-LIB_DEPENDS+= ncursesw.5:${PORTSDIR}/devel/ncurses
-NCURSES_INC= ncurses/
-.endif
-
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/|${NCURSES_INC}|'\
+ @${REINPLACE_CMD} -e 's|ncursesw/|${NCURSESINC}/|'\
${WRKSRC}/stfl_internals.h
@${ECHO_CMD} 'prefix = ${PREFIX}' > ${WRKSRC}/Makefile.cfg