[crux-commits] ports/contrib (3.6): gnvim: initial commit, version 0.1.6

crux at crux.nu crux at crux.nu
Fri Jul 2 23:39:17 UTC 2021


commit 420adfa337b9dd829c0c5e2aa583b77238a9ef8c
Author: Tim Biermann <tbier at posteo.de>
Date:   Fri Jul 2 22:26:41 2021 +0000

    gnvim: initial commit, version 0.1.6

diff --git a/gnvim/.footprint b/gnvim/.footprint
new file mode 100644
index 000000000..493301452
--- /dev/null
+++ b/gnvim/.footprint
@@ -0,0 +1,25 @@
+drwxr-xr-x	root/root	usr/
+drwxr-xr-x	root/root	usr/bin/
+-rwxr-xr-x	root/root	usr/bin/gnvim
+drwxr-xr-x	root/root	usr/share/
+drwxr-xr-x	root/root	usr/share/applications/
+-rw-r--r--	root/root	usr/share/applications/gnvim.desktop
+drwxr-xr-x	root/root	usr/share/gnvim/
+drwxr-xr-x	root/root	usr/share/gnvim/runtime/
+drwxr-xr-x	root/root	usr/share/gnvim/runtime/autoload/
+drwxr-xr-x	root/root	usr/share/gnvim/runtime/autoload/gnvim/
+-rw-r--r--	root/root	usr/share/gnvim/runtime/autoload/gnvim/cursor_tooltip.vim
+-rw-r--r--	root/root	usr/share/gnvim/runtime/autoload/gnvim/popupmenu.vim
+drwxr-xr-x	root/root	usr/share/gnvim/runtime/doc/
+-rw-r--r--	root/root	usr/share/gnvim/runtime/doc/gnvim.txt
+-rw-r--r--	root/root	usr/share/gnvim/runtime/doc/tags
+drwxr-xr-x	root/root	usr/share/gnvim/runtime/plugin/
+-rw-r--r--	root/root	usr/share/gnvim/runtime/plugin/gnvim.vim
+drwxr-xr-x	root/root	usr/share/icons/
+drwxr-xr-x	root/root	usr/share/icons/hicolor/
+drwxr-xr-x	root/root	usr/share/icons/hicolor/128x128/
+drwxr-xr-x	root/root	usr/share/icons/hicolor/128x128/apps/
+-rw-r--r--	root/root	usr/share/icons/hicolor/128x128/apps/gnvim.png
+drwxr-xr-x	root/root	usr/share/icons/hicolor/48x48/
+drwxr-xr-x	root/root	usr/share/icons/hicolor/48x48/apps/
+-rw-r--r--	root/root	usr/share/icons/hicolor/48x48/apps/gnvim.png
diff --git a/gnvim/.signature b/gnvim/.signature
new file mode 100644
index 000000000..bbbbfefbf
--- /dev/null
+++ b/gnvim/.signature
@@ -0,0 +1,5 @@
+untrusted comment: verify with /etc/ports/contrib.pub
+RWSagIOpLGJF306sbY8n1JF10VDYaOT+3dO/HATx3eErFPHpoSS+S3RcN2SzU93f9WTQg0awul1nfXShg0yw6Xl77ac/0jQxjwM=
+SHA256 (Pkgfile) = 953e30202778f5f63f524b51606617016b2935817aa694f9612e78f02c691905
+SHA256 (.footprint) = 6989f156e9601c420b6d8e5e5788da74b625eb4175e091d36c52f5e3f64ab6a5
+SHA256 (gnvim-0.1.6.tar.gz) = 5cda3422b99114710cee6818cf3616ed0e7f810d38e51dd1861c9c269b9e28d0
diff --git a/gnvim/Pkgfile b/gnvim/Pkgfile
new file mode 100644
index 000000000..fa058d76b
--- /dev/null
+++ b/gnvim/Pkgfile
@@ -0,0 +1,41 @@
+# Description: GUI for neovim, without any web bloat
+# URL: https://github.com/vhakulinen/gnvim
+# Maintainer: Tim Biermann, tbier at posteo dot de
+# Depends on: gtk3 neovim rust
+# Optional: webkitgtk
+
+name=gnvim
+version=0.1.6
+release=1
+source=(https://github.com/vhakulinen/gnvim/archive/v$version/$name-$version.tar.gz)
+
+build() {
+  prt-get isinst sccache && export RUSTC_WRAPPER='/usr/bin/sccache'
+  mkdir "$PKGMK_SOURCE_DIR/rust" || true
+  export CARGO_HOME="$PKGMK_SOURCE_DIR/rust"
+
+  prt-get isinst webkitgtk || PKGMK_GNVIM+=' --no-default-features'
+
+cat <<- EOF > $name-$version/build.rs
+use std::env;
+use std::fs::File;
+use std::io::Write;
+use std::path::Path;
+
+fn main() {
+  let out_dir = env::var("OUT_DIR").unwrap();
+  let dest_path = Path::new(&out_dir).join("gnvim_version.rs");
+  let mut f = File::create(&dest_path).unwrap();
+  f.write_all(b"const VERSION: &str = \"${version}\";").unwrap();
+}
+EOF
+
+  sed \
+    -e s'|/usr/local/share/gnvim/runtime|/usr/share/gnvim/runtime|' \
+    -i $name-$version/src/main.rs
+
+  cargo fetch --manifest-path $name-$version/Cargo.toml --locked
+  cargo build --manifest-path $name-$version/Cargo.toml --release --frozen $PKGMK_GNVIM
+
+  make -C $name-$version PREFIX=/usr DESTDIR=$PKG install
+}


More information about the crux-commits mailing list