pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
gosuki: fix build on NetBSD, finish package
Module Name: pkgsrc-wip
Committed By: Thomas Klausner <wiz%NetBSD.org@localhost>
Pushed By: wiz
Date: Sat Dec 20 22:27:28 2025 +0100
Changeset: 21e48dd93b64e721c22aee2a91a4f567233ca138
Modified Files:
gosuki/Makefile
gosuki/PLIST
gosuki/TODO
gosuki/distinfo
Added Files:
gosuki/patches/patch-pkg_browsers_basedir__netbsd.go
gosuki/patches/patch-pkg_browsers_browsers.yaml
gosuki/patches/patch-pkg_browsers_defined__browsers__netbsd.go
Log Message:
gosuki: fix build on NetBSD, finish package
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=21e48dd93b64e721c22aee2a91a4f567233ca138
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
gosuki/Makefile | 5 ++
gosuki/PLIST | 5 +-
gosuki/TODO | 13 +----
gosuki/distinfo | 3 +
.../patches/patch-pkg_browsers_basedir__netbsd.go | 49 +++++++++++++++++
gosuki/patches/patch-pkg_browsers_browsers.yaml | 49 +++++++++++++++++
...patch-pkg_browsers_defined__browsers__netbsd.go | 64 ++++++++++++++++++++++
7 files changed, 173 insertions(+), 15 deletions(-)
diffs:
diff --git a/gosuki/Makefile b/gosuki/Makefile
index c6789b1078..25bbaf4727 100644
--- a/gosuki/Makefile
+++ b/gosuki/Makefile
@@ -14,6 +14,11 @@ LICENSE= gnu-agpl-v3
USE_LANGUAGES= c
USE_TOOLS+= gmake
+post-install:
+ ${RM} ${DESTDIR}${PREFIX}/bin/gen
+ ${RM} ${DESTDIR}${PREFIX}/bin/generate
+ ${RM} ${DESTDIR}${PREFIX}/bin/scripts
+
.include "go-modules.mk"
.include "../../lang/go/go-module.mk"
diff --git a/gosuki/PLIST b/gosuki/PLIST
index 92ba51a2d7..2dd292d250 100644
--- a/gosuki/PLIST
+++ b/gosuki/PLIST
@@ -1,4 +1,3 @@
@comment $NetBSD$
-@comment TODO: to fill this file with the file listing:
-@comment TODO: 1. run "/usr/bin/make package"
-@comment TODO: 2. run "/usr/bin/make print-PLIST"
+bin/gosuki
+bin/suki
diff --git a/gosuki/TODO b/gosuki/TODO
index b45bb2ea1a..90b67dda6d 100644
--- a/gosuki/TODO
+++ b/gosuki/TODO
@@ -1,12 +1 @@
-Build problem:
-
-# github.com/blob42/gosuki/pkg/browsers
-pkg/browsers/base.go:53:18: b.ExpandBaseDir undefined (type BrowserDef has no field or method ExpandBaseDir)
-pkg/browsers/base.go:54:3: undefined: log
-pkg/browsers/base.go:54:39: b.BaseDir undefined (type BrowserDef has no field or method BaseDir, but does have field baseDir)
-pkg/browsers/base.go:55:3: undefined: log
-pkg/browsers/base.go:57:3: undefined: log
-pkg/browsers/base.go:87:21: undefined: DefinedBrowsers
-
-Reported upstream at
-https://github.com/blob42/gosuki/issues/20
+Test.
diff --git a/gosuki/distinfo b/gosuki/distinfo
index e1cc37d74c..4856a7511d 100644
--- a/gosuki/distinfo
+++ b/gosuki/distinfo
@@ -795,3 +795,6 @@ Size (gopkg.in_yaml.v3_@v_v3.0.1.zip) = 104623 bytes
BLAKE2s (gosuki-1.3.0.20251218-92c2d4b4f45205240a771ee1b3610682ee97b9ba.tar.gz) = 4183e39be767b7e0ba41e558ceaffb7fc4f1b74925f49bb3b454676b9c23e862
SHA512 (gosuki-1.3.0.20251218-92c2d4b4f45205240a771ee1b3610682ee97b9ba.tar.gz) = 14f5913aff67253275f0fda377fa1c9dd8106cf418221d7cb0e60bd79ac1d39af4dfe525e361b50556c25aebfb51c2a57ba9fb84d0430ef504943a34269634a5
Size (gosuki-1.3.0.20251218-92c2d4b4f45205240a771ee1b3610682ee97b9ba.tar.gz) = 430018 bytes
+SHA1 (patch-pkg_browsers_basedir__netbsd.go) = fbf53e58902a86496a5063fbc4d5d00994576f62
+SHA1 (patch-pkg_browsers_browsers.yaml) = bb68c1a0b024d16b20028a4aedcff16b64ffec3b
+SHA1 (patch-pkg_browsers_defined__browsers__netbsd.go) = 2c45a15005b675028ae35f875043875763ac7f68
diff --git a/gosuki/patches/patch-pkg_browsers_basedir__netbsd.go b/gosuki/patches/patch-pkg_browsers_basedir__netbsd.go
new file mode 100644
index 0000000000..b205dbf13b
--- /dev/null
+++ b/gosuki/patches/patch-pkg_browsers_basedir__netbsd.go
@@ -0,0 +1,49 @@
+$NetBSD$
+
+Add NetBSD support.
+
+--- pkg/browsers/basedir_netbsd.go.orig 2025-12-20 21:20:16.771439541 +0000
++++ pkg/browsers/basedir_netbsd.go
+@@ -0,0 +1,42 @@
++//
++// Copyright (c) 2025 Chakib Ben Ziane <contact%blob42.xyz@localhost> and [`gosuki` contributors](https://github.com/blob42/gosuki/graphs/contributors).
++// All rights reserved.
++//
++// SPDX-License-Identifier: AGPL-3.0-or-later
++//
++// This file is part of GoSuki.
++//
++// GoSuki is free software: you can redistribute it and/or modify
++// it under the terms of the GNU Affero General Public License as
++// published by the Free Software Foundation, either version 3 of the
++// License, or (at your option) any later version.
++//
++// GoSuki is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU Affero General Public License for more details.
++//
++// You should have received a copy of the GNU Affero General Public License
++// along with gosuki. If not, see <http://www.gnu.org/licenses/>.
++//
++
++//go:build netbsd
++
++package browsers
++
++import (
++ "github.com/blob42/gosuki/internal/utils"
++ "github.com/blob42/gosuki/pkg/logging"
++)
++
++var log = logging.GetLogger("browsers")
++
++// base directory without normalization
++func (b BrowserDef) GetBaseDir() string {
++ return b.BaseDir
++}
++
++// Expands to the full path of base directory
++func (b BrowserDef) ExpandBaseDir() (string, error) {
++ return utils.ExpandPath(b.BaseDir)
++}
diff --git a/gosuki/patches/patch-pkg_browsers_browsers.yaml b/gosuki/patches/patch-pkg_browsers_browsers.yaml
new file mode 100644
index 0000000000..1fad2d061a
--- /dev/null
+++ b/gosuki/patches/patch-pkg_browsers_browsers.yaml
@@ -0,0 +1,49 @@
+$NetBSD$
+
+Add NetBSD support.
+
+--- pkg/browsers/browsers.yaml.orig 2025-12-20 21:17:02.847131894 +0000
++++ pkg/browsers/browsers.yaml
+@@ -13,6 +13,9 @@ chrome:
+ darwin:
+ base_dir: ~/Library/Application Support/Google/Chrome
+
++ netbsd:
++ base_dir: ~/.config/google-chrome
++
+ chromium:
+ linux:
+ base_dir: ~/.config/chromium
+@@ -24,6 +27,9 @@ chrome:
+ darwin:
+ base_dir: ~/Library/Application Support/chromium
+
++ netbsd:
++ base_dir: ~/.config/chromium
++
+ brave:
+ linux:
+ base_dir: ~/.config/BraveSoftware/Brave-Browser
+@@ -42,12 +48,16 @@ mozilla:
+ flat: ~/.var/app/org.mozilla.firefox/.mozilla/firefox
+ darwin:
+ base_dir: ~/Library/Application Support/Firefox
++ netbsd:
++ base_dir: ~/.mozilla/firefox
+ librewolf:
+ linux:
+ base_dir: ~/.librewolf
+ flat: ~/.var/app/io.gitlab.librewolf-community/.librewolf
+ darwin:
+ base_dir: ~/Library/Application Support/Librewolf
++ netbsd:
++ base_dir: ~/.librewolf
+ waterfox:
+ linux:
+ base_dir: ~/.waterfox
+@@ -71,3 +81,5 @@ other:
+ qutebrowser: # flavour
+ linux: # platform
+ base_dir: ~/.config/qutebrowser
++ netbsd:
++ base_dir: ~/.config/qutebrowser
diff --git a/gosuki/patches/patch-pkg_browsers_defined__browsers__netbsd.go b/gosuki/patches/patch-pkg_browsers_defined__browsers__netbsd.go
new file mode 100644
index 0000000000..c7dbb65922
--- /dev/null
+++ b/gosuki/patches/patch-pkg_browsers_defined__browsers__netbsd.go
@@ -0,0 +1,64 @@
+$NetBSD$
+
+Add NetBSD support (generated file).
+
+--- pkg/browsers/defined_browsers_netbsd.go.orig 2025-12-20 21:23:22.504348696 +0000
++++ pkg/browsers/defined_browsers_netbsd.go
+@@ -0,0 +1,57 @@
++// Code generated DO NOT EDIT.
++
++//go:build netbsd
++package browsers
++
++var DefinedBrowsers = []BrowserDef{
++ {
++ "chrome",
++ 1,
++ "~/.config/google-chrome",
++ "",
++ "",
++ },
++ {
++ "chromium",
++ 1,
++ "~/.config/chromium",
++ "",
++ "",
++ },
++ {
++ "firefox",
++ 0,
++ "~/.mozilla/firefox",
++ "",
++ "",
++ },
++ {
++ "librewolf",
++ 0,
++ "~/.librewolf",
++ "",
++ "",
++ },
++ {
++ "qutebrowser",
++ 2,
++ "~/.config/qutebrowser",
++ "",
++ "",
++ },
++}
++
++func Defined(family BrowserFamily) map[string]BrowserDef {
++ result := map[string]BrowserDef{}
++ for _, bd := range DefinedBrowsers {
++ if bd.Family == family {
++ result[bd.Flavour] = bd
++ }
++ }
++
++ return result
++}
++
++func AddBrowserDef(b BrowserDef) {
++ DefinedBrowsers = append(DefinedBrowsers, b)
++}
Home |
Main Index |
Thread Index |
Old Index