From 417db3af33b10edfb07eabb61caf62ec385df136 Mon Sep 17 00:00:00 2001 From: Joe Marcus Clarke Date: Fri, 25 Jul 2003 21:33:26 +0000 Subject: Allow yelp to work when a manpage has been cached into catman. PR: 54808 --- x11/libgnome/Makefile | 1 + .../patch-help-converters_man_gnome-man2html.c | 51 ++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 x11/libgnome/files/patch-help-converters_man_gnome-man2html.c (limited to 'x11/libgnome') diff --git a/x11/libgnome/Makefile b/x11/libgnome/Makefile index 2c7f51cd54e6..6cae8c0fcb08 100644 --- a/x11/libgnome/Makefile +++ b/x11/libgnome/Makefile @@ -7,6 +7,7 @@ PORTNAME= libgnome PORTVERSION= 2.2.3 +PORTREVISION= 1 CATEGORIES?= x11 gnome MASTER_SITES= ${MASTER_SITE_GNOME} MASTER_SITE_SUBDIR= sources/${PORTNAME}/2.2 diff --git a/x11/libgnome/files/patch-help-converters_man_gnome-man2html.c b/x11/libgnome/files/patch-help-converters_man_gnome-man2html.c new file mode 100644 index 000000000000..cdfbd7ca485f --- /dev/null +++ b/x11/libgnome/files/patch-help-converters_man_gnome-man2html.c @@ -0,0 +1,51 @@ +--- help-converters/man/gnome-man2html.c.orig Thu Jul 24 14:06:36 2003 ++++ help-converters/man/gnome-man2html.c Thu Jul 24 14:06:06 2003 +@@ -129,6 +129,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -3727,6 +3728,9 @@ + main(int argc, char **argv) + { + char *t=NULL; ++#ifdef __FreeBSD__ ++ char *source=NULL; ++#endif + int i,len; + char *buf; + char *h = '\0'; +@@ -3845,6 +3849,20 @@ + * right. + */ + ++#ifdef __FreeBSD__ ++ if ((source = strstr(output, "source: ")) != NULL) ++ { ++ int j; ++ for(i = 8, j = 0; i < strlen(source); i++) ++ { ++ if (!g_ascii_isspace((unsigned char)source[i]) && source[i] != ')') ++ { ++ output[j++] = source[i]; ++ } ++ } ++ output[j] = '\0'; ++ } ++#else + len = strlen(output); + for(i = 0; i < len; i++) + { +@@ -3855,8 +3873,7 @@ + i = strlen(output) - 1; + while (g_ascii_isspace((unsigned char)output[i])) + output[i--] = '\0'; +- +- ++#endif + if (output[0]) { + #ifdef HAVE_LIBBZ2 + if(strstr(output,".bz2")) -- cgit v1.2.3