- import of dvipdfm-0.13.2

- patch to cure /tmp race condition added; it needs cleaning up before
  submitting back to authors though (espie@ ok)

--
Dvipdfm is a command-line DVI to PDF translator.

Its features include TeX \special's that approximate the functionality
of the PostScript pdfmarks used by Adobe Acrobat Distiller, the
ability to include PDF files and JPEG files as embedded images,
support for both Type1 and PK fonts, support for arbitrary linear
graphics transformations, a color stack accessible via \special's,
partial font embedding and stream compression for reduced output
file size, native, portable graphics via TPIC \specials, balanced
page and destination trees for improved reader access on very large
document files.
This commit is contained in:
avsm 2001-01-12 23:21:06 +00:00
parent 3577f730cc
commit 6b338200be
7 changed files with 124 additions and 0 deletions

32
print/dvipdfm/Makefile Normal file
View File

@ -0,0 +1,32 @@
# $OpenBSD: Makefile,v 1.1.1.1 2001/01/12 23:21:06 avsm Exp $
DISTNAME= dvipdfm-0.13.2
CATEGORIES= print
NEED_VERSION= 1.348
HOMEPAGE= http://gaspra.kettering.edu/dvipdfm/
MAINTAINER= Anil Madhavapeddy <avsm@openbsd.org>
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
MASTER_SITES= http://gaspra.kettering.edu/dvipdfm/
BUILD_DEPENDS= ${PREFIX}/lib/libkpathsea.a::print/teTeX
LIB_DEPENDS= png.1::graphics/png
CONFIGURE_STYLE= gnu dest
CONFIGURE_ARGS= --with-kpathsea=${PREFIX} --with-png=${PREFIX}
WRKDIST= ${WRKDIR}/dvipdfm
pre-fake:
${INSTALL_DATA_DIR} ${PREFIX}/share/texmf/dvipdfm/config
${INSTALL_DATA_DIR} ${PREFIX}/share/texmf/tex/latex/graphics
post-install:
${INSTALL_DATA} ${WRKSRC}/latex-support/dvipdfm.def \
${PREFIX}/share/texmf/tex/latex/graphics
.include <bsd.port.mk>

3
print/dvipdfm/files/md5 Normal file
View File

@ -0,0 +1,3 @@
MD5 (dvipdfm-0.13.2.tar.gz) = b87294e1daf5feb2f5a9f363ef506687
RMD160 (dvipdfm-0.13.2.tar.gz) = f5e8d1544a1689ded09846943dbe35813d6a2989
SHA1 (dvipdfm-0.13.2.tar.gz) = f3249941402b5e2a302dbac607aecca4ac92d451

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-config,v 1.1.1.1 2001/01/12 23:21:07 avsm Exp $
--- config.orig Thu Jan 11 23:16:28 2001
+++ config Thu Jan 11 23:17:18 2001
@@ -15,9 +15,7 @@
% D "/usr/local/bin/pstill -c -o %o %i"
% The following line works with GhostScript
-% D "gs -q -sPAPERSIZE=ledger -sDEVICE=pdfwrite -dCompatibilityLevel=1.2 -dUseFlateCompression=true -sOutputFile=%o %i -c quit"
-% The following line works on compressed or uncompressed postscript with GhostScript
-D "zcat -f %i | gs -q -sPAPERSIZE=a0 -sDEVICE=pdfwrite -dCompatibilityLevel=1.2 -dUseFlateCompression=true -sOutputFile=%o - -c quit"
+D "gs -q -sPAPERSIZE=ledger -sDEVICE=pdfwrite -dCompatibilityLevel=1.2 -dUseFlateCompression=true -sOutputFile=%o %i -c quit"
% The following line works with Adobe Acrobat Distiller
% D "/usr/local/bin/distill -quiet -pairs %i %o"

View File

@ -0,0 +1,43 @@
$OpenBSD: patch-psimage.c,v 1.1.1.1 2001/01/12 23:21:07 avsm Exp $
Cures a /tmp race condition when converting embedded eps/ps formats
to pdf, using external applications. It needs cleaning up, and fallback
via autoconf before submission back to authors - avsm@
--- psimage.c.orig Fri Oct 13 21:36:47 2000
+++ psimage.c Thu Jan 11 23:40:40 2001
@@ -113,10 +113,18 @@ pdf_obj *ps_include (char *file_name,
{
#ifdef HAVE_SYSTEM
pdf_obj *result = NULL;
- char *tmp, *cmd;
+ char *cmd, tmp[30];
FILE *pdf_file = NULL;
- /* Get a full qualified tmp name */
- tmp = tmpnam (NULL);
+ int fd = -1;
+
+ strlcpy(tmp, "/tmp/dvipdfm.XXXXXXXXXXXX", sizeof(tmp));
+ /* Get a full qualified tmp name and create it in one operation */
+ if ((fd=mkstemp(tmp)) == -1) {
+ fprintf(stderr, "\nError opening tmp file %s: %s\n", tmp, strerror(errno));
+ return NULL;
+ }
+ close(fd);
+
if ((cmd = build_command_line (file_name, tmp))) {
if (!system (cmd) && (pdf_file = MFOPEN (tmp, FOPEN_RBIN_MODE))) {
result = pdf_include_page (pdf_file, p, res_name);
@@ -125,10 +133,11 @@ pdf_obj *ps_include (char *file_name,
}
if (pdf_file) {
MFCLOSE (pdf_file);
- remove (tmp);
}
RELEASE (cmd);
}
+
+ unlink(tmp);
return result;
#else
fprintf (stderr, "\n\nCannot include PS/EPS files unless you have and enable system() command.\n");

View File

@ -0,0 +1 @@
converts DVI files to PDF format

13
print/dvipdfm/pkg/DESCR Normal file
View File

@ -0,0 +1,13 @@
Dvipdfm is a command-line DVI to PDF translator.
Its features include TeX \special's that approximate the functionality
of the PostScript pdfmarks used by Adobe Acrobat Distiller, the
ability to include PDF files and JPEG files as embedded images,
support for both Type1 and PK fonts, support for arbitrary linear
graphics transformations, a color stack accessible via \special's,
partial font embedding and stream compression for reduced output
file size, native, portable graphics via TPIC \specials, balanced
page and destination trees for improved reader access on very large
document files.
WWW: ${HOMEPAGE}

18
print/dvipdfm/pkg/PLIST Normal file
View File

@ -0,0 +1,18 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2001/01/12 23:21:07 avsm Exp $
bin/dvipdfm
bin/dvipdft
bin/ebb
share/texmf/dvipdfm/base
share/texmf/dvipdfm/config/cmr.map
share/texmf/dvipdfm/config/config
share/texmf/dvipdfm/config/lw35urw.map
share/texmf/dvipdfm/config/lw35urwa.map
share/texmf/dvipdfm/config/psbase14.map
share/texmf/dvipdfm/config/t1fonts.map
@exec mv %D/share/texmf/tex/latex/graphics/dvipdfm.def %D/share/texmf/tex/latex/graphics/dvipdfm.def.old
share/texmf/tex/latex/graphics/dvipdfm.def
@unexec mv %D/share/texmf/tex/latex/graphics/dvipdfm.def.old %D/share/texmf/tex/latex/graphics/dvipdfm.def
@dirrm share/texmf/dvipdfm/config
@dirrm share/texmf/dvipdfm
@exec TEXMFMAIN=%D/share/texmf %D/bin/mktexlsr
@unexec TEXMFMAIN=%D/share/texmf %D/bin/mktexlsr