pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/mc Converted the package to the pkg.options.m...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c0bb9e55242f
branches:  trunk
changeset: 488942:c0bb9e55242f
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Sat Feb 12 22:59:28 2005 +0000

description:
Converted the package to the pkg.options.mk framework. Bumped PKGREVISION,
because the +BUILD_INFO file changed.

diffstat:

 sysutils/mc/Makefile   |  80 ++++++++-----------------------------------------
 sysutils/mc/options.mk |  77 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 90 insertions(+), 67 deletions(-)

diffs (191 lines):

diff -r 79e9771d3928 -r c0bb9e55242f sysutils/mc/Makefile
--- a/sysutils/mc/Makefile      Sat Feb 12 22:43:44 2005 +0000
+++ b/sysutils/mc/Makefile      Sat Feb 12 22:59:28 2005 +0000
@@ -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 @@
 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 @@
 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 -r 79e9771d3928 -r c0bb9e55242f sysutils/mc/options.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/mc/options.mk    Sat Feb 12 22:59:28 2005 +0000
@@ -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



Home | Main Index | Thread Index | Old Index