diff options
Diffstat (limited to 'Mk/Uses/ncurses.mk')
-rw-r--r-- | Mk/Uses/ncurses.mk | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/Mk/Uses/ncurses.mk b/Mk/Uses/ncurses.mk index c89ad90ff3cb..23b5c0216fa3 100644 --- a/Mk/Uses/ncurses.mk +++ b/Mk/Uses/ncurses.mk @@ -24,19 +24,19 @@ .if !defined(_INCLUDE_USES_NCURSES_MK) _INCLUDE_USES_NCURSES_MK= yes -.if empty(ncurses_ARGS) -. if !exists(${DESTDIR}/${LOCALBASE}/lib/libncurses.so) && exists(${DESTDIR}/usr/lib/libncursesw.so) +. if empty(ncurses_ARGS) +. if !exists(${DESTDIR}/${LOCALBASE}/lib/libncurses.so) && exists(${DESTDIR}/usr/lib/libncursesw.so) ncurses_ARGS= base -. else +. else ncurses_ARGS= port +. endif . endif -.endif -.if ${ncurses_ARGS} == base +. if ${ncurses_ARGS} == base NCURSESBASE= /usr NCURSESINC= ${NCURSESBASE}/include -. if exists(${LOCALBASE}/lib/libncurses.so) +. if exists(${LOCALBASE}/lib/libncurses.so) _USES_sanity+= 400:check-depends-ncurses check-depends-ncurses: @${ECHO_CMD} "Dependency error: this port wants the ncurses library from the FreeBSD" @@ -44,27 +44,27 @@ check-depends-ncurses: @${ECHO_CMD} "version is installed by a port." @${ECHO_CMD} "Please deinstall the port or undefine WITH_NCURSES_BASE." @${FALSE} -. endif +. endif -.elif ${ncurses_ARGS} == port +. elif ${ncurses_ARGS} == port NCURSESBASE= ${LOCALBASE} NCURSESINC= ${LOCALBASE}/include/ncurses -. if !defined(NCURSES_PORT) && exists(${DESTDIR}/${LOCALBASE}/lib/libncurses.so) +. if !defined(NCURSES_PORT) && exists(${DESTDIR}/${LOCALBASE}/lib/libncurses.so) PKG_DBDIR?= ${DESTDIR}/var/db/pkg -. if defined(DESTDIR) +. if defined(DESTDIR) PKGARGS= -c ${DESTDIR} -. endif +. endif PKGARGS?= NCURSES_INSTALLED!= ${PKG_BIN} ${PKGARGS} which -qo ${LOCALBASE}/lib/libncurses.so || : -. endif +. endif NCURSES_INSTALLED?= -.if ${NCURSES_INSTALLED} != "" +. if ${NCURSES_INSTALLED} != "" NCURSES_PORT= ${NCURSES_INSTALLED} NCURSES_SHLIBFILE!= ${PKG_INFO} -ql ${NCURSES_INSTALLED} | grep -m 1 "^`${PKG_QUERY} "%p" ${NCURSES_INSTALLED}`/lib/libncurses.so." NCURSES_SHLIBVER?= ${NCURSES_SHLIBFILE:E} -.endif +. endif NCURSES_PORT?= devel/ncurses NCURSES_SHLIBVER?= 6 @@ -75,14 +75,14 @@ NCURSESRPATH= ${NCURSESBASE}/lib TINFO_LIB= -ltinfo NCURSES_LIB= -lncurses -.if defined(NCURSES_RPATH) +. if defined(NCURSES_RPATH) CFLAGS+= -Wl,-rpath,${NCURSESRPATH} -.endif +. endif LDFLAGS+= -Wl,-rpath=${NCURSESRPATH} -.else +. else .error USES=ncurses only accept 'port' and 'base' as arguments, got ${ncurses_ARGS} -.endif +. endif NCURSESLIB= ${NCURSESBASE}/lib NCURSES_IMPL?= ncursesw |