I've managed to make ports/textproc/urlview work not just with extended regular expressions, but with PCRE. Please, take a look at attached port directory patch (it adds CFLAGS/LDFLAGS to Makefile and a string to files/patch-urlview.c). If patch is Ok, please, commit this changes. Thanx in advance. Fix: See the patch attached. Patch attached with submission follows:
Maintainer of textproc/urlview, Please note that PR ports/182853 has just been submitted. If it contains a patch for an upgrade, an enhancement or a bug fix you agree on, reply to this email stating that you approve the patch and a committer will take care of it. The full text of the PR can be found at: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/182853 -- Edwin Groothuis via the GNATS Auto Assign Tool edwin@FreeBSD.org
State Changed From-To: open->feedback Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
I updated the patch to support stage, and incorporated the change from http://www.freebsd.org/cgi/query-pr.cgi?pr=180681 The port builds and installs on ia64 and amd64, both current, but fails configure on redports: On my boxes: checking whether the C compiler (cc -O2 -pipe -I/usr/local/include -Wall -fno-strict-aliasing -L/usr/local/lib -lpcreposix -lpcre) works... yes On redports, any platform: checking whether the C compiler (cc -O2 -pipe -I/usr/local/include -Wall -fno-strict-aliasing -L/usr/local/lib -lpcreposix -lpcre) works... no I don't know what the reason for this is. I asked in ports@ and got no reply. Another issue is that staging Q/A gives this error: ====> Running Q/A tests Error: /usr/ports/textproc/urlview/work/stage/usr/local/bin/urlview is referring to /usr/ports/textproc/urlview/work/stage # Again, I asked in ports and got no reply. Can the PR submitter please try the new patch and report back. Index: Makefile =================================================================== --- Makefile (revision 330472) +++ Makefile (working copy) @@ -16,18 +16,20 @@ COMMENT= URL extractor/launcher GNU_CONFIGURE= yes -MAN1= urlview.1 PLIST_FILES= bin/urlview \ - etc/urlview.conf.sample + etc/urlview.conf.sample \ + man/man1/urlview.1.gz -NO_STAGE= yes +CFLAGS+= -I${LOCALBASE}/include -Wall +LDFLAGS+= -L${LOCALBASE}/lib -lpcreposix -lpcre + post-patch: - @${REINPLACE_CMD} -e 's,/etc,${PREFIX}&,' \ + @${REINPLACE_CMD} -e 's,/etc,${STAGEDIR}${PREFIX}&,' \ -e 's/url_handler.sh/firefox/' \ ${WRKSRC}/* post-install: ${INSTALL_DATA} ${WRKSRC}/sample.urlview \ - ${PREFIX}/etc/urlview.conf.sample + ${STAGEDIR}${PREFIX}/etc/urlview.conf.sample .include <bsd.port.mk> Index: files/patch-Makefile.in =================================================================== --- files/patch-Makefile.in (revision 0) +++ files/patch-Makefile.in (working copy) @@ -0,0 +1,11 @@ +--- Makefile.in.orig 2013-10-15 17:01:57.000000000 +0100 ++++ Makefile.in 2013-10-15 17:02:06.000000000 +0100 +@@ -318,7 +318,7 @@ + + + install-data-local: +- $(INSTALL_DATA) urlview.man $(mandir)/man1/urlview.1 ++ $(INSTALL_DATA) urlview.man $(DESTDIR)$(mandir)/man1/urlview.1 + + # how to create a target for uninstall-data-local??? + Property changes on: files/patch-Makefile.in ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: files/patch-urlview.c =================================================================== --- files/patch-urlview.c (revision 330472) +++ files/patch-urlview.c (working copy) @@ -1,6 +1,12 @@ ---- urlview.c.orig Wed Nov 9 15:34:39 2005 -+++ urlview.c Wed Nov 9 15:35:06 2005 -@@ -46,6 +46,8 @@ +--- urlview.c.orig 2000-07-04 11:14:30.000000000 +0100 ++++ urlview.c 2013-10-16 16:06:40.000000000 +0100 +@@ -41,13 +41,15 @@ + #include <sys/stat.h> + + #ifdef HAVE_REGEX_H +-#include <regex.h> ++#include <pcreposix.h> + #else #include <rx/rxposix.h> #endif @@ -7,5 +13,17 @@ +#include "quote.h" + #define DEFAULT_REGEXP "(((https?|ftp|gopher)://|(mailto|file|news):)[^' \t<>\"]+|(www|web|w3)\\.[-a-z0-9.]+)[^' \t.,;<>\"\\):]" - #define DEFAULT_COMMAND "url_handler.sh %s" - #define SYSTEM_INITFILE "/usr/local/etc/urlview.conf" +-#define DEFAULT_COMMAND "url_handler.sh %s" ++#define DEFAULT_COMMAND "firefox %s" + #define SYSTEM_INITFILE "/etc/urlview.conf" + + #define OFFSET 2 +@@ -61,7 +63,7 @@ + MOTION + }; + +-extern int mutt_enter_string (unsigned char *buf, size_t buflen, int y, int x, ++extern int mutt_enter_string (char *buf, size_t buflen, int y, int x, + int flags); + + void search_forward (char *search, int urlcount, char **url, int *redraw, int *current, int *top)
Michael Elkins maintains the upstream: https://github.com/sigpipe/urlview He is happy to take patches. I merged one chunk with the upstread already. Perhaps the submitter wants to communicate with upstream directly.
Hello! Anton, I've tried your patch, but got this error: #> patch < /tmp/yz/urlview.patch Hmm... Looks like a unified diff to me... The text leading up to this was: -------------------------- |Index: Makefile |=================================================================== |--- Makefile (revision 330472) |+++ Makefile (working copy) -------------------------- Patching file Makefile using Plan A... patch: **** malformed patch at line 6: COMMENT= URL extractor/launcher Should I use some special command-line args for `patch'? Also I joined issue that you had opened at github for urlview, but unfortunately I'm not good at making patches for configure scripts =( -- George L. Yermulnik [YZ-RIPE]
I just added new maintainer to the PR. Zsolt, Please evaluate this PR and see if it's still valid, if urlview needs patches, or what. Let's try to close this PR. John
Thanks John for attention! I've checked this patch but I don't know why should use pcre. This program is very simple and doesn't need complicated regular expression. So my question (to yz): what are the benefits of using pcre instead of the system-based 'regex'?
I'll reject the proposal based on maintainer's comments. If yz comes back with a good argument, he is free to reopen this PR and we can discuss it some more.
It seems a good solution. If yz doesn't reflect I think the support of pcre can reject. Thanks, John!