On Fri, May 04, 2018 at 04:14:20AM +1000, Joel Sing wrote:
> On Saturday 07 April 2018 01:04:59 Klemens Nanni wrote:
> > Same thing as with lang/go: Simplify do-install, combine finds,
> > fix space/tab mixtures.
> > 
> > Feedback? OK?
Updated diff after feedback from jsing@.

OK?

> > +GOBIN =                    pkg/tool/${GOCFG}
> 
> GOTOOLS
Done.

> >  do-test:
> >     @cd ${WRKSRC} && \
> >             ulimit -n 256 -d 2097152 && \
> > -           PATH=${WRKDIST}/bin:${PATH} GOROOT=${WRKDIST} ./run.bash
> > +           PATH=${WRKDIST}/bin:${PATH} \
> > +           GOROOT=${WRKDIST} \
> > +           ./run.bash
> 
> Same comment re readability - either revert, or indent such that it is 
> obvious 
> what the env is for.
Indented as done in the lang/go diff as well.

> > -.  for dir in doc include lib misc src pkg
> > -           @cd ${WRKDIST} && \
> > -                   find ${dir} -type d \
> > -                           -exec ${INSTALL_DATA_DIR} \
> > -                           ${GOROOT}/{} \;
> > -           @cd ${WRKDIST} && \
> > -                   find ${dir} ! -name \*.orig -type f \
> > -                           -exec ${INSTALL_DATA} -p {} \
> > -                           ${GOROOT}/{} \;
> > -.  endfor
> > +   @find ${WRKDIST} -maxdepth 1 -type f ! -name .git\* ! -name .hg\* \
> > +           -exec ${INSTALL_DATA} -p {} ${GOROOT} \;
> > +
> > +.for dir in doc include lib misc src pkg
> > +   cd ${WRKDIST} && \
> > +           find ${dir} -type d \
> > +                   -exec ${INSTALL_DATA_DIR} ${GOROOT}/{} \; \
> > +               -o -type f ! -name \*.orig \
> > +                   -exec ${INSTALL_DATA} -p {} ${GOROOT}/{} \;
> > +.endfor
> 
> Indentation appears messed up here - it should be <dot><tab>for.
Done.

Index: Makefile
===================================================================
RCS file: /cvs/ports/lang/go-bootstrap/Makefile,v
retrieving revision 1.9
diff -u -p -r1.9 Makefile
--- Makefile    5 Apr 2018 17:47:30 -0000       1.9
+++ Makefile    5 May 2018 13:45:34 -0000
@@ -6,19 +6,19 @@ COMMENT =             Go programming language
 
 VERSION =              1.4
 RELEASE =              20171003
-DISTNAME =             go${VERSION}-bootstrap-${RELEASE}
-PKGNAME =              go-bootstrap-${VERSION}.${RELEASE}
+DISTNAME =             go${VERSION}-bootstrap-${RELEASE}
+PKGNAME =              go-bootstrap-${VERSION}.${RELEASE}
 CATEGORIES =           lang
 REVISION =             0
 
 HOMEPAGE =             https://golang.org/
 
-MAINTAINER =           Joel Sing <js...@openbsd.org>
+MAINTAINER =           Joel Sing <js...@openbsd.org>
 
 # software: BSD, documentation: CC-BY-3.0
 PERMIT_PACKAGE_CDROM = bootstrap only
 PERMIT_PACKAGE_FTP =   bootstrap only
-PERMIT_DISTFILES_FTP =  bootstrap only
+PERMIT_DISTFILES_FTP = bootstrap only
 
 WANTLIB =              c m pthread
 
@@ -35,9 +35,9 @@ WRKSRC =              ${WRKDIST}/src
 
 INSTALL_STRIP =
 
-GOOS =                         openbsd
+GOOS =                 openbsd
 GOARCH =               unknown
-GOROOT =               ${PREFIX}/go/bootstrap
+GOROOT =               ${PREFIX}/go/bootstrap
 
 .if ${MACHINE_ARCH} == "amd64"
 GOARCH =               amd64
@@ -50,11 +50,13 @@ EXEPREFIX =         8
 PKG_ARGS +=            -Damd64=0
 PKG_ARGS +=            -Di386=1
 .else
-PKG_ARGS +=            -Damd64=0 -Di386=0
+PKG_ARGS +=            -Damd64=0
+PKG_ARGS +=            -Di386=0
 .endif
 
 GOCFG =                        /${GOOS}_${GOARCH}
 GOEXE =                        ${GOCFG}/${EXEPREFIX}
+GOTOOLS =              pkg/tool/${GOCFG}
 
 do-configure:
 .      if ${GOARCH} == "unknown"
@@ -62,7 +64,6 @@ do-configure:
                @exit 1
 .      endif
 
-
 do-build:
        @cd ${WRKSRC} && \
                CC="${CC}" \
@@ -75,7 +76,9 @@ do-build:
 do-test:
        @cd ${WRKSRC} && \
                ulimit -n 256 -d 2097152 && \
-               PATH=${WRKDIST}/bin:${PATH} GOROOT=${WRKDIST} ./run.bash
+               PATH=${WRKDIST}/bin:${PATH} \
+               GOROOT=${WRKDIST} \
+                   ./run.bash
 
 do-install:
        ${INSTALL_PROGRAM_DIR} ${GOROOT}
@@ -83,25 +86,19 @@ do-install:
        ${INSTALL_PROGRAM_DIR} ${GOROOT}/bin
        ${INSTALL_PROGRAM} -p ${WRKDIST}/bin/go{,fmt} ${GOROOT}/bin
 
-       @cd ${WRKDIST} && \
-               find . ! -name .git\* ! -name .hg\* -type f -maxdepth 1 \
-                       -exec ${INSTALL_DATA} -p {} \
-                       ${GOROOT} \;
+       @find ${WRKDIST} -maxdepth 1 -type f ! -name .git\* ! -name .hg\* \
+               -exec ${INSTALL_DATA} -p {} ${GOROOT} \;
 
 .      for dir in doc include lib misc src pkg
-               @cd ${WRKDIST} && \
+               cd ${WRKDIST} && \
                        find ${dir} -type d \
-                               -exec ${INSTALL_DATA_DIR} \
-                               ${GOROOT}/{} \;
-               @cd ${WRKDIST} && \
-                       find ${dir} ! -name \*.orig -type f \
-                               -exec ${INSTALL_DATA} -p {} \
-                               ${GOROOT}/{} \;
+                               -exec ${INSTALL_DATA_DIR} ${GOROOT}/{} \; \
+                           -o -type f ! -name \*.orig \
+                               -exec ${INSTALL_DATA} -p {} ${GOROOT}/{} \;
 .      endfor
 
        # These get installed via `find' however we need them to be executable
-       ${INSTALL_PROGRAM_DIR} ${GOROOT}/pkg/tool/${GOOS}_${GOARCH}
-       ${INSTALL_PROGRAM} -p ${WRKDIST}/pkg/tool/${GOOS}_${GOARCH}/* \
-               ${GOROOT}/pkg/tool/${GOOS}_${GOARCH}
+       ${INSTALL_PROGRAM_DIR} ${GOROOT}/${GOTOOLS}
+       ${INSTALL_PROGRAM} -p ${WRKDIST}/${GOTOOLS}/* ${GOROOT}/${GOTOOLS}
 
 .include <bsd.port.mk>

Reply via email to