View | Details | Raw Unified | Return to bug 166745 | Differences between
and this patch

Collapse All | Expand All

(-)./Makefile (-13 / +8 lines)
Lines 5-11 Link Here
5
# $FreeBSD: ports/graphics/mupdf/Makefile,v 1.18 2011/09/17 16:22:07 dhn Exp $
5
# $FreeBSD: ports/graphics/mupdf/Makefile,v 1.18 2011/09/17 16:22:07 dhn Exp $
6
6
7
PORTNAME=	mupdf
7
PORTNAME=	mupdf
8
PORTVERSION=	0.9
8
DISTVERSION=	1.0rc1
9
PORTEPOCH=	1
9
PORTEPOCH=	1
10
CATEGORIES=	graphics
10
CATEGORIES=	graphics
11
MASTER_SITES=	GOOGLE_CODE \
11
MASTER_SITES=	GOOGLE_CODE \
Lines 21-33 Link Here
21
LIB_DEPENDS=	freetype.9:${PORTSDIR}/print/freetype2 \
21
LIB_DEPENDS=	freetype.9:${PORTSDIR}/print/freetype2 \
22
		jpeg.11:${PORTSDIR}/graphics/jpeg \
22
		jpeg.11:${PORTSDIR}/graphics/jpeg \
23
		jbig2dec.0:${PORTSDIR}/graphics/jbig2dec \
23
		jbig2dec.0:${PORTSDIR}/graphics/jbig2dec \
24
		openjpeg.2:${PORTSDIR}/graphics/openjpeg
24
		openjpeg.1:${PORTSDIR}/graphics/openjpeg
25
25
26
USE_GMAKE=	yes
26
USE_GMAKE=	yes
27
MAKE_ARGS+=	build=release prefix=${PREFIX} verbose=1 mandir=${PREFIX}/man
27
MAKE_ARGS+=	build=release prefix=${PREFIX} verbose=1 mandir=${PREFIX}/man
28
USE_XORG=	x11 xext
28
USE_XORG=	x11 xext
29
USE_GNOME=	pkgconfig
29
USE_GNOME=	pkgconfig
30
MAN1=		mupdf.1 mu_pdfclean.1 mu_pdfdraw.1 mu_pdfshow.1
30
MAN1=		mupdf.1 mupdfclean.1 mudraw.1 mupdfshow.1
31
31
32
MAKE_JOBS_SAFE=	yes
32
MAKE_JOBS_SAFE=	yes
33
33
Lines 35-42 Link Here
35
35
36
.include <bsd.port.options.mk>
36
.include <bsd.port.options.mk>
37
37
38
.if ${ARCH} == "amd64" || ${ARCH} == "i386"
38
.if ${CC:T:Mclang} == "clang"
39
CFLAGS+=	-mfpmath=sse
39
CFLAGS+=	-no-integrated-as
40
.elif ${ARCH} == "amd64" || ${ARCH} == "i386"
41
CFLAGS+=	-mfpmath=sse 
40
.endif
42
.endif
41
43
42
.if defined(WITH_SCROLL)
44
.if defined(WITH_SCROLL)
Lines 45-66 Link Here
45
47
46
post-patch:	.SILENT
48
post-patch:	.SILENT
47
	${REINPLACE_CMD} \
49
	${REINPLACE_CMD} \
48
		-e 's#\(PDF_APPS :=.*/\)#\1mu_#' \
49
		-e 's#\(XPS_APPS :=.*/\)#\1mu_#' \
50
		-e 's#\(MUPDF) :.*/\)#\1mu_#' \
51
		-e 's#\(OUT)/\).*: apps/#\1mu_%.o : apps/#' \
52
		-e '/install:/,/^$$/ { /-d/d; }' \
50
		-e '/install:/,/^$$/ { /-d/d; }' \
53
		-e '/install.*bindir)$$/s/install/$$(BSD_INSTALL_PROGRAM)/' \
51
		-e '/install.*bindir)$$/s/install/$$(BSD_INSTALL_PROGRAM)/' \
54
		-e '/install.*libdir)$$/s/install/$$(BSD_INSTALL_LIB)/' \
52
		-e '/install.*libdir)$$/s/install/$$(BSD_INSTALL_LIB)/' \
55
		-e '/install.*incdir)$$/s/install/$$(BSD_INSTALL_DATA)/' \
53
		-e '/install.*incdir)$$/s/install/$$(BSD_INSTALL_DATA)/' \
56
		-e '/install.*man1$$/s/install/$$(BSD_INSTALL_MAN)/' \
54
		-e '/install.*man1$$/s/install/$$(BSD_INSTALL_MAN)/' \
57
		${WRKSRC}/Makefile
55
		${WRKSRC}/Makefile
58
	${REINPLACE_CMD} -e 's/-O2//' \
56
	${REINPLACE_CMD} -e 's/-pipe -O2 //' \
59
		-e 's|/usr/local|${LOCALBASE}|' \
57
		-e 's|/usr/local|${LOCALBASE}|' \
60
		${WRKSRC}/Makerules
58
		${WRKSRC}/Makerules
61
59
62
pre-install:	.SILENT
63
	${FIND} ${WRKSRC} -name pdf\*.1 -exec ${SH} -c 'mv {} $$(dirname {})/mu_$$(basename {})' \;
64
65
.include <bsd.port.pre.mk>
60
.include <bsd.port.pre.mk>
66
.include <bsd.port.post.mk>
61
.include <bsd.port.post.mk>
(-)./distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (mupdf-0.9-source.tar.gz) = abed825cb1d73e0e28f0a7ee72b5d7a451ba41d21b0c55837ed2a212f3b16b2d
1
SHA256 (mupdf-1.0rc1-source.tar.gz) = 1676f6df404edc3fb965d48ad885e27dd05fbeca6ba62dac7118baba62c0af39
2
SIZE (mupdf-0.9-source.tar.gz) = 3917075
2
SIZE (mupdf-1.0rc1-source.tar.gz) = 4262574
(-)./files/patch-apps_x11_main.c (-24 / +4 lines)
Lines 1-18 Link Here
1
--- apps/x11_main.c.orig	2011-04-29 14:06:09.000000000 -0500
1
--- apps/x11_main.c.orig	2012-03-29 05:46:53.000000000 -0500
2
+++ apps/x11_main.c	2011-06-11 02:15:12.203411543 -0500
2
+++ apps/x11_main.c	2012-04-07 14:37:40.754315181 -0500
3
@@ -482,9 +482,7 @@ void winreloadfile(pdfapp_t *app)
3
@@ -602,6 +602,24 @@ static void usage(void)
4
 
4
 	exit(1);
5
 void winopenuri(pdfapp_t *app, char *buf)
6
 {
7
-	char *browser = getenv("BROWSER");
8
-	if (!browser)
9
-		browser = "open";
10
+	char browser[] = "xdg-open";
11
 	if (fork() == 0)
12
 		execlp(browser, browser, buf, (char*)0);
13
 }
14
@@ -563,6 +561,24 @@ static void winresettmo(struct timeval *
15
 	tmo_at->tv_usec = 0;
16
 }
5
 }
17
 
6
 
18
+/* reference:
7
+/* reference:
Lines 36-47 Link Here
36
 int main(int argc, char **argv)
25
 int main(int argc, char **argv)
37
 {
26
 {
38
 	int c;
27
 	int c;
39
@@ -571,7 +587,7 @@ int main(int argc, char **argv)
40
 	KeySym keysym;
41
 	int oldx = 0;
42
 	int oldy = 0;
43
-	int resolution = 72;
44
+	int resolution = get_dpi();
45
 	int pageno = 1;
46
 	int wasshowingpage;
47
 	struct timeval tmo, tmo_at;
(-)./files/scroll_hack-apps_pdfapp.c (-13 / +14 lines)
Lines 1-22 Link Here
1
--- apps/pdfapp.c.orig	2011-04-29 14:06:09.000000000 -0500
1
--- apps/pdfapp.c.orig	2012-03-29 05:46:53.000000000 -0500
2
+++ apps/pdfapp.c	2011-05-16 19:58:55.650380651 -0500
2
+++ apps/pdfapp.c	2012-04-07 16:43:55.030462608 -0500
3
@@ -777,11 +777,15 @@ void pdfapp_onkey(pdfapp_t *app, int c)
3
@@ -774,11 +774,15 @@ void pdfapp_onkey(pdfapp_t *app, int c)
4
 		break;
4
 		break;
5
 
5
 
6
 	case 'j':
6
 	case 'j':
7
+		if (app->pany + app->image->h <= app->winh)
7
+ 		if (app->pany + fz_pixmap_height(app->ctx, app->image) <= app->winh)
8
+			goto pagedown;
8
+ 			goto pagedown;
9
 		app->pany -= app->image->h / 10;
9
 		app->pany -= fz_pixmap_height(app->ctx, app->image) / 10;
10
 		pdfapp_showpage(app, 0, 0, 1);
10
 		pdfapp_showpage(app, 0, 0, 1);
11
 		break;
11
 		break;
12
 
12
 
13
 	case 'k':
13
 	case 'k':
14
+		if (app->pany >= 0)
14
+ 		if (app->pany >= 0)
15
+			goto pageup;
15
+ 			goto pageup;
16
 		app->pany += app->image->h / 10;
16
 		app->pany += fz_pixmap_height(app->ctx, app->image) / 10;
17
 		pdfapp_showpage(app, 0, 0, 1);
17
 		pdfapp_showpage(app, 0, 0, 1);
18
 		break;
18
 		break;
19
@@ -843,6 +847,7 @@ void pdfapp_onkey(pdfapp_t *app, int c)
19
@@ -842,6 +846,7 @@ void pdfapp_onkey(pdfapp_t *app, int c)
20
 	 */
20
 	 */
21
 
21
 
22
 	case ',':
22
 	case ',':
Lines 24-30 Link Here
24
 		panto = PAN_TO_BOTTOM;
24
 		panto = PAN_TO_BOTTOM;
25
 		if (app->numberlen > 0)
25
 		if (app->numberlen > 0)
26
 			app->pageno -= atoi(app->number);
26
 			app->pageno -= atoi(app->number);
27
@@ -851,6 +856,7 @@ void pdfapp_onkey(pdfapp_t *app, int c)
27
@@ -850,6 +855,7 @@ void pdfapp_onkey(pdfapp_t *app, int c)
28
 		break;
28
 		break;
29
 
29
 
30
 	case '.':
30
 	case '.':
Lines 32-42 Link Here
32
 		panto = PAN_TO_TOP;
32
 		panto = PAN_TO_TOP;
33
 		if (app->numberlen > 0)
33
 		if (app->numberlen > 0)
34
 			app->pageno += atoi(app->number);
34
 			app->pageno += atoi(app->number);
35
@@ -1022,6 +1028,11 @@ void pdfapp_onmouse(pdfapp_t *app, int x
35
@@ -1039,6 +1045,12 @@ void pdfapp_onmouse(pdfapp_t *app, int x
36
 				int isx = (modifiers & (1<<0));
36
 				int isx = (modifiers & (1<<0));
37
 				int xstep = isx ? 20 * dir : 0;
37
 				int xstep = isx ? 20 * dir : 0;
38
 				int ystep = !isx ? 20 * dir : 0;
38
 				int ystep = !isx ? 20 * dir : 0;
39
+				if (!isx && dir < 0 && app->pany + app->image->h <= app->winh)
39
+				if (!isx && dir < 0 && app->pany +
40
+				    fz_pixmap_height(app->ctx, app->image) <= app->winh)
40
+					pdfapp_onkey(app, 'j');
41
+					pdfapp_onkey(app, 'j');
41
+				else if (!isx && dir > 0 && app->pany >= 0)
42
+				else if (!isx && dir > 0 && app->pany >= 0)
42
+					pdfapp_onkey(app, 'k');
43
+					pdfapp_onkey(app, 'k');
(-)./pkg-plist (-8 / +7 lines)
Lines 1-13 Link Here
1
bin/mupdf
1
bin/mupdf
2
bin/mu_pdfclean
2
bin/mupdfclean
3
bin/mu_pdfdraw
3
bin/mudraw
4
bin/mu_pdfextract
4
bin/mupdfextract
5
bin/mu_pdfinfo
5
bin/mupdfinfo
6
bin/mu_pdfshow
6
bin/mupdfshow
7
bin/mu_xpsdraw
8
include/fitz.h
7
include/fitz.h
8
include/memento.h
9
include/mucbz.h
9
include/mupdf.h
10
include/mupdf.h
10
include/muxps.h
11
include/muxps.h
11
lib/libfitz.a
12
lib/libfitz.a
12
lib/libmupdf.a
13
lib/libmuxps.a

Return to bug 166745