Same thing as with lang/go: Simplify do-install, combine finds, fix space/tab mixtures.
Feedback? OK? 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 6 Apr 2018 22:48:35 -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,26 +35,25 @@ 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 EXEPREFIX = 6 -PKG_ARGS += -Damd64=1 -PKG_ARGS += -Di386=0 +PKG_ARGS += -Damd64=1 -Di386=0 .elif ${MACHINE_ARCH} == "i386" GOARCH = 386 EXEPREFIX = 8 -PKG_ARGS += -Damd64=0 -PKG_ARGS += -Di386=1 +PKG_ARGS += -Damd64=0 -Di386=1 .else PKG_ARGS += -Damd64=0 -Di386=0 .endif GOCFG = /${GOOS}_${GOARCH} GOEXE = ${GOCFG}/${EXEPREFIX} +GOBIN = pkg/tool/${GOCFG} do-configure: . if ${GOARCH} == "unknown" @@ -62,7 +61,6 @@ do-configure: @exit 1 . endif - do-build: @cd ${WRKSRC} && \ CC="${CC}" \ @@ -75,7 +73,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 +83,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} \; - -. 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 # 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}/${GOBIN} + ${INSTALL_PROGRAM} -p ${WRKDIST}/${GOBIN}/* ${GOROOT}/${GOBIN} .include <bsd.port.mk> =================================================================== Stats: --- 30 lines 943 chars Stats: +++ 24 lines 825 chars Stats: -6 lines Stats: -118 chars