Date: Sat, 11 Jun 2011 02:24:05 -0500 From: Zhihao Yuan <lichray@gmail.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/157756: graphics/mupdf: makes use of xdg-open instead of $BROWSER Message-ID: <4df31819.c4342b0a.379b.ffff8ac3@mx.google.com> Resent-Message-ID: <201106110730.p5B7UAXW009438@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 157756 >Category: ports >Synopsis: graphics/mupdf: makes use of xdg-open instead of $BROWSER >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Sat Jun 11 07:30:10 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Zhihao Yuan >Release: FreeBSD 8.2-STABLE amd64 >Organization: Northern Illinois University >Environment: System: FreeBSD compaq.yuetime 8.2-STABLE FreeBSD 8.2-STABLE #0 r222763: Mon Jun 6 13:13:53 CDT 2011 lichray@compaq.yuetime:/usr/obj/home/lichray/devel/freebsd-stable/sys/HOUKAGO amd64 >Description: When opening a URI in PDF, mupdf tries $BROWSER first, which is so decent; then tries the "open" command, which is wrong. >How-To-Repeat: >Fix: My patch only uses xdg-open. It will obeys the freedesktop standard, and tries $BROWSER as an fallback. --- mupdf_2.patch begins here --- diff -ruN --exclude=CVS /usr/ports/graphics/mupdf.orig/Makefile /usr/ports/graphics/mupdf/Makefile --- /usr/ports/graphics/mupdf.orig/Makefile 2011-05-17 19:25:45.000000000 -0500 +++ /usr/ports/graphics/mupdf/Makefile 2011-06-11 02:10:02.519730447 -0500 @@ -6,7 +6,7 @@ PORTNAME= mupdf PORTVERSION= 0.8.165 -PORTREVISION= 1 +PORTREVISION= 2 PORTEPOCH= 1 CATEGORIES= graphics MASTER_SITES= GOOGLE_CODE \ @@ -20,6 +20,7 @@ jpeg.11:${PORTSDIR}/graphics/jpeg \ jbig2dec.0:${PORTSDIR}/graphics/jbig2dec \ openjpeg.2:${PORTSDIR}/graphics/openjpeg +RUN_DEPENDS= xdg-open:${PORTSDIR}/devel/xdg-utils USE_GMAKE= yes MAKE_ARGS+= build=native prefix=${PREFIX} verbose=1 mandir=${PREFIX}/man diff -ruN --exclude=CVS /usr/ports/graphics/mupdf.orig/files/patch-apps_x11_main.c /usr/ports/graphics/mupdf/files/patch-apps_x11_main.c --- /usr/ports/graphics/mupdf.orig/files/patch-apps_x11_main.c 2011-05-17 19:25:45.000000000 -0500 +++ /usr/ports/graphics/mupdf/files/patch-apps_x11_main.c 2011-06-11 02:15:18.340728757 -0500 @@ -1,6 +1,17 @@ ---- apps/x11_main.c.orig 2011-05-16 23:18:12.046785782 -0500 -+++ apps/x11_main.c 2011-05-16 23:24:55.669305772 -0500 -@@ -563,6 +563,24 @@ static void winresettmo(struct timeval * +--- apps/x11_main.c.orig 2011-04-29 14:06:09.000000000 -0500 ++++ apps/x11_main.c 2011-06-11 02:15:12.203411543 -0500 +@@ -482,9 +482,7 @@ void winreloadfile(pdfapp_t *app) + + void winopenuri(pdfapp_t *app, char *buf) + { +- char *browser = getenv("BROWSER"); +- if (!browser) +- browser = "open"; ++ char browser[] = "xdg-open"; + if (fork() == 0) + execlp(browser, browser, buf, (char*)0); + } +@@ -563,6 +561,24 @@ static void winresettmo(struct timeval * tmo_at->tv_usec = 0; } @@ -25,7 +36,7 @@ int main(int argc, char **argv) { int c; -@@ -571,7 +589,7 @@ int main(int argc, char **argv) +@@ -571,7 +587,7 @@ int main(int argc, char **argv) KeySym keysym; int oldx = 0; int oldy = 0; --- mupdf_2.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4df31819.c4342b0a.379b.ffff8ac3>