Skip to content

Commit 9ab54a8

Browse files
committed
Revert "Move most TIFF tools to archive and keep some as unsupported (see #580)."
This reverts commit eab89a6. # Conflicts: # tools/unsupported/CMakeLists.txt # tools/unsupported/tif_tools-unsupported_versioninfo.rc
1 parent cf0bdb6 commit 9ab54a8

File tree

174 files changed

+1122
-274
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

174 files changed

+1122
-274
lines changed

CMakeLists.txt

+5-5
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ else()
5151
endif()
5252

5353
option(tiff-tools "build TIFF tools" ON)
54-
option(tiff-tools-unsupported "build unsupported TIFF tools" OFF)
5554
option(tiff-tests "build TIFF tests" ON)
5655
option(tiff-contrib "build TIFF contrib" ON)
5756
option(tiff-docs "build TIFF documentation" ON)
@@ -125,6 +124,9 @@ include(WebPCodec)
125124
# Option for C++ libtiffxx library
126125
include(CXXLibrary)
127126

127+
# Checks for OpenGL support
128+
include(OpenGLChecks)
129+
128130
# Windows support
129131
include(WindowsSupport)
130132

@@ -144,9 +146,6 @@ add_subdirectory(libtiff)
144146
if(tiff-tools)
145147
add_subdirectory(tools)
146148
endif()
147-
if(tiff-tools-unsupported)
148-
add_subdirectory(tools/unsupported)
149-
endif()
150149
if(tiff-tests)
151150
add_subdirectory(test)
152151
endif()
@@ -177,7 +176,6 @@ message(STATUS " C compiler: ${CMAKE_C_COMPILER}")
177176
message(STATUS " C++ compiler: ${CMAKE_CXX_COMPILER}")
178177
message(STATUS " Build shared libraries: ${BUILD_SHARED_LIBS}")
179178
message(STATUS " Build tools: ${tiff-tools}")
180-
message(STATUS " Build tools-unsupported: ${tiff-tools-unsupported}")
181179
message(STATUS " Build tests: ${tiff-tests}")
182180
message(STATUS " Build contrib: ${tiff-contrib}")
183181
message(STATUS " Build docs: ${tiff-docs}")
@@ -228,5 +226,7 @@ message(STATUS " ZSTD support: Requested:${zstd} Availabi
228226
message(STATUS " WEBP support: Requested:${webp} Availability:${WebP_FOUND} Support:${WEBP_SUPPORT}")
229227
message(STATUS "")
230228
message(STATUS " C++ support: ${cxx} (requested) ${CXX_SUPPORT} (availability)")
229+
message(STATUS "")
231230
# message(STATUS " X Athena Widgets support: ${HAVE_XAW}")
231+
message(STATUS " OpenGL support: Requested:${tiff-opengl} Availability:${HAVE_OPENGL} Support:${OPENGL_SUPPORT}")
232232
message(STATUS "")

Makefile.am

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ distcheck-hook:
6060
rm -rf $(distdir)/_build/cmake
6161
rm -rf $(distdir)/_inst/cmake
6262

63-
SUBDIRS = port libtiff tools build contrib test doc tools/unsupported
63+
SUBDIRS = port libtiff tools build contrib test doc
6464

6565

6666
NEW_LIBTIFF_RELEASE_DATE=$(shell date +"%Y%m%d")

archive/test/tiffcp-g3-1d-fill.sh

-7
This file was deleted.

archive/test/tiffcp-g3-1d.sh

-6
This file was deleted.

archive/test/tiffcp-g3-2d-fill.sh

-7
This file was deleted.

archive/test/tiffcp-g3-2d.sh

-6
This file was deleted.

archive/test/tiffcp-g3.sh

-6
This file was deleted.

archive/test/tiffcp-g4.sh

-6
This file was deleted.

archive/test/tiffcp-logluv.sh

-7
This file was deleted.

archive/test/tiffcp-lzw-compat.sh

-6
This file was deleted.

archive/test/tiffcp-lzw-scanline-decode.sh

-6
This file was deleted.

archive/test/tiffcp-split-join.sh

-16
This file was deleted.

archive/test/tiffcp-split.sh

-13
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,50 @@
1-
# Tag Image File Format (TIFF) Software
1+
# Checks for OpenGL and GLUT support
22
#
3-
# Copyright (C) 2004, Andrey Kiselev <[email protected]>
3+
# Copyright © 2015 Open Microscopy Environment / University of Dundee
4+
# Copyright © 2021 Roger Leigh <[email protected]>
5+
# Written by Roger Leigh <[email protected]>
46
#
5-
# Permission to use, copy, modify, distribute, and sell this software and
7+
# Permission to use, copy, modify, distribute, and sell this software and
68
# its documentation for any purpose is hereby granted without fee, provided
79
# that (i) the above copyright notices and this permission notice appear in
810
# all copies of the software and related documentation, and (ii) the names of
911
# Sam Leffler and Silicon Graphics may not be used in any advertising or
1012
# publicity relating to the software without the specific, prior written
1113
# permission of Sam Leffler and Silicon Graphics.
12-
#
13-
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
14-
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
15-
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
16-
#
14+
#
15+
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
16+
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
17+
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
18+
#
1719
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
1820
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
1921
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
20-
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
21-
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
22+
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
23+
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
2224
# OF THIS SOFTWARE.
2325

24-
# Process this file with automake to produce Makefile.in.
25-
26-
LIBPORT = $(top_builddir)/port/libport.la
27-
LIBTIFF = $(top_builddir)/libtiff/libtiff.la
28-
29-
EXTRA_DIST = \
30-
CMakeLists.txt
31-
32-
(echo tifftoolsunsupported: $(TIFF_TOOLS_UNSUPPORTED))
33-
if TIFF_TOOLS_UNSUPPORTED
34-
bin_PROGRAMS = \
35-
tiff2pdf \
36-
tiff2ps
37-
endif
38-
39-
EXTRA_PROGRAMS =
26+
# OpenGL and GLUT
27+
set(OpenGL_GL_PREFERENCE LEGACY)
4028

41-
if HAVE_RPATH
42-
AM_LDFLAGS = $(LIBDIR)
43-
endif
29+
find_package(OpenGL COMPONENTS OpenGL)
30+
find_package(GLUT)
4431

45-
tiff2pdf_SOURCES = tiff2pdf.c
46-
tiff2pdf_LDADD = $(LIBTIFF) $(LIBPORT)
32+
set(OPENGL_SUPPORT FALSE)
33+
set(HAVE_OPENGL FALSE)
34+
if(OPENGL_FOUND AND OPENGL_GLU_FOUND AND GLUT_FOUND)
35+
set(HAVE_OPENGL TRUE)
36+
endif()
4737

48-
tiff2ps_SOURCES = tiff2ps.c
49-
tiff2ps_LDADD = $(LIBTIFF) $(LIBPORT)
38+
# Purely to satisfy the generated headers:
39+
check_include_file(GL/gl.h HAVE_GL_GL_H)
40+
check_include_file(GL/glu.h HAVE_GL_GLU_H)
41+
check_include_file(GL/glut.h HAVE_GL_GLUT_H)
42+
check_include_file(GLUT/glut.h HAVE_GLUT_GLUT_H)
43+
check_include_file(OpenGL/gl.h HAVE_OPENGL_GL_H)
44+
check_include_file(OpenGL/glu.h HAVE_OPENGL_GLU_H)
5045

51-
AM_CPPFLAGS = -I$(top_srcdir)/libtiff -I$(top_srcdir)/port
46+
option(tiff-opengl "use OpenGL (required for tiffgt viewer)" ${HAVE_OPENGL})
5247

53-
echo:
54-
(echo $(CFLAGS))
55-
(echo tifftoolsunsupported: $(TIFF_TOOLS_UNSUPPORTED))
48+
if (tiff-opengl AND HAVE_OPENGL)
49+
set(OPENGL_SUPPORT TRUE)
50+
endif()

configure.ac

+34-9
Original file line numberDiff line numberDiff line change
@@ -320,12 +320,6 @@ AC_ARG_ENABLE(tools,
320320
[TIFF_TOOLS=$enableval], [TIFF_TOOLS=yes])
321321
AM_CONDITIONAL(TIFF_TOOLS, test "$TIFF_TOOLS" = "yes")
322322

323-
AC_ARG_ENABLE(tools-unsupported,
324-
AS_HELP_STRING([--enable-tools-unsupported],
325-
[Enable building of unsupported tools]),
326-
[TIFF_TOOLS_UNSUPPORTED=$enableval], [TIFF_TOOLS_UNSUPPORTED=no])
327-
AM_CONDITIONAL(TIFF_TOOLS_UNSUPPORTED, test "$TIFF_TOOLS_UNSUPPORTED" = "yes")
328-
329323
AC_ARG_ENABLE(tests,
330324
AS_HELP_STRING([--disable-tests],
331325
[Disable building of tests]),
@@ -966,6 +960,38 @@ fi
966960

967961
AM_CONDITIONAL(HAVE_CXX, test "$HAVE_CXX" = "yes")
968962

963+
dnl ---------------------------------------------------------------------------
964+
dnl Check for OpenGL and GLUT.
965+
dnl ---------------------------------------------------------------------------
966+
967+
HAVE_OPENGL=no
968+
969+
AC_ARG_ENABLE(opengl,
970+
AS_HELP_STRING([--disable-opengl],
971+
[disable OpenGL usage (required by tiffgt, enabled by default)]),,)
972+
973+
if test "x$enable_opengl" != "xno" ; then
974+
975+
AC_PATH_XTRA
976+
977+
dnl AX_CHECK_GL sets GL_CFLAGS & GL_LIBS. Also PTHREAD_LIBS,
978+
dnl PTHREAD_CFLAGS, & PTHREAD_CC as a side-effect
979+
AX_CHECK_GL
980+
981+
dnl AX_CHECK_GLU sets GLU_CFLAGS & GLU_LIBS
982+
AX_CHECK_GLU
983+
984+
dnl AX_CHECK_GLUT sets GLUT_CFLAGS & GLUT_LIBS
985+
AX_CHECK_GLUT
986+
987+
if test "$no_x" != "yes" -a "$no_gl" != "yes" \
988+
-a "$no_glu" != "yes" -a "$no_glut" != "yes" ; then
989+
HAVE_OPENGL=yes
990+
fi
991+
fi
992+
993+
AM_CONDITIONAL(HAVE_OPENGL, test "$HAVE_OPENGL" = "yes")
994+
969995
dnl ---------------------------------------------------------------------------
970996
dnl Check for Win32 IO: make sure we have windows.h but not cygwin
971997
dnl ---------------------------------------------------------------------------
@@ -1187,8 +1213,7 @@ AC_CONFIG_FILES([Makefile \
11871213
libtiff/tiffvers.h \
11881214
port/Makefile \
11891215
test/Makefile \
1190-
tools/Makefile \
1191-
tools/unsupported/Makefile])
1216+
tools/Makefile])
11921217
AC_OUTPUT
11931218

11941219
dnl ---------------------------------------------------------------------------
@@ -1207,7 +1232,6 @@ LOC_MSG([ Documentation directory: ${LIBTIFF_DOCDIR}])
12071232
LOC_MSG([ C compiler: ${CC} ${CFLAGS}])
12081233
LOC_MSG([ C++ compiler: ${CXX} ${CXXFLAGS}])
12091234
LOC_MSG([ Build tools: ${TIFF_TOOLS}])
1210-
LOC_MSG([ Build tools-unsupported: ${TIFF_TOOLS_UNSUPPORTED}])
12111235
LOC_MSG([ Build tests: ${TIFF_TESTS}])
12121236
LOC_MSG([ Build contrib: ${TIFF_CONTRIB}])
12131237
LOC_MSG([ Build docs: ${TIFF_DOCS}])
@@ -1245,5 +1269,6 @@ LOC_MSG()
12451269
LOC_MSG([ C++ support: ${HAVE_CXX}])
12461270
LOC_MSG()
12471271
dnl LOC_MSG([ X Athena Widgets support: ${HAVE_XAW}])
1272+
LOC_MSG([ OpenGL support: ${HAVE_OPENGL}])
12481273
LOC_MSG()
12491274

doc/Makefile.am

+16
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,26 @@ rst_sources = \
103103
index.rst \
104104
build.rst \
105105
internals.rst \
106+
tools/tiffgt.rst \
107+
tools/tiffdither.rst \
108+
tools/tiff2pdf.rst \
109+
tools/tiff2ps.rst \
110+
tools/ppm2tiff.rst \
111+
tools/raw2tiff.rst \
112+
tools/fax2tiff.rst \
113+
tools/tiffcrop.rst \
114+
tools/tiff2bw.rst \
115+
tools/fax2ps.rst \
116+
tools/thumbnail.rst \
117+
tools/tiffcmp.rst \
106118
tools/tiffdump.rst \
119+
tools/tiff2rgba.rst \
107120
tools/tiffinfo.rst \
121+
tools/rgb2ycbcr.rst \
108122
tools/tiffset.rst \
109123
tools/tiffsplit.rst \
124+
tools/tiffmedian.rst \
125+
tools/pal2rgb.rst \
110126
tools/tiffcp.rst \
111127
project/license.rst \
112128
project/index.rst \

doc/build.rst

+8-4
Original file line numberDiff line numberDiff line change
@@ -617,16 +617,20 @@ necessary to manually do this work on a non-UNIX system.
617617
Testing the software
618618
--------------------
619619

620-
You can try
620+
Assuming you have working versions of :doc:`/tools/tiffgt`, you can now use
621+
it to view any of the sample images available for testing, or try
621622
:doc:`/tools/tiffinfo` to display the file metadata. See the
622-
:doc:`images` section on obtaining the test images.
623-
Otherwise, you can do a cursory check of the library
624-
with the :doc:`/tools/tiffcp` program. For example,
623+
:doc:`images` section on obtaining the test images. Otherwise, you can
624+
do a cursory check of the library with the :doc:`/tools/tiffcp` and
625+
:doc:`/tools/tiffcmp` programs. For example,
625626

626627
.. code-block:: shell
627628
628629
tiffcp -lzw cramps.tif x.tif
630+
tiffcmp cramps.tif x.tif
629631
632+
(:program:`tiffcmp` should be silent if the files compare
633+
correctly).
630634

631635

632636
LibTIFF source files

0 commit comments

Comments
 (0)