vips: fix patch
[feed/packages.git] / libs / vips / patches / 001-no_cpp.patch
1 diff -u --recursive --new-file vips-7.42.1-vanilla/configure.ac vips-7.42.1/configure.ac
2 --- vips-7.42.1-vanilla/configure.ac 2014-12-29 17:45:59.576995574 -0500
3 +++ vips-7.42.1/configure.ac 2014-12-29 17:59:03.698808601 -0500
4 @@ -264,7 +264,6 @@
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 @@ -272,19 +271,6 @@
13 AC_PROG_LN_S
14 AM_WITH_DMALLOC
15
16 -# vips_PROG_CXX_WORKS
17 -# Check whether the C++ compiler works.
18 -AC_DEFUN([vips_PROG_CXX_WORKS],
19 - [AC_REQUIRE([AC_PROG_CXX])dnl
20 - AC_CACHE_CHECK([whether the C++ compiler works],
21 - [vips_cv_prog_cxx_works],
22 - [AC_LANG_PUSH([C++])
23 - AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
24 - [vips_cv_prog_cxx_works=yes],
25 - [vips_cv_prog_cxx_works=no])
26 - AC_LANG_POP([C++])])
27 -])
28 -
29 # option to build without C++
30 # handy for some embedded applications
31 # also, including C++ source causes link problems on some
32 @@ -292,24 +278,8 @@
33 AC_ARG_ENABLE(cxx,
34 AS_HELP_STRING([--enable-cxx], [build C++ components (default: test)]))
35
36 -if test x"$enable_cxx" != x"no"; then
37 - vips_PROG_CXX_WORKS
38 - if test x"$vips_cv_prog_cxx_works" = x"yes"; then
39 - AC_DEFINE(ENABLE_CXX,1,[build C++ components])
40 - AM_CONDITIONAL(ENABLE_CXX, true)
41 - # need -lstdc++ for (eg.) the C++ format loaders
42 - # this gets added to vips.pc to help mingw and friends link programs
43 - # using libvips
44 - if test x"$vips_needs_stdcpp" != x"no"; then
45 - VIPS_CXX_LIBS="-lstdc++"
46 - fi
47 - enable_cxx=yes
48 - fi
49 -fi
50 -
51 if test x"$enable_cxx" != x"yes"; then
52 AM_CONDITIONAL(ENABLE_CXX, false)
53 - VIPS_CXX_LIBS=""
54 enable_cxx=no
55 fi
56
57 @@ -817,7 +787,6 @@
58 AC_SUBST(VIPS_CFLAGS)
59 AC_SUBST(VIPS_INCLUDES)
60 AC_SUBST(VIPS_LIBS)
61 -AC_SUBST(VIPS_CXX_LIBS)
62 AC_SUBST(PACKAGES_USED)
63 AC_SUBST(EXTRA_LIBS_USED)
64
65 @@ -850,12 +819,6 @@
66 libvips/create/Makefile
67 libvips/resample/Makefile
68 libvips/video/Makefile
69 - libvipsCC/include/Makefile
70 - libvipsCC/include/vips/Makefile
71 - libvipsCC/Makefile
72 - cplusplus/include/Makefile
73 - cplusplus/include/vips/Makefile
74 - cplusplus/Makefile
75 tools/Makefile
76 tools/batch_crop
77 tools/batch_image_convert
78 @@ -866,7 +829,6 @@
79 test/Makefile
80 test/variables.sh
81 swig/Makefile
82 - swig/vipsCC/Makefile
83 man/Makefile
84 doc/Makefile
85 doc/reference/Makefile
86 diff -u --recursive --new-file vips-7.42.1-vanilla/libvips/Makefile.am vips-7.42.1/libvips/Makefile.am
87 --- vips-7.42.1-vanilla/libvips/Makefile.am 2014-12-29 17:45:59.590996100 -0500
88 +++ vips-7.42.1/libvips/Makefile.am 2014-12-29 17:59:32.053375826 -0500
89 @@ -33,14 +33,6 @@
90 # empty means default to C linking
91 libvips_la_SOURCES =
92
93 -# if we have C++ components enabled, make sure we link the top-level with c++
94 -#
95 -# sadly the if/endif isn't enough to stop automake detecting a c++ link even
96 -# when c++ is disabled ... comment out this line if you have linking problems
97 -if ENABLE_CXX
98 -nodist_EXTRA_libvips_la_SOURCES = resample/dummy2.cc
99 -endif
100 -
101 # DLLs need dependant libs there too ... put @VIPS_LIBS@ at the end
102 libvips_la_LIBADD = \
103 resample/libresample.la \
104 diff -u --recursive --new-file vips-7.42.1-vanilla/libvips/resample/Makefile.am vips-7.42.1/libvips/resample/Makefile.am
105 --- vips-7.42.1-vanilla/libvips/resample/Makefile.am 2014-12-29 17:45:59.591996138 -0500
106 +++ vips-7.42.1/libvips/resample/Makefile.am 2014-12-29 18:01:57.107188019 -0500
107 @@ -1,30 +1,3 @@
108 -# only build the C++ stuff if ENABLE_CXX
109 -# you'd think we could just define a couple of variables, but that seems to
110 -# confuse libtool and make it link the library with g++
111 -# instead, have two completely different paths
112 -if ENABLE_CXX
113 -
114 -libresample_la_SOURCES = \
115 - affine.c \
116 - quadratic.c \
117 - resample.c \
118 - similarity.c \
119 - resize.c \
120 - presample.h \
121 - shrink.c \
122 - interpolate.c \
123 - transform.c \
124 - bicubic.cpp \
125 - lbb.cpp \
126 - nohalo.cpp \
127 - vsqbs.cpp \
128 - templates.h
129 -
130 -EXTRA_DIST = \
131 - dummy2.cc
132 -
133 -else
134 -
135 libresample_la_SOURCES = \
136 resample.c \
137 similarity.c \
138 @@ -36,16 +9,6 @@
139 quadratic.c \
140 transform.c
141
142 -EXTRA_DIST = \
143 - dummy2.cc \
144 - bicubic.cpp \
145 - lbb.cpp \
146 - nohalo.cpp \
147 - vsqbs.cpp \
148 - templates.h
149 -
150 -endif
151 -
152 noinst_LTLIBRARIES = libresample.la
153
154 AM_CPPFLAGS = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@