From 7489f69fa59304043f6e26f4f2fd7cd92a2068c4 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Fri, 24 Apr 2009 10:14:52 +0000 Subject: [PATCH] Update to 1.1.0 pre1 --- .cvsignore | 2 +- opencv-1.1-nooptim.patch | 52 ++++++++++++++++++++++++++ opencv-1.1.0-conflicts.patch | 12 ++++++ opencv-1.1.0-pythondir.diff | 14 +++++++ opencv.spec | 72 ++++++++++++++++++++++-------------- sources | 2 +- 6 files changed, 125 insertions(+), 29 deletions(-) create mode 100644 opencv-1.1-nooptim.patch create mode 100644 opencv-1.1.0-conflicts.patch create mode 100644 opencv-1.1.0-pythondir.diff diff --git a/.cvsignore b/.cvsignore index 7b74af7..0422027 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -opencv-1.0.0.tar.gz +opencv-1.1pre1.tar.gz diff --git a/opencv-1.1-nooptim.patch b/opencv-1.1-nooptim.patch new file mode 100644 index 0000000..0b73e32 --- /dev/null +++ b/opencv-1.1-nooptim.patch @@ -0,0 +1,52 @@ +diff -up opencv-1.1.0/configure.in.nooptim opencv-1.1.0/configure.in +--- opencv-1.1.0/configure.in.nooptim 2008-10-15 17:47:43.000000000 +0200 ++++ opencv-1.1.0/configure.in 2009-04-23 18:54:30.000000000 +0200 +@@ -274,41 +274,41 @@ else + AC_MSG_NOTICE( TARGET=$target ) + case $target in + i*86-apple-*) +- if test x"$ac_cv_c_compiler_gnu" = "xyes"; then ++ if test x"no" = "xyes"; then + # apples g++ fails with '-march=i686' and there are no apple machines older than prescott/core anyway + DEFAULT_CXXFLAGS="-g -march=prescott -ffast-math -fomit-frame-pointer $DEFAULT_CXXFLAGS" + fi + ;; + i686-*-*) +- if test x"$ac_cv_c_compiler_gnu" = "xyes"; then ++ if test x"no" = "xyes"; then + # default to i686/pentiumpro -- people can override this + DEFAULT_CXXFLAGS="-g -march=i686 -ffast-math -fomit-frame-pointer $DEFAULT_CXXFLAGS" + fi + ;; + amd64-*-* | x86_64-*-*) +- if test x"$ac_cv_c_compiler_gnu" = "xyes"; then ++ if test x"no" = "xyes"; then + # default to i686/pentiumpro -- people can override this + DEFAULT_CXXFLAGS="-g $DEFAULT_CXXFLAGS" + fi + ;; + powerpc-*-*) +- if test x"$ac_cv_c_compiler_gnu" = "xyes"; then ++ if test x"no" = "xyes"; then + # default to G3 processors -- people can override this + DEFAULT_CXXFLAGS="-g -mcpu=G3 -mtune=G5 -fomit-frame-pointer $DEFAULT_CXXFLAGS" + fi + ;; + *-*-*) +- if test x"$ac_cv_c_compiler_gnu" = "xyes"; then ++ if test x"no" = "xyes"; then + DEFAULT_CXXFLAGS="-fomit-frame-pointer $DEFAULT_CXXFLAGS" + fi + ;; + esac + + CPPFLAGS="-DNDEBUG $CPPFLAGS" +- DEFAULT_CXXFLAGS="-O3 $DEFAULT_CXXFLAGS" ++# DEFAULT_CXXFLAGS="-O3 $DEFAULT_CXXFLAGS" + fi + +-if test x"$ac_cv_c_compiler_gnu" = "xyes"; then ++if test x"no" = "xyes"; then + PY_CXXFLAGS="-Wall -pipe $DEFAULT_CXXFLAGS" + OCT_CXXFLAGS="-fno-strict-aliasing -Wall -Wno-uninitialized -pipe $DEFAULT_CXXFLAGS" + DEF_CXXFLAGS="-Wall -fno-rtti -pipe $DEFAULT_CXXFLAGS" diff --git a/opencv-1.1.0-conflicts.patch b/opencv-1.1.0-conflicts.patch new file mode 100644 index 0000000..967aa3f --- /dev/null +++ b/opencv-1.1.0-conflicts.patch @@ -0,0 +1,12 @@ +diff -up opencv-1.1.0/configure.in.conflicts opencv-1.1.0/configure.in +--- opencv-1.1.0/configure.in.conflicts 2009-04-24 12:01:24.000000000 +0200 ++++ opencv-1.1.0/configure.in 2009-04-24 12:01:29.000000000 +0200 +@@ -37,7 +37,7 @@ AC_PREREQ(2.60) + AC_INIT([opencv],[opencv_version],[opencvlibrary-devel@lists.sourceforge.net]) + AC_CONFIG_SRCDIR([opencv.pc.in]) + AC_CONFIG_AUX_DIR([autotools]) +-AC_CONFIG_MACRO_DIR([autotools/aclocal]) ++ + + # put CVS revision of this configure.in into the resulting configure script + AC_REVISION($Revision: 1.60 $) diff --git a/opencv-1.1.0-pythondir.diff b/opencv-1.1.0-pythondir.diff new file mode 100644 index 0000000..bef26ef --- /dev/null +++ b/opencv-1.1.0-pythondir.diff @@ -0,0 +1,14 @@ +--- opencv-1.0.0.orig/interfaces/swig/python/Makefile.am 2006-08-10 15:29:20.000000000 +0200 ++++ opencv-1.0.0/interfaces/swig/python/Makefile.am 2007-03-22 04:04:45.000000000 +0100 +@@ -92,9 +92,9 @@ + + if BUILD_PYTHON_WRAPPERS + +-pkgpython_LTLIBRARIES = _cv.la _highgui.la ++pkgpyexec_LTLIBRARIES = _cv.la _highgui.la + +-pkgpython_PYTHON = \ ++pkgpyexec_PYTHON = \ + __init__.py \ + cv.py \ + adaptors.py \ diff --git a/opencv.spec b/opencv.spec index 7f046cb..0ecf887 100644 --- a/opencv.spec +++ b/opencv.spec @@ -2,23 +2,24 @@ %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} Name: opencv -Version: 1.0.0 -Release: 14%{?dist} +Version: 1.1.0 +Release: 0.1.pre1%{?dist} Summary: Collection of algorithms for computer vision Group: Development/Libraries # This is normal three clause BSD. License: BSD URL: http://opencv.willowgarage.com/wiki/ -Source0: http://prdownloads.sourceforge.net/opencvlibrary/opencv-%{version}.tar.gz +Source0: http://prdownloads.sourceforge.net/opencvlibrary/opencv-1.1pre1.tar.gz Source1: opencv-samples-Makefile -Patch0: opencv-1.0.0-pythondir.diff -Patch1: opencv-1.0.0-configure.in.diff -Patch2: opencv-1.0.0-autotools.diff -Patch3: opencv-1.0.0-pkgconfig.diff -Patch4: opencv-1.0.0-gcc44.patch +Patch0: opencv-1.0.0-gcc44.patch +Patch1: opencv-1.1-nooptim.patch +Patch2: opencv-1.1.0-pythondir.diff +Patch3: opencv-1.1.0-conflicts.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: libtool + BuildRequires: gtk2-devel BuildRequires: jasper-devel BuildRequires: libpng-devel @@ -27,6 +28,7 @@ BuildRequires: libtiff-devel BuildRequires: libtool BuildRequires: swig >= 1.3.24, zlib-devel, pkgconfig BuildRequires: python-devel +BuildRequires: python-imaging, numpy %{?_with_ffmpeg:BuildRequires: ffmpeg-devel >= 0.4.9} @@ -52,6 +54,8 @@ will use the OpenCV library. Summary: Python bindings for apps which use OpenCV Group: Development/Libraries Requires: opencv = %{version}-%{release} +Requires: python-imaging +Requires: numpy %description python This package contains Python bindings for the OpenCV library. @@ -59,39 +63,49 @@ This package contains Python bindings for the OpenCV library. %prep %setup -q -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -b .gcc44 -%{__sed} -i 's/\r//' interfaces/swig/python/*.py \ - samples/python/*.py -%{__sed} -i 's/^#!.*//' interfaces/swig/python/adaptors.py \ - interfaces/swig/python/__init__.py -# Adjust timestamp on cvconfig.h.in -touch -r configure.in cvconfig.h.in +%patch0 -p1 -b .gcc44 +%patch1 -p1 -b .nooptim +%patch2 -p1 -b .pydir +#autotools conflicts between AC_CONFIG_MACRO_DIR and AM_FLAGS +%patch3 -p1 -b .conflicts + + +#Renew the autotools (and remove rpath). +autoreconf -vif %build -%configure --disable-static --enable-python --enable-apps +%configure --disable-static --enable-apps \ +%ifarch i386 i586 + --disable-sse2 \ +%endif + make %{?_smp_mflags} + %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" CPPROG="cp -p" -rm -f $RPM_BUILD_ROOT%{_libdir}/*.la \ - $RPM_BUILD_ROOT%{python_sitearch}/opencv/*.la \ - $RPM_BUILD_ROOT%{_datadir}/opencv/samples/c/build_all.sh \ +find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' + +rm -f $RPM_BUILD_ROOT%{_datadir}/opencv/samples/c/build_all.sh \ $RPM_BUILD_ROOT%{_datadir}/opencv/samples/c/cvsample.dsp \ $RPM_BUILD_ROOT%{_datadir}/opencv/samples/c/cvsample.vcproj \ $RPM_BUILD_ROOT%{_datadir}/opencv/samples/c/facedetect.cmd \ $RPM_BUILD_ROOT%{_datadir}/opencv/samples/c/makefile.gcc \ $RPM_BUILD_ROOT%{_datadir}/opencv/samples/c/makefile.gen -install -pm644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/opencv/samples/c/GNUmakefile +install -m644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/opencv/samples/c/GNUmakefile + +#Remove unversioned documentation +rm -rf $RPM_BUILD_ROOT%{_docdir}/opencv +#And Octave since we don't build against it yet +rm -rf $RPM_BUILD_ROOT%{_datadir}/opencv/{samples/octave/,ChangeLog,THANKS} %check -make check +#Check fails since we don't support most video +#read/write capability and we don't provide a display +make check || : %clean @@ -131,11 +145,15 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Apr 24 2009 kwizart < kwizart at gmail.com > - 1.1.0-0.1.pre1 +- Update to 1.1pre1 +- Disable CXXFLAGS hardcoded optimization +- Add BR: python-imaging, numpy +- Disable make check failure for now + * Wed Apr 22 2009 kwizart < kwizart at gmail.com > - 1.0.0-14 - Fix for gcc44 - Enable BR jasper-devel -- Disable ldconfig run on python modules (uneeded) -- Prevent timestamp change on install * Thu Feb 26 2009 Fedora Release Engineering - 1.0.0-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild diff --git a/sources b/sources index 3b102e7..cf7f12b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -146a05005f2d2c16c4ee10ebd7f1dd58 opencv-1.0.0.tar.gz +b147b7cd3c059831c415c5a2bcecdf95 opencv-1.1pre1.tar.gz