wmclockmon: fix the build with -fno-common and remove a

trailing whitespace in DESCR.

OK naddy@
This commit is contained in:
cwen 2021-02-02 22:10:38 +00:00
parent 7645da3a40
commit 5a26c868fd
11 changed files with 277 additions and 11 deletions

View File

@ -1,11 +1,11 @@
# $OpenBSD: Makefile,v 1.19 2019/07/12 20:51:24 sthen Exp $
# $OpenBSD: Makefile,v 1.20 2021/02/02 22:10:38 cwen Exp $
COMMENT= WindowMaker dock.app clock
BROKEN-sparc64 = ICE in change_address_1, at emit-rtl.c:1784
DISTNAME= wmclockmon-0.8.1
CATEGORIES= x11 x11/windowmaker
REVISION= 0
REVISION= 1
HOMEPAGE= http://tnemeth.free.fr/projets/dockapps.html
@ -17,8 +17,8 @@ PERMIT_PACKAGE= Yes
WANTLIB += X11 Xcomposite Xcursor Xdamage Xext Xfixes Xi Xinerama
WANTLIB += Xpm Xrandr Xrender atk-1.0 c cairo fontconfig freetype
WANTLIB += gdk-x11-2.0 gdk_pixbuf-2.0 gio-2.0 glib-2.0 gobject-2.0
WANTLIB += gtk-x11-2.0 intl pango-1.0 pangocairo-1.0 pangoft2-1.0
WANTLIB += pthread z
WANTLIB += gtk-x11-2.0 harfbuzz intl pango-1.0 pangocairo-1.0
WANTLIB += pangoft2-1.0 pthread z
LIB_DEPENDS= devel/gettext,-runtime \
x11/gtk+2

View File

@ -0,0 +1,30 @@
$OpenBSD: patch-wmclockmon-cal_main_c,v 1.1 2021/02/02 22:10:38 cwen Exp $
Fix -fno-common build failure.
Index: wmclockmon-cal/main.c
--- wmclockmon-cal/main.c.orig
+++ wmclockmon-cal/main.c
@@ -15,6 +15,22 @@
#include "mainwindow.h"
#include "main.h"
+GtkWidget *application;
+GtkWidget *alarmlist;
+GtkWidget *wid_backlight;
+GtkWidget *wid_blink;
+GtkWidget *wid_styledir;
+GtkWidget *wid_stylename;
+GtkWidget *wid_color;
+GtkWidget *wid_command;
+GtkWidget *wid_msgcmd;
+GtkWidget *wid_h12;
+GtkWidget *wid_itm;
+GtkWidget *wid_locale;
+
+int selected_row;
+
+struct tm *timeinfos;
void Usage () {
printf("Usage: "PACKAGE"-cal [-h] [-v]\n"

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-wmclockmon-cal_main_h,v 1.1 2021/02/02 22:10:38 cwen Exp $
Fix -fno-common build failure.
Index: wmclockmon-cal/main.h
--- wmclockmon-cal/main.h.orig
+++ wmclockmon-cal/main.h
@@ -9,7 +9,7 @@
#include <sys/time.h>
-struct tm *timeinfos;
+extern struct tm *timeinfos;
void quit_app();

View File

@ -0,0 +1,41 @@
$OpenBSD: patch-wmclockmon-cal_mainwindow_h,v 1.1 2021/02/02 22:10:38 cwen Exp $
Fix -fno-common build failure.
Index: wmclockmon-cal/mainwindow.h
--- wmclockmon-cal/mainwindow.h.orig
+++ wmclockmon-cal/mainwindow.h
@@ -7,20 +7,20 @@
#include <gtk/gtk.h>
-GtkWidget *application;
-GtkWidget *alarmlist;
-GtkWidget *wid_backlight;
-GtkWidget *wid_blink;
-GtkWidget *wid_styledir;
-GtkWidget *wid_stylename;
-GtkWidget *wid_color;
-GtkWidget *wid_command;
-GtkWidget *wid_msgcmd;
-GtkWidget *wid_h12;
-GtkWidget *wid_itm;
-GtkWidget *wid_locale;
+extern GtkWidget *application;
+extern GtkWidget *alarmlist;
+extern GtkWidget *wid_backlight;
+extern GtkWidget *wid_blink;
+extern GtkWidget *wid_styledir;
+extern GtkWidget *wid_stylename;
+extern GtkWidget *wid_color;
+extern GtkWidget *wid_command;
+extern GtkWidget *wid_msgcmd;
+extern GtkWidget *wid_h12;
+extern GtkWidget *wid_itm;
+extern GtkWidget *wid_locale;
-int selected_row;
+extern int selected_row;
gint list_unsel_cb (GtkCList *clist,
gint row,

View File

@ -0,0 +1,32 @@
$OpenBSD: patch-wmclockmon-config_actions_c,v 1.1 2021/02/02 22:10:38 cwen Exp $
Fix -fno-common build failure.
Index: wmclockmon-config/actions.c
--- wmclockmon-config/actions.c.orig
+++ wmclockmon-config/actions.c
@@ -19,6 +19,24 @@
#include "edit.h"
#include "actions.h"
+GtkWidget *application;
+GtkWidget *alarmlist;
+GtkWidget *wid_backlight;
+GtkWidget *wid_blink;
+GtkWidget *wid_styledir;
+GtkWidget *wid_stylename;
+GtkWidget *wid_color;
+GtkWidget *wid_command;
+GtkWidget *wid_msgcmd;
+GtkWidget *wid_h12;
+GtkWidget *wid_clk;
+GtkWidget *wid_itm;
+GtkWidget *wid_bin;
+GtkWidget *wid_locale;
+GtkWidget *wid_showcal;
+GtkWidget *wid_calalrms;
+
+int selected_row;
void quit_app() {
FREE(command);

View File

@ -1,11 +1,21 @@
$OpenBSD: patch-wmclockmon-config_edit_c,v 1.1 2010/03/23 22:12:39 jasper Exp $
$OpenBSD: patch-wmclockmon-config_edit_c,v 1.2 2021/02/02 22:10:38 cwen Exp $
Switch to gtk+2:
- Remove call to deprecated function.
Hunk #1: Fix -fno-common build failure.
Hunk #2: Switch to gtk+2: remove call to deprecated function.
--- wmclockmon-config/edit.c.orig Tue Mar 23 23:04:31 2010
+++ wmclockmon-config/edit.c Tue Mar 23 23:04:39 2010
@@ -76,7 +76,6 @@ void edit_dialog(const char *title,
Index: wmclockmon-config/edit.c
--- wmclockmon-config/edit.c.orig
+++ wmclockmon-config/edit.c
@@ -16,6 +16,8 @@ static GtkWidget *wid_time;
static GtkWidget *wid_date;
static GtkWidget *wid_mesg;
+char *newalarm;
+
void set_data(GtkWidget *widget, GtkWidget *data) {
char *wstat = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(wid_status)->entry));
char *wtime = gtk_entry_get_text(GTK_ENTRY(wid_time));
@@ -76,7 +78,6 @@ void edit_dialog(const char *title,
bouton, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS(GTK_WIDGET(bouton), GTK_CAN_DEFAULT);
gtk_widget_grab_default(GTK_WIDGET(bouton));

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-wmclockmon-config_edit_h,v 1.1 2021/02/02 22:10:38 cwen Exp $
Fix -fno-common build failure.
Index: wmclockmon-config/edit.h
--- wmclockmon-config/edit.h.orig
+++ wmclockmon-config/edit.h
@@ -5,7 +5,7 @@
#ifndef EDIT_H
#define EDIT_H
-char *newalarm;
+extern char *newalarm;
void edit_dialog(const char *title,
int on,

View File

@ -0,0 +1,49 @@
$OpenBSD: patch-wmclockmon-config_mainwindow_h,v 1.1 2021/02/02 22:10:38 cwen Exp $
Fix -fno-common build failure.
Index: wmclockmon-config/mainwindow.h
--- wmclockmon-config/mainwindow.h.orig
+++ wmclockmon-config/mainwindow.h
@@ -7,24 +7,24 @@
#include <gtk/gtk.h>
-GtkWidget *application;
-GtkWidget *alarmlist;
-GtkWidget *wid_backlight;
-GtkWidget *wid_blink;
-GtkWidget *wid_styledir;
-GtkWidget *wid_stylename;
-GtkWidget *wid_color;
-GtkWidget *wid_command;
-GtkWidget *wid_msgcmd;
-GtkWidget *wid_h12;
-GtkWidget *wid_clk;
-GtkWidget *wid_itm;
-GtkWidget *wid_bin;
-GtkWidget *wid_locale;
-GtkWidget *wid_showcal;
-GtkWidget *wid_calalrms;
+extern GtkWidget *application;
+extern GtkWidget *alarmlist;
+extern GtkWidget *wid_backlight;
+extern GtkWidget *wid_blink;
+extern GtkWidget *wid_styledir;
+extern GtkWidget *wid_stylename;
+extern GtkWidget *wid_color;
+extern GtkWidget *wid_command;
+extern GtkWidget *wid_msgcmd;
+extern GtkWidget *wid_h12;
+extern GtkWidget *wid_clk;
+extern GtkWidget *wid_itm;
+extern GtkWidget *wid_bin;
+extern GtkWidget *wid_locale;
+extern GtkWidget *wid_showcal;
+extern GtkWidget *wid_calalrms;
-int selected_row;
+extern int selected_row;
gint list_unsel_cb (GtkCList *clist,
gint row,

View File

@ -0,0 +1,29 @@
$OpenBSD: patch-wmclockmon-config_tools_c,v 1.1 2021/02/02 22:10:38 cwen Exp $
Fix -fno-common build failure.
Index: wmclockmon-config/tools.c
--- wmclockmon-config/tools.c.orig
+++ wmclockmon-config/tools.c
@@ -17,6 +17,21 @@
#include <sys/types.h>
#include "configfile.h"
+int backlight;
+int switch_authorized;
+int h12;
+int time_mode;
+int use_leds;
+int use_locale;
+int showcal;
+int calalrms;
+char *style_name;
+char *style_dir;
+char *config_file;
+char *light_color;
+char *command;
+char *msgcmd;
+Alarm *alarms;
int fexist(const char *filename) {
FILE *file;

View File

@ -0,0 +1,43 @@
$OpenBSD: patch-wmclockmon-config_variables_h,v 1.1 2021/02/02 22:10:38 cwen Exp $
Fix -fno-common build failure.
Index: wmclockmon-config/variables.h
--- wmclockmon-config/variables.h.orig
+++ wmclockmon-config/variables.h
@@ -7,20 +7,20 @@
#include "defines.h"
-int backlight;
-int switch_authorized;
-int h12;
-int time_mode;
-int use_leds;
-int use_locale;
-int showcal;
-int calalrms;
-char *style_name;
-char *style_dir;
-char *config_file;
-char *light_color;
-char *command;
-char *msgcmd;
-Alarm *alarms;
+extern int backlight;
+extern int switch_authorized;
+extern int h12;
+extern int time_mode;
+extern int use_leds;
+extern int use_locale;
+extern int showcal;
+extern int calalrms;
+extern char *style_name;
+extern char *style_dir;
+extern char *config_file;
+extern char *light_color;
+extern char *command;
+extern char *msgcmd;
+extern Alarm *alarms;
#endif

View File

@ -1,4 +1,4 @@
wmclockmon is a nice digital clock Window Maker dockapp with 7
different styles in either LCD style or LED style. It uses
locales to display week-day and month names. It also features
locales to display week-day and month names. It also features
Internet time display.