summaryrefslogtreecommitdiff
path: root/sysutils/mc
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2005-02-12 22:59:28 +0000
committerrillig <rillig@pkgsrc.org>2005-02-12 22:59:28 +0000
commitda3437bb1de43f6a4411f0eb180e23ee2a3327cb (patch)
treede12b941e0be6c1c590197a28bca825bf35a7a2d /sysutils/mc
parent36721c989ae5d489280fecf916ce3ebc748bdc79 (diff)
downloadpkgsrc-da3437bb1de43f6a4411f0eb180e23ee2a3327cb.tar.gz
Converted the package to the pkg.options.mk framework. Bumped PKGREVISION,
because the +BUILD_INFO file changed.
Diffstat (limited to 'sysutils/mc')
-rw-r--r--sysutils/mc/Makefile80
-rw-r--r--sysutils/mc/options.mk77
2 files changed, 90 insertions, 67 deletions
diff --git a/sysutils/mc/Makefile b/sysutils/mc/Makefile
index 7b294148331..365f4e17c7d 100644
--- a/sysutils/mc/Makefile
+++ b/sysutils/mc/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.48 2005/02/12 01:02:50 rillig Exp $
+# $NetBSD: Makefile,v 1.49 2005/02/12 22:59:28 rillig Exp $
DISTNAME= mc-4.6.1-pre2b
PKGNAME= mc-4.6.1rc2
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= sysutils
MASTER_SITES= http://pavelsh.pp.ru/mc/
#MASTER_SITES= http://www.ibiblio.org/pub/Linux/utils/file/managers/mc/ \
@@ -12,12 +12,20 @@ MAINTAINER= pavel.arnost@clnet.cz
HOMEPAGE= http://www.ibiblio.org/mc/
COMMENT= User-friendly file manager and visual shell
-.include "../../mk/bsd.prefs.mk"
-
USE_BUILDLINK3= YES
GNU_CONFIGURE= YES
USE_GNU_TOOLS+= make
USE_PKGLOCALEDIR= YES
+CPPFLAGS.NetBSD+= -D__unix__
+
+# see options.mk for an explanation of these options
+PKG_OPTIONS_VAR= PKG_OPTIONS.mc
+PKG_SUPPORTED_OPTIONS= charset edit largefile ncurses samba slang \
+ subshell vfs x11
+PKG_DEFAULT_OPTIONS= charset edit largefile slang subshell vfs
+
+.include "../../mk/bsd.prefs.mk"
+.include "../../mk/bsd.options.mk"
.if ${OPSYS} == "Linux"
PLIST_SRC+= ${PKGDIR}/PLIST.cons.saver
@@ -31,71 +39,9 @@ post-install:
CONFIGURE_ARGS+= --without-ext2undel
CONFIGURE_ARGS+= --without-gpm-mouse
-MC_FEATURES= edit charset largefile samba subshell vfs x11
-MC_DISABLE_FEATURES= x11 samba
-
-MC_SCREEN_LIBRARY= slang
-
-.for feature in ${MC_FEATURES}
-
-__feature:=${feature}
-
-. if empty(MC_DISABLE_FEATURES:M${feature})
-
-. if ${__feature} == edit
-CONFIGURE_ARGS+= --with-edit
-PLIST_SRC+= ${PKGDIR}/PLIST.mcedit
-. elif ${__feature} == charset
-CONFIGURE_ARGS+= --enable-charset
-.include "../../converters/libiconv/buildlink3.mk"
-PLIST_SRC+= ${PKGDIR}/PLIST.charset
-. elif ${__feature} == largefile
-CONFIGURE_ARGS+= --enable-largefile
-. elif ${__feature} == samba
-CONFIGURE_ARGS+= --with-samba
-. elif ${__feature} == subshell
-CONFIGURE_ARGS+= --with-subshell
-. elif ${__feature} == vfs
-CONFIGURE_ARGS+= --with-vfs
-PLIST_SRC+= ${PKGDIR}/PLIST.vfs
-. elif ${__feature} == x11
-USE_X11= YES
-CONFIGURE_ARGS+= --with-x
-. endif
-
-. else
-
-. if ${__feature} == edit
-CONFIGURE_ARGS+= --without-edit
-. elif ${__feature} == charset
-CONFIGURE_ARGS+= --disable-charset
-. elif ${__feature} == largefile
-CONFIGURE_ARGS+= --disable-largefile
-. elif ${__feature} == samba
-CONFIGURE_ARGS+= --without-samba
-. elif ${__feature} == subshell
-CONFIGURE_ARGS+= --without-subshell
-. elif ${__feature} == vfs
-CONFIGURE_ARGS+= --without-vfs
-. elif ${__feature} == x11
-CONFIGURE_ARGS+= --without-x
-. endif
-
-. endif
-
-.endfor
-
PLIST_SRC+= ${PKGDIR}/PLIST
-.if ${MC_SCREEN_LIBRARY} == "slang"
-CONFIGURE_ARGS+= --with-screen=slang
-.include "../../devel/libslang/buildlink3.mk"
-.elif ${MC_SCREEN_LIBRARY} == "ncurses"
-CONFIGURE_ARGS+= --with-screen=ncurses
-.include "../../devel/ncurses/buildlink3.mk"
-.else
-CONFIGURE_ARGS+= --with-screen=mcslang
-.endif
+.include "options.mk"
.include "../../devel/glib2/buildlink3.mk"
.include "../../devel/gettext-lib/buildlink3.mk"
diff --git a/sysutils/mc/options.mk b/sysutils/mc/options.mk
new file mode 100644
index 00000000000..656fc7c53fd
--- /dev/null
+++ b/sysutils/mc/options.mk
@@ -0,0 +1,77 @@
+# $NetBSD: options.mk,v 1.1 2005/02/12 22:59:28 rillig Exp $
+#
+
+### The charset option enables input/display support for various 8-bit
+### codepages, chooseable at runtime.
+.if !empty(PKG_OPTIONS:Mcharset)
+CONFIGURE_ARGS+= --enable-charset
+PLIST_SRC+= ${PKGDIR}/PLIST.charset
+.include "../../converters/libiconv/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-charset
+.endif
+
+### The internal editor can be disabled to save disk space.
+.if !empty(PKG_OPTIONS:Medit)
+CONFIGURE_ARGS+= --with-edit
+PLIST_SRC+= ${PKGDIR}/PLIST.mcedit
+.else
+CONFIGURE_ARGS+= --without-edit
+.endif
+
+### Enable file sizes >= 2 GB. Note that this option is considered
+### experimental, as some filesize calculations are still done with
+### 32 bits of precision.
+.if !empty(PKG_OPTIONS:Mlargefile)
+CONFIGURE_ARGS+= --enable-largefile
+.else
+CONFIGURE_ARGS+= --disable-largefile
+.endif
+
+### Enable the Samba virtual file system. You can connect to Windows
+### file servers or Samba servers in your network.
+.if !empty(PKG_OPTIONS:Msamba)
+CONFIGURE_ARGS+= --with-samba
+.else
+CONFIGURE_ARGS+= --without-samba
+.endif
+
+### The subshell is a shell command line inside the Midnight Commander.
+### It does not work well on NetBSD (does not save the screen contents).
+.if !empty(PKG_OPTIONS:Msubshell)
+CONFIGURE_ARGS+= --with-subshell
+.else
+CONFIGURE_ARGS+= --without-subshell
+.endif
+
+### Enable the virtual file system of the Midnight Commander. With the
+### VFS you can access files via FTP, SSH, in various archive formats
+### like if they were on your local disk.
+.if !empty(PKG_OPTIONS:Mvfs)
+CONFIGURE_ARGS+= --with-vfs
+PLIST_SRC+= ${PKGDIR}/PLIST.vfs
+.else
+CONFIGURE_ARGS+= --without-vfs
+.endif
+
+### X11 support allows better key handling (detection of the Alt, Ctrl,
+### Shift modifiers) and mouse support.
+.if !empty(PKG_OPTIONS:Mx11)
+CONFIGURE_ARGS+= --with-x
+USE_X11= yes
+.else
+CONFIGURE_ARGS+= --without-x
+.endif
+
+### The Midnight Commander can use three different screen libraries to
+### draw itself on the screen. SLang, ncurses, and a slim variant of
+### SLang (the default), which is distributed with the Midnight Commander.
+.if !empty(PKG_OPTIONS:Mslang)
+CONFIGURE_ARGS+= --with-screen=slang
+.include "../../devel/libslang/buildlink3.mk"
+.elif !empty(PKG_OPTIONS:Mncurses)
+CONFIGURE_ARGS+= --with-screen=ncurses
+.include "../../devel/ncurses/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --with-screen=mcslang
+.endif