From f3a6a113cf241e3c85d443f1ce3eb124c8c596c2 Mon Sep 17 00:00:00 2001 From: corsepiu Date: Thu, 21 Sep 2006 15:52:42 +0000 Subject: [PATCH] - Stop configure.in from hacking CXXFLAGS. - Activate testsuite. - Let *-devel require pkgconfig. --- opencv-0.9.9-autotools.diff | 42 ++++++++++++++++++++++++++++++---- opencv-0.9.9-configure.in.diff | 37 ++++++++++++++++++++++++++++++ opencv.spec | 17 ++++++++++++-- 3 files changed, 90 insertions(+), 6 deletions(-) create mode 100644 opencv-0.9.9-configure.in.diff diff --git a/opencv-0.9.9-autotools.diff b/opencv-0.9.9-autotools.diff index 892e593..341b285 100644 --- a/opencv-0.9.9-autotools.diff +++ b/opencv-0.9.9-autotools.diff @@ -1,6 +1,6 @@ diff -uNr opencv-0.9.9.orig/aclocal.m4 opencv-0.9.9/aclocal.m4 --- opencv-0.9.9.orig/aclocal.m4 2006-08-18 16:34:17.000000000 +0200 -+++ opencv-0.9.9/aclocal.m4 2006-09-21 04:24:11.000000000 +0200 ++++ opencv-0.9.9/aclocal.m4 2006-09-21 17:26:11.000000000 +0200 @@ -13,7 +13,7 @@ # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- @@ -234,7 +234,7 @@ diff -uNr opencv-0.9.9.orig/aclocal.m4 opencv-0.9.9/aclocal.m4 else diff -uNr opencv-0.9.9.orig/configure opencv-0.9.9/configure --- opencv-0.9.9.orig/configure 2006-08-18 16:34:17.000000000 +0200 -+++ opencv-0.9.9/configure 2006-09-21 04:24:15.000000000 +0200 ++++ opencv-0.9.9/configure 2006-09-21 17:26:11.000000000 +0200 @@ -4333,7 +4333,7 @@ lt_cv_deplibs_check_method=pass_all ;; @@ -916,9 +916,43 @@ diff -uNr opencv-0.9.9.orig/configure opencv-0.9.9/configure ;; netbsd*) +@@ -19036,28 +19162,28 @@ + i686-*-*) + if test x"$ac_cv_c_compiler_gnu" = "xyes"; then + # default to i686/pentiumpro -- people can override this +- CXXFLAGS="-g -march=i686 -ffast-math -fomit-frame-pointer $CXXFLAGS" ++: CXXFLAGS="-g -march=i686 -ffast-math -fomit-frame-pointer $CXXFLAGS" + fi + ;; + powerpc-*-*) + if test x"$ac_cv_c_compiler_gnu" = "xyes"; then + # default to G3 processors -- people can override this +- CXXFLAGS="-g -mcpu=G3 -mtune=G5 -fomit-frame-pointer $CXXFLAGS" ++: CXXFLAGS="-g -mcpu=G3 -mtune=G5 -fomit-frame-pointer $CXXFLAGS" + fi + ;; + *-*-*) + if test x"$ac_cv_c_compiler_gnu" = "xyes"; then +- CXXFLAGS="-fomit-frame-pointer $CXXFLAGS" ++: CXXFLAGS="-fomit-frame-pointer $CXXFLAGS" + fi + ;; + esac + + CPPFLAGS="-DNDEBUG $CPPFLAGS" +- CXXFLAGS="-O3 $CXXFLAGS" ++: CXXFLAGS="-O3 $CXXFLAGS" + fi + + if test x"$ac_cv_c_compiler_gnu" = "xyes"; then +- CXXFLAGS="-Wall -fno-rtti -pipe $CXXFLAGS" ++: CXXFLAGS="-Wall -fno-rtti -pipe $CXXFLAGS" + fi + + # add libm because it is used by several libraries and OpenCV itself diff -uNr opencv-0.9.9.orig/cvconfig.h.in opencv-0.9.9/cvconfig.h.in --- opencv-0.9.9.orig/cvconfig.h.in 2006-08-18 16:34:17.000000000 +0200 -+++ opencv-0.9.9/cvconfig.h.in 2006-09-21 04:24:16.000000000 +0200 ++++ opencv-0.9.9/cvconfig.h.in 2006-09-21 17:26:11.000000000 +0200 @@ -134,7 +134,7 @@ /* If using the C implementation of alloca, define if you know the @@ -930,7 +964,7 @@ diff -uNr opencv-0.9.9.orig/cvconfig.h.in opencv-0.9.9/cvconfig.h.in STACK_DIRECTION = 0 => direction of growth unknown */ diff -uNr opencv-0.9.9.orig/interfaces/swig/python/Makefile.in opencv-0.9.9/interfaces/swig/python/Makefile.in --- opencv-0.9.9.orig/interfaces/swig/python/Makefile.in 2006-08-18 16:34:45.000000000 +0200 -+++ opencv-0.9.9/interfaces/swig/python/Makefile.in 2006-09-21 04:24:24.000000000 +0200 ++++ opencv-0.9.9/interfaces/swig/python/Makefile.in 2006-09-21 17:26:11.000000000 +0200 @@ -63,10 +63,10 @@ *) f=$$p;; \ esac; diff --git a/opencv-0.9.9-configure.in.diff b/opencv-0.9.9-configure.in.diff new file mode 100644 index 0000000..f32dfe2 --- /dev/null +++ b/opencv-0.9.9-configure.in.diff @@ -0,0 +1,37 @@ +diff -uNr opencv-0.9.9.orig/configure.in opencv-0.9.9/configure.in +--- opencv-0.9.9.orig/configure.in 2006-08-18 16:34:16.000000000 +0200 ++++ opencv-0.9.9/configure.in 2006-09-21 17:26:11.000000000 +0200 +@@ -201,28 +201,28 @@ + i686-*-*) + if test x"$ac_cv_c_compiler_gnu" = "xyes"; then + # default to i686/pentiumpro -- people can override this +- CXXFLAGS="-g -march=i686 -ffast-math -fomit-frame-pointer $CXXFLAGS" ++: CXXFLAGS="-g -march=i686 -ffast-math -fomit-frame-pointer $CXXFLAGS" + fi + ;; + powerpc-*-*) + if test x"$ac_cv_c_compiler_gnu" = "xyes"; then + # default to G3 processors -- people can override this +- CXXFLAGS="-g -mcpu=G3 -mtune=G5 -fomit-frame-pointer $CXXFLAGS" ++: CXXFLAGS="-g -mcpu=G3 -mtune=G5 -fomit-frame-pointer $CXXFLAGS" + fi + ;; + *-*-*) + if test x"$ac_cv_c_compiler_gnu" = "xyes"; then +- CXXFLAGS="-fomit-frame-pointer $CXXFLAGS" ++: CXXFLAGS="-fomit-frame-pointer $CXXFLAGS" + fi + ;; + esac + + CPPFLAGS="-DNDEBUG $CPPFLAGS" +- CXXFLAGS="-O3 $CXXFLAGS" ++: CXXFLAGS="-O3 $CXXFLAGS" + fi + + if test x"$ac_cv_c_compiler_gnu" = "xyes"; then +- CXXFLAGS="-Wall -fno-rtti -pipe $CXXFLAGS" ++: CXXFLAGS="-Wall -fno-rtti -pipe $CXXFLAGS" + fi + + # add libm because it is used by several libraries and OpenCV itself diff --git a/opencv.spec b/opencv.spec index e8461d7..5765e12 100644 --- a/opencv.spec +++ b/opencv.spec @@ -5,7 +5,7 @@ Name: opencv Version: 0.9.9 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Collection of algorithms for computer vision Group: Development/Libraries @@ -14,7 +14,8 @@ URL: http://www.intel.com/technology/computing/opencv/index.htm Source0: http://prdownloads.sourceforge.net/opencvlibrary/opencv-%{version}.tar.gz Source1: opencv-samples-Makefile Patch0: opencv-0.9.9-pythondir.diff -Patch1: opencv-0.9.9-autotools.diff +Patch1: opencv-0.9.9-configure.in.diff +Patch2: opencv-0.9.9-autotools.diff BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: gtk2-devel, libpng-devel, libjpeg-devel, libtiff-devel @@ -34,6 +35,7 @@ and Computer Vision algorithms. Summary: Development files for using the OpenCV library Group: Development/Libraries Requires: opencv = %{version}-%{release} +Requires: pkgconfig %description devel This package contains the OpenCV C/C++ library and header files, as well as @@ -55,6 +57,7 @@ This package contains Python bindings for the OpenCV library. %setup -q %patch0 -p1 %patch1 -p1 +%patch2 -p1 %{__sed} -i 's/\r//' interfaces/swig/python/*.py \ samples/python/*.py %{__sed} -i 's/^#!.*//' interfaces/swig/python/adaptors.py \ @@ -81,6 +84,11 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la \ install -m644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/opencv/samples/c/GNUmakefile +%check +# The test suite fails. +make check ||: + + %clean rm -rf $RPM_BUILD_ROOT @@ -123,6 +131,11 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Sep 21 2006 Ralf Corsépius - 0.9.9-2 +- Stop configure.in from hacking CXXFLAGS. +- Activate testsuite. +- Let *-devel require pkgconfig. + * Thu Sep 21 2006 Ralf Corsépius - 0.9.9-1 - Upstream update. - Don't BR: autotools.