FR: add libtiff to winlibs and php-sdk/deps

[email protected] ("Christoph M. Becker") Tue, 24 Jan 2017 19:24:11 +0100
Newsgroups php.internals.win
Message-ID <[email protected]>
Hi Anatol!

A while ago Pierre suggested that we use the relevant php-sdk/deps[1]
for the GD project[1].  That works great, and we have rudimentary build
system for MSVC 14 running.  However, libtiff is not available in the
php-sdk/deps, so we can't easily offer prebuilt binaries[2] with TIFF
support; we can't even easily run the (few) TIFF related test cases[3].

I had a look at building libtiff 3.8.2[4] myself, and actually that
worked quite well with the supplied Makefile.vc.  I only made some
minimal adjustments to nmake.opt (see the attached diff) – and ignored a
lot of warnings.

So would it be possible to add libtiff to <https://github.com/winlibs>,
and to make a binary distribution available as part of the php-sdk?
Note that TIFF support is not planned for PHP's GD binding for now[5],
but as soon as TIFF support has improved, that is likely to change.

Cheers,
Christoph

[1] <https://github.com/libgd/libgd/issues/249>
[2] <https://github.com/libgd/libgd/issues/342>
[3] <https://github.com/libgd/libgd/issues/249#issuecomment-273871529>
[4] <http://dl.maptools.org/dl/libtiff/>
[5] <https://github.com/php/php-src/pull/2029#issuecomment-236952960>
nmake.opt.diff (text/plain, 952 B)
--- C:\Users\cmb\Downloads\nmake.opt
+++ C:\Users\cmb\php\sdk\phpdev\vc14\x64\tiff-3.8.2\nmake.opt
@@ -54,10 +54,10 @@
 #
 # Uncomment and edit following lines to enable JPEG support.
 #
-#JPEG_SUPPORT	= 1
+JPEG_SUPPORT	= 1
 #JPEGDIR 	= d:/projects/jpeg-6b
-#JPEG_INCLUDE	= -I$(JPEGDIR)
-#JPEG_LIB 	= $(JPEGDIR)/Release/jpeg.lib
+JPEG_INCLUDE	= -I../../deps-master/include/
+JPEG_LIB 	= ../../deps-master/lib/libjpeg_a.lib
 
 #
 # Uncomment following lines to enable Old JPEG support
@@ -69,10 +69,10 @@
 # Uncomment and edit following lines to enable ZIP support
 # (required for Deflate compression and Pixar log-format)
 #
-#ZIP_SUPPORT	= 1
+ZIP_SUPPORT	= 1
 #ZLIBDIR 	= d:/projects/zlib-1.2.1
-#ZLIB_INCLUDE	= -I$(ZLIBDIR)
-#ZLIB_LIB 	= $(ZLIBDIR)/zlib.lib
+ZLIB_INCLUDE	= -I../../deps-master/include/
+ZLIB_LIB 	= ../../deps-master/lib/zlib_a.lib
 
 #
 # Uncomment following line to enable Pixar log-format algorithm