On 2023/11/20 17:02, Greg Steuck wrote:
> The Google polyglot build tool at https://bazel.build/ turned out to be
> a bit more trouble to port than usual, but it is somewhat functional
> with the preliminary port below.
> 
> The effort is losely based on the previous attempt by Matt Hildebrand
> from 2020 (thanks Matt!).
> 
> I'm not yet sure if I want this in the tree. I'll keep it around until
> somebody else wants to put it in.
> 
> I still haven't figured out how to configure the packaged bazel to
> rebuild bazel from the source tree. The toolchain mechanism is just too
> much for me to grasp. If somebody figures out the magic, do let me know.
> 
> Thanks
> Greg
> 


some tweaks for consideration,

- drop rcs id
- no point restricting untested archs
- unzip is already auto-added to BDEPs
- no need to set MODPY_VERSION to what's already the default
- verbose builds are often helpful to figure out any issues in
bulk builds
- use DIST_TUPLE (also needs "make makesum" to regen distinfo)

--- Makefile.orig       Tue Nov 21 10:56:58 2023
+++ Makefile    Tue Nov 21 11:08:04 2023
@@ -1,8 +1,3 @@
-# $OpenBSD: Makefile,v$
-
-# Haven't tested anything else yet.
-ONLY_FOR_ARCHS =       amd64
-
 VERSION =              6.3.2
 
 COMMENT =              polyglot build tool
@@ -14,7 +9,7 @@ EXTRACT_CASES =                *.zip) ${UNZIP} -Laq 
${FULLDISTDIR}/$
 
 CATEGORIES =           devel
 
-# Apache 2.0 license.
+# Apache 2.0
 PERMIT_PACKAGE =       Yes
 
 WANTLIB +=             ${COMPILER_LIBCXX} c m
@@ -24,15 +19,12 @@ SITES =                     
https://github.com/bazelbuild/bazel/releases
 EXTRACT_SUFX =         -dist.zip
 
 ABSEIL_VER =           20230802.1
-DISTFILES.abseil =     abseil-{}${ABSEIL_VER}.tar.gz
-SITES.abseil =         https://github.com/abseil/abseil-cpp/archive/refs/tags/
+DIST_TUPLE =           github abseil abseil-cpp 20230802.1 .
 
 MODULES =              java lang/python
 MODJAVA_VER =          17
-MODPY_VERSION =                ${MODPY_DEFAULT_VERSION_3}
 
 BUILD_DEPENDS =                archivers/zip \
-                       archivers/unzip \
                        shells/bash
 
 EXTRACT_ONLY =         ${DISTFILES}
@@ -41,12 +33,15 @@ EXTRACT_ONLY =              ${DISTFILES}
 # stripping the binary removes this zip file, breaking the binary.
 INSTALL_STRIP =
 
+MAKE_ENV =             VERBOSE=yes
+
 # The bundled verison of abseil is from 2021 and isn't compatible with 
clang-16.
 post-patch:
-       cp ${FULLDISTDIR}/abseil-${ABSEIL_VER}.tar.gz 
${WRKSRC}/derived/distdir/${ABSEIL_VER}.tar.gz
+       cp ${FULLDISTDIR}/abseil-abseil-cpp-${ABSEIL_VER}.tar.gz \
+               ${WRKSRC}/derived/distdir/${ABSEIL_VER}.tar.gz
 
 do-build:
-       cd ${WRKSRC} && ${SETENV} \
+       cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
                EMBED_LABEL="${VERSION}" \
                
EXTRA_BAZEL_ARGS="--tool_java_runtime_version=local_jdk_${MODJAVA_VER}" \
                BAZEL_WRKDIR=${WRKDIR}/tmp \

Reply via email to