From 04bf41d99694a150f91f4e1be152a70e30a11f39 Mon Sep 17 00:00:00 2001 From: landry Date: Mon, 21 Jan 2019 20:13:44 +0000 Subject: [PATCH] Update to beaver 0.4.1 --- editors/beaver/Makefile | 39 ++++----------- editors/beaver/distinfo | 4 +- editors/beaver/patches/patch-src_conf_c | 12 ----- editors/beaver/patches/patch-src_editor_c | 51 ++++++++------------ editors/beaver/patches/patch-src_interface_c | 24 --------- editors/beaver/pkg/PLIST | 37 +++++++++++--- 6 files changed, 62 insertions(+), 105 deletions(-) delete mode 100644 editors/beaver/patches/patch-src_conf_c delete mode 100644 editors/beaver/patches/patch-src_interface_c diff --git a/editors/beaver/Makefile b/editors/beaver/Makefile index 7b9d23b5644..f472621de4f 100644 --- a/editors/beaver/Makefile +++ b/editors/beaver/Makefile @@ -1,16 +1,13 @@ -# $OpenBSD: Makefile,v 1.33 2018/06/27 21:03:41 espie Exp $ +# $OpenBSD: Makefile,v 1.34 2019/01/21 20:13:44 landry Exp $ COMMENT= lightweight Gtk text editor with syntax highlighting -DISTNAME= beaver0_3_0_1 -PKGNAME= beaver-0.3.0.1 +DISTNAME= beaver-0.4.1 CATEGORIES= editors -REVISION= 11 - HOMEPAGE= http://beaver-editor.sourceforge.net/ MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=beaver-editor/} -EXTRACT_SUFX= .tgz +EXTRACT_SUFX = .tar.bz2 # GPLv2 PERMIT_PACKAGE_CDROM= Yes @@ -19,32 +16,14 @@ WANTLIB= X11 Xcomposite Xcursor Xdamage Xext Xfixes Xi Xinerama Xrandr WANTLIB+= Xrender atk-1.0 c cairo fontconfig freetype gdk-x11-2.0 WANTLIB+= gdk_pixbuf-2.0 gio-2.0 glib-2.0 gobject-2.0 gtk-x11-2.0 iconv WANTLIB+= intl m pango-1.0 pangocairo-1.0 pangoft2-1.0 pthread z +WANTLIB += expat ffi fribidi gmodule-2.0 graphite2 gthread-2.0 +WANTLIB += harfbuzz pcre pixman-1 png xcb xcb-render xcb-shm LIB_DEPENDS= x11/gtk+2 -RUN_DEPENDS= devel/desktop-file-utils - -USE_GMAKE= Yes -MAKE_FLAGS= CC="${CC}" OPTI="${CFLAGS}" - -WRKSRC= ${WRKDIST}/src - -NO_TEST= Yes - -pre-configure: - ${SUBST_CMD} ${WRKSRC}/interface.c - -do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/beaver \ - ${PREFIX}/bin/beaver - ${INSTALL_DATA} ${WRKDIST}/beaver.1x \ - ${PREFIX}/man/man1/beaver.1 - ${INSTALL_DATA_DIR} ${PREFIX}/share/beaver/pixmaps - ${INSTALL_DATA_DIR} ${PREFIX}/share/beaver/bl - @cd ${WRKDIST}; ${INSTALL_DATA} ${WRKDIST}/bl/* \ - ${PREFIX}/share/beaver/bl - ${INSTALL_DATA} ${WRKDIST}/pixmaps/* ${PREFIX}/share/beaver/pixmaps/ - ${INSTALL_DATA_DIR} ${PREFIX}/share/applications/ - ${INSTALL_DATA} ${WRKDIST}/beaver.desktop ${PREFIX}/share/applications/ +RUN_DEPENDS= devel/desktop-file-utils \ + x11/gtk+3,-guic +BUILD_DEPENDS = devel/gettext-tools +CONFIGURE_STYLE = gnu .include diff --git a/editors/beaver/distinfo b/editors/beaver/distinfo index 630a22c1afd..077276cd478 100644 --- a/editors/beaver/distinfo +++ b/editors/beaver/distinfo @@ -1,2 +1,2 @@ -SHA256 (beaver0_3_0_1.tgz) = BnMGoQVbJgTDCQYP7UUiRusJPpPf42Ycl8dyi4yUzQo= -SIZE (beaver0_3_0_1.tgz) = 142255 +SHA256 (beaver-0.4.1.tar.bz2) = hEoyelny3iHkjlUXbUUgcDaDfwiTXDNB6pY9xioVMeM= +SIZE (beaver-0.4.1.tar.bz2) = 436321 diff --git a/editors/beaver/patches/patch-src_conf_c b/editors/beaver/patches/patch-src_conf_c deleted file mode 100644 index 21635ffee83..00000000000 --- a/editors/beaver/patches/patch-src_conf_c +++ /dev/null @@ -1,12 +0,0 @@ -$OpenBSD: patch-src_conf_c,v 1.1 2005/08/30 20:32:52 alek Exp $ ---- src/conf.c.orig Sat Aug 27 22:54:54 2005 -+++ src/conf.c Sat Aug 27 22:54:27 2005 -@@ -157,7 +157,7 @@ gint get_conf(gchar *key, t_conf *conf) - for (i = 0; conf->file_content[i]; i++) - for (j = 0; conf->file_content[i][j]; j++) - if (conf->file_content[i][j] == COMMENT && -- (conf->file_content[i][j - 1] != '\\' || !j)) -+ (!j || conf->file_content[i][j - 1] != '\\')) - { - conf->file_content[i][j] = '\0'; - break; diff --git a/editors/beaver/patches/patch-src_editor_c b/editors/beaver/patches/patch-src_editor_c index cee20f262ea..5f247d023eb 100644 --- a/editors/beaver/patches/patch-src_editor_c +++ b/editors/beaver/patches/patch-src_editor_c @@ -1,39 +1,30 @@ -$OpenBSD: patch-src_editor_c,v 1.1 2017/04/25 21:45:02 jca Exp $ ---- src/editor.c.orig Tue Apr 25 23:35:58 2017 -+++ src/editor.c Tue Apr 25 23:37:17 2017 -@@ -404,7 +404,7 @@ extern void refresh_editor(GtkWidget *Editor, gint to - /* preconditions: iter points to possible start of interesting word - postconditions: end is set to the end of the word in the buffer if it was found. - if word found, returns TRUE, else FALSE*/ --inline gboolean starts_string (gchar *text, gint i, gchar *word, gint *end) -+static inline gboolean starts_string (gchar *text, gint i, gchar *word, gint *end) - { - gunichar ch; - gunichar k; -@@ -438,7 +438,7 @@ inline gboolean starts_string (gchar *text, gint i, gc - - - /* returns color index of match, or -1 if none */ --inline gint is_matching_keyword (gint Lg, const gchar *str) -+static inline gint is_matching_keyword (gint Lg, const gchar *str) - { - gint rv = -1; - gpointer val; -@@ -454,7 +454,7 @@ inline gint is_matching_keyword (gint Lg, const gchar +$OpenBSD: patch-src_editor_c,v 1.2 2019/01/21 20:13:44 landry Exp $ + +/usr/bin/ld: error: undefined symbol: search_for_keyword_fastly +>>> referenced by editor.c +>>> beaver-editor.o:(markup_syhi_range) +/usr/bin/ld: error: undefined symbol: refresh_markers +>>> referenced by editor.c +>>> beaver-editor.o:(markup_syhi_range) + +Index: src/editor.c +--- src/editor.c.orig ++++ src/editor.c +@@ -537,7 +537,7 @@ inline gint is_matching_keyword (gint Lg, const gchar } --inline void refresh_markers (GtkTextBuffer *Buffer) -+static inline void refresh_markers (GtkTextBuffer *Buffer) +-inline void refresh_markers (GtkTextBuffer * Buffer) ++void refresh_markers (GtkTextBuffer * Buffer) { gint CurrentPage; gint Lg; -@@ -780,7 +780,7 @@ void search_for_keyword_correctly (gint page, GtkTextB - } +@@ -894,7 +894,7 @@ void search_for_keyword_correctly (gint page, GtkTextB + END_FCN} --inline void search_for_keyword_fastly (gint page, GtkTextBuffer *Buffer, gchar *text, gint *i, gint offset, gint Lg) -+static inline void search_for_keyword_fastly (gint page, GtkTextBuffer *Buffer, gchar *text, gint *i, gint offset, gint Lg) +-inline void search_for_keyword_fastly (gint page, GtkTextBuffer * Buffer, ++void search_for_keyword_fastly (gint page, GtkTextBuffer * Buffer, + gchar * text, gint * i, gint offset, + gint Lg) { - /* search for a keyword */ - gint tmp, next; diff --git a/editors/beaver/patches/patch-src_interface_c b/editors/beaver/patches/patch-src_interface_c deleted file mode 100644 index ab4b6b62620..00000000000 --- a/editors/beaver/patches/patch-src_interface_c +++ /dev/null @@ -1,24 +0,0 @@ -$OpenBSD: patch-src_interface_c,v 1.1 2008/09/16 20:00:18 jasper Exp $ - -Correct paths to pixmap files. - ---- src/interface.c.orig Tue Sep 16 21:52:26 2008 -+++ src/interface.c Tue Sep 16 21:55:47 2008 -@@ -1166,7 +1166,7 @@ void interface (gint argc, gchar *argv[]) - gtk_set_locale(); - gtk_init (&argc, &argv); - Settings = init_settings (); -- gtk_window_set_default_icon_from_file("../pixmaps/beaver.png", NULL); // set beaver icon for all windows in Beaver -+ gtk_window_set_default_icon_from_file("${PREFIX}/share/beaver/pixmaps/beaver.png", NULL); // set beaver icon for all windows in Beaver - MainWindow = gtk_window_new (GTK_WINDOW_TOPLEVEL); - gtk_window_set_policy (GTK_WINDOW(MainWindow), TRUE, TRUE, FALSE); - gtk_window_set_default_size (GTK_WINDOW (MainWindow), MAIN_WINDOW_WIDTH, MAIN_WINDOW_HEIGHT); -@@ -1265,7 +1265,7 @@ void about (void) - { - const char *AUTHORS[] = {"Damien Terrier", "Marc Bevand", "Emmanuel Turquin", "Michael Terry", "Leslie Polzer", "Trevor Brown", "Double 12", "Tobias Heinzen", NULL}; - const char *ARTISTS[] = {"Tigert (logo)", "Remy Turquin (website logo)", NULL}; -- GdkPixbuf *logo = gdk_pixbuf_new_from_file ("../pixmaps/about.xpm", NULL); -+ GdkPixbuf *logo = gdk_pixbuf_new_from_file ("${PREFIX}/share/beaver/pixmaps/about.xpm", NULL); - GtkWidget *AboutWindow = g_object_new (GTK_TYPE_ABOUT_DIALOG, - "name", APP_NAME, - "version", VERSION_NUMBER, diff --git a/editors/beaver/pkg/PLIST b/editors/beaver/pkg/PLIST index 5bbf8a0620f..4eb7d7cf6c3 100644 --- a/editors/beaver/pkg/PLIST +++ b/editors/beaver/pkg/PLIST @@ -1,14 +1,37 @@ -@comment $OpenBSD: PLIST,v 1.5 2018/06/27 21:03:41 espie Exp $ +@comment $OpenBSD: PLIST,v 1.6 2019/01/21 20:13:44 landry Exp $ @bin bin/beaver +include/beaver.h +lib/beaver/ +lib/beaver/plugins/ +lib/beaver/plugins/ascii.a +lib/beaver/plugins/ascii.la +lib/beaver/plugins/ascii.so +lib/beaver/plugins/sample.a +lib/beaver/plugins/sample.la +lib/beaver/plugins/sample.so +lib/beaver/plugins/tools.a +lib/beaver/plugins/tools.la +lib/beaver/plugins/tools.so @man man/man1/beaver.1 share/applications/beaver.desktop share/beaver/ -share/beaver/bl/ -share/beaver/bl/example1.bl -share/beaver/bl/example2.bl -share/beaver/bl/glib.bl share/beaver/pixmaps/ share/beaver/pixmaps/about.xpm -share/beaver/pixmaps/beaver.png -share/beaver/pixmaps/stock_about.xpm +share/beaver/pixmaps/beaver-old.png +share/beaver/pixmaps/beaver-project-icon.svg +share/beaver/pixmaps/beaver-project-icon_16.svg +share/beaver/pixmaps/beaver-project-icon_22.svg +share/beaver/pixmaps/beaver-project-icon_32.svg +share/beaver/pixmaps/beaver-project-icon_48.svg +share/beaver/resource/ +share/beaver/resource/beaver.conf.default +share/beaver/resource/standard.xml +share/beaver/resource/wordfile.default +share/icons/hicolor/16x16/apps/beaver.png +share/icons/hicolor/22x22/apps/beaver.png +share/icons/hicolor/32x32/apps/beaver.png +share/icons/hicolor/48x48/apps/beaver.png +share/pixmaps/ +share/pixmaps/beaver.png @tag update-desktop-database +@tag gtk-update-icon-cache %D/share/icons/hicolor