diff options
author | hrs <hrs@FreeBSD.org> | 2014-08-22 14:32:10 +0000 |
---|---|---|
committer | hrs <hrs@FreeBSD.org> | 2014-08-22 14:32:10 +0000 |
commit | be6637f7deb80df778d8e3c563113377d7952052 (patch) | |
tree | 487ff85020d4cec050e02cb68621657dcb22cd05 | |
parent | 2d45a056c764a57beafe26de5381854bb8dd8302 (diff) | |
download | FreeBSD-ports-be6637f7deb80df778d8e3c563113377d7952052.zip FreeBSD-ports-be6637f7deb80df778d8e3c563113377d7952052.tar.gz |
Fix bugs which prevented papersize configuration from working.
-rw-r--r-- | print/tex-xdvik/Makefile | 1 | ||||
-rw-r--r-- | print/tex-xdvik/files/patch-texk-xdvik-dvi-init.c | 12 | ||||
-rw-r--r-- | print/tex-xdvik/files/patch-texk-xdvik-main.c | 38 |
3 files changed, 46 insertions, 5 deletions
diff --git a/print/tex-xdvik/Makefile b/print/tex-xdvik/Makefile index 7ea8b31..f7bb63c 100644 --- a/print/tex-xdvik/Makefile +++ b/print/tex-xdvik/Makefile @@ -3,6 +3,7 @@ PORTNAME= xdvik PORTVERSION= 22.87 +PORTREVISION= 1 CATEGORIES= print MASTER_SITES= SF/xdvi/${PORTNAME}/${PORTVERSION} PKGNAMEPREFIX= tex- diff --git a/print/tex-xdvik/files/patch-texk-xdvik-dvi-init.c b/print/tex-xdvik/files/patch-texk-xdvik-dvi-init.c index 75b97b2..42e6a3c 100644 --- a/print/tex-xdvik/files/patch-texk-xdvik-dvi-init.c +++ b/print/tex-xdvik/files/patch-texk-xdvik-dvi-init.c @@ -1,5 +1,5 @@ --- dvi-init.c.orig 2013-04-05 09:14:54.000000000 +0900 -+++ dvi-init.c 2013-05-06 05:13:12.000000000 +0900 ++++ dvi-init.c 2014-08-22 23:26:27.000000000 +0900 @@ -53,6 +53,9 @@ #include "statusline.h" #include "events.h" @@ -26,7 +26,7 @@ if (*arg == '+') { ++arg; ignore_papersize_specials = True; -@@ -884,6 +892,55 @@ +@@ -884,6 +892,57 @@ break; } arg = temp; @@ -38,12 +38,14 @@ + name = systempapername(); + if (name == NULL) + name = defaultpapername(); ++ if (strcmp(name, "libpaper") == 0) ++ name = "a4"; + + strncpy(temp, name, sizeof(temp)); + temp[sizeof(temp) - 1] = '\0'; + } -+ if (strcmp(temp, "letter") != 0 || -+ strcmp(temp, "ledgar") != 0) { ++ if (strcmp(temp, "letter") != 0 && ++ strcmp(temp, "ledger") != 0) { + if (temp[strlen(temp) - 1] == 'r') { + temp[strlen(temp) - 1] = '\0'; + landscape = 1; @@ -82,7 +84,7 @@ /* perform substitutions */ for (p = paper_types; p < paper_types + paper_types_size; p += 2) { if (strcmp(temp, *p) == 0) { -@@ -898,6 +955,7 @@ +@@ -898,6 +957,7 @@ m_paper_unshrunk_h = atopix(arg1 + 1, False); globals.grid_paper_unit = atopixunit(arg); diff --git a/print/tex-xdvik/files/patch-texk-xdvik-main.c b/print/tex-xdvik/files/patch-texk-xdvik-main.c new file mode 100644 index 0000000..9c82084 --- /dev/null +++ b/print/tex-xdvik/files/patch-texk-xdvik-main.c @@ -0,0 +1,38 @@ +--- main.c.orig 2014-04-03 10:17:12.000000000 +0900 ++++ main.c 2014-08-22 23:24:13.000000000 +0900 +@@ -39,6 +39,9 @@ + #include "filehist.h" + #include "mag.h" + #include "message-window.h" ++#ifdef HAVE_LIBPAPER ++#include <paper.h> ++#endif + + #if FREETYPE + # include <ft2build.h> +@@ -651,8 +654,16 @@ + + /* paper type */ + if (!set_paper_type(resource.paper)) { +- const char **p; + char *helpmsg = xstrdup("Possible paper types are:\n "); ++#ifdef HAVE_LIBPAPER ++ const struct paper *pp; ++ ++ for (pp = paperfirst(); pp; pp = papernext(pp)) { ++ helpmsg = xstrcat(helpmsg, papername(pp)); ++ helpmsg = xstrcat(helpmsg, " "); ++ } ++#else ++ const char **p; + const char **paper_types = get_paper_types(); + for (p = paper_types; p < paper_types + get_paper_types_size(); p += 2) { + if (**p == '\0') { /* next line of list */ +@@ -663,6 +674,7 @@ + helpmsg = xstrcat(helpmsg, " "); + } + } ++#endif + helpmsg = xstrcat(helpmsg, + "\n(the names ending with `r' are `rotated' or `landscape' variants).\n" + "Alternatively, you can specify the dimensions as `WIDTHxHEIGHT', followed " |