Import gsimplecal.

Gsimplecal is a lightweight calendar applet written in C++ using GTK.

It was originally made for use with tint2 panel in the openbox window
manager (to be launched upon clock click), but of course it works in
any environment (just bind gsimplecal to some hotkey).  For easier
integration, when started it first shows up, when launched again it
closes the running instance (no need to write wrapper scripts or
whatever).

It can be configured to not only show the calendar, but also display
multiple clocks for different world timezones

Submission from Alessandro De Laurenzis, thanks!
Tweaks and OK sthen@
This commit is contained in:
kirby 2019-06-16 07:37:33 +00:00
parent 820000f899
commit bfe0c442ca
5 changed files with 68 additions and 0 deletions

View File

@ -0,0 +1,36 @@
# $OpenBSD: Makefile,v 1.1.1.1 2019/06/16 07:37:33 kirby Exp $
COMMENT = lightweight GTK calendar applet
GH_ACCOUNT = dmedvinsky
GH_PROJECT = gsimplecal
GH_TAGNAME = v2.1
CATEGORIES = productivity x11
MAINTAINER = Alessandro De Laurenzis <just22@atlantide.t28.net>
# BSD
PERMIT_PACKAGE = Yes
WANTLIB += ${COMPILER_LIBCXX}
WANTLIB += atk-1.0 c cairo cairo-gobject gdk-3 gdk_pixbuf-2.0 gio-2.0
WANTLIB += glib-2.0 gobject-2.0 gtk-3 intl m pango-1.0 pangocairo-1.0
LIB_DEPENDS = x11/gtk+3
# C++
COMPILER = base-clang ports-gcc base-gcc
CONFIGURE_STYLE = autoreconf
AUTOCONF_VERSION = 2.69
AUTOMAKE_VERSION = 1.11
AUTORECONF = ./autogen.sh
MAKE_FLAGS = CXXFLAGS="-std=c++98 ${CXXFLAGS}"
NO_TEST = Yes
pre-configure:
${SUBST_CMD} ${WRKSRC}/src/Unique.cpp
.include <bsd.port.mk>

View File

@ -0,0 +1,2 @@
SHA256 (gsimplecal-2.1.tar.gz) = ZgysczPTUHIDoAjhQuK49d/PBzW2zKvdjT2QK10sQOk=
SIZE (gsimplecal-2.1.tar.gz) = 14133

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-src_Unique_cpp,v 1.1.1.1 2019/06/16 07:37:33 kirby Exp $
Index: src/Unique.cpp
--- src/Unique.cpp.orig
+++ src/Unique.cpp
@@ -108,7 +108,9 @@ void Unique::getPathnameFromFile(const char *const pat
void Unique::getPathnameFromExe(char* pathname)
{
-#if HAVE_GETEXECNAME && HAVE_STRLCPY
+#ifdef __OpenBSD__
+ strlcpy(pathname, "${PREFIX}/bin/gsimplecal", PATH_MAX + 1);
+#elif HAVE_GETEXECNAME && HAVE_STRLCPY
// Try getexecname (Solaris).
const char* execname = getexecname();
strlcpy(pathname, execname, PATH_MAX + 1);

View File

@ -0,0 +1,11 @@
Gsimplecal is a lightweight calendar applet written in C++ using GTK.
It was originally made for use with tint2 panel in the openbox window
manager (to be launched upon clock click), but of course it works in
any environment (just bind gsimplecal to some hotkey). For easier
integration, when started it first shows up, when launched again it
closes the running instance (no need to write wrapper scripts or
whatever).
It can be configured to not only show the calendar, but also display
multiple clocks for different world timezones.

View File

@ -0,0 +1,3 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2019/06/16 07:37:33 kirby Exp $
@bin bin/gsimplecal
@man man/man1/gsimplecal.1