diff options
author | Hiroki Sato <hrs@FreeBSD.org> | 2013-05-06 00:44:22 +0000 |
---|---|---|
committer | Hiroki Sato <hrs@FreeBSD.org> | 2013-05-06 00:44:22 +0000 |
commit | 139838ce1dace9d35cb8d660e6e591b3fb19f34e (patch) | |
tree | f024a0631ef42d4f33ad0f86f2ce804fa502b489 /print/tex-xdvik/files | |
parent | dcfbe93e784be574a4e36ce62babbb56db7918d3 (diff) |
Notes
Diffstat (limited to 'print/tex-xdvik/files')
-rw-r--r-- | print/tex-xdvik/files/patch-texk-xdvik-Makefile.in | 25 | ||||
-rw-r--r-- | print/tex-xdvik/files/patch-texk-xdvik-dvi-init.c | 92 | ||||
-rw-r--r-- | print/tex-xdvik/files/patch-texk-xdvik-texmf-XDvi | 11 |
3 files changed, 128 insertions, 0 deletions
diff --git a/print/tex-xdvik/files/patch-texk-xdvik-Makefile.in b/print/tex-xdvik/files/patch-texk-xdvik-Makefile.in new file mode 100644 index 000000000000..eaef792ef40b --- /dev/null +++ b/print/tex-xdvik/files/patch-texk-xdvik-Makefile.in @@ -0,0 +1,25 @@ +--- Makefile.in.orig 2013-04-03 11:30:04.000000000 +0900 ++++ Makefile.in 2013-05-06 04:17:09.000000000 +0900 +@@ -472,7 +472,7 @@ + x_extra_libs = $(X_EXTRA_LIBS) $(iconv_libs) + xdvi_x_libs = $(x_ldflags) $(x_tool_libs) $(x_xmu_lib) -lXt \ + $(X_PRE_LIBS) $(x_ext_lib) $(x_xpm_libs) -lX11 $(x_extra_libs) +-common_ldadd = $(KPATHSEA_LIBS) $(FREETYPE2_LIBS) $(xdvi_x_libs) ++common_ldadd = $(KPATHSEA_LIBS) $(FREETYPE2_LIBS) $(xdvi_x_libs) -lpaper + common_dependencies = $(KPATHSEA_DEPEND) $(FREETYPE2_DEPEND) + libxdvi_dependencies = ${top_srcdir}/*.[ch] ${top_srcdir}/gui/*.[ch] ${top_builddir}/psheader.c + AM_CPPFLAGS = -I$(srcdir)/gui $(common_includes) +@@ -532,10 +532,10 @@ + xdvi.icon xdvizilla xdvizilla.1 + CLEANFILES = psheader.c sedscript xdvi.1 + nodist_man1_MANS = xdvi.1 +-xdvidir = $(datarootdir)/texmf-dist/xdvi +-dvipsconfdir = $(datarootdir)/texmf-dist/dvips/config ++xdvidir = $(datarootdir)/texmf/xdvi ++dvipsconfdir = $(datarootdir)/texmf/xdvi + dist_xdvi_DATA = texmf/XDvi +-pixmapdir = $(datarootdir)/texmf-dist/xdvi/pixmap ++pixmapdir = $(datarootdir)/texmf/xdvi/pixmaps + dist_pixmap_DATA = pixmaps/toolbar.xpm pixmaps/toolbar2.xpm + dist_noinst_DATA = texmf/config.xdvi + all: c-auto.h diff --git a/print/tex-xdvik/files/patch-texk-xdvik-dvi-init.c b/print/tex-xdvik/files/patch-texk-xdvik-dvi-init.c new file mode 100644 index 000000000000..75b97b255753 --- /dev/null +++ b/print/tex-xdvik/files/patch-texk-xdvik-dvi-init.c @@ -0,0 +1,92 @@ +--- dvi-init.c.orig 2013-04-05 09:14:54.000000000 +0900 ++++ dvi-init.c 2013-05-06 05:13:12.000000000 +0900 +@@ -53,6 +53,9 @@ + #include "statusline.h" + #include "events.h" + #include "font-open.h" ++#ifdef HAVE_LIBPAPER ++#include <paper.h> ++#endif + + #if FREETYPE + # include FT_SIZES_H +@@ -865,9 +868,14 @@ + char temp[21]; + const char **p; + char *q; ++#ifdef HAVE_LIBPAPER ++ const struct paper *pp; ++ int landscape = 0; ++#else + const char **paper_types = get_paper_types(); + size_t paper_types_size = get_paper_types_size(); +- ++#endif ++ + if (*arg == '+') { + ++arg; + ignore_papersize_specials = True; +@@ -884,6 +892,55 @@ + break; + } + arg = temp; ++#ifdef HAVE_LIBPAPER ++ paperinit(); ++ if (strcmp(temp, "libpaper") == 0) { ++ const char *name; ++ ++ name = systempapername(); ++ if (name == NULL) ++ name = defaultpapername(); ++ ++ strncpy(temp, name, sizeof(temp)); ++ temp[sizeof(temp) - 1] = '\0'; ++ } ++ if (strcmp(temp, "letter") != 0 || ++ strcmp(temp, "ledgar") != 0) { ++ if (temp[strlen(temp) - 1] == 'r') { ++ temp[strlen(temp) - 1] = '\0'; ++ landscape = 1; ++ } ++ } ++ for (pp = paperfirst(); pp; pp = papernext(pp)) { ++ if (strcmp(temp, papername(pp)) == 0) { ++ double w, h; ++ char wstr[256]; ++ char hstr[256]; ++ ++ if (landscape == 0) { ++ w = paperpswidth(pp); ++ h = paperpsheight(pp); ++ } else { ++ h = paperpswidth(pp); ++ w = paperpsheight(pp); ++ } ++ w = w / 72.0 * 10 * 2.54; ++ h = h / 72.0 * 10 * 2.54; ++ snprintf(wstr, sizeof(wstr), "%f mm", w); ++ snprintf(hstr, sizeof(hstr), "%f mm", h); ++ wstr[sizeof(wstr) - 1] = '\0'; ++ hstr[sizeof(hstr) - 1] = '\0'; ++ m_paper_unshrunk_w = atopix(wstr, False); ++ m_paper_unshrunk_h = atopix(hstr, False); ++ globals.grid_paper_unit = atopixunit("mm"); ++ ++ break; ++ } ++ } ++ paperdone(); ++ if (pp == NULL) ++ return (False); ++#else + /* perform substitutions */ + for (p = paper_types; p < paper_types + paper_types_size; p += 2) { + if (strcmp(temp, *p) == 0) { +@@ -898,6 +955,7 @@ + m_paper_unshrunk_h = atopix(arg1 + 1, False); + + globals.grid_paper_unit = atopixunit(arg); ++#endif + + return (m_paper_unshrunk_w != 0 && m_paper_unshrunk_h != 0); + } diff --git a/print/tex-xdvik/files/patch-texk-xdvik-texmf-XDvi b/print/tex-xdvik/files/patch-texk-xdvik-texmf-XDvi new file mode 100644 index 000000000000..8df774f3dece --- /dev/null +++ b/print/tex-xdvik/files/patch-texk-xdvik-texmf-XDvi @@ -0,0 +1,11 @@ +--- texmf/XDvi.orig 2013-05-06 03:19:23.000000000 +0900 ++++ texmf/XDvi 2013-05-06 03:19:33.000000000 +0900 +@@ -21,7 +21,7 @@ + !!! and greater flexibility for shrink values. Generating MF fonts shouldn't be an + !!! issue when using T1lib. + !*mfMode: ljfour +-*paper: a4 ++*paper: libpaper + + !!! This should be the best choice for modern displays with large color depth. + *thorough: true |