2000-02-13 02:57:46 +01:00
|
|
|
# New ports collection makefile for: newt
|
|
|
|
# Date created: 08 Jan 2000
|
|
|
|
# Whom: Will Andrews <andrews@technologist.com>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
2000-04-11 23:30:15 +02:00
|
|
|
PORTNAME= newt
|
2010-01-11 00:40:08 +01:00
|
|
|
PORTVERSION= 0.52.11
|
2012-06-01 07:26:28 +02:00
|
|
|
PORTREVISION= 3
|
2000-02-13 02:57:46 +01:00
|
|
|
CATEGORIES= devel
|
2010-01-11 00:40:08 +01:00
|
|
|
MASTER_SITES= https://fedorahosted.org/releases/n/e/newt/
|
2007-08-03 14:04:27 +02:00
|
|
|
PKGNAMESUFFIX= ${PYTHONSUFFIX}${TCLSUFFIX}
|
2000-02-13 02:57:46 +01:00
|
|
|
|
2010-04-05 01:51:46 +02:00
|
|
|
MAINTAINER= ports@FreeBSD.org
|
2004-04-14 05:03:14 +02:00
|
|
|
COMMENT= Not Erik's Windowing Toolkit: console I/O handling library#'
|
2000-02-13 02:57:46 +01:00
|
|
|
|
2010-01-11 00:40:08 +01:00
|
|
|
LIB_DEPENDS= slang:${PORTSDIR}/devel/libslang2 \
|
|
|
|
popt:${PORTSDIR}/devel/popt
|
2000-02-13 02:57:46 +01:00
|
|
|
|
|
|
|
GNU_CONFIGURE= yes
|
2007-12-15 00:14:24 +01:00
|
|
|
USE_LDCONFIG= yes
|
2010-01-11 00:40:08 +01:00
|
|
|
SOVERSION= ${PORTVERSION:R:E}
|
|
|
|
TCL_NODOT= tcl${TCL_VER:S/.//}
|
|
|
|
CFLAGS+= -Werror
|
|
|
|
MAKE_ENV+= PCFLAGS="${CFLAGS}" TCLVERSION="tcl${TCL_VER}"
|
2002-10-13 08:17:07 +02:00
|
|
|
PLIST_SUB+= SOVERSION=${SOVERSION} \
|
2010-01-11 00:40:08 +01:00
|
|
|
VERSION=${PORTVERSION} \
|
2002-10-13 08:17:07 +02:00
|
|
|
EXAMPLESDIR="${EXAMPLESDIR:S,${PREFIX}/,,}"
|
2010-01-11 00:40:08 +01:00
|
|
|
SUB_LIST= VERSION=${PORTVERSION}
|
2000-02-13 02:57:46 +01:00
|
|
|
|
2010-01-11 00:40:08 +01:00
|
|
|
USE_GMAKE= yes
|
2010-03-17 19:43:54 +01:00
|
|
|
MAKE_JOBS_UNSAFE= yes
|
2010-01-11 00:40:08 +01:00
|
|
|
|
|
|
|
.if defined(WITHOUT_NLS)
|
|
|
|
CONFIGURE_ARGS+=--disable-nls
|
|
|
|
.else
|
|
|
|
USE_GETTEXT= yes
|
|
|
|
.endif
|
2003-01-15 06:43:18 +01:00
|
|
|
.if defined(WITH_PYTHON)
|
2002-03-17 13:09:03 +01:00
|
|
|
PYTHONSUFFIX= -${PYTHON_PKGNAMEPREFIX:S/-//}
|
|
|
|
BUILD_DEPENDS+= ${PYDISTUTILS}
|
|
|
|
USE_PYTHON= yes
|
|
|
|
MAKE_ENV+= WITH_PYTHON=yes
|
2010-01-11 00:40:08 +01:00
|
|
|
PLIST_SUB+= PYTHONOPT="" \
|
|
|
|
PYNUM=${PYTHON_VERSION:S/python//}
|
|
|
|
SUB_FILES+= setup.py
|
2002-03-17 13:09:03 +01:00
|
|
|
.else
|
|
|
|
PLIST_SUB+= PYTHONOPT="@comment "
|
|
|
|
.endif
|
|
|
|
|
2003-01-15 06:43:18 +01:00
|
|
|
.if defined(WITH_TCL)
|
2010-01-11 00:40:08 +01:00
|
|
|
USE_TCL= 84+
|
2002-03-17 13:09:03 +01:00
|
|
|
TCLSUFFIX= -${TCL_NODOT}
|
2010-01-11 00:40:08 +01:00
|
|
|
MAKE_ENV+= WITH_TCL=yes TCL_LIBDIR=${TCL_LIBDIR:Q}
|
|
|
|
PLIST_SUB+= TCLOPT="" TCL_VER=${TCL_VER}${_TCL_THREADS_SUFFIX}
|
2011-09-24 00:26:39 +02:00
|
|
|
CPPFLAGS+= -I${TCL_INCLUDEDIR:Q}
|
2010-01-11 00:40:08 +01:00
|
|
|
SUB_FILES+= pkgIndex.tcl
|
|
|
|
|
|
|
|
pre-su-install:
|
|
|
|
${MKDIR} ${TCL_LIBDIR}/whip
|
2009-05-16 08:27:56 +02:00
|
|
|
|
2002-03-17 13:09:03 +01:00
|
|
|
.else
|
|
|
|
PLIST_SUB+= TCLOPT="@comment "
|
2010-01-11 00:40:08 +01:00
|
|
|
CONFIGURE_ARGS+=--without-tcl
|
2002-03-17 13:09:03 +01:00
|
|
|
.endif
|
|
|
|
|
2010-01-11 00:40:08 +01:00
|
|
|
MAN1= whiptail.1
|
|
|
|
|
2004-04-14 05:03:14 +02:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2002-10-13 08:17:07 +02:00
|
|
|
post-patch:
|
|
|
|
${REINPLACE_CMD} -e 's,^\(SONAME=\).*,\1${SOVERSION},g' \
|
|
|
|
${WRKSRC}/configure
|
2010-01-11 00:40:08 +01:00
|
|
|
${REINPLACE_CMD} -e 's|/usr/include/slang|${LOCALBASE:Q}/include|' \
|
|
|
|
-e 's|-lslang|-lcurses -L${LOCALBASE:Q}/lib -lslang|' \
|
|
|
|
-e 's|-ltcl8.4||' \
|
|
|
|
-e 's|^pkgconfigdir.*|pkgconfigdir=${LOCALBASE:Q}/libdata/pkgconfig|' \
|
|
|
|
-e 's,PYTHONVERS =.*,PYTHONVERS=${PYTHON_VER},' \
|
|
|
|
${WRKSRC}/Makefile.in
|
2007-08-03 14:04:27 +02:00
|
|
|
${REINPLACE_CMD} -e 's,PyMem_DEL,PyObject_DEL,g' \
|
|
|
|
${WRKSRC}/snackmodule.c
|
2002-10-13 08:17:07 +02:00
|
|
|
|
2003-01-15 06:43:18 +01:00
|
|
|
.if defined(WITH_PYTHON)
|
2010-01-11 00:40:08 +01:00
|
|
|
pre-install:
|
2006-10-09 14:11:00 +02:00
|
|
|
@${LN} -sf ${WRKSRC}/libnewt.so.${SOVERSION} ${WRKSRC}/libnewt.so
|
2010-01-11 00:40:08 +01:00
|
|
|
@cd ${WRKSRC} && ${MAKE_ENV} ${PYTHON_CMD} ${WRKDIR}/setup.py build
|
|
|
|
.endif
|
2002-03-17 13:09:03 +01:00
|
|
|
|
|
|
|
post-install:
|
2010-01-11 00:40:08 +01:00
|
|
|
.if defined(WITH_TCL)
|
|
|
|
${INSTALL_DATA} ${WRKDIR}/pkgIndex.tcl ${TCL_LIBDIR}/whip/
|
|
|
|
.endif
|
|
|
|
.if defined(WITH_PYTHON)
|
|
|
|
@cd ${WRKSRC} && ${MAKE_ENV} ${PYTHON_CMD} ${WRKDIR}/setup.py install --prefix=${PREFIX}
|
|
|
|
.if !defined(NOPORTEXAMPLES)
|
|
|
|
${MKDIR} ${EXAMPLESDIR}/
|
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/peanuts.py ${WRKSRC}/popcorn.py ${EXAMPLESDIR}/
|
2002-03-17 13:09:03 +01:00
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
|
2004-04-14 05:03:14 +02:00
|
|
|
.include <bsd.port.post.mk>
|