tiff: remove dependency on libgl, include SupportDefs.h

* also add secondary arch suffixes
* enable other architectures
This commit is contained in:
Jerome Duval
2014-06-02 18:37:27 +00:00
parent b41fbe8e15
commit ce7e5754a7
2 changed files with 137 additions and 10 deletions

View File

@@ -0,0 +1,128 @@
From a82320c3f0bf541c6c400cbaafda7a5f50b6ba12 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Mon, 2 Jun 2014 20:07:15 +0000
Subject: checks for uint32, uint16, uint8 and uses SupportsDefs.h
diff --git a/configure.ac b/configure.ac
index d48a58b..763ed52 100644
--- a/configure.ac
+++ b/configure.ac
@@ -154,11 +154,14 @@ AC_CHECK_SIZEOF(long)
AC_HEADER_TIME
AC_STRUCT_TM
dnl Some compilers (IBM VisualAge) has these types defined, so check it here:
-AC_CHECK_TYPES([int8, int16, int32],,,
+AC_CHECK_TYPES([int8, int16, int32, uint8, uint16, uint32],,,
[
#if HAVE_INTTYPES_H
# include <inttypes.h>
#endif
+#ifdef __HAIKU__
+# include <SupportDefs.h>
+#endif
])
# Obtain size of a 'signed long' and define as SIZEOF_SIGNED_LONG
diff --git a/libtiff/tif_config.h.in b/libtiff/tif_config.h.in
index 01e54de..41a5772 100644
--- a/libtiff/tif_config.h.in
+++ b/libtiff/tif_config.h.in
@@ -142,6 +142,15 @@
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
+/* Define to 1 if the system has the type `uint16'. */
+#undef HAVE_UINT16
+
+/* Define to 1 if the system has the type `uint32'. */
+#undef HAVE_UINT32
+
+/* Define to 1 if the system has the type `uint8'. */
+#undef HAVE_UINT8
+
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
diff --git a/libtiff/tiff.h b/libtiff/tiff.h
index 0d4ab9f..c70f214 100644
--- a/libtiff/tiff.h
+++ b/libtiff/tiff.h
@@ -28,6 +28,10 @@
#define _TIFF_
#include "tiffconf.h"
+#ifdef __HAIKU__
+ #include <SupportDefs.h>
+ // needed for uint* types, avoid massive changes in libtiff
+#endif
/*
* Tag Image File Format (TIFF)
@@ -64,22 +68,30 @@
#ifndef HAVE_INT8
typedef signed char int8; /* NB: non-ANSI compilers may not grok */
#endif
+#ifndef HAVE_UINT8
typedef unsigned char uint8;
+#endif
#ifndef HAVE_INT16
typedef short int16;
#endif
+#ifndef HAVE_UINT16
typedef unsigned short uint16; /* sizeof (uint16) must == 2 */
+#endif
#if SIZEOF_INT == 4
#ifndef HAVE_INT32
typedef int int32;
#endif
+#ifndef HAVE_UINT32
typedef unsigned int uint32; /* sizeof (uint32) must == 4 */
+#endif
#elif SIZEOF_LONG == 4
#ifndef HAVE_INT32
typedef long int32;
#endif
+#ifndef HAVE_UINT32
typedef unsigned long uint32; /* sizeof (uint32) must == 4 */
#endif
+#endif
/* For TIFFReassignTagToIgnore */
enum TIFFIgnoreSense /* IGNORE tag table */
diff --git a/libtiff/tiffconf.h.in b/libtiff/tiffconf.h.in
index 1a52b37..3cdcc28 100644
--- a/libtiff/tiffconf.h.in
+++ b/libtiff/tiffconf.h.in
@@ -16,6 +16,15 @@
/* Define to 1 if the system has the type `int8'. */
#undef HAVE_INT8
+/* Define to 1 if the system has the type `uint16'. */
+#undef HAVE_UINT16
+
+/* Define to 1 if the system has the type `uint32'. */
+#undef HAVE_UINT32
+
+/* Define to 1 if the system has the type `uint8'. */
+#undef HAVE_UINT8
+
/* The size of a `int', as computed by sizeof. */
#undef SIZEOF_INT
diff --git a/libtiff/tiffiop.h b/libtiff/tiffiop.h
index f65f855..3f0e9f7 100644
--- a/libtiff/tiffiop.h
+++ b/libtiff/tiffiop.h
@@ -62,7 +62,7 @@ extern void *lfind(const void *, const void *, size_t *, size_t,
utilities may use it.
*/
-#if !defined(__xlC__) && !defined(__xlc__) // Already defined there (#2301)
+#if !defined(__xlC__) && !defined(__xlc__) && !defined(__HAIKU__) // Already defined there (#2301)
typedef TIFF_INT64_T int64;
typedef TIFF_UINT64_T uint64;
#endif
--
1.8.3.4

View File

@@ -12,9 +12,11 @@ LICENSE="MIT"
COPYRIGHT="1988-1997 Sam Leffler
1991-1997 Silicon Graphics, Inc."
REVISION="1"
ARCHITECTURES="x86_gcc2 ?x86 ?x86_64"
SECONDARY_ARCHITECTURES="?x86_gcc2 ?x86"
REVISION="2"
ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
PATCHES="${portVersionedName}.patchset"
PROVIDES="
tiff$secondaryArchSuffix = $portVersion compat >= 3
@@ -23,14 +25,12 @@ PROVIDES="
"
REQUIRES="
haiku$secondaryArchSuffix >= $haikuVersion
lib:libglu
lib:libjpeg
lib:libz
lib:libjpeg$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
devel:libglu
devel:libjpeg
devel:libz
devel:libjpeg$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel >= $haikuVersion
@@ -121,7 +121,6 @@ if [ -z "$secondaryArchSuffix" ]; then
"
REQUIRES_tools="
haiku >= $haikuVersion
lib:libGL
lib:libjpeg
lib:libz
tiff == $portVersion base