x11/fbpanel: update to 7.0 and unbreak with -fno-common

patch taken from
https://svnweb.freebsd.org/ports?view=revision&revision=546840

note: upstream is dead since 2015, gtk+2 only.
This commit is contained in:
landry 2021-02-20 18:23:12 +00:00
parent 5840baf522
commit 6499f81b2b
16 changed files with 144 additions and 129 deletions

View File

@ -1,13 +1,13 @@
# $OpenBSD: Makefile,v 1.27 2020/11/11 09:51:46 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.28 2021/02/20 18:23:12 landry Exp $
COMMENT= lightweight NETWM compliant desktop panel
DISTNAME= fbpanel-6.1
REVISION= 8
GH_ACCOUNT= aanatoly
GH_PROJECT= fbpanel
GH_TAGNAME= 7.0
CATEGORIES= x11
EXTRACT_SUFX= .tbz2
HOMEPAGE= http://fbpanel.sourceforge.net/
HOMEPAGE= http://aanatoly.github.io/fbpanel/
# BSD
PERMIT_PACKAGE= Yes
@ -18,24 +18,24 @@ WANTLIB += gdk-x11-2.0 gdk_pixbuf-2.0 gio-2.0 glib-2.0 gmodule-2.0
WANTLIB += gobject-2.0 gtk-x11-2.0 harfbuzz intl m pango-1.0 pangocairo-1.0
WANTLIB += pangoft2-1.0 pthread z
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=fbpanel/}
USE_GMAKE= Yes
NO_TEST= Yes
CONFIGURE_STYLE=simple
MODULES= lang/python
MODPY_ADJ_FILES=configure .config/repl.py .config/tar.py
BUILD_DEPENDS= graphics/gdk-pixbuf-xlib \
shells/bash
LIB_DEPENDS= x11/gtk+2
MAKE_FLAGS= V=1
DATADIR = ${PREFIX}/share/fbpanel
EXECDIR = ${PREFIX}/libexec/fbpanel
EXAMPLEDIR = ${PREFIX}/share/examples/fbpanel
pre-configure:
${SUBST_CMD} ${WRKSRC}/configure ${WRKSRC}/scripts/rfs-pkg-config
${SUBST_CMD} ${WRKSRC}/.config/rules.mk ${WRKSRC}/scripts/rfs-pkg-config
${MODPYTHON_pre-configure}
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/panel/fbpanel ${PREFIX}/bin/

View File

@ -1,2 +1,2 @@
SHA256 (fbpanel-6.1.tbz2) = 4UVCzIHqBuZN1HCFRvX9P14BiEw+RheIXH7yKvjPOWU=
SIZE (fbpanel-6.1.tbz2) = 190266
SHA256 (fbpanel-7.0.tar.gz) = cRVwlU+PmSNdavt+wyJt7eILgy63EqW9AOT3k7daxbs=
SIZE (fbpanel-7.0.tar.gz) = 3746477

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-_config_rules_mk,v 1.1 2021/02/20 18:23:12 landry Exp $
Index: .config/rules.mk
--- .config/rules.mk.orig
+++ .config/rules.mk
@@ -3,7 +3,7 @@
# environment checks #
###############################################
-SHELL=/bin/bash
+SHELL=${LOCALBASE}/bin/bash
.DEFAULT_GOAL := all

View File

@ -1,34 +0,0 @@
$OpenBSD: patch-configure,v 1.2 2010/12/21 10:29:48 dcoppa Exp $
fix bash and system directory paths
--- configure.orig Sun Apr 4 11:02:40 2010
+++ configure Tue Dec 21 06:56:28 2010
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!${LOCALBASE}/bin/bash
PID=$$
# NLS nuisances.
@@ -324,18 +324,18 @@ add_var host "stab: configure for arch" ""
add_var target "stab: configure for arch" ""
# N.B. order is important
-add_var prefix "install architecture-independent files" /usr
+add_var prefix "install architecture-independent files" ${TRUEPREFIX}
add_var eprefix "install architecture-dependent files" '$prefix'
add_var bindir "user executables" '$eprefix/bin'
add_var sbindir "system executables" '$eprefix/sbin'
add_var libexecdir "program executables" '$eprefix/libexec'
add_var libdir "object code libraries" '$eprefix/lib'
-add_var sysconfdir "read-only single-machine data" '$prefix/etc'
+add_var sysconfdir "read-only single-machine data" ${SYSCONFDIR}
add_var datadir "read-only architecture-independent data" '$prefix/share'
add_var includedir "C header files" '$prefix/include'
add_var mandir "man documentation" '$prefix/man'
add_var infodir "info documentation" '$prefix/info'
-add_var localstatedir "modifiable single-machine data in DIR" '$prefix/var'
+add_var localstatedir "modifiable single-machine data in DIR" '/var'
add_var topdir "project's top directory" '`pwd`'
add_var version "version" '`< version`'
add_feature debug "debug build" disabled

View File

@ -1,27 +1,19 @@
$OpenBSD: patch-exec_make_profile_in,v 1.5 2015/10/20 13:38:35 dcoppa Exp $
$OpenBSD: patch-exec_make_profile_in,v 1.6 2021/02/20 18:23:13 landry Exp $
remove bashism
fix default config file path
use some sane defaults for menu/launchbar apps: that's a best effort
task :-)
--- exec/make_profile.in.orig Wed Mar 24 10:58:10 2010
+++ exec/make_profile.in Fri Jan 13 18:11:16 2012
Index: exec/make_profile.in
--- exec/make_profile.in.orig
+++ exec/make_profile.in
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
umask 0077
# new profile directory
@@ -6,7 +6,7 @@ npdir=~/.config/fbpanel
# old profile directory
opdir=~/.fbpanel
# system profile directory
-spdir=%%datadir%%/fbpanel
+spdir=%%datadir%%/examples/fbpanel
# if profile name was not set, use 'default'
profile=${1:-default}
@@ -42,24 +42,24 @@ fi
# Creates new profile using system profile as template
# $1 - system profile name

View File

@ -1,11 +1,12 @@
$OpenBSD: patch-exec_xlogout,v 1.4 2017/04/17 08:49:23 sthen Exp $
$OpenBSD: patch-exec_xlogout,v 1.5 2021/02/20 18:23:13 landry Exp $
fix xlogout script on OpenBSD
use some sane defaults for X session names: that's a best effort
task :-)
--- exec/xlogout.orig Tue Apr 13 12:58:08 2010
+++ exec/xlogout Tue Apr 13 13:00:31 2010
Index: exec/xlogout
--- exec/xlogout.orig
+++ exec/xlogout
@@ -1,49 +1,5 @@
-#!/bin/bash
+#!/bin/sh
@ -56,6 +57,6 @@ task :-)
-[ -z "$SPID" ] && exit 1
-echo "Session start up script"
-ps -o uid,pid,ppid,sess,cmd --pid $SPID
-kill -SIGTERM -$SPID
-kill -SIGTERM -$SPID $SPID
-
+for pid in ${XSESS} ; do kill ${pid} ; done

View File

@ -1,17 +1,18 @@
$OpenBSD: patch-panel_gconf_panel_c,v 1.1 2015/10/20 13:38:35 dcoppa Exp $
$OpenBSD: patch-panel_gconf_panel_c,v 1.2 2021/02/20 18:23:13 landry Exp $
Fix typo in the GUI
Bug-Debian: http://bugs.debian.org/590727
Author: Dererk <dererk@debian.org>
--- panel/gconf_panel.c.orig Tue Oct 20 13:40:56 2015
+++ panel/gconf_panel.c Tue Oct 20 13:42:01 2015
Index: panel/gconf_panel.c
--- panel/gconf_panel.c.orig
+++ panel/gconf_panel.c
@@ -233,7 +233,7 @@ mk_geom_block(xconf *xc)
w = gconf_edit_enum(geom_block, xconf_get(xc, "allign"),
allign_enum);
- gconf_block_add(geom_block, gtk_label_new("Allignment"), TRUE);
+ gconf_block_add(geom_block, gtk_label_new("Alignment"), TRUE);
- gconf_block_add(geom_block, gtk_label_new(_("Allignment")), TRUE);
+ gconf_block_add(geom_block, gtk_label_new(_("Alignment")), TRUE);
gconf_block_add(geom_block, w, FALSE);
allign_opt = w;

View File

@ -1,10 +1,11 @@
$OpenBSD: patch-panel_misc_c,v 1.2 2010/12/21 10:29:48 dcoppa Exp $
$OpenBSD: patch-panel_misc_c,v 1.3 2021/02/20 18:23:13 landry Exp $
use g_snprintf instead of g_sprintf
--- panel/misc.c.orig Wed Apr 28 13:39:31 2010
+++ panel/misc.c Tue Dec 21 06:56:28 2010
@@ -687,7 +687,7 @@ gchar *
Index: panel/misc.c
--- panel/misc.c.orig
+++ panel/misc.c
@@ -697,7 +697,7 @@ gchar *
gdk_color_to_RRGGBB(GdkColor *color)
{
static gchar str[10]; // #RRGGBB + \0

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-panel_plugin_c,v 1.1 2021/02/20 18:23:13 landry Exp $
fix for -fno-common
https://svnweb.freebsd.org/ports?view=revision&revision=546840
Index: panel/plugin.c
--- panel/plugin.c.orig
+++ panel/plugin.c
@@ -17,6 +17,7 @@
//#define DEBUGPRN
#include "dbg.h"
extern panel *the_panel;
+struct _plugin_instance *stam;
/**************************************************************/

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-panel_plugin_h,v 1.1 2021/02/20 18:23:13 landry Exp $
fix for -fno-common
https://svnweb.freebsd.org/ports?view=revision&revision=546840
Index: panel/plugin.h
--- panel/plugin.h.orig
+++ panel/plugin.h
@@ -9,7 +9,7 @@
#include <stdio.h>
#include "panel.h"
-struct _plugin_instance *stam;
+extern struct _plugin_instance *stam;
typedef struct {
/* common */

View File

@ -0,0 +1,35 @@
$OpenBSD: patch-plugins_Makefile,v 1.1 2021/02/20 18:23:13 landry Exp $
Index: plugins/Makefile
--- plugins/Makefile.orig
+++ plugins/Makefile
@@ -2,28 +2,21 @@
TOPDIR := ..
-SUBDIRS := battery \
- chart \
- cpu \
- dclock \
+SUBDIRS := dclock \
deskno \
deskno2 \
genmon \
icons \
image \
launchbar \
- mem \
mem2 \
menu \
- meter \
- net \
pager \
separator \
space \
systray \
taskbar \
tclock \
- volume \
wincmd \
user

View File

@ -1,16 +0,0 @@
$OpenBSD: patch-plugins_Makefile_in,v 1.2 2010/12/21 10:29:48 dcoppa Exp $
remove linux-only plugins
--- plugins/Makefile.in.orig Wed Mar 31 14:44:34 2010
+++ plugins/Makefile.in Tue Dec 21 06:58:36 2010
@@ -1,7 +1,7 @@
include %%topdir%%/config.mk
-SUBDIRS = taskbar launchbar space menu pager mem chart cpu net
+SUBDIRS = taskbar launchbar space menu pager
SUBDIRS += systray dclock wincmd icons separator image
-SUBDIRS += deskno tclock genmon deskno2 meter volume battery
+SUBDIRS += deskno tclock genmon deskno2
include %%topdir%%/rules.mk

View File

@ -1,17 +0,0 @@
$OpenBSD: patch-plugins_image_image_c,v 1.1 2012/03/29 08:17:41 dcoppa Exp $
gdk_pixbuf_unref() has been deprecated with gdk-pixbuf-2.25
--- plugins/image/image.c.orig Thu Mar 29 10:04:11 2012
+++ plugins/image/image.c Thu Mar 29 10:04:30 2012
@@ -68,8 +68,8 @@ image_constructor(plugin_instance *p)
ratio * ((float) gdk_pixbuf_get_height(gp)),
GDK_INTERP_HYPER);
gdk_pixbuf_render_pixmap_and_mask(gps, &img->pix, &img->mask, 127);
- gdk_pixbuf_unref(gp);
- gdk_pixbuf_unref(gps);
+ g_object_unref(gp);
+ g_object_unref(gps);
wid = gtk_image_new_from_pixmap(img->pix, img->mask);
}

View File

@ -1,10 +1,11 @@
$OpenBSD: patch-plugins_pager_pager_c,v 1.2 2012/03/29 08:17:41 dcoppa Exp $
$OpenBSD: patch-plugins_pager_pager_c,v 1.3 2021/02/20 18:23:13 landry Exp $
add icon drawing support to the pager plugin
(adapted from an older patch written for fbpanel-4.3 by daf@minuslab.net)
--- plugins/pager/pager.c.orig Wed Apr 28 13:39:20 2010
+++ plugins/pager/pager.c Thu Mar 29 10:04:48 2012
Index: plugins/pager/pager.c
--- plugins/pager/pager.c.orig
+++ plugins/pager/pager.c
@@ -27,10 +27,13 @@
@ -423,7 +424,7 @@ add icon drawing support to the pager plugin
g_hash_table_insert(p->htable, &t->win, t);
DBG("add %lx\n", t->win);
desk_set_dirty_by_win(p, t);
@@ -786,6 +1149,9 @@ pager_constructor(plugin_instance *plug)
@@ -787,6 +1150,9 @@ pager_constructor(plugin_instance *plug)
g_signal_connect(G_OBJECT(pg->fbbg), "changed",
G_CALLBACK(pager_bg_changed), pg);
}

View File

@ -1,10 +1,11 @@
$OpenBSD: patch-scripts_custom_sh,v 1.1 2015/10/20 13:38:35 dcoppa Exp $
$OpenBSD: patch-scripts_custom_sh,v 1.2 2021/02/20 18:23:13 landry Exp $
https://gitweb.gentoo.org/repo/gentoo.git/plain/x11-misc/fbpanel/files/fbpanel-6.1-underlinking.patch
--- scripts/custom.sh.orig Tue Oct 20 13:43:52 2015
+++ scripts/custom.sh Tue Oct 20 13:45:07 2015
@@ -18,10 +18,10 @@
Index: scripts/custom.sh
--- scripts/custom.sh.orig
+++ scripts/custom.sh
@@ -17,10 +17,10 @@ add_var version "package version, e.g 6.2 or 1.4.5-alp
add_feature dependency "disable dependency tracking" disabled
add_var glib_cflags "glib cflags" '`RFS=$rfs scripts/rfs-pkg-config --cflags glib-2.0`'

View File

@ -1,21 +1,24 @@
@comment $OpenBSD: PLIST,v 1.5 2020/11/11 09:51:46 ajacoutot Exp $
@comment $OpenBSD: PLIST,v 1.6 2021/02/20 18:23:13 landry Exp $
@bin bin/fbpanel
lib/fbpanel/
@so lib/fbpanel/dclock.so
@so lib/fbpanel/deskno.so
@so lib/fbpanel/deskno2.so
@so lib/fbpanel/genmon.so
@so lib/fbpanel/icons.so
@so lib/fbpanel/image.so
@so lib/fbpanel/launchbar.so
@so lib/fbpanel/menu.so
@so lib/fbpanel/pager.so
@so lib/fbpanel/separator.so
@so lib/fbpanel/space.so
@so lib/fbpanel/taskbar.so
@so lib/fbpanel/tclock.so
@so lib/fbpanel/tray.so
@so lib/fbpanel/wincmd.so
@so lib/fbpanel/libdclock.so
@so lib/fbpanel/libdeskno.so
@so lib/fbpanel/libdeskno2.so
@so lib/fbpanel/libgenmon.so
@so lib/fbpanel/libicons.so
@so lib/fbpanel/libimage.so
@so lib/fbpanel/liblaunchbar.so
@so lib/fbpanel/libmem2.so
@so lib/fbpanel/libmenu.so
@so lib/fbpanel/libpager.so
@so lib/fbpanel/libseparator.so
@so lib/fbpanel/libspace.so
lib/fbpanel/libsystray.so
@so lib/fbpanel/libtaskbar.so
@so lib/fbpanel/libtclock.so
@so lib/fbpanel/libtray.so
@so lib/fbpanel/libuser.so
@so lib/fbpanel/libwincmd.so
libexec/fbpanel/
libexec/fbpanel/make_profile
libexec/fbpanel/xlogout