aboutsummaryrefslogtreecommitdiffstats
path: root/devel/cdialog/Makefile
blob: bf1ee34beb0d07c0c83623f8e52981966cbdb937 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# $FreeBSD$

PORTNAME=   cdialog
PORTVERSION=    1.2.20150920
PORTEPOCH=  2
CATEGORIES= devel
MASTER_SITES=   ftp://invisible-island.net/${PORTNAME:S|^c||}/
DISTNAME=   ${PORTNAME:S|^c||}-${PORTVERSION:R}-${PORTVERSION:E}

MAINTAINER= ports@FreeBSD.org
COMMENT=    Enhanced version of 'dialog' to work with ncurses

LICENSE=    LGPL21

OPTIONS_DEFINE= EXAMPLES

USES=       libtool:build ncurses tar:tgz
GNU_CONFIGURE=  yes
USE_LDCONFIG=   yes
CONFIGURE_ARGS= --enable-widec \
        --includedir=${PREFIX}/include/${PORTNAME} \
        --with-libtool \
        --with-ncursesw \
        --with-package=${PORTNAME}
MAKEFILE=   makefile

INSTALL_TARGET= install-strip install-man install-lib

.include <bsd.port.pre.mk>

.if ${NCURSESBASE} != /usr
CONFIGURE_ARGS+=    --with-curses-dir=${NCURSESBASE}
.endif

post-patch:
    @${FIND} ${WRKSRC}/samples/ -type f -exec ${REINPLACE_CMD} -i "" "s|dialog|cdialog|g" {} \;
    @${REINPLACE_CMD} -e 's|$$(INSTALL_DATA) $$(LIB)|$$(INSTALL_DATA) -s $$(LIB)|'\
        ${WRKSRC}/${MAKEFILE}.in

post-install:
    @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
    cd ${WRKSRC}/samples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}

.include <bsd.port.post.mk>