ports/76215: infrastructure for MINIMAL build of ports/misc/mc

Eugene Grosbein eugen at grosbein.pp.ru
Thu Jan 13 19:00:52 UTC 2005


>Number:         76215
>Category:       ports
>Synopsis:       infrastructure for MINIMAL build of ports/misc/mc
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jan 13 19:00:50 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Eugene Grosbein
>Release:        FreeBSD 4.10-STABLE i386
>Organization:
Svyaz Service JSC
>Environment:
System: FreeBSD grosbein.pp.ru 4.10-STABLE FreeBSD 4.10-STABLE #2: Mon Nov 8 23:47:00 KRAT 2004 eu at grosbein.pp.ru:/usr/local/obj/usr/local/src/sys/DADV i386

>Description:
	Currently ports/misc/mc builds the Midnight Commander with SAMBA
	support. This leads to very long startup time of MC when DNS
	is not accessible due to resolver (which is used by MC's SAMBA support)
	timeout. This may be avoided by building the port WITHOUT_SAMBA,
	but this "feature" is quite obscure.

	The port depends on 5 extra perl modules for RELENG_4 just to
	support *.deb and *.zip types of VFS and provides no way to
	axe out the dependency when this support is not needed.

	The port always build internal editor - no way to disable.

	Here is an attempt to provide a way to build MC with lesser
	dependancy list. We introduce new Makefile variable MINIMAL
	that defines a wish to axe out as many MC's features as possible:

	it turns off SAMBA support (does not if WITH_SAMBA is defined also),

	it turns off X Window support (does not if WITH_X is defined also),

	it turns off internal editor (does not if WITH_EDIT is defined also;
	one may use WITHOUT_EDIT alone just to disable the editor),

	it turns off dependency of SLANG (does not if WITH_SLANG is defined
	also) and switches to plain NCURSES,

	it turns off subshell support (does not if WITH_SUBSHELL is defined also),

	it turns off dependency of extra perl modules
	(does not if WITH_PERL_MODULES is defined also;
	one may use WITHOUT_PERL_MODULES alone).

	The following patch is just intended to provide an infrastructure
	for making slightly more light-weight package of MC.
	It works but is not complete - f.e., it does not eliminate
	dependency of iconv package.

	One may turn off all features but one (or several): a command
			make MINIMAL=yes WITH_EDIT=yes
	keeps internal editor in places and disables other features.

>How-To-Repeat:
	N/A
>Fix:

--- Makefile.orig	Fri Jan 14 00:00:42 2005
+++ Makefile	Fri Jan 14 00:52:32 2005
@@ -25,12 +25,12 @@
 
 .include <bsd.port.pre.mk>
 
-.if !defined(WITHOUT_SAMBA)
+.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(WITHOUT_ICONV)
+.if defined(WITH_ICONV) || !(defined(WITHOUT_ICONV) || defined(MINIMAL))
 CONFIGURE_ARGS+=--enable-charset
 USE_ICONV=	yes
 PLIST_SUB=	CHARSETS=""
@@ -38,10 +38,17 @@
 PLIST_SUB=	CHARSETS="@comment "
 .endif
 
-.if !defined(WITH_X11)
+.if !defined(WITH_X11) || defined(MINIMAL)
 CONFIGURE_ARGS+=--without-x
 .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
@@ -49,7 +56,7 @@
 WITHOUT_SLANG=	yes
 .endif
 
-.if defined(WITHOUT_SLANG)
+.if !defined(WITH_SLANG) && (defined(WITHOUT_SLANG) || defined(MINIMAL))
 CONFIGURE_ARGS+=--with-screen=ncurses
 .else
 CONFIGURE_ARGS+=--with-screen=slang
@@ -58,12 +65,14 @@
 LIB_DEPENDS+=	slang.1:${PORTSDIR}/devel/libslang
 .endif
 
-.if defined(WITHOUT_SUBSHELL)
+.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
--- pkg-plist.orig	Fri Jan 14 00:43:04 2005
+++ pkg-plist	Fri Jan 14 00:56:25 2005
@@ -1,6 +1,6 @@
 bin/mcmfmt
 bin/mc
-bin/mcedit
+%%EDITOR%%bin/mcedit
 bin/mcview
 bin/midc
 share/locale/az/LC_MESSAGES/mc.mo


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list