pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
grafana: add some compiler & linker flags to conserve memory
Module Name: pkgsrc-wip
Committed By: Tobias Nygren <tnn%NetBSD.org@localhost>
Pushed By: tnn
Date: Fri Aug 21 09:56:06 2026 +0200
Changeset: 04a3d06a61ef0a4eb654125ab5dc18f1b363ff32
Modified Files:
grafana/Makefile
grafana/options.mk
Log Message:
grafana: add some compiler & linker flags to conserve memory
Makes it somewhat practical again to build on a 4GB host w/ swap.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=04a3d06a61ef0a4eb654125ab5dc18f1b363ff32
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
grafana/Makefile | 3 ++-
grafana/options.mk | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diffs:
diff --git a/grafana/Makefile b/grafana/Makefile
index b9ea3f63b5..00d436c219 100644
--- a/grafana/Makefile
+++ b/grafana/Makefile
@@ -25,6 +25,7 @@ CHECK_PORTABILITY_SKIP= docs/* packaging/* devenv/*
CHECK_PORTABILITY_SKIP+= packages/grafana-toolkit/docker/*
USE_TOOLS+= pax
+MAKE_ENV+= GOMEMLIMIT=2GiB
PUBLICDIR= ${PREFIX}/share/grafana/public
DATADIR= ${VARBASE}/lib/grafana/data
@@ -83,7 +84,7 @@ do-build:
${RUN} cd ${WRKSRC} && ${PKGSRC_SETENV} ${MAKE_ENV} ${GO} telemetry off
${RUN} cd ${WRKSRC} && ${PKGSRC_SETENV} ${MAKE_ENV} ${GO} run ./pkg/build/wire/cmd/wire/main.go gen -tags "oss" -gen_tags "(!enterprise && !pro)" ./pkg/server
${RUN} cd ${WRKSRC} && ${PKGSRC_SETENV} ${MAKE_ENV} ${GO} generate ./pkg/services/preference
- ${RUN} cd ${WRKSRC} && ${PKGSRC_SETENV} ${MAKE_ENV} ${GO} build -buildvcs=false -trimpath -ldflags "-X main.version=${PKGVERSION_NOREV} -X main.commit=${PKGVERSION} -X main.buildBranch=pkgsrc -X main.buildstamp=0" ./pkg/cmd/grafana
+ ${RUN} cd ${WRKSRC} && ${PKGSRC_SETENV} ${MAKE_ENV} ${GO} build -p=1 -buildvcs=false -trimpath -ldflags "-w -s -X main.version=${PKGVERSION_NOREV} -X main.commit=${PKGVERSION} -X main.buildBranch=pkgsrc -X main.buildstamp=0" ./pkg/cmd/grafana
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/grafana ${DESTDIR}${PREFIX}/bin/
diff --git a/grafana/options.mk b/grafana/options.mk
index 3442c205ab..d578363bf8 100644
--- a/grafana/options.mk
+++ b/grafana/options.mk
@@ -2,7 +2,7 @@
PKG_OPTIONS_VAR= PKG_OPTIONS.sqlite3
PKG_SUPPORTED_OPTIONS= sqlite3
-# The sqlite3 option will only work where moderc.org/sqlite ships
+# The sqlite3 option will only work where modernc.org/sqlite ships
# transpiled amalgamation blobs:
# https://pkg.go.dev/modernc.org/sqlite#hdr-Supported_platforms_and_architectures
# Please compile-test before adding platforms.
Home |
Main Index |
Thread Index |
Old Index