View | Details | Raw Unified | Return to bug 215490 | Differences between
and this patch

Collapse All | Expand All

(-)bazel/Makefile (-5 / +20 lines)
Lines 2-11 Link Here
2
# $FreeBSD: head/devel/bazel/Makefile 430235 2017-01-01 03:45:12Z sunpoet $
2
# $FreeBSD: head/devel/bazel/Makefile 430235 2017-01-01 03:45:12Z sunpoet $
3
3
4
PORTNAME=		bazel
4
PORTNAME=		bazel
5
PORTVERSION=		0.4.2r # rc2 of 0.4.2
5
PORTVERSION=		0.4.3
6
CATEGORIES=		devel java
6
CATEGORIES=		devel java
7
MASTER_SITES=		https://storage.googleapis.com/bazel/0.4.2/rc2/
7
MASTER_SITES=		https://storage.googleapis.com/bazel/${PORTVERSION}/rc${FINALRC}/
8
DISTNAME=		bazel-0.4.2rc2-dist
8
DISTNAME=		bazel-${PORTVERSION}rc${FINALRC}-dist
9
9
10
MAINTAINER=		aehlig@linta.de
10
MAINTAINER=		aehlig@linta.de
11
COMMENT=		Fast and correct build system
11
COMMENT=		Fast and correct build system
Lines 16-21 Link Here
16
BUILD_DEPENDS=		bash:shells/bash \
16
BUILD_DEPENDS=		bash:shells/bash \
17
			zip:archivers/zip
17
			zip:archivers/zip
18
18
19
# In bazel, a release is always code-wise identical to the final release candidate.
20
# Hence we can also download that one and so have a simple way to also test earlier release
21
# candidates.
22
FINALRC=		6
23
19
NO_WRKSUBDIR=		YES
24
NO_WRKSUBDIR=		YES
20
USES=			shebangfix zip
25
USES=			shebangfix zip
21
SHEBANG_FILES=		${WRKSRC}/tools/cpp/link_dynamic_library.sh
26
SHEBANG_FILES=		${WRKSRC}/tools/cpp/link_dynamic_library.sh
Lines 25-40 Link Here
25
JAVA_BUILD=		yes
30
JAVA_BUILD=		yes
26
JAVA_RUN=		yes
31
JAVA_RUN=		yes
27
32
28
PLIST_FILES=		bin/bazel
33
# Have the location of the system-wide rc file reside ${ETCDIR}.
34
# Also adapt the sample file to disable persistent java workers as they
35
# do not work reliably on FreeBSD.
36
post-patch:
37
	@${REINPLACE_CMD} \
38
	-e "s|\"/etc/bazel.bazelrc\"|\"${ETCDIR}/bazel.bazelrc\"|" \
39
	${WRKSRC}/src/main/cpp/workspace_layout.cc
40
	@${ECHO_CMD} build --strategy=Javac=standalone >> ${WRKSRC}/scripts/packages/debian/bazel.bazelrc
29
41
30
do-build:
42
do-build:
31
	@${MKDIR} ${WRKDIR}/bazel_tmp
43
	@${MKDIR} ${WRKDIR}/bazel_tmp
32
	(cd ${WRKSRC} && \
44
	(cd ${WRKSRC} && \
33
	${SETENV} BAZEL_SH=${LOCALBASE}/bin/bash \
45
	${SETENV} BAZEL_SH=${LOCALBASE}/bin/bash \
34
	TMPDIR=${WRKDIR}/bazel_tmp \
46
	TMPDIR=${WRKDIR}/bazel_tmp \
47
	EMBED_LABEL='${PORTVERSION}' \
35
	${LOCALBASE}/bin/bash ./compile.sh)
48
	${LOCALBASE}/bin/bash ./compile.sh)
36
49
37
do-install:
50
do-install:
38
	@${CP} ${WRKSRC}/output/bazel ${STAGEDIR}${PREFIX}/bin
51
	${CP} ${WRKSRC}/output/bazel ${STAGEDIR}${PREFIX}/bin
52
	@${MKDIR} ${STAGEDIR}${ETCDIR}
53
	${INSTALL_DATA} ${WRKSRC}/scripts/packages/debian/bazel.bazelrc ${STAGEDIR}${ETCDIR}/bazel.bazelrc.sample
39
54
40
.include <bsd.port.mk>
55
.include <bsd.port.mk>
(-)bazel/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1480863971
1
TIMESTAMP = 1482352307
2
SHA256 (bazel-0.4.2rc2-dist.zip) = 8e6f41252abadcdb2cc7a07f910ec4b45fb12c46f0a578672c6a186c7efcdb36
2
SHA256 (bazel-0.4.3rc6-dist.zip) = aeff47c789bf1ab5b0b2e6ad342c69f95efd4e2b284a755103a9477fa29b763c
3
SIZE (bazel-0.4.2rc2-dist.zip) = 89321429
3
SIZE (bazel-0.4.3rc6-dist.zip) = 90362416
(-)bazel/files/patch-src_main_cpp_blaze__util__freebsd.cc (-12 lines)
Lines 1-12 Link Here
1
--- src/main/cpp/blaze_util_freebsd.cc.orig	1979-12-31 23:00:00 UTC
2
+++ src/main/cpp/blaze_util_freebsd.cc
3
@@ -145,6 +145,9 @@ bool IsSharedLibrary(const string &filen
4
 
5
 string GetDefaultHostJavabase() {
6
   // if JAVA_HOME is defined, then use it as default.
7
+  if (getenv("JAVA_HOME") == nullptr) {
8
+    return "/usr/local/openjdk8";
9
+  }
10
   string javahome = getenv("JAVA_HOME");
11
   return !javahome.empty() ? javahome : "/usr/local/openjdk8";
12
 }
(-)bazel/files/patch-src_main_cpp_util_file__platform.h (-10 lines)
Lines 1-10 Link Here
1
--- src/main/cpp/util/file_platform.h.orig	2016-12-05 22:12:53 UTC
2
+++ src/main/cpp/util/file_platform.h
3
@@ -16,6 +16,7 @@
4
 #define BAZEL_SRC_MAIN_CPP_UTIL_FILE_PLATFORM_H_
5
 
6
 #include <stdint.h>
7
+#include <time.h>
8
 
9
 #include <string>
10
 
(-)bazel/files/patch-third__party_ijar_platform__utils.h (+11 lines)
Line 0 Link Here
1
--- third_party/ijar/platform_utils.h.orig	2017-01-02 19:18:55 UTC
2
+++ third_party/ijar/platform_utils.h
3
@@ -18,6 +18,8 @@
4
 #include <stdlib.h>
5
 
6
 #include <string>
7
+#include <sys/stat.h>
8
+#include <sys/types.h>
9
 
10
 #include "third_party/ijar/common.h"
11
 
(-)bazel/files/patch-third__party_protobuf_3.0.0_BUILD (-11 lines)
Lines 1-11 Link Here
1
--- third_party/protobuf/3.0.0/BUILD.orig	1979-12-31 23:00:00 UTC
2
+++ third_party/protobuf/3.0.0/BUILD
3
@@ -87,7 +87,7 @@ COPTS = [
4
     "-Wno-error=unused-variable",
5
 ]
6
 
7
-LINK_OPTS = ["-lpthread"]
8
+LINK_OPTS = ["-lpthread", "-lm"]
9
 
10
 cc_library(
11
     name = "protobuf_lite",
(-)bazel/pkg-plist (+2 lines)
Line 0 Link Here
1
bin/bazel
2
@sample %%ETCDIR%%/bazel.bazelrc.sample

Return to bug 215490