freebsd-ports/misc/mc/Makefile
Baptiste Daroussin 9346b215f0 new devel/pkgconf added to replace devel/pkg-config. new version of pkg-config
are no more self hosting so we are stuck with 0.25 version while pkgconf provide
the same set of features as 0.27 and a compatible frontend. A symlink to
pkg-config has been added for convenience and compatibility

This also introduces a new macro to use pkgconf in your ports:
USE_PKGCONFIG

it can take the following arguments:
 - yes (meaning build only dep)
 - build (meaning build only dep)
 - run (meaning run only dep)
 - both (meaning run and build dep)

From now USE_GNOME= pkgconfig is deprecated in favour of USE_PKGCONFIG
The old gnome macro has been modified to use pkgconf but still the sameway: run
and build dep to avoid large breakage.

While here fix some ports relying on pkg-config but not specifying it, fix some
ports broken because testing wrong .pc files, and fix ports using pkg-config
--version to determine pkg-config version instead of
pkg-config --modversion pkg-config like recommanded by pkg-config

With Hat:	portmgr
Exp-runs by:	bapt (pointhat-west), beat (pointyhat)
2012-07-26 05:40:22 +00:00

99 lines
2.5 KiB
Makefile

# New ports collection makefile for: mc
# Date created: 15 Jul 1995
# Whom: torstenb@FreeBSD.org
#
# $FreeBSD$
#
PORTNAME= mc
PORTVERSION= 4.8.1.1
PORTREVISION= 1
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*
USE_GMAKE= yes
USE_GNOME= glib20
USE_PKGCONFIG= yes
USE_PERL5= yes
USE_XZ= yes
GNU_CONFIGURE= yes
CONFIGURE_ENV= ZIP=${UNZIP_CMD} UNZIP=${UNZIP_CMD}
USE_AUTOTOOLS= libtool
OPTIONS= 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
post-patch:
${REINPLACE_CMD} -e 's/SUBDIRS = intl/SUBDIRS =/' ${WRKSRC}/Makefile.in
.include <bsd.port.pre.mk>
.if defined(WITH_SAMBA) || !(defined(WITHOUT_SAMBA) || defined(MINIMAL))
CONFIGURE_ARGS+=--enable-vfs-smb --with-configdir=${LOCALBASE}/etc\
--with-codepagedir=${LOCALBASE}/etc/codepages
.endif
.if defined(WITH_ICONV) || !(defined(WITHOUT_ICONV) || defined(MINIMAL))
USE_ICONV= yes
PLIST_SUB= CHARSETS=""
.else
CONFIGURE_ARGS+=--disable-charset
PLIST_SUB= CHARSETS="@comment "
.endif
.if !defined(WITH_NLS) && (defined(WITHOUT_NLS) || defined(MINIMAL))
CONFIGURE_ARGS+=--disable-nls
PLIST_SUB+= NLS="@comment "
.else
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
USE_GETTEXT= yes
PLIST_SUB+= NLS=""
_MANLANG= es hu it pl ru sr
.endif
.if !defined(WITH_X11) || (defined(WITHOUT_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 !defined(WITH_SLANG) && (defined(WITHOUT_SLANG) || defined(MINIMAL))
CONFIGURE_ARGS+=--with-screen=ncurses
.else
LIB_DEPENDS+= slang.2:${PORTSDIR}/devel/libslang2
CONFIGURE_ARGS+=--with-screen=slang --with-slang-includes=${LOCALBASE}/include
.endif
.if !defined(WITH_SUBSHELL) && (defined(WITHOUT_SUBSHELL) || defined(MINIMAL))
CONFIGURE_ARGS+=--without-subshell
.endif
MAN1= mc.1 mcedit.1 mcview.1
_MAN1= mc.1
.for lang in ${_MANLANG}
_MANPAGES+= ${_MAN1:S%^%${MAN1PREFIX}/man/${lang}/man1/%}
.endfor
.include <bsd.port.post.mk>