aboutsummaryrefslogtreecommitdiff
path: root/print
diff options
context:
space:
mode:
authorMakoto Matsushita <matusita@FreeBSD.org>2004-02-08 16:29:16 +0000
committerMakoto Matsushita <matusita@FreeBSD.org>2004-02-08 16:29:16 +0000
commita061fccc362d3284d2bbac3a632227f290acbf5d (patch)
tree8a23bf674bbedaa6cc6ed05a31cd5f7a5ae6c13b /print
parenta0162b67bde15c6e0d5d4cff314063987a8265e8 (diff)
downloadports-a061fccc362d3284d2bbac3a632227f290acbf5d.tar.gz
ports-a061fccc362d3284d2bbac3a632227f290acbf5d.zip
Notes
Diffstat (limited to 'print')
-rw-r--r--print/dvipdfmx/Makefile13
-rw-r--r--print/dvipdfmx/distinfo2
-rw-r--r--print/dvipdfmx/files/patch-psspecial.c-epsbox.sty105
3 files changed, 118 insertions, 2 deletions
diff --git a/print/dvipdfmx/Makefile b/print/dvipdfmx/Makefile
index c4e837ee6939..3fe85519ff5a 100644
--- a/print/dvipdfmx/Makefile
+++ b/print/dvipdfmx/Makefile
@@ -7,10 +7,15 @@
PORTNAME= dvipdfmx
PORTVERSION= 20031116
+PORTREVISION= 1
CATEGORIES= print
-MASTER_SITES= http://project.ktug.or.kr/dvipdfmx/snapshot/release/
+MASTER_SITES= http://project.ktug.or.kr/dvipdfmx/snapshot/release/:main \
+ http://project.ktug.or.kr/dvipdfmx/snapshot/patch/:patch1
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:main \
+ dvipdfmx-${PORTVERSION}.patch:patch1
+EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= matusita@FreeBSD.org
COMMENT= Dvipdfm with Asian languages by CID-keyed font technology support
BUILD_DEPENDS= ${LOCALBASE}/lib/libkpathsea.a:${PORTSDIR}/print/teTeX
@@ -19,6 +24,10 @@ RUN_DEPENDS= ${LOCALBASE}/share/ghostscript/Resource/ai0/CMap/Identity-H:${PORTS
kpsepath:${PORTSDIR}/print/teTeX
GNU_CONFIGURE= yes
+PATCH_STRIP= -p1
+
+post-patch:
+ (cd ${WRKSRC}/src; ${PATCH} --quiet < ${DISTDIR}/dvipdfmx-${PORTVERSION}.patch)
post-install:
@${LN} -fs ${LOCALBASE}/share/ghostscript/Resource ${PREFIX}/share/texmf/dvipdfm/
diff --git a/print/dvipdfmx/distinfo b/print/dvipdfmx/distinfo
index b281ff57e409..7e694ad19c33 100644
--- a/print/dvipdfmx/distinfo
+++ b/print/dvipdfmx/distinfo
@@ -1,2 +1,4 @@
MD5 (dvipdfmx-20031116.tar.gz) = 9c56e59c1536b4cb6f2606948c3e669c
SIZE (dvipdfmx-20031116.tar.gz) = 325457
+MD5 (dvipdfmx-20031116.patch) = a2313bf0e2b4a7ce1aaf3d0b48a409fc
+SIZE (dvipdfmx-20031116.patch) = 676
diff --git a/print/dvipdfmx/files/patch-psspecial.c-epsbox.sty b/print/dvipdfmx/files/patch-psspecial.c-epsbox.sty
new file mode 100644
index 000000000000..b003e259f0a1
--- /dev/null
+++ b/print/dvipdfmx/files/patch-psspecial.c-epsbox.sty
@@ -0,0 +1,105 @@
+Origin: http://www.matsusaka-u.ac.jp/~okumura/texfaq/qa/23745.html
+
+This patch enables to handle dvifile using epsbox.sty. The epsbox.sty
+embeds EPS files with "postscriptbox" directive, but original dvipdfmx
+doesn't know what postscriptbox is, showing "Unrecognized special ignored"
+and exit abnormally.
+
+Note that following 8bit strings are Japanese EUC characters. Actually
+this file is a Web bulletinboard message; there is "name" field, but
+it only says "noda"-san (no email address or contact information are there),
+I cannot contact to the person posted this. If there's something wrong,
+please contact to matusita@FreeBSD.org, current MAINTAINER of this port.
+
+--- contents below --
+<meta http-equiv="Content-Type" content="text/html; charset=EUC-JP">
+<title>23745</title>
+<link rel="stylesheet" type="text/css" href="style.css">
+<body>
+<h2>Re: dvipdfm・・・</h2>
+<pre>
+名前: 野田
+日時: 2003-11-24 00:36:45
+IPアドレス: 218.47.0.*
+<hr>
+<a href="20624.html">&gt;&gt;20624</a>
+
+だいぶ前の話な上に元質問者の方は既に解決済みのようですが…
+
+古いソースから作成したDVIファイルをPDF化するのに,epsbox.styに対応する
+必要に迫られたため,dvipdfmx用のepsbox.sty対応パッチを作成しました.
+
+別解ということで,投稿しておきます.
+
+diff -ur dvipdfmx-20031110.orig/src/psspecial.c dvipdfmx-20031110/src/psspecial.c
+--- dvipdfmx-20031110.orig/src/psspecial.c 2002-10-30 11:27:16.000000000 +0900
++++ dvipdfmx-20031110/src/psspecial.c 2003-11-14 09:56:59.000000000 +0900
+@@ -260,6 +260,53 @@
+ result = 1; /* Likewise */
+ do_raw_ps_special (&amp;start, end, 1,
+ block_pending?pending_x:x_user, block_pending?pending_y:y_user);
++ } else if (!strncmp (start, "postscriptbox", strlen("postscriptbox"))) {
++ char filename[256];
++ double width, height;
++
++ if (sscanf (start+13, "{%lfpt}{%lfpt}{%256[^}]}",
++ &amp;width, &amp;height, filename) == 3) {
++ struct xform_info *p = new_xform_info();
++
++ p -&gt; width = width*72/72.27;
++ p -&gt; height = height*72/72.27;
++
++ {
++ FILE *image_file;
++ char *kpse_file_name;
++ char buf[256], *pos;
++ if ((kpse_file_name = kpse_find_pict (filename)) &amp;&amp;
++ (image_file = MFOPEN (kpse_file_name, FOPEN_R_MODE))) {
++ while (fgets (buf, 256, image_file)) {
++ if ((pos = strstr(buf, "%%BoundingBox:" )) != NULL){
++ double llx, lly, urx, ury;
++
++ while (*pos++ != ':' );
++ if (sscanf (pos, "%lf %lf %lf %lf",
++ &amp;llx, &amp;lly, &amp;urx, &amp;ury) == 4) {
++ p -&gt; u_llx = llx;
++ p -&gt; u_lly = lly;
++ p -&gt; u_urx = urx;
++ p -&gt; u_ury = ury;
++ p -&gt; user_bbox = 1;
++ break;
++ }
++ }
++ }
++ MFCLOSE (image_file);
++ }
++ }
++
++ if(p -&gt; user_bbox &amp;&amp; validate_image_xform_info (p)) {
++ pdf_obj *embeded;
++ embeded = embed_image (filename, p, x_user, y_user, NULL);
++ if (embeded)
++ pdf_release_obj (embeded);
++ result = 1;
++ }
++
++ release_xform_info (p);
++ }
+ }
+ return result;
+ }
+
+</pre>
+<hr>
+<p>この書き込みへの返事:
+<form action="webbbs.cgi" method="post">
+お名前 <input type="text" name="name" size="20"><br>
+題名  <input type="text" name="subject" size="40" value="Re: dvipdfm・・・"><br>
+メッセージ(タグは &lt;a href="..."&gt;...&lt;/a&gt; だけ使えます)<br>
+<textarea name="message" rows="6" cols="80">
+<a href="23745.html">&gt;&gt;23745</a>
+</textarea>
+<br>
+<input type="submit" value="送る">
+<input type="reset" value="リセット">
+</form>