Commit 5f52c1a9 authored by Ben Boeckel's avatar Ben Boeckel

Merge branch 'libtiff-import'

* libtiff-import:
  FIX: new location of tiffio.h
  Added the binary include directory for the config
  tiff 2016-07-11 (fb8cca2c)
  script to update tiff from upstream
  vtktiff: remove old import
Also-developed-by: Robert Maynard's avatarRobert Maynard <robert.maynard@kitware.com>
Reviewed-by: Ben Boeckel's avatarBen Boeckel <ben.boeckel@kitware.com>
Merge-request: !1680
parents 4a25e5c6 56602229
Pipeline #19200 running with stage
in 660 minutes and 52 seconds
vtk_module_third_party(TIFF)
vtk_module_third_party(TIFF
INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/vtktiff/libtiff)
#!/usr/bin/env bash
set -e
set -x
shopt -s dotglob
readonly name="tiff"
readonly ownership="Tiff Upstream <kwrobot@kitware.com>"
readonly subtree="ThirdParty/$name/vtk$name"
readonly repo="https://gitlab.kitware.com/third-party/tiff.git"
readonly tag="for/vtk"
readonly paths="
.gitattributes
CMakeLists.txt
configure.ac
libtiff/CMakeLists.txt
libtiff/mkg3states.c
libtiff/mkspans.c
libtiff/SConstruct
libtiff/t4.h
libtiff/tif_aux.c
libtiff/tif_close.c
libtiff/tif_codec.c
libtiff/tif_color.c
libtiff/tif_compress.c
libtiff/tif_config.h.cmake.in
libtiff/tif_config.h.in
libtiff/tif_config.h-vms
libtiff/tif_config.vc.h
libtiff/tif_config.wince.h
libtiff/tif_dir.c
libtiff/tif_dir.h
libtiff/tif_dirinfo.c
libtiff/tif_dirread.c
libtiff/tif_dirwrite.c
libtiff/tif_dumpmode.c
libtiff/tif_error.c
libtiff/tif_extension.c
libtiff/tif_fax3.c
libtiff/tif_fax3.h
libtiff/tif_fax3.c
libtiff/tif_fax3.h
libtiff/tif_fax3sm.c
libtiff/tiffconf.h.cmake.in
libtiff/tiffconf.h.in
libtiff/tiffconf.h-vms
libtiff/tiffconf.vc.h
libtiff/tiffconf.wince.h
libtiff/tiff.h
libtiff/tiffio.h
libtiff/tiffiop.h
libtiff/tif_flush.c
libtiff/tiffvers.h
libtiff/tiffvers.h.in
libtiff/tif_getimage.c
libtiff/tif_jbig.c
libtiff/tif_jpeg_12.c
libtiff/tif_jpeg.c
libtiff/tif_luv.c
libtiff/tif_lzma.c
libtiff/tif_lzw.c
libtiff/tif_next.c
libtiff/tif_ojpeg.c
libtiff/tif_open.c
libtiff/tif_packbits.c
libtiff/tif_pixarlog.c
libtiff/tif_predict.c
libtiff/tif_predict.h
libtiff/tif_print.c
libtiff/tif_read.c
libtiff/tif_strip.c
libtiff/tif_swab.c
libtiff/tif_thunder.c
libtiff/tif_tile.c
libtiff/tif_unix.c
libtiff/tif_version.c
libtiff/tif_vms.c
libtiff/tif_warning.c
libtiff/tif_win32.c
libtiff/tif_wince.c
libtiff/tif_write.c
libtiff/tif_zip.c
libtiff/uvcode.h
libtiff/vtk_tiff_mangle.h
libtiff/libtiff.def
libtiff/libtiff.map
libtiff/libtiffxx.map
port/CMakeLists.txt
port/dummy.c
port/getopt.c
port/lfind.c
port/libport.h
port/Makefile.am
port/Makefile.in
port/Makefile.vc
port/snprintf.c
port/strcasecmp.c
port/strtoul.c
port/strtoull.c
ChangeLog
COMMITTERS
README
"
extract_source () {
git_archive
}
. "${BASH_SOURCE%/*}/../update-common.sh"
......@@ -20,7 +20,7 @@
#ifdef VTK_USE_SYSTEM_TIFF
# include <tiffio.h>
#else
# include <vtktiff/tiffio.h>
# include <vtktiff/libtiff/tiffio.h>
#endif
#endif
This diff is collapsed.
Active Libtiff Committers
-------------------------
Frank Warmerdam (fwarmerdam): warmerdam@pobox.com
Andrey Kiselev (dron): dron@ak4719.spb.edu
Bob Friesenhahn (bfriesen): bfriesen@simple.dallas.tx.us
Joris Van Damme (joris): info@awaresystems.be
Lee Howard (faxguy): faxguy@howardsilvan.com
Olivier Paquet (olivier): olivier.paquet@gmail.com
Tom Lane (tgl): tgl@sss.pgh.pa.us
Even Rouault (erouault): even.rouault@spatialys.com
This diff is collapsed.
Header
$Header$
TIFF Software Distribution
--------------------------
This file is just a placeholder; all the documentation is now in
HTML in the html directory. To view the documentation point your
favorite WWW viewer at html/index.html; e.g.
favorite WWW viewer at html/index.html;
netscape html/index.html
e.g.
firefox html/index.html
If you don't have an HTML viewer then you can read the HTML source
or fetch a PostScript version of this documentation from the directory
......@@ -23,7 +25,7 @@ want to do is:
# make install
More information, email contacts, and mailing list information can be
found online at http://www.libtiff.org/.
found online at http://www.remotesensing.org/libtiff/.
Use and Copyright
......
This directory contains a subset of libtiff from www.libtiff.org
Modifications
-------------
* It uses CMake
some "gamma" local variable has been renamed to gamma2 to avoid shadowing
gamma BSD function.
This diff is collapsed.
#! /bin/sh
# Header
if test -r tiff.alpha; then
ALPHA=`cat tiff.alpha`; rm -f tiff.alpha
echo "$ALPHA" | awk '{ printf "define ALPHA %1d\n", $3+1}' > tiff.alpha
else
echo "define ALPHA 001" >tiff.alpha
fi
This diff is collapsed.
# CMake build for libtiff
#
# Copyright © 2015 Open Microscopy Environment / University of Dundee
# Written by Roger Leigh <rleigh@codelibre.net>
#
# Permission to use, copy, modify, distribute, and sell this software and
# its documentation for any purpose is hereby granted without fee, provided
# that (i) the above copyright notices and this permission notice appear in
# all copies of the software and related documentation, and (ii) the names of
# Sam Leffler and Silicon Graphics may not be used in any advertising or
# publicity relating to the software without the specific, prior written
# permission of Sam Leffler and Silicon Graphics.
#
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
#
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
# OF THIS SOFTWARE.
# Generate headers
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tif_config.h.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/tif_config.h
@ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tiffconf.h.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/tiffconf.h
@ONLY)
extra_dist(
SConstruct
tif_config.h-vms
tif_config.vc.h
tif_config.wince.h
tiffconf.vc.h
tiffconf.wince.h
libtiff.def
libtiff.map
libtiffxx.map)
set(tiff_HEADERS
tiff.h
tiffio.h
tiffvers.h
# XXX(kitware): install mangling header
vtk_tiff_mangle.h)
set(tiff_noinst_HEADERS
t4.h
tif_dir.h
tif_predict.h
tiffiop.h
uvcode.h)
set(nodist_tiff_HEADERS
${CMAKE_CURRENT_BINARY_DIR}/tiffconf.h)
set(tiff_SOURCES
tif_aux.c
tif_close.c
tif_codec.c
tif_color.c
tif_compress.c
tif_dir.c
tif_dirinfo.c
tif_dirread.c
tif_dirwrite.c
tif_dumpmode.c
tif_error.c
tif_extension.c
tif_fax3.c
tif_fax3sm.c
tif_flush.c
tif_getimage.c
tif_jbig.c
tif_jpeg.c
tif_jpeg_12.c
tif_luv.c
tif_lzma.c
tif_lzw.c
tif_next.c
tif_ojpeg.c
tif_open.c
tif_packbits.c
tif_pixarlog.c
tif_predict.c
tif_print.c
tif_read.c
tif_strip.c
tif_swab.c
tif_thunder.c
tif_tile.c
tif_version.c
tif_warning.c
tif_write.c
tif_zip.c)
if (BUILD_SHARED_LIBS)
set(tiff_DEFS
libtiff.def)
endif ()
if(WIN32_IO)
extra_dist(tif_unix.c)
list(APPEND tiff_SOURCES tif_win32.c)
add_definitions(-DUSE_WIN32_FILEIO)
else()
extra_dist(tif_win32.c)
list(APPEND tiff_SOURCES tif_unix.c)
endif()
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${TIFF_INCLUDES})
if (FALSE) # XXX(kitware): mangle library name
add_library(tiff ${tiff_SOURCES} ${tiff_HEADERS} ${nodist_tiff_HEADERS}
${tiff_port_SOURCES} ${tiff_DEFS})
target_link_libraries(tiff ${TIFF_LIBRARY_DEPS})
set_target_properties(tiff PROPERTIES SOVERSION ${SO_COMPATVERSION})
endif ()
vtk_add_library(vtktiff ${tiff_SOURCES} ${tiff_HEADERS} ${nodist_tiff_HEADERS}
${tiff_port_SOURCES} ${tiff_DEFS})
target_link_libraries(vtktiff ${TIFF_LIBRARY_DEPS})
set_target_properties(vtktiff PROPERTIES SOVERSION ${SO_COMPATVERSION})
if(NOT CYGWIN)
# This property causes shared libraries on Linux to have the full version
# encoded into their final filename. We disable this on Cygwin because
# it causes cygz-${TIFF_FULL_VERSION}.dll to be created when cygz.dll
# seems to be the default.
if (FALSE) # XXX(kitware): mangle library name
set_target_properties(tiff PROPERTIES VERSION ${SO_VERSION})
endif ()
set_target_properties(vtktiff PROPERTIES VERSION ${SO_VERSION})
endif()
if(HAVE_LD_VERSION_SCRIPT)
if (FALSE) # XXX(kitware): mangle library name
set_target_properties(tiff PROPERTIES LINK_FLAGS
"-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/libtiff.map")
endif ()
set_target_properties(vtktiff PROPERTIES LINK_FLAGS
"-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/libtiff.map")
endif()
if (FALSE) # XXX(kitware): mangle library name
install(TARGETS tiff
RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR})
endif ()
install(TARGETS vtktiff
RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR})
if (NOT_VTK_INSTALL_NO_DEVELOPMENT) # XXX(kitware): install headers when VTK does
install(FILES ${tiff_HEADERS} ${nodist_tiff_HEADERS}
DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}")
endif ()
# $Id$
# Tag Image File Format (TIFF) Software
#
# Copyright (C) 2005, Andrey Kiselev <dron@ak4719.spb.edu>
#
# Permission to use, copy, modify, distribute, and sell this software and
# its documentation for any purpose is hereby granted without fee, provided
# that (i) the above copyright notices and this permission notice appear in
# all copies of the software and related documentation, and (ii) the names of
# Sam Leffler and Silicon Graphics may not be used in any advertising or
# publicity relating to the software without the specific, prior written
# permission of Sam Leffler and Silicon Graphics.
#
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
#
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
# OF THIS SOFTWARE.
# This file contains rules to build software with the SCons tool
# (see the http://www.scons.org/ for details on SCons).
# Import globally defined options
Import([ 'env', 'idir_lib' ])
SRCS = [ \
'tif_aux.c', \
'tif_close.c', \
'tif_codec.c', \
'tif_color.c', \
'tif_compress.c', \
'tif_dir.c', \
'tif_dirinfo.c', \
'tif_dirread.c', \
'tif_dirwrite.c', \
'tif_dumpmode.c', \
'tif_error.c', \
'tif_extension.c', \
'tif_fax3.c', \
'tif_fax3sm.c', \
'tif_flush.c', \
'tif_getimage.c', \
'tif_jbig.c', \
'tif_jpeg.c', \
'tif_luv.c', \
'tif_lzw.c', \
'tif_next.c', \
'tif_ojpeg.c', \
'tif_open.c', \
'tif_packbits.c', \
'tif_pixarlog.c', \
'tif_predict.c', \
'tif_print.c', \
'tif_read.c', \
'tif_strip.c', \
'tif_swab.c', \
'tif_thunder.c', \
'tif_tile.c', \
'tif_unix.c', \
'tif_version.c', \
'tif_warning.c', \
'tif_write.c', \
'tif_zip.c' ]
StaticLibrary('tiff', SRCS)
SharedLibrary('tiff', SRCS)
EXPORTS vtk_TIFFAccessTagMethods
vtk_TIFFCIELabToRGBInit
vtk_TIFFCIELabToXYZ
vtk_TIFFCheckTile
vtk_TIFFCheckpointDirectory
vtk_TIFFCleanup
vtk_TIFFClientOpen
vtk_TIFFClientdata
vtk_TIFFClose
vtk_TIFFComputeStrip
vtk_TIFFComputeTile
vtk_TIFFCreateCustomDirectory
vtk_TIFFCreateDirectory
vtk_TIFFCreateEXIFDirectory
vtk_TIFFCurrentDirOffset
vtk_TIFFCurrentDirectory
vtk_TIFFCurrentRow
vtk_TIFFCurrentStrip
vtk_TIFFCurrentTile
vtk_TIFFDataWidth
vtk_TIFFDefaultStripSize
vtk_TIFFDefaultTileSize
vtk_TIFFError
vtk_TIFFErrorExt
vtk_TIFFFdOpen
vtk_TIFFFieldDataType
vtk_TIFFFieldName
vtk_TIFFFieldPassCount
vtk_TIFFFieldReadCount
vtk_TIFFFieldTag
vtk_TIFFFieldWithName
vtk_TIFFFieldWithTag
vtk_TIFFFieldWriteCount
vtk_TIFFFileName
vtk_TIFFFileno
vtk_TIFFFindCODEC
vtk_TIFFFindField
vtk_TIFFFlush
vtk_TIFFFlushData
vtk_TIFFFreeDirectory
vtk_TIFFGetBitRevTable
vtk_TIFFGetClientInfo
vtk_TIFFGetCloseProc
vtk_TIFFGetConfiguredCODECs
vtk_TIFFGetField
vtk_TIFFGetFieldDefaulted
vtk_TIFFGetMapFileProc
vtk_TIFFGetMode
vtk_TIFFGetReadProc
vtk_TIFFGetSeekProc
vtk_TIFFGetSizeProc
vtk_TIFFGetTagListCount
vtk_TIFFGetTagListEntry
vtk_TIFFGetUnmapFileProc
vtk_TIFFGetVersion
vtk_TIFFGetWriteProc
vtk_TIFFIsBigEndian
vtk_TIFFIsByteSwapped
vtk_TIFFIsCODECConfigured
vtk_TIFFIsMSB2LSB
vtk_TIFFIsTiled
vtk_TIFFIsUpSampled
vtk_TIFFLastDirectory
vtk_TIFFMergeFieldInfo
vtk_TIFFNumberOfDirectories
vtk_TIFFNumberOfStrips
vtk_TIFFNumberOfTiles
vtk_TIFFOpen
vtk_TIFFOpenW
vtk_TIFFPrintDirectory
vtk_TIFFRGBAImageBegin
vtk_TIFFRGBAImageEnd
vtk_TIFFRGBAImageGet
vtk_TIFFRGBAImageOK
vtk_TIFFRasterScanlineSize
vtk_TIFFRasterScanlineSize64
vtk_TIFFRawStripSize
vtk_TIFFRawStripSize64
vtk_TIFFReadBufferSetup
vtk_TIFFReadCustomDirectory
vtk_TIFFReadDirectory
vtk_TIFFReadEXIFDirectory
vtk_TIFFReadEncodedStrip
vtk_TIFFReadEncodedTile
vtk_TIFFReadRGBAImage
vtk_TIFFReadRGBAImageOriented
vtk_TIFFReadRGBAStrip
vtk_TIFFReadRGBATile
vtk_TIFFReadRawStrip
vtk_TIFFReadRawTile
vtk_TIFFReadScanline
vtk_TIFFReadTile
vtk_TIFFRegisterCODEC
vtk_TIFFReverseBits
vtk_TIFFRewriteDirectory
vtk_TIFFScanlineSize
vtk_TIFFScanlineSize64
vtk_TIFFSetClientInfo
vtk_TIFFSetClientdata
vtk_TIFFSetCompressionScheme
vtk_TIFFSetDirectory
vtk_TIFFSetErrorHandler
vtk_TIFFSetErrorHandlerExt
vtk_TIFFSetField
vtk_TIFFSetFileName
vtk_TIFFSetFileno
vtk_TIFFSetMode
vtk_TIFFSetSubDirectory
vtk_TIFFSetTagExtender
vtk_TIFFSetWarningHandler
vtk_TIFFSetWarningHandlerExt
vtk_TIFFSetWriteOffset
vtk_TIFFSetupStrips
vtk_TIFFStripSize
vtk_TIFFStripSize64
vtk_TIFFSwabArrayOfDouble
vtk_TIFFSwabArrayOfFloat
vtk_TIFFSwabArrayOfLong
vtk_TIFFSwabArrayOfLong8
vtk_TIFFSwabArrayOfShort
vtk_TIFFSwabArrayOfTriples
vtk_TIFFSwabDouble
vtk_TIFFSwabFloat
vtk_TIFFSwabLong
vtk_TIFFSwabLong8
vtk_TIFFSwabShort
vtk_TIFFTileRowSize
vtk_TIFFTileRowSize64
vtk_TIFFTileSize
vtk_TIFFTileSize64
vtk_TIFFUnRegisterCODEC
vtk_TIFFUnlinkDirectory
vtk_TIFFUnsetField
vtk_TIFFVGetField
vtk_TIFFVGetFieldDefaulted
vtk_TIFFVSetField
vtk_TIFFVStripSize
vtk_TIFFVStripSize64
vtk_TIFFVTileSize
vtk_TIFFVTileSize64
vtk_TIFFWarning
vtk_TIFFWarningExt
vtk_TIFFWriteBufferSetup
vtk_TIFFWriteCheck
vtk_TIFFWriteCustomDirectory
vtk_TIFFWriteDirectory
vtk_TIFFWriteEncodedStrip
vtk_TIFFWriteEncodedTile
vtk_TIFFWriteRawStrip
vtk_TIFFWriteRawTile
vtk_TIFFWriteScanline
vtk_TIFFWriteTile
vtk_TIFFXYZToRGB
vtk_TIFFYCbCrToRGBInit
vtk_TIFFYCbCrtoRGB
vtk__TIFFCheckMalloc
vtk__TIFFCheckRealloc
vtk__TIFFRewriteField
vtk__TIFFfree
vtk__TIFFmalloc
vtk__TIFFmemcmp
vtk__TIFFmemcpy
vtk__TIFFmemset
vtk__TIFFrealloc
/* "Id */
/* "$Id$ */
/*
* Copyright (c) 1991-1997 Sam Leffler
......@@ -41,7 +41,11 @@
#include "tif_fax3.h"
#define streq(a,b) (strcmp(a,b) == 0)
#ifndef HAVE_GETOPT
extern int getopt(int, char**, char*);
#endif
#define streq(a,b) (strcmp(a,b) == 0)
/* NB: can't use names in tif_fax3.h 'cuz they are declared const */
TIFFFaxTabEnt MainTable[128];
......@@ -49,8 +53,8 @@ TIFFFaxTabEnt WhiteTable[4096];
TIFFFaxTabEnt BlackTable[8192];
struct proto {
uint16 code; /* right justified, lsb-first, zero filled */
uint16 val; /* (pixel count)<<4 + code width */
uint16 code; /* right justified, lsb-first, zero filled */
uint16 val; /* (pixel count)<<4 + code width */
};
static struct proto Pass[] = {
......@@ -318,25 +322,25 @@ FillTable(TIFFFaxTabEnt *T, int Size, struct proto *P, int State)
int limit = 1 << Size;
while (P->val) {
int width = P->val & 15;
int param = P->val >> 4;
int incr = 1 << width;
int code;
for (code = P->code; code < limit; code += incr) {
TIFFFaxTabEnt *E = T+code;
E->State = State;
E->Width = width;
E->Param = param;
}
P++;
int width = P->val & 15;
int param = P->val >> 4;
int incr = 1 << width;
int code;
for (code = P->code; code < limit; code += incr) {
TIFFFaxTabEnt *E = T+code;
E->State = State;
E->Width = width;
E->Param = param;
}
P++;
}
}