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.
--
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: 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.