Adam Wolk said:
> On Thu, 21 Apr 2016 15:12:24 +0200
> "Dmitrij D. Czarkoff" <czark...@gmail.com> wrote:
> 
>> Dmitrij D. Czarkoff said:
>>> Edd Barrett said:  
>>>> On Thu, Apr 21, 2016 at 01:38:54AM +0200, Adam Wolk wrote:  
>>>>> +# Use INSTALL_SCRIPT to prevent stripping go binaries  
>>>> 
>>>> Is it worth adding a INSTALL_GO_PROGRAM in the lang/go MODULE to
>>>> avoid confusion?  
>>> 
>>> I'd rather go with more generic change.  Patch below adds
>>> INSTALL_NO_STRIP macro to bsd.port.mk.  Setting this macro to "Yes"
>>> makes INSTALL_STRIP empty.  go.port.mk sets INSTALL_NO_STRIP to
>>> "Yes".
>>> 
>>> Diff against bsd.port.mk.5 in src also included.  
>> 
>> Forgot to define INSTALL_NO_STRIP.
>> 
> 
> OK awolk@ on condition that INSTALL_NO_STRIP = Yes is added to
> lang/go/Makefile. The go port itself doesn't use it's module but
> installs go binaries and has the same warnings. Looks ok with your diff
> plus  the additional INSTALL_NO_STRIP.
> 
> Reverting logstash/forwarder change from yesterday will also be
> required. I can do that if you commit the go port changes.

I could do it all in one go.  But I'd rather have more OKs for diff that
changes bsd.port.mk.

(Diff below is updated with lang/go/Makefile chunk.)

-- 
Dmitrij D. Czarkoff

Index: infrastructure/mk/bsd.port.mk
===================================================================
RCS file: /cvs/ports/infrastructure/mk/bsd.port.mk,v
retrieving revision 1.1310
diff -u -p -r1.1310 bsd.port.mk
--- infrastructure/mk/bsd.port.mk       20 Mar 2016 20:07:20 -0000      1.1310
+++ infrastructure/mk/bsd.port.mk       21 Apr 2016 13:10:29 -0000
@@ -729,6 +729,12 @@ UNZIP ?= unzip
 BZIP2 ?= bzip2
 
 
+# disable stripping if requested
+INSTALL_NO_STRIP ?=
+.if ${INSTALL_NO_STRIP:L} == "yes"
+INSTALL_STRIP =
+.endif
+
 # copy selected info from bsd.own.mk
 MAKE_ENV += COMPILER_VERSION=${COMPILER_VERSION} \
        PICFLAG="${PICFLAG}" ASPICFLAG=${ASPICFLAG} \
Index: Makefile
===================================================================
RCS file: /cvs/ports/lang/go/Makefile,v
retrieving revision 1.29
diff -u -p -r1.29 Makefile
--- Makefile    14 Apr 2016 17:43:26 -0000      1.29
+++ Makefile    21 Apr 2016 14:27:24 -0000
@@ -30,6 +30,8 @@ SUBST_VARS =          GOCFG
 WRKDIST =              ${WRKDIR}/go
 WRKSRC =               ${WRKDIST}/src
 
+INSTALL_NO_STRIP =     Yes
+
 GOOS =                         openbsd
 GOARCH =               unknown
 GOROOT =               ${PREFIX}/go
Index: lang/go/go.port.mk
===================================================================
RCS file: /cvs/ports/lang/go/go.port.mk,v
retrieving revision 1.6
diff -u -p -r1.6 go.port.mk
--- lang/go/go.port.mk  28 Feb 2016 13:24:16 -0000      1.6
+++ lang/go/go.port.mk  21 Apr 2016 13:03:21 -0000
@@ -2,6 +2,8 @@
 
 ONLY_FOR_ARCHS ?=      ${GO_ARCHS}
 
+INSTALL_NO_STRIP =     Yes
+
 MODGO_BUILDDEP ?=      Yes
 
 MODGO_RUN_DEPENDS =    lang/go
Index: share/man/man5/bsd.port.mk.5
===================================================================
RCS file: /cvs/src/share/man/man5/bsd.port.mk.5,v
retrieving revision 1.434
diff -u -p -r1.434 bsd.port.mk.5
--- share/man/man5/bsd.port.mk.5        22 Mar 2016 16:02:02 -0000      1.434
+++ share/man/man5/bsd.port.mk.5        21 Apr 2016 13:02:45 -0000
@@ -1743,6 +1743,11 @@ User settings.
 If set to
 .Sq Yes ,
 do not print anything when ignoring a port.
+.It Ev INSTALL_NO_STRIP
+If set to
+.Sq Yes ,
+.Ev INSTALL_PROGRAM
+macro does not strip binaries.
 .It Ev INSTALL_{PROGRAM,SCRIPT,DATA,MAN}[_DIR]
 Macros to use to install a program, a script, data, or a man page (or the
 corresponding directory), respectively.

Reply via email to