Ticket #7866: vips-7.22.2.2.patch

File vips-7.22.2.2.patch, 23.8 KB (added by W. Michael Petullo <mike@…>, 6 years ago)

Use --disable-threads to fix crash while I engage VIPS developers, obsoletes previous

  • libs/vips/patches/vips-7.22.2-no-cxx.patch

     
     1diff -u --recursive vips-7.22.2-vanilla/libvips/Makefile.am vips-7.22.2/libvips/Makefile.am 
     2--- vips-7.22.2-vanilla/libvips/Makefile.am     2010-08-31 00:54:45.215126001 -0500 
     3+++ vips-7.22.2/libvips/Makefile.am     2010-08-31 00:55:18.900126060 -0500 
     4@@ -36,9 +36,6 @@ 
     5 lib_LTLIBRARIES = libvips.la 
     6  
     7 libvips_la_SOURCES = dummy.c  
     8-if ENABLE_CXX 
     9-libvips_la_SOURCES += dummy2.cc 
     10-endif 
     11  
     12 # DLLs need dependant libs there too ... put @VIPS_LIBS@ at the end 
     13 libvips_la_LIBADD = \ 
     14diff -u --recursive vips-7.22.2-vanilla/libvips/Makefile.am vips-7.22.2/libvips/Makefile.am 
     15--- vips-7.22.2-vanilla/libvips/Makefile.am     2010-08-31 00:54:45.215126001 -0500 
     16+++ vips-7.22.2/libvips/Makefile.am     2010-08-31 00:55:18.900126060 -0500 
     17@@ -36,9 +36,6 @@ 
     18 lib_LTLIBRARIES = libvips.la 
     19  
     20 libvips_la_SOURCES = dummy.c  
     21-if ENABLE_CXX 
     22-libvips_la_SOURCES += dummy2.cc 
     23-endif 
     24  
     25 # DLLs need dependant libs there too ... put @VIPS_LIBS@ at the end 
     26 libvips_la_LIBADD = \ 
  • libs/vips/patches/vips-7.22.2-iconv.patch

     
     1diff -u --recursive --new-file vips-7.22.2-vanilla/configure.in vips-7.22.2/configure.in 
     2--- vips-7.22.2-vanilla/configure.in    2010-09-13 16:03:33.945285002 -0500 
     3+++ vips-7.22.2/configure.in    2010-09-13 16:13:36.848285002 -0500 
     4@@ -142,6 +142,7 @@ 
     5 AC_PROG_AWK 
     6 AC_PROG_CC 
     7 AC_PROG_CC_STDC 
     8+AC_PROG_CXX 
     9 AC_C_CONST 
     10 AC_C_RESTRICT 
     11 AC_PROG_RANLIB 
     12@@ -157,7 +158,6 @@ 
     13   AS_HELP_STRING([--enable-cxx], [build C++ components (default: enabled)])) 
     14  
     15 if test x"$enable_cxx" != "xno"; then 
     16-  AC_PROG_CXX 
     17   AC_DEFINE(ENABLE_CXX,1,[build C++ components]) 
     18   AM_CONDITIONAL(ENABLE_CXX, true) 
     19   enable_cxx=yes 
     20@@ -273,9 +273,6 @@ 
     21   enable_threads=yes 
     22 fi 
     23  
     24-# check for gtk-doc 
     25-GTK_DOC_CHECK(1.9) 
     26- 
     27 # optional supporting libraries 
     28  
     29 # we can wrap fftw3 and fftw2 ... but just look for fftw3, since we can do 
     30@@ -633,9 +630,6 @@ 
     31        swig/vipsCC/Makefile  
     32        swig/python/setup.py  
     33        man/Makefile 
     34-       doc/Makefile 
     35-       doc/reference/Makefile 
     36-       doc/reference/libvips-docs.sgml 
     37        po/Makefile.in 
     38 ]) 
     39  
     40diff -u --recursive --new-file vips-7.22.2-vanilla/m4/iconv.m4 vips-7.22.2/m4/iconv.m4 
     41--- vips-7.22.2-vanilla/m4/iconv.m4     1969-12-31 18:00:00.000000000 -0600 
     42+++ vips-7.22.2/m4/iconv.m4     2010-09-13 16:14:05.650285001 -0500 
     43@@ -0,0 +1,214 @@ 
     44+# iconv.m4 serial 11 (gettext-0.18.1) 
     45+dnl Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc. 
     46+dnl This file is free software; the Free Software Foundation 
     47+dnl gives unlimited permission to copy and/or distribute it, 
     48+dnl with or without modifications, as long as this notice is preserved. 
     49+ 
     50+dnl From Bruno Haible. 
     51+ 
     52+AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], 
     53+[ 
     54+  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. 
     55+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 
     56+  AC_REQUIRE([AC_LIB_RPATH]) 
     57+ 
     58+  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV 
     59+  dnl accordingly. 
     60+  AC_LIB_LINKFLAGS_BODY([iconv]) 
     61+]) 
     62+ 
     63+AC_DEFUN([AM_ICONV_LINK], 
     64+[ 
     65+  dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and 
     66+  dnl those with the standalone portable GNU libiconv installed). 
     67+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles 
     68+ 
     69+  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV 
     70+  dnl accordingly. 
     71+  AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) 
     72+ 
     73+  dnl Add $INCICONV to CPPFLAGS before performing the following checks, 
     74+  dnl because if the user has installed libiconv and not disabled its use 
     75+  dnl via --without-libiconv-prefix, he wants to use it. The first 
     76+  dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. 
     77+  am_save_CPPFLAGS="$CPPFLAGS" 
     78+  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) 
     79+ 
     80+  AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [ 
     81+    am_cv_func_iconv="no, consider installing GNU libiconv" 
     82+    am_cv_lib_iconv=no 
     83+    AC_TRY_LINK([#include <stdlib.h> 
     84+#include <iconv.h>], 
     85+      [iconv_t cd = iconv_open("",""); 
     86+       iconv(cd,NULL,NULL,NULL,NULL); 
     87+       iconv_close(cd);], 
     88+      [am_cv_func_iconv=yes]) 
     89+    if test "$am_cv_func_iconv" != yes; then 
     90+      am_save_LIBS="$LIBS" 
     91+      LIBS="$LIBS $LIBICONV" 
     92+      AC_TRY_LINK([#include <stdlib.h> 
     93+#include <iconv.h>], 
     94+        [iconv_t cd = iconv_open("",""); 
     95+         iconv(cd,NULL,NULL,NULL,NULL); 
     96+         iconv_close(cd);], 
     97+        [am_cv_lib_iconv=yes] 
     98+        [am_cv_func_iconv=yes]) 
     99+      LIBS="$am_save_LIBS" 
     100+    fi 
     101+  ]) 
     102+  if test "$am_cv_func_iconv" = yes; then 
     103+    AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [ 
     104+      dnl This tests against bugs in AIX 5.1, HP-UX 11.11, Solaris 10. 
     105+      am_save_LIBS="$LIBS" 
     106+      if test $am_cv_lib_iconv = yes; then 
     107+        LIBS="$LIBS $LIBICONV" 
     108+      fi 
     109+      AC_TRY_RUN([ 
     110+#include <iconv.h> 
     111+#include <string.h> 
     112+int main () 
     113+{ 
     114+  /* Test against AIX 5.1 bug: Failures are not distinguishable from successful 
     115+     returns.  */ 
     116+  { 
     117+    iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); 
     118+    if (cd_utf8_to_88591 != (iconv_t)(-1)) 
     119+      { 
     120+        static const char input[] = "\342\202\254"; /* EURO SIGN */ 
     121+        char buf[10]; 
     122+        const char *inptr = input; 
     123+        size_t inbytesleft = strlen (input); 
     124+        char *outptr = buf; 
     125+        size_t outbytesleft = sizeof (buf); 
     126+        size_t res = iconv (cd_utf8_to_88591, 
     127+                            (char **) &inptr, &inbytesleft, 
     128+                            &outptr, &outbytesleft); 
     129+        if (res == 0) 
     130+          return 1; 
     131+      } 
     132+  } 
     133+  /* Test against Solaris 10 bug: Failures are not distinguishable from 
     134+     successful returns.  */ 
     135+  { 
     136+    iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); 
     137+    if (cd_ascii_to_88591 != (iconv_t)(-1)) 
     138+      { 
     139+        static const char input[] = "\263"; 
     140+        char buf[10]; 
     141+        const char *inptr = input; 
     142+        size_t inbytesleft = strlen (input); 
     143+        char *outptr = buf; 
     144+        size_t outbytesleft = sizeof (buf); 
     145+        size_t res = iconv (cd_ascii_to_88591, 
     146+                            (char **) &inptr, &inbytesleft, 
     147+                            &outptr, &outbytesleft); 
     148+        if (res == 0) 
     149+          return 1; 
     150+      } 
     151+  } 
     152+#if 0 /* This bug could be worked around by the caller.  */ 
     153+  /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */ 
     154+  { 
     155+    iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); 
     156+    if (cd_88591_to_utf8 != (iconv_t)(-1)) 
     157+      { 
     158+        static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; 
     159+        char buf[50]; 
     160+        const char *inptr = input; 
     161+        size_t inbytesleft = strlen (input); 
     162+        char *outptr = buf; 
     163+        size_t outbytesleft = sizeof (buf); 
     164+        size_t res = iconv (cd_88591_to_utf8, 
     165+                            (char **) &inptr, &inbytesleft, 
     166+                            &outptr, &outbytesleft); 
     167+        if ((int)res > 0) 
     168+          return 1; 
     169+      } 
     170+  } 
     171+#endif 
     172+  /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is 
     173+     provided.  */ 
     174+  if (/* Try standardized names.  */ 
     175+      iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) 
     176+      /* Try IRIX, OSF/1 names.  */ 
     177+      && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) 
     178+      /* Try AIX names.  */ 
     179+      && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) 
     180+      /* Try HP-UX names.  */ 
     181+      && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) 
     182+    return 1; 
     183+  return 0; 
     184+}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no], 
     185+        [case "$host_os" in 
     186+           aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; 
     187+           *)            am_cv_func_iconv_works="guessing yes" ;; 
     188+         esac]) 
     189+      LIBS="$am_save_LIBS" 
     190+    ]) 
     191+    case "$am_cv_func_iconv_works" in 
     192+      *no) am_func_iconv=no am_cv_lib_iconv=no ;; 
     193+      *)   am_func_iconv=yes ;; 
     194+    esac 
     195+  else 
     196+    am_func_iconv=no am_cv_lib_iconv=no 
     197+  fi 
     198+  if test "$am_func_iconv" = yes; then 
     199+    AC_DEFINE([HAVE_ICONV], [1], 
     200+      [Define if you have the iconv() function and it works.]) 
     201+  fi 
     202+  if test "$am_cv_lib_iconv" = yes; then 
     203+    AC_MSG_CHECKING([how to link with libiconv]) 
     204+    AC_MSG_RESULT([$LIBICONV]) 
     205+  else 
     206+    dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV 
     207+    dnl either. 
     208+    CPPFLAGS="$am_save_CPPFLAGS" 
     209+    LIBICONV= 
     210+    LTLIBICONV= 
     211+  fi 
     212+  AC_SUBST([LIBICONV]) 
     213+  AC_SUBST([LTLIBICONV]) 
     214+]) 
     215+ 
     216+dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to 
     217+dnl avoid warnings like 
     218+dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required". 
     219+dnl This is tricky because of the way 'aclocal' is implemented: 
     220+dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN. 
     221+dnl   Otherwise aclocal's initial scan pass would miss the macro definition. 
     222+dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions. 
     223+dnl   Otherwise aclocal would emit many "Use of uninitialized value $1" 
     224+dnl   warnings. 
     225+m4_define([gl_iconv_AC_DEFUN], 
     226+  m4_version_prereq([2.64], 
     227+    [[AC_DEFUN_ONCE( 
     228+        [$1], [$2])]], 
     229+    [[AC_DEFUN( 
     230+        [$1], [$2])]])) 
     231+gl_iconv_AC_DEFUN([AM_ICONV], 
     232+[ 
     233+  AM_ICONV_LINK 
     234+  if test "$am_cv_func_iconv" = yes; then 
     235+    AC_MSG_CHECKING([for iconv declaration]) 
     236+    AC_CACHE_VAL([am_cv_proto_iconv], [ 
     237+      AC_TRY_COMPILE([ 
     238+#include <stdlib.h> 
     239+#include <iconv.h> 
     240+extern 
     241+#ifdef __cplusplus 
     242+"C" 
     243+#endif 
     244+#if defined(__STDC__) || defined(__cplusplus) 
     245+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); 
     246+#else 
     247+size_t iconv(); 
     248+#endif 
     249+], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"]) 
     250+      am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) 
     251+    am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` 
     252+    AC_MSG_RESULT([ 
     253+         $am_cv_proto_iconv]) 
     254+    AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], 
     255+      [Define as const if the declaration of iconv() needs const.]) 
     256+  fi 
     257+]) 
     258diff -u --recursive --new-file vips-7.22.2-vanilla/Makefile.am vips-7.22.2/Makefile.am 
     259--- vips-7.22.2-vanilla/Makefile.am     2010-09-13 16:03:33.946285002 -0500 
     260+++ vips-7.22.2/Makefile.am     2010-09-13 16:10:27.306284973 -0500 
     261@@ -24,7 +24,6 @@ 
     262        tools \ 
     263        man \ 
     264        po \ 
     265-       doc \ 
     266        $(C_COMPILE_DIR) \ 
     267        $(P_COMPILE_DIR)  
     268  
     269diff -u --recursive --new-file vips-7.22.2-vanilla/configure.in vips-7.22.2/configure.in 
     270--- vips-7.22.2-vanilla/configure.in    2010-09-13 16:03:33.945285002 -0500 
     271+++ vips-7.22.2/configure.in    2010-09-13 16:13:36.848285002 -0500 
     272@@ -142,6 +142,7 @@ 
     273 AC_PROG_AWK 
     274 AC_PROG_CC 
     275 AC_PROG_CC_STDC 
     276+AC_PROG_CXX 
     277 AC_C_CONST 
     278 AC_C_RESTRICT 
     279 AC_PROG_RANLIB 
     280@@ -157,7 +158,6 @@ 
     281   AS_HELP_STRING([--enable-cxx], [build C++ components (default: enabled)])) 
     282  
     283 if test x"$enable_cxx" != "xno"; then 
     284-  AC_PROG_CXX 
     285   AC_DEFINE(ENABLE_CXX,1,[build C++ components]) 
     286   AM_CONDITIONAL(ENABLE_CXX, true) 
     287   enable_cxx=yes 
     288@@ -273,9 +273,6 @@ 
     289   enable_threads=yes 
     290 fi 
     291  
     292-# check for gtk-doc 
     293-GTK_DOC_CHECK(1.9) 
     294- 
     295 # optional supporting libraries 
     296  
     297 # we can wrap fftw3 and fftw2 ... but just look for fftw3, since we can do 
     298@@ -633,9 +630,6 @@ 
     299        swig/vipsCC/Makefile  
     300        swig/python/setup.py  
     301        man/Makefile 
     302-       doc/Makefile 
     303-       doc/reference/Makefile 
     304-       doc/reference/libvips-docs.sgml 
     305        po/Makefile.in 
     306 ]) 
     307  
     308diff -u --recursive --new-file vips-7.22.2-vanilla/m4/iconv.m4 vips-7.22.2/m4/iconv.m4 
     309--- vips-7.22.2-vanilla/m4/iconv.m4     1969-12-31 18:00:00.000000000 -0600 
     310+++ vips-7.22.2/m4/iconv.m4     2010-09-13 16:14:05.650285001 -0500 
     311@@ -0,0 +1,214 @@ 
     312+# iconv.m4 serial 11 (gettext-0.18.1) 
     313+dnl Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc. 
     314+dnl This file is free software; the Free Software Foundation 
     315+dnl gives unlimited permission to copy and/or distribute it, 
     316+dnl with or without modifications, as long as this notice is preserved. 
     317+ 
     318+dnl From Bruno Haible. 
     319+ 
     320+AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], 
     321+[ 
     322+  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. 
     323+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 
     324+  AC_REQUIRE([AC_LIB_RPATH]) 
     325+ 
     326+  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV 
     327+  dnl accordingly. 
     328+  AC_LIB_LINKFLAGS_BODY([iconv]) 
     329+]) 
     330+ 
     331+AC_DEFUN([AM_ICONV_LINK], 
     332+[ 
     333+  dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and 
     334+  dnl those with the standalone portable GNU libiconv installed). 
     335+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles 
     336+ 
     337+  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV 
     338+  dnl accordingly. 
     339+  AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) 
     340+ 
     341+  dnl Add $INCICONV to CPPFLAGS before performing the following checks, 
     342+  dnl because if the user has installed libiconv and not disabled its use 
     343+  dnl via --without-libiconv-prefix, he wants to use it. The first 
     344+  dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. 
     345+  am_save_CPPFLAGS="$CPPFLAGS" 
     346+  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) 
     347+ 
     348+  AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [ 
     349+    am_cv_func_iconv="no, consider installing GNU libiconv" 
     350+    am_cv_lib_iconv=no 
     351+    AC_TRY_LINK([#include <stdlib.h> 
     352+#include <iconv.h>], 
     353+      [iconv_t cd = iconv_open("",""); 
     354+       iconv(cd,NULL,NULL,NULL,NULL); 
     355+       iconv_close(cd);], 
     356+      [am_cv_func_iconv=yes]) 
     357+    if test "$am_cv_func_iconv" != yes; then 
     358+      am_save_LIBS="$LIBS" 
     359+      LIBS="$LIBS $LIBICONV" 
     360+      AC_TRY_LINK([#include <stdlib.h> 
     361+#include <iconv.h>], 
     362+        [iconv_t cd = iconv_open("",""); 
     363+         iconv(cd,NULL,NULL,NULL,NULL); 
     364+         iconv_close(cd);], 
     365+        [am_cv_lib_iconv=yes] 
     366+        [am_cv_func_iconv=yes]) 
     367+      LIBS="$am_save_LIBS" 
     368+    fi 
     369+  ]) 
     370+  if test "$am_cv_func_iconv" = yes; then 
     371+    AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [ 
     372+      dnl This tests against bugs in AIX 5.1, HP-UX 11.11, Solaris 10. 
     373+      am_save_LIBS="$LIBS" 
     374+      if test $am_cv_lib_iconv = yes; then 
     375+        LIBS="$LIBS $LIBICONV" 
     376+      fi 
     377+      AC_TRY_RUN([ 
     378+#include <iconv.h> 
     379+#include <string.h> 
     380+int main () 
     381+{ 
     382+  /* Test against AIX 5.1 bug: Failures are not distinguishable from successful 
     383+     returns.  */ 
     384+  { 
     385+    iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); 
     386+    if (cd_utf8_to_88591 != (iconv_t)(-1)) 
     387+      { 
     388+        static const char input[] = "\342\202\254"; /* EURO SIGN */ 
     389+        char buf[10]; 
     390+        const char *inptr = input; 
     391+        size_t inbytesleft = strlen (input); 
     392+        char *outptr = buf; 
     393+        size_t outbytesleft = sizeof (buf); 
     394+        size_t res = iconv (cd_utf8_to_88591, 
     395+                            (char **) &inptr, &inbytesleft, 
     396+                            &outptr, &outbytesleft); 
     397+        if (res == 0) 
     398+          return 1; 
     399+      } 
     400+  } 
     401+  /* Test against Solaris 10 bug: Failures are not distinguishable from 
     402+     successful returns.  */ 
     403+  { 
     404+    iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); 
     405+    if (cd_ascii_to_88591 != (iconv_t)(-1)) 
     406+      { 
     407+        static const char input[] = "\263"; 
     408+        char buf[10]; 
     409+        const char *inptr = input; 
     410+        size_t inbytesleft = strlen (input); 
     411+        char *outptr = buf; 
     412+        size_t outbytesleft = sizeof (buf); 
     413+        size_t res = iconv (cd_ascii_to_88591, 
     414+                            (char **) &inptr, &inbytesleft, 
     415+                            &outptr, &outbytesleft); 
     416+        if (res == 0) 
     417+          return 1; 
     418+      } 
     419+  } 
     420+#if 0 /* This bug could be worked around by the caller.  */ 
     421+  /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */ 
     422+  { 
     423+    iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); 
     424+    if (cd_88591_to_utf8 != (iconv_t)(-1)) 
     425+      { 
     426+        static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; 
     427+        char buf[50]; 
     428+        const char *inptr = input; 
     429+        size_t inbytesleft = strlen (input); 
     430+        char *outptr = buf; 
     431+        size_t outbytesleft = sizeof (buf); 
     432+        size_t res = iconv (cd_88591_to_utf8, 
     433+                            (char **) &inptr, &inbytesleft, 
     434+                            &outptr, &outbytesleft); 
     435+        if ((int)res > 0) 
     436+          return 1; 
     437+      } 
     438+  } 
     439+#endif 
     440+  /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is 
     441+     provided.  */ 
     442+  if (/* Try standardized names.  */ 
     443+      iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) 
     444+      /* Try IRIX, OSF/1 names.  */ 
     445+      && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) 
     446+      /* Try AIX names.  */ 
     447+      && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) 
     448+      /* Try HP-UX names.  */ 
     449+      && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) 
     450+    return 1; 
     451+  return 0; 
     452+}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no], 
     453+        [case "$host_os" in 
     454+           aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; 
     455+           *)            am_cv_func_iconv_works="guessing yes" ;; 
     456+         esac]) 
     457+      LIBS="$am_save_LIBS" 
     458+    ]) 
     459+    case "$am_cv_func_iconv_works" in 
     460+      *no) am_func_iconv=no am_cv_lib_iconv=no ;; 
     461+      *)   am_func_iconv=yes ;; 
     462+    esac 
     463+  else 
     464+    am_func_iconv=no am_cv_lib_iconv=no 
     465+  fi 
     466+  if test "$am_func_iconv" = yes; then 
     467+    AC_DEFINE([HAVE_ICONV], [1], 
     468+      [Define if you have the iconv() function and it works.]) 
     469+  fi 
     470+  if test "$am_cv_lib_iconv" = yes; then 
     471+    AC_MSG_CHECKING([how to link with libiconv]) 
     472+    AC_MSG_RESULT([$LIBICONV]) 
     473+  else 
     474+    dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV 
     475+    dnl either. 
     476+    CPPFLAGS="$am_save_CPPFLAGS" 
     477+    LIBICONV= 
     478+    LTLIBICONV= 
     479+  fi 
     480+  AC_SUBST([LIBICONV]) 
     481+  AC_SUBST([LTLIBICONV]) 
     482+]) 
     483+ 
     484+dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to 
     485+dnl avoid warnings like 
     486+dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required". 
     487+dnl This is tricky because of the way 'aclocal' is implemented: 
     488+dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN. 
     489+dnl   Otherwise aclocal's initial scan pass would miss the macro definition. 
     490+dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions. 
     491+dnl   Otherwise aclocal would emit many "Use of uninitialized value $1" 
     492+dnl   warnings. 
     493+m4_define([gl_iconv_AC_DEFUN], 
     494+  m4_version_prereq([2.64], 
     495+    [[AC_DEFUN_ONCE( 
     496+        [$1], [$2])]], 
     497+    [[AC_DEFUN( 
     498+        [$1], [$2])]])) 
     499+gl_iconv_AC_DEFUN([AM_ICONV], 
     500+[ 
     501+  AM_ICONV_LINK 
     502+  if test "$am_cv_func_iconv" = yes; then 
     503+    AC_MSG_CHECKING([for iconv declaration]) 
     504+    AC_CACHE_VAL([am_cv_proto_iconv], [ 
     505+      AC_TRY_COMPILE([ 
     506+#include <stdlib.h> 
     507+#include <iconv.h> 
     508+extern 
     509+#ifdef __cplusplus 
     510+"C" 
     511+#endif 
     512+#if defined(__STDC__) || defined(__cplusplus) 
     513+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); 
     514+#else 
     515+size_t iconv(); 
     516+#endif 
     517+], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"]) 
     518+      am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) 
     519+    am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` 
     520+    AC_MSG_RESULT([ 
     521+         $am_cv_proto_iconv]) 
     522+    AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], 
     523+      [Define as const if the declaration of iconv() needs const.]) 
     524+  fi 
     525+]) 
     526diff -u --recursive --new-file vips-7.22.2-vanilla/Makefile.am vips-7.22.2/Makefile.am 
     527--- vips-7.22.2-vanilla/Makefile.am     2010-09-13 16:03:33.946285002 -0500 
     528+++ vips-7.22.2/Makefile.am     2010-09-13 16:10:27.306284973 -0500 
     529@@ -24,7 +24,6 @@ 
     530        tools \ 
     531        man \ 
     532        po \ 
     533-       doc \ 
     534        $(C_COMPILE_DIR) \ 
     535        $(P_COMPILE_DIR)  
     536  
  • libs/vips/Makefile

     
     1# 
     2# Copyright (C) 2009 OpenWrt.org 
     3# 
     4# This is free software, licensed under the GNU General Public License v2. 
     5# See /LICENSE for more information. 
     6# 
     7 
     8include $(TOPDIR)/rules.mk 
     9 
     10PKG_NAME:=vips 
     11PKG_VERSION:=7.22.2 
     12PKG_RELEASE:=1 
     13 
     14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 
     15PKG_SOURCE_URL:=http://www.vips.ecs.soton.ac.uk/supported/7.22/ 
     16PKG_MD5SUM:=bb626458e82ff208ea531c304f65cb04 
     17 
     18include $(INCLUDE_DIR)/package.mk 
     19 
     20export PATH:=$(PKG_BUILD_DIR)/bin:$(TARGET_PATH) 
     21 
     22PKG_INSTALL=1 
     23 
     24define Package/vips/Default 
     25  TITLE:=vips 
     26  URL:=http://www.vips.ecs.soton.ac.uk/ 
     27endef 
     28 
     29define Package/vips 
     30  $(call Package/vips/Default) 
     31  SECTION:=multimedia 
     32  CATEGORY:=Multimedia 
     33  DEPENDS:=+libjpeg +libintl +glib2 +libxml2 
     34endef 
     35 
     36define Package/vips/description 
     37  An image manipulation library. 
     38endef 
     39 
     40TARGET_CFLAGS+= \ 
     41        -I$(STAGING_DIR)/usr/lib/libintl/include 
     42 
     43TARGET_LDFLAGS+= \ 
     44        -L$(STAGING_DIR)/usr/lib/libintl/lib 
     45 
     46define Build/Configure 
     47        # This should be handled upstream in the next version (VIPS 2.22.3+) 
     48        ( cd "$(PKG_BUILD_DIR)" && aclocal && libtoolize --force && autoconf ) 
     49 
     50        $(call Build/Configure/Default, \ 
     51                --disable-cxx \ 
     52                --disable-threads \ 
     53                --without-liboil \ 
     54        ) 
     55endef 
     56 
     57define Build/InstallDev 
     58        $(INSTALL_DIR) $(1)/usr/include/vips 
     59        $(CP) \ 
     60                $(PKG_INSTALL_DIR)/usr/include/* \ 
     61                $(1)/usr/include/ 
     62 
     63        $(INSTALL_DIR) $(1)/usr/lib/ 
     64        $(CP) \ 
     65                $(PKG_INSTALL_DIR)/usr/lib/*.so* \ 
     66                $(1)/usr/lib/ 
     67 
     68        $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/ 
     69        $(INSTALL_DATA) \ 
     70                $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ 
     71                $(1)/usr/lib/pkgconfig/ 
     72endef 
     73 
     74define Package/vips/install 
     75        $(INSTALL_DIR) $(1)/usr/lib/ 
     76        $(CP) \ 
     77                $(PKG_INSTALL_DIR)/usr/lib/*.so* \ 
     78                $(1)/usr/lib/ 
     79endef 
     80 
     81$(eval $(call BuildPackage,vips)) 
     82# 
     83# Copyright (C) 2009 OpenWrt.org 
     84# 
     85# This is free software, licensed under the GNU General Public License v2. 
     86# See /LICENSE for more information. 
     87# 
     88 
     89include $(TOPDIR)/rules.mk 
     90 
     91PKG_NAME:=vips 
     92PKG_VERSION:=7.22.2 
     93PKG_RELEASE:=1 
     94 
     95PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 
     96PKG_SOURCE_URL:=http://www.vips.ecs.soton.ac.uk/supported/7.22/ 
     97PKG_MD5SUM:=bb626458e82ff208ea531c304f65cb04 
     98 
     99include $(INCLUDE_DIR)/package.mk 
     100 
     101export PATH:=$(PKG_BUILD_DIR)/bin:$(TARGET_PATH) 
     102 
     103PKG_INSTALL=1 
     104 
     105define Package/vips/Default 
     106  TITLE:=vips 
     107  URL:=http://www.vips.ecs.soton.ac.uk/ 
     108endef 
     109 
     110define Package/vips 
     111  $(call Package/vips/Default) 
     112  SECTION:=multimedia 
     113  CATEGORY:=Multimedia 
     114  DEPENDS:=+libjpeg +libintl +glib2 +libxml2 
     115endef 
     116 
     117define Package/vips/description 
     118  An image manipulation library. 
     119endef 
     120 
     121TARGET_CFLAGS+= \ 
     122        -I$(STAGING_DIR)/usr/lib/libintl/include 
     123 
     124TARGET_LDFLAGS+= \ 
     125        -L$(STAGING_DIR)/usr/lib/libintl/lib 
     126 
     127define Build/Configure 
     128        # This should be handled upstream in the next version (VIPS 2.22.3+) 
     129        ( cd "$(PKG_BUILD_DIR)" && aclocal && libtoolize --force && autoconf ) 
     130 
     131        $(call Build/Configure/Default, \ 
     132                --disable-cxx \ 
     133                --disable-threads \ 
     134                --without-liboil \ 
     135        ) 
     136endef 
     137 
     138define Build/InstallDev 
     139        $(INSTALL_DIR) $(1)/usr/include/vips 
     140        $(CP) \ 
     141                $(PKG_INSTALL_DIR)/usr/include/* \ 
     142                $(1)/usr/include/ 
     143 
     144        $(INSTALL_DIR) $(1)/usr/lib/ 
     145        $(CP) \ 
     146                $(PKG_INSTALL_DIR)/usr/lib/*.so* \ 
     147                $(1)/usr/lib/ 
     148 
     149        $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/ 
     150        $(INSTALL_DATA) \ 
     151                $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ 
     152                $(1)/usr/lib/pkgconfig/ 
     153endef 
     154 
     155define Package/vips/install 
     156        $(INSTALL_DIR) $(1)/usr/lib/ 
     157        $(CP) \ 
     158                $(PKG_INSTALL_DIR)/usr/lib/*.so* \ 
     159                $(1)/usr/lib/ 
     160endef 
     161 
     162$(eval $(call BuildPackage,vips))