mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-23 00:43:28 +00:00
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>
This commit is contained in:
parent
63e4f8628d
commit
bc2d6d648e
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=18409
39
graphics/tifmerge/Makefile
Normal file
39
graphics/tifmerge/Makefile
Normal file
@ -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>
|
1
graphics/tifmerge/distinfo
Normal file
1
graphics/tifmerge/distinfo
Normal file
@ -0,0 +1 @@
|
||||
MD5 (tifmerge/tiff.zip) = 3dcc8fb3e96ed1f09cceb0e2bb0e2fd6
|
9
graphics/tifmerge/files/Makefile
Normal file
9
graphics/tifmerge/files/Makefile
Normal file
@ -0,0 +1,9 @@
|
||||
LIB= tifmerge
|
||||
|
||||
SHLIB_MAJOR= 1
|
||||
SHLIB_MINOR= 0
|
||||
NOPROFILE= yes
|
||||
|
||||
SRCS= tifmerge.c
|
||||
|
||||
.include <bsd.lib.mk>
|
47
graphics/tifmerge/files/patch-aa
Normal file
47
graphics/tifmerge/files/patch-aa
Normal file
@ -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;
|
69
graphics/tifmerge/files/tifmerge.3
Normal file
69
graphics/tifmerge/files/tifmerge.3
Normal file
@ -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.
|
1
graphics/tifmerge/pkg-comment
Normal file
1
graphics/tifmerge/pkg-comment
Normal file
@ -0,0 +1 @@
|
||||
Library to merge TIFF files into multi-page TIFF files.
|
12
graphics/tifmerge/pkg-descr
Normal file
12
graphics/tifmerge/pkg-descr
Normal file
@ -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!).
|
6
graphics/tifmerge/pkg-plist
Normal file
6
graphics/tifmerge/pkg-plist
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user