aboutsummaryrefslogtreecommitdiffstats
path: root/misc/mc/Makefile
blob: 02786339cbe4431e527017dd7fd0ccd3e70d39f6 (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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# New ports collection makefile for:    mc
# Date created:     15 Jul 1995
# Whom:         torstenb@FreeBSD.org
#
# $FreeBSD$
#

PORTNAME=   mc
PORTVERSION=    4.6.0
CATEGORIES= misc shells
MASTER_SITES=   ${MASTER_SITE_SUNSITE}
MASTER_SITE_SUBDIR= utils/file/managers/mc/

MAINTAINER= fjoe@FreeBSD.org
COMMENT=    Midnight Commander, a free Norton Commander Clone

LIB_DEPENDS=    intl.4:${PORTSDIR}/devel/gettext

USE_GMAKE=  yes
USE_GNOMENG=    yes
USE_GNOME=  glib12
USE_REINPLACE=  yes
GNU_CONFIGURE=  yes
CONFIGURE_ARGS= --with-samba --with-configdir=${LOCALBASE}/etc \
        --with-codepagedir=${LOCALBASE}/etc/codepages

.if !defined(WITHOUT_ICONV)
CONFIGURE_ARGS+=--enable-charset
LIB_DEPENDS+=   iconv.3:${PORTSDIR}/converters/libiconv
PLIST_SUB=  CHARSETS=""
.else
PLIST_SUB=  CHARSETS="@comment "
.endif

.if defined(WITHOUT_SLANG)
CONFIGURE_ARGS+=--with-screen=ncurses
.else
CONFIGURE_ARGS+=--with-screen=slang
CONFIGURE_ENV=  CPPFLAGS="-I ${LOCALBASE}/include" \
        LDFLAGS="-ltermcap -L ${LOCALBASE}/lib"
LIB_DEPENDS+=   slang.1:${PORTSDIR}/devel/libslang
.endif

.if defined(WITHOUT_SUBSHELL)
CONFIGURE_ARGS+=--without-subshell
.endif

MAN1=       mc.1 mcedit.1 mcview.1

post-patch:
    ${REINPLACE_CMD} -e 's|/usr/bin/zip|${LOCALBASE}/bin/zip|' \
        -e 's|/usr/bin/unzip|${LOCALBASE}/bin/unzip|' \
        ${WRKSRC}/configure

post-install:
    @${LN} -sf mc ${PREFIX}/bin/midc

.include <bsd.port.mk>