x11/gmrun: Update to 1.4w

Move WWW to new maintained place and upgrade to most recent version,
which supports gtk 3
This commit is contained in:
Renato Botelho 2024-01-08 16:51:26 -03:00
parent 992741b4fa
commit 7f150628b8
8 changed files with 23 additions and 115 deletions

View file

@ -1,36 +1,34 @@
PORTNAME= gmrun
PORTVERSION= 0.9.2
PORTREVISION= 15
DISTVERSION= 1.4w
CATEGORIES= x11
MASTER_SITES= SF
MAINTAINER= garga@FreeBSD.org
COMMENT= Customizable program to run programs, with tab-completion
WWW= https://sourceforge.net/projects/gmrun/
COMMENT= Run utiliy with a slim design and bash style auto-completion
WWW= https://github.com/wdlkmpx/gmrun
LICENSE= GPLv2
LIB_DEPENDS= libfontconfig.so:x11-fonts/fontconfig \
libfreetype.so:print/freetype2 \
libpopt.so:devel/popt
LIB_DEPENDS= libharfbuzz.so:print/harfbuzz
USES= compiler:c++11-lang gmake gnome localbase:ldflags pkgconfig
USES= desktop-file-utils gmake gnome pkgconfig
USE_GNOME= cairo gdkpixbuf2 gtk20
USE_GITHUB= yes
GH_ACCOUNT= wdlkmpx
USE_GNOME= cairo gdkpixbuf2 gtk30
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --disable-stlport
INSTALL_TARGET= install-strip
PLIST_FILES= bin/gmrun ${DATADIR}/gmrunrc
PORTDOCS= README
PORTDOCS= README.md
OPTIONS_DEFINE= DOCS
post-patch:
@${REINPLACE_CMD} -e '/my_alphasort/s#const void\*#const struct dirent**#g' \
${WRKSRC}/src/gtkcompletionline.cc
post-install:
${MV} ${STAGEDIR}${PREFIX}/etc/gmrunrc \
${STAGEDIR}${PREFIX}/etc/gmrunrc.sample
post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>

View file

@ -1,2 +1,3 @@
SHA256 (gmrun-0.9.2.tar.gz) = 17297bce53249ccc7145931db22251b47f77ac355f78cf8abf1e87ae16341fa0
SIZE (gmrun-0.9.2.tar.gz) = 66097
TIMESTAMP = 1704732439
SHA256 (wdlkmpx-gmrun-1.4w_GH0.tar.gz) = 7715eca337877abe180b435494a12d3ec3383a6677fe638724bcd23d84a5841b
SIZE (wdlkmpx-gmrun-1.4w_GH0.tar.gz) = 51854

View file

@ -1,12 +0,0 @@
--- config/gmrunrc.orig 2003-11-16 10:43:41 UTC
+++ config/gmrunrc
@@ -7,7 +7,8 @@ Terminal = gnome-terminal --start-factory-server --use
TermExec = ${Terminal} -e
AlwaysInTerm = ssh telnet ftp lynx mc vi vim pine centericq perldoc man
-# Set window geometry (except height)
+# Set window geometry (except height).
+# Top / Left = -1: Center dialog box in the current screen.
Width = 400
Top = 100
Left = 200

View file

@ -1,41 +0,0 @@
--- src/gtkcompletionline.cc.orig 2003-11-16 10:55:07 UTC
+++ src/gtkcompletionline.cc
@@ -39,6 +39,8 @@ static int on_key_press_handler = 0;
/* GLOBALS */
+GtkType type = 0;
+
/* signals */
enum {
UNIQUE,
@@ -76,14 +78,13 @@ static gboolean
on_key_press(GtkCompletionLine *cl, GdkEventKey *event, gpointer data);
/* get_type */
-guint gtk_completion_line_get_type(void)
+GtkType gtk_completion_line_get_type(void)
{
- static guint type = 0;
if (type == 0)
{
GtkTypeInfo type_info =
{
- "GtkCompletionLine",
+ (gchar *)"GtkCompletionLine",
sizeof(GtkCompletionLine),
sizeof(GtkCompletionLineClass),
(GtkClassInitFunc)gtk_completion_line_class_init,
@@ -551,10 +552,10 @@ parse_tilda(GtkCompletionLine *object)
{
string text = gtk_entry_get_text(GTK_ENTRY(object));
gint where = (gint)text.find("~");
- if (where != string::npos) {
+ if (where != (gint)string::npos) {
if ((where > 0) && (text[where - 1] != ' '))
return 0;
- if (where < text.size() - 1 && text[where + 1] != '/') {
+ if (where < (gint)text.size() - 1 && text[where + 1] != '/') {
// FIXME: Parse another user's home
} else {
string home = g_get_home_dir();

View file

@ -1,11 +0,0 @@
--- src/gtkcompletionline.h.orig 2003-11-16 10:43:32 UTC
+++ src/gtkcompletionline.h
@@ -76,7 +76,7 @@ extern "C++" {
void (* cancel)(GtkCompletionLine *cl);
};
- guint gtk_completion_line_get_type(void);
+ GtkType gtk_completion_line_get_type(void);
GtkWidget *gtk_completion_line_new();
void gtk_completion_line_last_history_item(GtkCompletionLine*);

View file

@ -1,10 +0,0 @@
--- src/ci_string.h.orig 2019-05-27 11:24:56 UTC
+++ src/ci_string.h
@@ -6,6 +6,7 @@
#ifndef __CI_STRING_H__
#define __CI_STRING_H__
+#include <cstring>
#include <string>
#include <ctype.h>

View file

@ -1,22 +0,0 @@
--- src/main.cc.orig 2003-11-16 10:55:07 UTC
+++ src/main.cc
@@ -541,7 +541,6 @@ int main(int argc, char **argv)
gtk_widget_set_name(win, "Msh_Run_Window");
gtk_window_set_title(GTK_WINDOW(win), "Execute program feat. completion");
gtk_window_set_policy(GTK_WINDOW(win), FALSE, FALSE, TRUE);
- // gtk_window_set_position(GTK_WINDOW(win), GTK_WIN_POS_CENTER);
gtk_container_set_border_width(GTK_CONTAINER(win), 4);
gtk_signal_connect(GTK_OBJECT(win), "destroy",
GTK_SIGNAL_FUNC(gtk_main_quit), NULL);
@@ -653,7 +652,10 @@ int main(int argc, char **argv)
}
else
{
- gtk_widget_set_uposition(win, prefs_left, prefs_top);
+ if ((prefs_top == -1) && (prefs_left == -1))
+ gtk_window_set_position(GTK_WINDOW(win), GTK_WIN_POS_CENTER);
+ else
+ gtk_widget_set_uposition(win, prefs_left, prefs_top);
}
gtk_widget_show(win);

5
x11/gmrun/pkg-plist Normal file
View file

@ -0,0 +1,5 @@
bin/gmrun
@sample etc/gmrunrc.sample
man/man1/gmrun.1.gz
share/applications/gmrun.desktop
share/pixmaps/gmrun.png