pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/www/gotosocial



Module Name:    pkgsrc
Committed By:   nikita
Date:           Tue Jun 18 09:25:24 UTC 2024

Modified Files:
        pkgsrc/www/gotosocial: Makefile
Added Files:
        pkgsrc/www/gotosocial: options.mk

Log Message:
gotosocial: add option (turned on by default) to build with wasmsqlite3
for more architecture support.

# - wasmsqlite3: uses SQLite through WASM instead of the C-to-Go transpilation (experimental)
https://github.com/NetBSD/pkgsrc/issues/143:

There was initially an issue with that driver on the BSD family but that was resolved
in the driver before we cut this release. It's safe to use and expected to perform just fine.

We're currently keeping it behind a go build tag, wasmsqlite3, and we do consider it
slightly experimental. However, the plan is to switch to this Soon™ and a number of
people including two of the maintainers run this build on their own instances without any issues.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 pkgsrc/www/gotosocial/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/www/gotosocial/options.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/www/gotosocial/Makefile
diff -u pkgsrc/www/gotosocial/Makefile:1.38 pkgsrc/www/gotosocial/Makefile:1.39
--- pkgsrc/www/gotosocial/Makefile:1.38 Sun Jun 16 16:52:43 2024
+++ pkgsrc/www/gotosocial/Makefile      Tue Jun 18 09:25:24 2024
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.38 2024/06/16 16:52:43 nikita Exp $
+# $NetBSD: Makefile,v 1.39 2024/06/18 09:25:24 nikita Exp $
 
 GOTOVER=       0.16.0
 DISTNAME=      gotosocial-${GOTOVER}-source-code
+PKGREVISION=   1
 PKGNAME=       ${DISTNAME:S/-source-code//}
 CATEGORIES=    www
 
@@ -11,7 +12,7 @@ COMMENT=      Fediverse server written in Go
 LICENSE=       gnu-agpl-v3
 USE_TOOLS+=    pax tar
 
-DISTFILES=      gotosocial-${GOTOVER}-source-code.tar.gz
+DISTFILES=     gotosocial-${GOTOVER}-source-code.tar.gz
 DISTFILES+=    gotosocial_${GOTOVER}_web-assets.tar.gz
 
 SITES.gotosocial-${GOTOVER}-source-code.tar.gz= \
@@ -28,6 +29,7 @@ MAKE_ENV+=    VERSION=${PKGVERSION_NOREV}
 BUILD_DEFS+=   VARBASE
 
 .include "../../mk/bsd.prefs.mk"
+.include "options.mk"
 
 GOTOSOCIAL_USER?=      gotosocial
 GOTOSOCIAL_GROUP?=     gotosocial
@@ -75,7 +77,13 @@ SUBST_SED.systemdpaths+=     -e 's,config.ya
 # "imports modernc.org/libc/errno: build constraints exclude all Go files in /usr/ports/net-im/gotosocial/work/gotosocial-0.5.2/vendor/modernc.org/libc/errno"
 # BUG: does not build on Sun
 # to unblock: https://github.com/ncruces/go-sqlite3/issues/85
-ONLY_FOR_PLATFORM=     *-*-x86_64
+# Switched to wasmsqlite3, which is maybe still restricted to amd64 + aarch64?
+# There was initially an issue with that driver on the BSD family but that was resolved in the driver before we cut this release.
+# It's safe to use and expected to perform just fine.
+# We're currently keeping it behind a go build tag, wasmsqlite3, and we do consider it slightly experimental.
+# However, the plan is to switch to this Soon™ and a number of people including two of the maintainers run this build on their own instances without any issues.
+# quote from https://github.com/NetBSD/pkgsrc/issues/143
+#ONLY_FOR_PLATFORM=    *-*-x86_64
 
 do-build:
        cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} scripts/build.sh

Added files:

Index: pkgsrc/www/gotosocial/options.mk
diff -u /dev/null pkgsrc/www/gotosocial/options.mk:1.1
--- /dev/null   Tue Jun 18 09:25:24 2024
+++ pkgsrc/www/gotosocial/options.mk    Tue Jun 18 09:25:24 2024
@@ -0,0 +1,13 @@
+# $NetBSD: options.mk,v 1.1 2024/06/18 09:25:24 nikita Exp $
+
+PKG_OPTIONS_VAR=       PKG_OPTIONS.gotosocial
+PKG_SUPPORTED_OPTIONS= wasmsqlite3
+PKG_SUGGESTED_OPTIONS= wasmsqlite3
+
+#PLIST_VARS+=
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mwasmsqlite3)
+MAKE_ENV+=             GO_BUILDTAGS="wasmsqlite3"
+.endif



Home | Main Index | Thread Index | Old Index