Date: Sun, 6 Oct 2013 15:58:03 GMT From: Kevin Zheng <kevinz5000@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/182749: [patch] Enable options by default for editors/vim Message-ID: <201310061558.r96Fw3rw014041@oldred.freebsd.org> Resent-Message-ID: <201310061600.r96G00iG006298@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 182749 >Category: ports >Synopsis: [patch] Enable options by default for editors/vim >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: Sun Oct 06 16:00:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Kevin Zheng >Release: 9.2-RELEASE >Organization: >Environment: FreeBSD sigma.local 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r255898: Fri Sep 27 03:52:52 UTC 2013 root@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC i386 >Description: The maintainer for this port prefers that the `make config` dialog is hidden by default. However, (in my opinion) this behavior is confusing and counter-intuitive. Users who do not wish to set options don't have to do anything differently; the options dialog is only shown when the user types `make config`. Users who do wish to set options, on the other hand, must type `make showconfig` to see the message warning users to set the correct property in make.conf. Most (including me) assume that a port doesn't have options after a `make config`. Please seriously consider changing the default behavior (the attached patch does this). If you don't like this change, you can cherry-pick the other changes with this patch which include cleaning up variables and petting portlint. >How-To-Repeat: Attempt to set port options without "WITH_OPTIONS" set. >Fix: Apply the attached patch. Patch attached with submission follows: Index: Makefile =================================================================== --- Makefile (revision 329592) +++ Makefile (working copy) @@ -12,15 +12,14 @@ # ! PATCHLEVEL to that level. PATCHLEVEL= 1314 PORTVERSION= 7.3.${PATCHLEVEL} -RELEASE= vim-${PORTVERSION:C/\.[0-9a-z]*$//} PORTREVISION?= 0 CATEGORIES?= editors MASTER_SITES= ${MASTER_SITE_VIM} -DISTFILES= ${RELEASE}${EXTRACT_SUFX} +DISTNAME= vim-${PORTVERSION:C/\.[0-9a-z]*$//} PATCH_SITES= ${MASTER_SITES:S|unix|patches/${PORTVERSION:C/\.[0-9a-z]*$//}|}\ ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/obrien/:local -PATCHFILES!= /usr/bin/jot -s " " -w ${PORTVERSION:C/\.[0-9]*$//}.%03d \ +PATCHFILES!= jot -s " " -w ${PORTVERSION:C/\.[0-9]*$//}.%03d \ ${PATCHLEVEL} 1 ${PATCHLEVEL} # bits to remove BADPATCHES= 527 780 796 873 890 1104 1111 @@ -35,7 +34,6 @@ NO_STAGE= yes .if !defined(LITE) -.if defined(WITH_OPTIONS) || defined(WITH_VIM_OPTIONS) .include "${.CURDIR}/../vim/options" OPTIONS_DEFAULT+= CSCOPE EXUBERANT_CTAGS PERL PYTHON RUBY \ TCL LUA X11 GTK2 @@ -45,7 +43,6 @@ ${VIM_PORT_SCRIPT_LANGS} PORT_OPTIONS?= ${VIM_PORT_OPTIONS} .endif -.endif .include <bsd.port.options.mk> @@ -66,7 +63,7 @@ REINPLACE_ARGS= -i "" MAKE_ARGS+= CONF_ARGS="--prefix=${PREFIX} --with-tlib=termlib ${CSCOPE_ARG}" ALL_TARGET= # -_DATADIR= ${RELEASE:S/-//g:S/.//g} +_DATADIR= ${DISTNAME:S/-//g:S/.//g} DATADIR= ${PREFIX}/share/vim/${_DATADIR} PLIST_SUB= VIM_VER=${_DATADIR} MAN1= evim.1 vim.1 vimdiff.1 vimtutor.1 xxd.1 @@ -168,12 +165,10 @@ .endif MAKE_ARGS+= CONF_OPT_GUI=${CONF_OPT_GUI} ${I18N} - .if exists(${LOCALBASE}/lib/libiconv.so) USES+= iconv .endif - post-patch: @(${FIND} ${WRKSRC}/../runtime/ -name menu\*.vim -print0 | ${XARGS} -0 \ ${REINPLACE_CMD} -e 's,ctags -R \.,${CTAGS_CMD},g') @@ -233,12 +228,6 @@ ${CP} -p ${TMPPLIST} ${TMPPLIST}.pre-share-vim cd ${WRKDIR} ; ex < ex.script -show-options: - @${MAKE} -DWITH_OPTIONS showconfig - @${ECHO_CMD} "" - @${ECHO_CMD} "Put \"WITH_OPTIONS=yes\" -or- \"WITH_VIM_OPTIONS=yes\"" - @${ECHO_CMD} "in your /etc/make.conf or /etc/ports.conf file to enable OPTIONS processing. - .if defined(ONT_CHECKSUM) checksum: .endif @@ -248,19 +237,19 @@ @${MAKE} -V PATCHLEVEL -(${SED} -i '' "s/^PATCHLEVEL=.*$$/PATCHLEVEL= `ncftpls \ ftp://ftp.vim.org/pub/vim/patches/${PORTVERSION:C/\.[0-9a-z]*$//}/ \ - | grep "^${PORTVERSION:C/\.[0-9a-z]*$//}" \ + | ${GREP} "^${PORTVERSION:C/\.[0-9a-z]*$//}" \ | ${SED} -n -E -e 's/${PORTVERSION:C/[0-9]*$//}([0-9]+)$$/\1/p' \ - | sort -n | ${TAIL} -1`/" Makefile) + | ${SORT} -n | ${TAIL} -1`/" Makefile) @${ECHO} -n "Now at: " @${MAKE} -V PATCHLEVEL find-bad-patches: - @cd ${DISTDIR} ; egrep -l \ + @cd ${DISTDIR} ; ${EGREP} -l \ '(src/if_(ole|mzsch)|src/gui_(w32|w48|mac)|src/os_(riscos|cyg|os2|vms|amiga|win32|mswin))|src(/testdir)?/Make_(dos|cyg|vms|mvc|ming|os2|amiga|mms)'\ vim/${PORTVERSION:C/\.[0-9a-z]*$//}* ckp: - /usr/bin/time -h ${MAKE} -DPATCH_DEBUG -DONT_CHECKSUM clean patch + time -h ${MAKE} -DPATCH_DEBUG -DONT_CHECKSUM clean patch ckmtree: ${MTREE_CMD} -f ${MTREE_FILE} -p ${PREFIX} >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310061558.r96Fw3rw014041>