blob: 5de6b43ea0a1422f7df2ccab382061acfa9e44eb (
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
|
# New ports collection makefile for: mc
# Date created: 15 Jul 1995
# Whom: torstenb@FreeBSD.org
#
# $FreeBSD$
#
PORTNAME= mc
PORTVERSION= 4.6.2
CATEGORIES= misc shells
MASTER_SITES= http://www.midnight-commander.org/downloads/ \
${MASTER_SITE_SUNSITE}
MASTER_SITE_SUBDIR= utils/file/managers/mc
PATCH_SITES= ${MASTER_SITES}
MAINTAINER= fjoe@FreeBSD.org
COMMENT= Midnight Commander, a free Norton Commander Clone
CONFLICTS= mc-light-4*
BUILD_DEPENDS= pkg-config:${PORTSDIR}/devel/pkg-config
USE_GETTEXT= yes
USE_ICONV= yes
USE_GMAKE= yes
.if defined(WITH_GLIB12) || defined(MINIMAL)
USE_GNOME= glib12
.else
USE_GNOME= glib20
.endif
USE_PERL5= yes
GNU_CONFIGURE= yes
USE_AUTOTOOLS= aclocal:19 automake:19
ACLOCAL_ARGS= -I m4
AUTOMAKE_ARGS= -c -a
OPTIONS= UTF8 "Build with UTF8 support" on \
SLANG "Build with SLang library" on \
ICONV "Build with iconv recoding" on \
NLS "Build with NLS support" on \
EDIT "Build with internal editor" on \
X11 "Build with X11 library" off \
SUBSHELL "Build with subshell support" on \
SAMBA "Build with Samba support" on
.include <bsd.port.pre.mk>
.if defined(WITH_SAMBA) || !(defined(WITHOUT_SAMBA) || defined(MINIMAL))
CONFIGURE_ARGS+=--with-samba --with-configdir=${LOCALBASE}/etc \
--with-codepagedir=${LOCALBASE}/etc/codepages
.endif
.if defined(WITH_ICONV) || !(defined(WITHOUT_ICONV) || defined(MINIMAL))
CONFIGURE_ARGS+=--enable-charset --with-libiconv-prefix=${LOCALBASE}
PLIST_SUB= CHARSETS=""
.else
PLIST_SUB= CHARSETS="@comment "
.endif
.if !defined(WITH_NLS) && (defined(WITHOUT_NLS) || defined(MINIMAL))
CONFIGURE_ARGS+=--disable-nls
PLIST_SUB+= NLS="@comment "
.else
CONFIGURE_ARGS+=--with-libintl-prefix=${LOCALBASE}
PLIST_SUB+= NLS=""
_MANLANG= es hu it pl ru sr
.endif
.if !defined(WITH_X11) || defined(MINIMAL)
CONFIGURE_ARGS+=--without-x
.else
USE_XORG= x11 xext
.endif
.if !defined(WITH_EDIT) && (defined(WITHOUT_EDIT) || defined(MINIMAL))
CONFIGURE_ARGS+=--without-edit
PLIST_SUB+= EDITOR="@comment "
.else
PLIST_SUB+= EDITOR=""
.endif
.if ${ARCH} == "alpha"
#
# something is wrong with slang on alpha: mc enters an infinite loop
# when calling has_colors() during terminal init (colors.c:250)
WITHOUT_SLANG= yes
.endif
.if defined(WITH_UTF8)
PATCHFILES= ${DISTNAME}-utf8.patch.gz
PATCH_DIST_STRIP= -p1
LIB_DEPENDS+= slang.2:${PORTSDIR}/devel/libslang2
CONFIGURE_ARGS+=--with-screen=slang
CONFIGURE_ENV+= LDFLAGS=-L${LOCALBASE}/lib
.elif !defined(WITH_SLANG) && (defined(WITHOUT_SLANG) || defined(MINIMAL))
CONFIGURE_ARGS+=--with-screen=ncurses
.else
CONFIGURE_ARGS+=--with-screen=mcslang
.endif
.if !defined(WITH_SUBSHELL) && (defined(WITHOUT_SUBSHELL) || defined(MINIMAL))
CONFIGURE_ARGS+=--without-subshell
.endif
.if defined(WITH_PERL_MODULES) || !(defined(WITHOUT_PERL_MODULES) || defined(MINIMAL))
.if ${PERL_LEVEL} < 500800
RUN_DEPENDS+= ${SITE_PERL}/File/Temp.pm:${PORTSDIR}/devel/p5-File-Temp
.endif
.endif
MAN1= mc.1 mcedit.1 mcview.1
_MAN1= mc.1
.for lang in ${_MANLANG}
_MANPAGES+= ${_MAN1:S%^%${MAN1PREFIX}/man/${lang}/man1/%}
.endfor
post-patch:
.if !defined(WITH_NLS) && (defined(WITHOUT_NLS) || defined(MINIMAL))
@${REINPLACE_CMD} -e '/^LIBFILES_ADD +=/,/[^\\]$$/ s/^/#/'\
${WRKSRC}/lib/Makefile.am
.endif
@${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.post.mk>
|