ports/150689: [patch] editors/vim: respect STRIP

Anonymous swell.k at gmail.com
Sat Sep 18 02:00:15 UTC 2010

>Number:         150689
>Category:       ports
>Synopsis:       [patch] editors/vim: respect STRIP
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Sep 18 02:00:14 UTC 2010
>Originator:     Anonymous
>Release:        FreeBSD 9.0-CURRENT amd64

I'm relying on bsd.own.mk not defining STRIP.
And WITH_DEBUG is too aggressive to remove -O2 from CFLAGS.
There are several cases symbols can be added to the binary
and whether to strip them is conditioned on STRIP variable.

  - WITH_DEBUG (in bsd.port.mk) that resets CFLAGS, STRIP, STRIP_CMD
  - DEBUG_FLAGS (via bsd.own.mk) leaves STRIP empty + explicit adding it
    to CFLAGS if the port doesn't use bsd.prog.mk or bsd.lib.mk
  - explicit defining of STRIP and altering CFLAGS

But this port just blindly uses strip(1) if it's available.
--- a.diff begins here ---
Index: editors/vim/Makefile
RCS file: /a/.cvsup/ports/editors/vim/Makefile,v
retrieving revision 1.357
diff -u -p -r1.357 Makefile
--- editors/vim/Makefile	17 Sep 2010 00:46:45 -0000	1.357
+++ editors/vim/Makefile	18 Sep 2010 01:41:39 -0000
@@ -193,6 +193,9 @@ CTAGS_CMD=	${FIND} . -type f \\|${XARGS}
 	@(${FIND} ${WRKSRC}/../runtime/ -name menu\*.vim -print0 | ${XARGS} -0 \
 		${REINPLACE_CMD} -e 's,ctags -R \.,${CTAGS_CMD},g')
+.if !defined(STRIP) || ${STRIP} == ""
+	${REINPLACE_CMD} '/$$(STRIP)/d' ${WRKSRC}/Makefile
 	# Fix dependency misspelling so that 'make -j#' will work.
--- a.diff ends here ---

More information about the freebsd-ports-bugs mailing list