From 146470079ccfe0956f77596f6b3c0a859c837ec8 Mon Sep 17 00:00:00 2001 From: Subhaditya Nath Date: Sat, 4 Feb 2023 00:55:57 +0530 Subject: [PATCH] New package: rofi-wayland-1.7.5+wayland1 --- .../patches/fix-libnkutils-test.patch | 18 +++ .../rofi-wayland/patches/wayland-suffix.patch | 143 ++++++++++++++++++ .../patches/wayland-suffix.patch.args | 1 + srcpkgs/rofi-wayland/template | 35 +++++ 4 files changed, 197 insertions(+) create mode 100644 srcpkgs/rofi-wayland/patches/fix-libnkutils-test.patch create mode 100644 srcpkgs/rofi-wayland/patches/wayland-suffix.patch create mode 100644 srcpkgs/rofi-wayland/patches/wayland-suffix.patch.args create mode 100644 srcpkgs/rofi-wayland/template diff --git a/srcpkgs/rofi-wayland/patches/fix-libnkutils-test.patch b/srcpkgs/rofi-wayland/patches/fix-libnkutils-test.patch new file mode 100644 index 000000000000..350e7b6abbcf --- /dev/null +++ b/srcpkgs/rofi-wayland/patches/fix-libnkutils-test.patch @@ -0,0 +1,18 @@ +Fix for GLib 2.73.1 %e time format +https://github.com/sardemff7/libnkutils/issues/4 +https://github.com/GNOME/glib/commit/7074122f308b7b3402fba250f2010778fdad6eff + +--- a/subprojects/libnkutils/tests/format-string.c ++++ b/subprojects/libnkutils/tests/format-string.c +@@ -677,7 +677,11 @@ static const struct { + { .name = "timestamp", .content = "1519910048" }, + { .name = NULL } + }, ++#if GLIB_CHECK_VERSION(2,73,1) ++ .result = "Thu Mar \u20071 13:14:08 2018" ++#else /* ! GLIB_CHECK_VERSION(2,73,1) */ + .result = "Thu Mar 1 13:14:08 2018" ++#endif /* ! GLIB_CHECK_VERSION(2,73,1) */ + } + }, + { diff --git a/srcpkgs/rofi-wayland/patches/wayland-suffix.patch b/srcpkgs/rofi-wayland/patches/wayland-suffix.patch new file mode 100644 index 000000000000..6543dd037215 --- /dev/null +++ b/srcpkgs/rofi-wayland/patches/wayland-suffix.patch @@ -0,0 +1,143 @@ +--- script/rofi-sensible-terminal-wayland ++++ script/rofi-sensible-terminal-wayland +@@ -15,4 +15,4 @@ + fi + done + +-rofi -e "Failed to find a suitable terminal" ++rofi-wayland -e "Failed to find a suitable terminal" +--- script/rofi-theme-selector-wayland ++++ script/rofi-theme-selector-wayland +@@ -3,7 +3,7 @@ + # This code is released in public domain by Dave Davenport + # + +-ROFI=$(which rofi) ++ROFI=$(which rofi-wayland) + SED=$(which sed) + MKTEMP=$(which mktemp) + +--- data/rofi-theme-selector-wayland.desktop ++++ data/rofi-theme-selector-wayland.desktop +@@ -3,6 +3,6 @@ + Version=1.0 + Type=Application + Terminal=false +-Exec=rofi-theme-selector +-Name=Rofi Theme Selector +-Icon=rofi ++Exec=rofi-theme-selector-wayland ++Name=Rofi Theme Selector (Wayland) ++Icon=rofi-wayland +--- data/rofi-wayland.desktop ++++ data/rofi-wayland.desktop +@@ -3,6 +3,6 @@ + Version=1.0 + Type=Application + Terminal=false +-Exec=rofi -show +-Name=Rofi +-Icon=rofi ++Exec=rofi-wayland -show ++Name=Rofi (Wayland) ++Icon=rofi-wayland +--- meson.build ++++ meson.build +@@ -141,30 +141,21 @@ + deps += nk.get_variable('libnkutils') + deps += nk.get_variable('libnkutils_bindings') + +-install_headers([ +- 'include/mode.h', +- 'include/mode-private.h', +- 'include/helper.h', +- 'include/rofi-types.h', +- 'include/rofi-icon-fetcher.h' +- ], +- subdir: meson.project_name(), +-) + install_data( +- 'script/rofi-sensible-terminal', +- 'script/rofi-theme-selector', ++ 'script/rofi-theme-selector-wayland', + install_dir: join_paths(get_option('prefix'), get_option('bindir')) + ) + + install_data( +- 'data/rofi-theme-selector.desktop', +- 'data/rofi.desktop', ++ 'data/rofi-theme-selector-wayland.desktop', ++ 'data/rofi-wayland.desktop', + install_dir: desktop_install_dir + ) + install_data( +- 'data/rofi.svg', ++ 'data/rofi-wayland.svg', ++ 'data/rofi-wayland.png', + install_dir: icondir + ) + + flex = generator(find_program('flex'), + output: '@BASENAME@.c', +@@ -296,7 +283,7 @@ + gnome = import('gnome') + default_theme = gnome.compile_resources('resources', files('resources/resources.xml')) + +-rofi = executable('rofi', rofi_sources + [ ++rofi = executable('rofi-wayland', rofi_sources + [ + theme_lexer, + theme_parser, + default_theme, +@@ -307,49 +294,9 @@ + + subdir('doc') + install_man( +- 'doc/rofi.1', +- 'doc/rofi-theme-selector.1', +- 'doc/rofi-sensible-terminal.1', +- 'doc/rofi-script.5', +- 'doc/rofi-theme.5', +- 'doc/rofi-debugging.5', +- 'doc/rofi-dmenu.5', +- 'doc/rofi-keys.5', +-) +- +-install_data( +- 'themes/Adapta-Nokto.rasi', +- 'themes/Arc.rasi', +- 'themes/Arc-Dark.rasi', +- 'themes/DarkBlue.rasi', +- 'themes/Indego.rasi', +- 'themes/Monokai.rasi', +- 'themes/Paper.rasi', +- 'themes/android_notification.rasi', +- 'themes/arthur.rasi', +- 'themes/blue.rasi', +- 'themes/c64.rasi', +- 'themes/dmenu.rasi', +- 'themes/docu.rasi', +- 'themes/glue_pro_blue.rasi', +- 'themes/gruvbox-common.rasi', +- 'themes/gruvbox-dark-hard.rasi', +- 'themes/gruvbox-dark-soft.rasi', +- 'themes/gruvbox-dark.rasi', +- 'themes/gruvbox-light-hard.rasi', +- 'themes/gruvbox-light-soft.rasi', +- 'themes/gruvbox-light.rasi', +- 'themes/lb.rasi', +- 'themes/paper-float.rasi', +- 'themes/purple.rasi', +- 'themes/sidebar.rasi', +- 'themes/sidebar-v2.rasi', +- 'themes/solarized.rasi', +- 'themes/solarized_alternate.rasi', +- 'themes/fancy.rasi', +- 'themes/iggy.rasi', +- 'themes/iggy.jpg', +- install_dir: themedir ++ 'doc/rofi-wayland.1', ++ 'doc/rofi-theme-selector-wayland.1', ++ 'doc/rofi-sensible-terminal-wayland.1', + ) + + pkg = import('pkgconfig') diff --git a/srcpkgs/rofi-wayland/patches/wayland-suffix.patch.args b/srcpkgs/rofi-wayland/patches/wayland-suffix.patch.args new file mode 100644 index 000000000000..4dd9cbd347b2 --- /dev/null +++ b/srcpkgs/rofi-wayland/patches/wayland-suffix.patch.args @@ -0,0 +1 @@ +-p0 diff --git a/srcpkgs/rofi-wayland/template b/srcpkgs/rofi-wayland/template new file mode 100644 index 000000000000..7072d17aad50 --- /dev/null +++ b/srcpkgs/rofi-wayland/template @@ -0,0 +1,35 @@ +# Template file for 'rofi-wayland' +pkgname=rofi-wayland +version=1.7.5+wayland1 +revision=1 +build_style=meson +hostmakedepends="pkg-config git flex glib-devel" +makedepends="libglib-devel cairo-devel pango-devel libxkbcommon-devel + gdk-pixbuf-devel wayland-devel libmpdclient-devel libnl3-devel libxcb-devel + xcb-util-devel xcb-util-wm-devel xcb-util-cursor-devel + startup-notification-devel wayland-protocols alsa-lib-devel check-devel" +depends="rofi>=${version%+*} bash which sed coreutils" +short_desc="Window switcher, run dialog and dmenu replacement - Wayland" +maintainer="Subhaditya Nath " +license="MIT" +homepage="https://github.com/lbonn/rofi" +changelog="https://raw.githubusercontent.com/lbonn/rofi/wayland/Changelog" +distfiles="https://github.com/lbonn/rofi/releases/download/${version%%+*}%2B${version##*+}/rofi-${version}.tar.gz" +checksum=4b7b5de0606e91380861dce6f2b894bebf63b2031c8746fd4096f72576ce541a + +post_extract() { + for f in script/rofi-*; do + mv $f "$f-wayland" + done + for f in data/*; do + mv $f "${f%.*}-wayland.${f##*.}" + done + for f in doc/*.?; do + mv $f ${f%.?}-wayland.${f##*.} + done +} + +post_install() { + vlicense COPYING + rm -rf $DESTDIR/usr/lib/pkgconfig +}