diff options
author | steve <steve@FreeBSD.org> | 1999-05-03 12:27:43 +0800 |
---|---|---|
committer | steve <steve@FreeBSD.org> | 1999-05-03 12:27:43 +0800 |
commit | ba6002ebb53f1e68277d17f4e98d05ebeba809ea (patch) | |
tree | 7d367b21bc9a83e726ded13e6ebfa65a33005986 /graphics/tifmerge | |
parent | 129f84ee4218fc7877b683461a30bb99ff477bfd (diff) | |
download | freebsd-ports-gnome-ba6002ebb53f1e68277d17f4e98d05ebeba809ea.tar.gz freebsd-ports-gnome-ba6002ebb53f1e68277d17f4e98d05ebeba809ea.tar.zst freebsd-ports-gnome-ba6002ebb53f1e68277d17f4e98d05ebeba809ea.zip |
Initial import of tifmerge version 1.0.
A library to merge TIFF files into mutli-page TIFF files.
PR: 11408
Submitted by: G. Adam Stanislav <adam@whizkidtech.net>
Diffstat (limited to 'graphics/tifmerge')
-rw-r--r-- | graphics/tifmerge/Makefile | 39 | ||||
-rw-r--r-- | graphics/tifmerge/distinfo | 1 | ||||
-rw-r--r-- | graphics/tifmerge/files/Makefile | 9 | ||||
-rw-r--r-- | graphics/tifmerge/files/patch-aa | 47 | ||||
-rw-r--r-- | graphics/tifmerge/files/tifmerge.3 | 69 | ||||
-rw-r--r-- | graphics/tifmerge/pkg-comment | 1 | ||||
-rw-r--r-- | graphics/tifmerge/pkg-descr | 12 | ||||
-rw-r--r-- | graphics/tifmerge/pkg-plist | 6 |
8 files changed, 184 insertions, 0 deletions
diff --git a/graphics/tifmerge/Makefile b/graphics/tifmerge/Makefile new file mode 100644 index 000000000000..64ba9231b15d --- /dev/null +++ b/graphics/tifmerge/Makefile @@ -0,0 +1,39 @@ +# New ports collection makefile for: tifmerge +# Version required: 1.0 +# Date created: 29 April 1999 +# Whom: G. Adam Stanislav <adam@whizkidtech.net> +# +# $Id$ +# + +DISTNAME= tiff +PKGNAME= tifmerge-1.0 +CATEGORIES= graphics +MASTER_SITES= http://www.whizkidtech.net/fports/ + +MAINTAINER= adam@whizkidtech.net + +BUILD_DEPENDS= tuc:${PORTSDIR}/textproc/tuc + +USE_ZIP= yes +DIST_SUBDIR= tifmerge +MAN3= tifmerge.3 + +post-extract: + @mkdir -p ${WRKSRC} + @tuc ${WRKDIR}/TIFMERGE.H ${WRKSRC}/tifmerge.h + @tuc ${WRKDIR}/TIFMERGE.C ${WRKSRC}/tifmerge.c + @${CP} ${FILESDIR}/Makefile ${WRKSRC} + @${CP} ${FILESDIR}/tifmerge.3 ${WRKSRC} + +do-install: + ${INSTALL_DATA} ${WRKSRC}/libtifmerge.so.1 ${PREFIX}/lib + ln -fs ${PREFIX}/lib/libtifmerge.so.1 ${PREFIX}/lib/libtifmerge.so + ${INSTALL_DATA} ${WRKSRC}/libtifmerge.a ${PREFIX}/lib + ${INSTALL_DATA} ${WRKSRC}/tifmerge.h ${PREFIX}/include + ${INSTALL_DATA} ${WRKSRC}/tifmerge.3 ${PREFIX}/man/man3 + +post-install: + ${SETENV} OBJFORMAT=${PORTOBJFORMAT} ${LDCONFIG} -m ${PREFIX}/lib + +.include <bsd.port.mk> diff --git a/graphics/tifmerge/distinfo b/graphics/tifmerge/distinfo new file mode 100644 index 000000000000..8269743fada7 --- /dev/null +++ b/graphics/tifmerge/distinfo @@ -0,0 +1 @@ +MD5 (tifmerge/tiff.zip) = 3dcc8fb3e96ed1f09cceb0e2bb0e2fd6 diff --git a/graphics/tifmerge/files/Makefile b/graphics/tifmerge/files/Makefile new file mode 100644 index 000000000000..143ef1a520d5 --- /dev/null +++ b/graphics/tifmerge/files/Makefile @@ -0,0 +1,9 @@ +LIB= tifmerge + +SHLIB_MAJOR= 1 +SHLIB_MINOR= 0 +NOPROFILE= yes + +SRCS= tifmerge.c + +.include <bsd.lib.mk> diff --git a/graphics/tifmerge/files/patch-aa b/graphics/tifmerge/files/patch-aa new file mode 100644 index 000000000000..bcc6d0048e5f --- /dev/null +++ b/graphics/tifmerge/files/patch-aa @@ -0,0 +1,47 @@ +--- tifmerge.c.orig Sat May 1 17:06:44 1999 ++++ tifmerge.c Sat May 1 17:07:43 1999 +@@ -10,11 +10,11 @@ + + */ + +-#include <io.h> ++#pragma align 1 + #include <stdio.h> + #include <stdlib.h> + +-#include "TifMerge.h" ++#include "tifmerge.h" + + typedef unsigned long DWORD; + typedef unsigned short WORD; +@@ -279,17 +279,17 @@ + stTiffIFD* pLastIFD; + + /* Open target data file */ +- fOutFile = fopen( lpOutFile, "r+b"); ++ fOutFile = fopen( lpOutFile, "r+"); + if( fOutFile == NULL) + return -1; + + /* save the offset to the last IFD */ +- pLastIFD = TiffReadLastIFD( fOutFile); ++ if ((pLastIFD = TiffReadLastIFD( fOutFile)) == NULL) return 1; + + /* Open source data file */ +- fInFile = fopen( lpInFile, "rb"); ++ fInFile = fopen( lpInFile, "r"); + if( fInFile == NULL) +- return -1; ++ return -2; + + /* seek to end of file */ + fseek( fOutFile, 0, SEEK_END); +@@ -298,7 +298,7 @@ + dwOff = ftell( fOutFile); + + /* append data */ +- dwIFDPos = TiffAppendFile( fOutFile, fInFile); ++ if ((dwIFDPos = TiffAppendFile( fOutFile, fInFile)) == 0) return 2; + + /* fix any file offsets */ + dwFPosNextIFD = pLastIFD->dwFilePosNextIFD; diff --git a/graphics/tifmerge/files/tifmerge.3 b/graphics/tifmerge/files/tifmerge.3 new file mode 100644 index 000000000000..ab88e4e59cef --- /dev/null +++ b/graphics/tifmerge/files/tifmerge.3 @@ -0,0 +1,69 @@ +.Dd April 29, 1999 +.Dt TIFMERGE 3 +.Os FreeBSD +.Sh NAME +.Nm TiffAppend +.Nd tifmerge library function manual page +.Sh SYNOPSIS +.Fd #include <tifmerge.h> +.Ft int +.Fn TiffAppend "const char *ptr out" "const char *ptr in" +.Sh DESCRIPTION +This is the tifmerge library function manual page for the +.Fn TiffAppend +function. This function merges two TIFF files into a single multi-page TIFF +file. +.Pp +The +.Fn TiffAppend +function takes two arguments: +.Fa out +and +.Fa in . +Both arguments contain the pointer to the name of a file. Both files must +exist and be valid TIFF files. +.Pp +The +.Fn TiffAppend +function will append the images contained in the +.Fa in +file to the images inside the +.Fa out +file. +.Pp +The function is declared in +.Aq Pa tifmerge.h , +located in the ${PREFIX}/include directory. +.Sh RETURN VALUES +The +.Fn TiffAppend +function returns 0 on success, non-0 otherwise. +.Sh ENVIRONMENT +The +.Fn TiffAppend +library function ignores the environment variables. +.Sh SEE ALSO +.Rs +.%A Peter van Vloten +.%D May 1999 +.%J Windows Developer's Journal +.%T Creating Multi-Page TIFF Files +.Re +.Sh STANDARDS +.St -ansiC . +.Sh DIAGNOSTICS +None. +.Sh AUTHORS +This manual page was written by +.An G. Adam Stanislav Aq adam@whizkidtech.net . +.Pp +The +.Fn TiffAppend +function was written by +.An Peter van Vloten Aq pixelpan@aol.com . +.Sh BUGS +The original version of the +.Fn TiffAppend +function causes a core dump if the +.Fa out +argument is not a valid TIFF file. This is fixed in the FreeBSD port. diff --git a/graphics/tifmerge/pkg-comment b/graphics/tifmerge/pkg-comment new file mode 100644 index 000000000000..16071e5e597a --- /dev/null +++ b/graphics/tifmerge/pkg-comment @@ -0,0 +1 @@ +Library to merge TIFF files into multi-page TIFF files. diff --git a/graphics/tifmerge/pkg-descr b/graphics/tifmerge/pkg-descr new file mode 100644 index 000000000000..f47eccc4bd6e --- /dev/null +++ b/graphics/tifmerge/pkg-descr @@ -0,0 +1,12 @@ +Library to convert TIFF files into multi-page TIFF files. It contains only one +function callable by programs: + + int TiffAppend(const char *outfile, const char *infile); + +It will insert images from infile as additional pages to outfile. Infile +and outfile must be names of two existing TIFF files. + +The function returns 0 on success, non-0 otherwise. + +The code for this library was written by Peter van Vloten <pixelpan@aol.com> +and was published in May 1999 issue of Windows Developer's Journal (sic!). diff --git a/graphics/tifmerge/pkg-plist b/graphics/tifmerge/pkg-plist new file mode 100644 index 000000000000..5629dd9aadbe --- /dev/null +++ b/graphics/tifmerge/pkg-plist @@ -0,0 +1,6 @@ +include/tifmerge.h +lib/libtifmerge.a +lib/libtifmerge.so +lib/libtifmerge.so.1 +@exec /usr/bin/env OBJFORMAT=%%PORTOBJFORMAT%% /sbin/ldconfig -m %D/lib +@unexec /usr/bin/env OBJFORMAT=%%PORTOBJFORMAT%% /sbin/ldconfig -R |