From f3bbf7dae2986985ba127169e3251dccef1f6908 Mon Sep 17 00:00:00 2001 From: gentoofan23 Date: Sun, 8 Jun 2008 23:41:36 +0000 Subject: Initial import, bug #70506 git-svn-id: http://overlays.gentoo.org/svn/proj/science/overlay@1134 32389bae-6d03-0410-99cf-db05cde120eb --- sci-libs/opencv/ChangeLog | 8 + sci-libs/opencv/Manifest | 9 + .../files/opencv-1.0.0-automagicdependencies.patch | 413 +++++++++++++++++++++ .../opencv/files/opencv-1.0.0-cvcapffmpeg.patch | 63 ++++ .../opencv/files/opencv-1.0.0-enableuseflags.patch | 137 +++++++ .../files/opencv-1.0.0-fixpythonmultilib.patch | 14 + .../opencv/files/opencv-1.0.0-havepngexrdefs.patch | 49 +++ sci-libs/opencv/metadata.xml | 16 + sci-libs/opencv/opencv-1.0.0.ebuild | 83 +++++ 9 files changed, 792 insertions(+) create mode 100644 sci-libs/opencv/ChangeLog create mode 100644 sci-libs/opencv/Manifest create mode 100644 sci-libs/opencv/files/opencv-1.0.0-automagicdependencies.patch create mode 100644 sci-libs/opencv/files/opencv-1.0.0-cvcapffmpeg.patch create mode 100644 sci-libs/opencv/files/opencv-1.0.0-enableuseflags.patch create mode 100644 sci-libs/opencv/files/opencv-1.0.0-fixpythonmultilib.patch create mode 100644 sci-libs/opencv/files/opencv-1.0.0-havepngexrdefs.patch create mode 100644 sci-libs/opencv/metadata.xml create mode 100644 sci-libs/opencv/opencv-1.0.0.ebuild (limited to 'sci-libs') diff --git a/sci-libs/opencv/ChangeLog b/sci-libs/opencv/ChangeLog new file mode 100644 index 000000000..8d8edd982 --- /dev/null +++ b/sci-libs/opencv/ChangeLog @@ -0,0 +1,8 @@ +# ChangeLog for sci-libs/opencv +# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 +# $Header: $ + + 08 Jun 2008; Thomas Anderson (gentoofan23) + ChangeLog: + Initial import, bug #70506 + diff --git a/sci-libs/opencv/Manifest b/sci-libs/opencv/Manifest new file mode 100644 index 000000000..373624c04 --- /dev/null +++ b/sci-libs/opencv/Manifest @@ -0,0 +1,9 @@ +AUX opencv-1.0.0-automagicdependencies.patch 15921 RMD160 3f057b3970fdf589de0a44342b3038d10966149b SHA1 64ccf3326a5c2015c217373c84b834e2e1b24ed5 SHA256 e86c08eca7dcc0ab4757bdc5e117803ba2caa35fb57d2929870aa71b7f561b3f +AUX opencv-1.0.0-cvcapffmpeg.patch 2189 RMD160 5865726b2334816bc92975657f40764700239e31 SHA1 ca60a2d270199c114771883ec14c431e03961e3d SHA256 ec499a152e17789ebe4054b5bb04da9933a54ee4e3ed8fdbd1ccc2fa64736d86 +AUX opencv-1.0.0-enableuseflags.patch 5107 RMD160 fb23cfe9ff83be4196f85448d462409e29797bf3 SHA1 9ad3158e2e5b0f84b13269bf9944b3753baab1c9 SHA256 af59706ebe8a4529366cfb335e4d8a2e17f9ab07127455a624df54876130e153 +AUX opencv-1.0.0-fixpythonmultilib.patch 423 RMD160 a3cdb0c1a25b4f8ab8447ac6e4776ade2daad458 SHA1 f3d43b10b5cdfd77ce50cfea7cf9c1431479c5de SHA256 317750f75417b5e2434c09f8244d347c7340eebe721579c7f39639b526af61fb +AUX opencv-1.0.0-havepngexrdefs.patch 1869 RMD160 477e487f34c9ebdc8e7666d2d6c7369a44bde7ed SHA1 9c7df4269887a5d5d3e2a4b17840f168098224f2 SHA256 5b077c9958d1699ec8b1d1c952f90d2830d4a4f9b0fe7a01a21747a6280f12d6 +DIST opencv-1.0.0.tar.gz 11146334 RMD160 f041798ea63101b90e945957e0d0ad3f7497dcd4 SHA1 c7dd500703b0060cedfa049fcb33de0846e631fb SHA256 3a6ee888e4dd4ab7f2bc80d046688c099c6a95d1267af554b7c8f1543b66f21e +EBUILD opencv-1.0.0.ebuild 2224 RMD160 fc28284cbc3cae09872363c27db74f62f971a61e SHA1 b118299ae0602e06f2319d127844580db7f6a87e SHA256 7b390554d3bb087e905432c679e7474f00133046081c5d81a41271c80029b9c7 +MISC ChangeLog 228 RMD160 18374ff78d7af305eea980fc44ea5be0e42f98ab SHA1 56292eaf093305f6814998010e6f6c5adb271846 SHA256 275e019bb73c5ef66d0bcb491dc02c30074ce62e33a5bd2ccf71033e1ab4bcbd +MISC metadata.xml 691 RMD160 759e574f771a8d57512b84db50a97acec7ba6a78 SHA1 9faa300f7489783893ac6684198d75c90600ae31 SHA256 d79926876ff2fdc9c9ef5a8660fee8959d05b9605db49651b2cd4fb360fd3696 diff --git a/sci-libs/opencv/files/opencv-1.0.0-automagicdependencies.patch b/sci-libs/opencv/files/opencv-1.0.0-automagicdependencies.patch new file mode 100644 index 000000000..cd267a773 --- /dev/null +++ b/sci-libs/opencv/files/opencv-1.0.0-automagicdependencies.patch @@ -0,0 +1,413 @@ +--- opencv-1.0.0-orig/configure.in 2006-11-03 10:54:33.000000000 -0500 ++++ opencv-1.0.0/configure.in 2008-06-07 09:49:34.000000000 -0400 +@@ -81,13 +81,14 @@ + AC_ARG_ENABLE([debug], + [AS_HELP_STRING([--enable-debug],[build debug version without optimization])], + [debug=$enableval], +- [debug=no]) ++ [debug="no"]) ++AM_CONDITIONAL([ENABLE_DEBUG], [test x"$enable_debug" = x"yes"]) + + # does the user want to build demo applications? + AC_ARG_ENABLE([apps], + [AS_HELP_STRING([--enable-apps],[build demo applications])], + [enable_apps=$enableval], +- [enable_apps="yes"]) ++ [enable_apps="no"]) + AM_CONDITIONAL([BUILD_APPS], [test x"$enable_apps" = x"yes"]) + + +@@ -101,55 +102,64 @@ + AC_ARG_WITH([swig], + [AS_HELP_STRING([--with-swig],[use swig wrapper generator])], + [with_swig=$withval], +- [with_swig=no]) ++ [with_swig="no"]) ++AM_CONDITIONAL([WITH_SWIG], [test x"$with_swig" = x"yes"]) + + # does the user want to compile python modules as well? + AC_ARG_WITH([python], + [AS_HELP_STRING([--with-python],[use python for wrapping])], + [with_python=$withval], +- [with_python=yes]) ++ [with_python="no"]) ++AM_CONDITIONAL([WITH_PYTHON], [test x"$with_python" = x"yes"]) + + # does the user want OpenCV to use xine video libraries? + AC_ARG_WITH([xine], + [AS_HELP_STRING([--with-xine],[use xine libraries (see LICENSE)])], + [with_xine=$withval], +- [with_xine=no]) ++ [with_xine="no"]) ++AM_CONDITIONAL([WITH_XINE], [test x"$with_xine" = x"yes"]) + + # does the user want OpenCV to use ffmpeg video libraries? + AC_ARG_WITH([ffmpeg], + [AS_HELP_STRING([--with-ffmpeg],[use ffmpeg libraries (see LICENSE)])], + [with_ffmpeg=$withval], +- [with_ffmpeg=auto]) ++ [with_ffmpeg="no"]) ++AM_CONDITIONAL([WITH_XINE], [test x"$with_xine" = x"yes"]) + + # does the user want OpenCV to use libraw1394/libdc1394 for video input? + AC_ARG_WITH([1394libs], + [AS_HELP_STRING([--with-1394libs],[use libraw1394/libdc1394])], + [with_1394libs=$withval], +- [with_1394libs=auto]) ++ [with_1394libs="no"]) ++AM_CONDITIONAL([WITH_1394LIBS], [test x"$with_1394libs" = x"yes"]) + + # does the user want OpenCV to use the video4linux kernel module? + AC_ARG_WITH([v4l], + [AS_HELP_STRING([--with-v4l],[use video4linux])], + [with_v4l=$withval], +- [with_v4l=auto]) ++ [with_v4l="no"]) ++AM_CONDITIONAL([WITH_V4L], [test x"$with_v4l" = x"yes"]) + + # does the user want OpenCV to use QuickTime video libraries? + AC_ARG_WITH([quicktime], + [AS_HELP_STRING([--with-quicktime],[use QuickTime libraries])], + [with_quicktime=$withval], +- [with_quicktime=yes]) ++ [with_quicktime="no"]) ++AM_CONDITIONAL([WITH_QUICKTIME], [test x"$with_quicktime" = x"yes"]) + + # does the user want OpenCV to use the Carbon GUI of Mac OS X? + AC_ARG_WITH([carbon], + [AS_HELP_STRING([--with-carbon],[use Carbon windows])], + [with_carbon=$withval], +- [with_carbon=yes]) ++ [with_carbon="no"]) ++AM_CONDITIONAL([WITH_CARBON], [test x"$with_carbon" = x"yes"]) + + # does the user want OpenCV to use GTK+ 2.0 for the GUI? + AC_ARG_WITH([gtk], + [AS_HELP_STRING([--with-gtk],[use gtk+ 2.0 windows])], + [with_gtk=$withval], +- [with_gtk=auto]) ++ [with_gtk="no"]) ++AM_CONDITIONAL([WITH_GTK], [test x"$with_gtk" = x"yes"]) + + + ###################################################################### +@@ -340,7 +350,7 @@ + + # if QuickTime is present, it will override everything else, + # (unless '--without-quicktime' was given) +-if test x"$with_quicktime" = "xyes"; then ++if test x"$with_quicktime" = x"yes"; then + + # check other ./configure flags + if test x"$with_ffmpeg" = "xyes"; then +@@ -460,92 +470,47 @@ + + # IEEE1394 / FireWire video video i/o with libdc1394, libraw1394 + # (can be managed by QuickTime as well) +-if test x"$with_1394libs" = "xno"; then ++if test x"$with_1394libs" = x"no"; then + have_raw1394=no + have_dc1394=no + # IEEE1394LIBS="" +-else ++fi ++if test x"$with_1394libs" = x"yes"; then + +- # check if ./configure arguments are valid +- if test x"$with_1394libs" = "xauto"; then +- with_1394libs=yes +- fi +- if test x"$with_1394libs" = "xyes"; then +- +- SAVELIBS="$LIBS" +- have_raw1394=no +- have_dc1394=no +- +- AC_CHECK_HEADER(libraw1394/raw1394.h, +- AC_CHECK_LIB(raw1394, raw1394_new_handle, +- [ +- have_raw1394=yes +- LIBS="-lm -lraw1394 $LIBS" +- ])) +- +- if test x"$have_raw1394" = "xyes"; then +- AC_CHECK_HEADER(libdc1394/dc1394_control.h, +- AC_CHECK_LIB(dc1394_control, dc1394_camera_on, +- [ +- have_dc1394=yes +- AC_DEFINE(HAVE_DC1394,,[IEEE1394 capturing support]) +- AC_EGREP_HEADER(do_extra_buffering, libdc1394/dc1394_control.h, +- [AC_DEFINE(HAVE_DC1394_095,,[libdc1394 0.9.4 or 0.9.5])]) +- IEEE1394LIBS="-lm -lraw1394 -ldc1394_control" +- ])) +- fi +- +- LIBS="$SAVELIBS" +- else +- # if we get here then --with-1394libs was not called with 'yes','no' or 'auto' +- AC_MSG_WARN([unexpected arguments for option --with-1394libs, continuing assuming 'no']) +- have_dc1394=no +- fi ++ AC_CHECK_HEADER(libraw1394/raw1394.h,, [AC_MSG_ERROR([1394 requested but header file libraw1394/raw1394.h not found])]) ++ AC_CHECK_LIB(raw1394, raw1394_new_handle,, [AC_MSG_ERROR([1394 requested but 1394 libraries not found])]) ++ AC_CHECK_HEADER(libdc1394/dc1394_control.h,, [AC_MSG_ERROR([1394 requested but header file libdc1394/dc1394_control.h not found])]) ++ AC_CHECK_LIB(dc1394_control, dc1394_camera_on,, [AC_MSG_ERROR([1394 requested but 1394 raw libraries not found])]) ++ AC_DEFINE(HAVE_DC1394,, [IEEE1394 capturing support]) ++ have_raw1394=yes ++ have_dc1394=yes ++ LIBS="-lm -lraw1394 $LIBS" ++ IEEE1394LIBS="-lm -lraw1394 -ldc1394_control" ++ SAVELIBS="$LIBS" ++ LIBS="$SAVELIBS" + fi + AC_SUBST(IEEE1394LIBS) +-AM_CONDITIONAL([BUILD_DC1394], [test x"$have_dc1394" = "xyes"]) ++AM_CONDITIONAL([BUILD_DC1394], [test x"$have_dc1394" = x"yes"]) + + # Video for Linux (V4L) + # we support version 1 and 2 currently +-if test x"$with_v4l" = "xno"; then +- have_v4l=no +- have_v4l2=no +- have_v4l1or2=no +-else +- # check if ./configure arguments are valid +- if test x"$with_v4l" = "xauto"; then +- with_v4l=yes +- fi +- if test x"$with_v4l" = "xyes"; then +- AC_CHECK_HEADER([linux/videodev.h], +- [ +- AC_DEFINE(HAVE_CAMV4L,,[V4L capturing support]) +- have_v4l=yes +- have_v4l1or2=yes +- ], +- [ +- have_v4l=no +- have_v4l1or2=no +- ]) +- AC_CHECK_HEADER([linux/videodev2.h], +- [ +- AC_DEFINE(HAVE_CAMV4L2,,[V4L2 capturing support]) +- have_v4l2=yes +- have_v4l1or2=yes +- ], +- [ have_v4l2=no ], +- [[ +- #include +- #include +- ]]) +- else +- # if we get here then --with-v4l was not called with 'yes','no' or 'auto' +- AC_MSG_WARN([unexpected arguments for option --with-v4l, continuing assuming 'no']) +- have_v4l=no +- have_v4l2=no +- have_v4l1or2=no +- fi ++have_v4l=no ++have_v4l2=no ++have_v4l1or2=no ++if test x"$with_v4l" = x"yes"; then ++ AC_CHECK_HEADER(linux/videodev.h,, [AC_MSG_ERROR([Video4linux requested but header file linux/videodev.h not found])]) ++ AC_DEFINE(HAVE_CAMV4L,,[V4L capturing support]) ++ have_v4l=yes ++fi ++ ++if test x"$with_v4l2" = x"yes"; then ++ AC_CHECK_HEADER(linux/videodev2.h,, [AC_MSG_ERROR([Video4linux2 requested but header file linux/videodev.h not found])]) ++ AC_DEFINE(HAVE_CAMV4L2,, [V4L2 capturing support]) ++ have_v4l2=yes ++fi + ++if test x"$with_v4l" = x"yes" && test x"$with_v4l2" = x"yes"; then ++ have_v4l1or2=yes + fi + AM_CONDITIONAL([BUILD_V4L], [test x"$have_v4l1or2" = "xyes"]) + +@@ -558,78 +523,86 @@ + + AC_SUBST(IMAGELIBS) + +-have_jpeg=no +-AC_CHECK_HEADER(jpeglib.h, +- AC_CHECK_LIB(jpeg, jpeg_destroy_decompress, +- [ +- have_jpeg=yes +- AC_DEFINE(HAVE_JPEG,,[IJG JPEG codec]) +- IMAGELIBS="$IMAGELIBS -ljpeg" +- ])) +- +-have_zlib=no +-AC_CHECK_HEADER(zlib.h, +- AC_CHECK_LIB(z, gzopen, +- [ +- have_zlib=yes +- AC_DEFINE(HAVE_ZLIB,,[LZ77 compression/decompression library (used for PNG)]) +- IMAGELIBS="$IMAGELIBS -lz -lm" +- LIBS="$LIBS -lz -lm" +- ])) +- +-have_png=no +-AC_CHECK_HEADER(png.h, +- [ +- AC_DEFINE(HAVE_PNG_H,,[png.h needs to be included]) +- have_png=yes +- ]) +-AC_CHECK_HEADER([libpng/png.h], +- [ +- AC_DEFINE(HAVE_LIBPNG_PNG_H,,[libpng/png.h needs to be included]) +- have_png=yes +- ]) +-if test x"$have_png" = "xyes"; then +- AC_CHECK_LIB(png12, png_read_image, +- [ +- have_png=yes +- AC_DEFINE(HAVE_PNG,,[PNG codec]) +- IMAGELIBS="-lpng12 $IMAGELIBS" +- LIBS="-lpng12 $LIBS" +- AC_CHECK_FUNCS(png_get_valid png_set_tRNS_to_alpha) +- ], +- [ have_png=no ]) +-fi +- +-have_tiff=no +-AC_CHECK_HEADER(tiff.h, +- AC_CHECK_LIB(tiff, TIFFReadRGBAStrip, +- [ +- have_tiff=yes +- AC_DEFINE(HAVE_TIFF,,[TIFF codec]) +- IMAGELIBS="$IMAGELIBS -ltiff" +- LIBS="$LIBS -ltiff" +- ])) +- +-have_jasper=no +-AC_CHECK_HEADER(jasper/jasper.h, +- AC_CHECK_LIB(jasper, jas_image_readcmpt, +- [ +- have_jasper=yes +- AC_DEFINE(HAVE_JASPER,,[JPEG-2000 codec]) +- IMAGELIBS="$IMAGELIBS -ljasper" +- LIBS="$LIBS -ljasper" +- ])) +- +-have_ilmimf=no +-AC_CHECK_HEADER(ImfCRgbaFile.h, +- AC_CHECK_LIB(IlmImf, ImfInputReadPixels, +- [ +- have_ilmimf=yes +- AC_DEFINE(HAVE_ILMIMF,,[OpenEXR codec]) +- IMAGELIBS="$IMAGELIBS -lIlmImf -lIex -lHalf" +- LIBS="$LIBS -lIlmImf -lIex -lHalf" +- ],, +- [ -lIex -lHalf ])) ++AC_ARG_ENABLE(jpeg, ++ [AS_HELP_STRING([--enable-jpeg], [Enable JPEG Image I/O])], ++ [enable_jpeg=$enableval], ++ [enable_jpeg=no]) ++ ++if test x"$enable_jpeg" = x"yes"; then ++ AC_CHECK_HEADER(jpeglib.h,, [AC_MSG_ERROR([Jpeg library requested but header jpeglib.h not found])]) ++ AC_CHECK_LIB(jpeg, jpeg_destroy_compress,, [AC_MSG_ERROR([Jpeg library requested but libraries not found])]) ++ IMAGELIBS="$IMAGELIBS -ljpeg" ++ AC_DEFINE(HAVE_JPEG,,[IJG JPEG codec]) ++fi ++ ++AC_ARG_ENABLE(zlib, ++ [AS_HELP_STRING([--enable-zlib], [Enable Zlib compression])], ++ [enable_zlib=$enableval], ++ [enable_zlib=no]) ++ ++if test x"$enable_zlib" = x"yes"; then ++ AC_CHECK_HEADER(zlib.h,, [AC_MSG_ERROR([Zlib library requested but header zlib.h not found])]) ++ AC_CHECK_LIB(z,gzopen,, [AC_MSG_ERROR([Zlib library requested but libraries not found])]) ++ AC_DEFINE(HAVE_ZLIB,,[lZ77 compression/decompression library (used for PNG)]) ++ IMAGELIBS="$IMAGELIBS -lz -lm" ++ LIBS="$LIBS -lz -lm" ++fi ++ ++AC_ARG_ENABLE(png, ++ [AS_HELP_STRING([--enable-png], [Enable PNG Image I/O])], ++ [enable_png=$enableval], ++ [enable_png=no]) ++ ++if test x"$enable_png" = x"yes"; then ++ AC_CHECK_HEADER(png.h,, [AC_MSG_ERROR([PNG requested but headers not found])]) ++ AC_CHECK_LIB(png12, png_read_image,, [AC_MSG_ERROR([PNG requested but libraries not found])]) ++ AC_DEFINE(HAVE_PNG,, [PNG codec]) ++ AC_DEFINE(HAVE_PNG_H,, [PNG header]) ++ IMAGELIBS="`libpng-config --ldflags` $IMAGELIBS" ++ LIBS="`libpng-config --ldflags` $IMAGELIBS" ++ AC_CHECK_FUNCS(png_get_valid png_set_tRNS_to_alpha) ++fi ++AM_CONDITIONAL([HAVE_PNG], [test x"$enable_png" = x"yes"]) ++ ++AC_ARG_ENABLE(tiff, ++ [AS_HELP_STRING([--enable-tiff], [Enable TIFF Image I/O])], ++ [enable_tiff=$enableval], ++ [enable_tiff=no]) ++ ++if test x"$enable_tiff" = x"yes"; then ++ AC_CHECK_HEADER(tiff.h,, [AC_MSG_ERROR([Tiff requested but header file not found])]) ++ AC_CHECK_LIB(tiff, TIFFReadRGBAStrip,, [AC_MSG_ERROR([Tiff requested but libraries not found])]) ++ AC_DEFINE(HAVE_TIFF,,[TIFF codec]) ++ IMAGELIBS="$IMAGELIBS -ltiff" ++ LIBS="$LIBS -ltiff" ++fi ++ ++AC_ARG_ENABLE(jasper, ++ [AS_HELP_STRING([--enable-jasper], [Enable Jasper])], ++ [enable_jasper=$enableval], ++ [enable_jasper=no]) ++ ++if test x"$enable_jasper" = x"yes"; then ++ AC_CHECK_HEADER(jasper/jasper.h,, [AC_MSG_ERROR([Jasper requested but header filejasper/jasper.h not found])]) ++ AC_CHECK_LIB(jasper, jas_image_readcmpt,, [AC_MSG_ERROR([Jasper requested but libraries not found])]) ++ AC_DEFINE(HAVE_JASPER,, [JPEG-2000 codec]) ++ IMAGELIBS="$IMAGELIBS -ljasper" ++ LIBS="$LIBS -ljasper" ++fi ++ ++ ++AC_ARG_ENABLE(openexr, ++ [AS_HELP_STRING([--enable-openexr], [Enable Openexr support])], ++ [enable_openexr=$enableval], ++ [enable_openexr=no]) ++ ++if test x"$enable_openexr" = x"yes"; then ++ AC_CHECK_HEADER(OpenEXR/ImfCRgbaFile.h,, [AC_MSG_ERROR([Openexr requested but header file ImfCrgbaFile.h not found])]) ++ AC_CHECK_LIB(IlmImf, ImfInputReadPixels,, [AC_MSG_ERROR([Openexr requested but libraries not found])]) ++ AC_DEFINE(HAVE_ILMIMF,, [OpenExr codec]) ++ IMAGELIBS="$IMAGELIBS -lIlmImf -lIex -lHalf" ++ LIBS="$LIBS -lIlmImf -lIex -lHalf" ++fi + + # Restore original LIBS settings... + LIBS="$SAVELIBS" +@@ -690,7 +663,7 @@ + AM_CONDITIONAL([BUILD_PYTHON_WRAPPERS], [test x"$have_python" = "xyes"]) + + # check for swig itself +-SWIG="" ++SWIG="no" + if test x"$with_swig" = "xyes"; then + AC_MSG_NOTICE([Checking for SWIG]) + +@@ -807,12 +780,12 @@ + Use gthread: ${have_gthread} + + Image I/O --------------------- +- Use libjpeg: ${have_jpeg} +- Use zlib: ${have_zlib} +- Use libpng: ${have_png} +- Use libtiff: ${have_tiff} +- Use libjasper: ${have_jasper} +- Use libIlmImf: ${have_ilmimf} ++ Use libjpeg: ${enable_jpeg} ++ Use zlib: ${enable_zlib} ++ Use libpng: ${enable_png} ++ Use libtiff: ${enable_tiff} ++ Use libjasper: ${enable_jasper} ++ Use libIlmImf: ${enable_openexr} + + Video I/O --------------------- + Use QuickTime / Mac OS X: ${have_quicktime} diff --git a/sci-libs/opencv/files/opencv-1.0.0-cvcapffmpeg.patch b/sci-libs/opencv/files/opencv-1.0.0-cvcapffmpeg.patch new file mode 100644 index 000000000..df06e6462 --- /dev/null +++ b/sci-libs/opencv/files/opencv-1.0.0-cvcapffmpeg.patch @@ -0,0 +1,63 @@ +--- opencv-1.0.0/otherlibs/highgui/cvcap_ffmpeg.cpp.org Tue May 8 11:31:09 2007 ++++ opencv-1.0.0/otherlibs/highgui/cvcap_ffmpeg.cpp Tue May 8 12:31:54 2007 + +43a44 +> #define __STDC_CONSTANT_MACROS +46a48,51 +> #include +> #include +> #include /* size_t */ +> #include +54a60,61 +> static struct SwsContext *img_convert_ctx; +> +217,229c224,238 +< #if LIBAVFORMAT_BUILD > 4628 +< img_convert( (AVPicture*)&capture->rgb_picture, PIX_FMT_BGR24, +< (AVPicture*)capture->picture, +< capture->video_st->codec->pix_fmt, +< capture->video_st->codec->width, +< capture->video_st->codec->height ); +< #else +< img_convert( (AVPicture*)&capture->rgb_picture, PIX_FMT_BGR24, +< (AVPicture*)capture->picture, +< capture->video_st->codec.pix_fmt, +< capture->video_st->codec.width, +< capture->video_st->codec.height ); +< #endif +--- +> +> img_convert_ctx = sws_getContext(capture->video_st->codec->width, +> capture->video_st->codec->height, +> capture->video_st->codec->pix_fmt, +> capture->video_st->codec->width, +> capture->video_st->codec->height, +> PIX_FMT_BGR24, +> SWS_BICUBIC, +> NULL, NULL, NULL); +> +> sws_scale(img_convert_ctx, capture->picture->data, +> capture->picture->linesize, 0, +> capture->video_st->codec->height, +> capture->rgb_picture.data, capture->rgb_picture.linesize); +> +716,718c725,738 +< if( img_convert((AVPicture *)mywriter->picture, c->pix_fmt, +< (AVPicture *)mywriter->rgb_picture, PIX_FMT_BGR24, +< image->width, image->height) < 0){ +--- +> img_convert_ctx = sws_getContext(image->width, +> image->height, +> PIX_FMT_BGR24, +> c->width, +> c->height, +> c->pix_fmt, +> SWS_BICUBIC, +> NULL, NULL, NULL); +> +> if ( sws_scale(img_convert_ctx, mywriter->rgb_picture->data, +> mywriter->rgb_picture->linesize, 0, +> image->height, +> mywriter->picture->data, mywriter->picture->linesize) < 0 ) +> { + diff --git a/sci-libs/opencv/files/opencv-1.0.0-enableuseflags.patch b/sci-libs/opencv/files/opencv-1.0.0-enableuseflags.patch new file mode 100644 index 000000000..046e6320e --- /dev/null +++ b/sci-libs/opencv/files/opencv-1.0.0-enableuseflags.patch @@ -0,0 +1,137 @@ +--- ../configure.in 2006-11-26 19:03:36.000000000 +0100 ++++ configure.in 2006-11-26 19:13:23.000000000 +0100 +@@ -81,13 +81,14 @@ + AC_ARG_ENABLE([debug], + [AS_HELP_STRING([--enable-debug],[build debug version without optimization])], + [debug=$enableval], +- [debug=no]) ++ [debug="no"]) ++AM_CONDITIONAL([ENABLE_DEBUG], [test x"$enable_debug" = x"yes"]) + + # does the user want to build demo applications? + AC_ARG_ENABLE([apps], + [AS_HELP_STRING([--enable-apps],[build demo applications])], + [enable_apps=$enableval], +- [enable_apps="yes"]) ++ [enable_apps="no"]) + AM_CONDITIONAL([BUILD_APPS], [test x"$enable_apps" = x"yes"]) + + +@@ -101,55 +102,64 @@ + AC_ARG_WITH([swig], + [AS_HELP_STRING([--with-swig],[use swig wrapper generator])], + [with_swig=$withval], +- [with_swig=no]) ++ [with_swig="no"]) ++AM_CONDITIONAL([WITH_SWIG], [test x"$with_swig" = x"yes"]) + + # does the user want to compile python modules as well? + AC_ARG_WITH([python], + [AS_HELP_STRING([--with-python],[use python for wrapping])], + [with_python=$withval], +- [with_python=yes]) ++ [with_python="no"]) ++AM_CONDITIONAL([WITH_PYTHON], [test x"$with_python" = x"yes"]) + + # does the user want OpenCV to use xine video libraries? + AC_ARG_WITH([xine], + [AS_HELP_STRING([--with-xine],[use xine libraries (see LICENSE)])], + [with_xine=$withval], +- [with_xine=no]) ++ [with_xine=i"no"]) ++AM_CONDITIONAL([WITH_XINE], [test x"$with_xine" = x"yes"]) + + # does the user want OpenCV to use ffmpeg video libraries? + AC_ARG_WITH([ffmpeg], + [AS_HELP_STRING([--with-ffmpeg],[use ffmpeg libraries (see LICENSE)])], + [with_ffmpeg=$withval], + [with_ffmpeg=auto]) ++AM_CONDITIONAL([WITH_XINE], [test x"$with_xine" = x"yes"]) + + # does the user want OpenCV to use libraw1394/libdc1394 for video input? + AC_ARG_WITH([1394libs], + [AS_HELP_STRING([--with-1394libs],[use libraw1394/libdc1394])], + [with_1394libs=$withval], +- [with_1394libs=auto]) ++ [with_1394libs="no"]) ++AM_CONDITIONAL([WITH_1394LIBS], [test x"$with_1394libs" = x"yes"]) + + # does the user want OpenCV to use the video4linux kernel module? + AC_ARG_WITH([v4l], + [AS_HELP_STRING([--with-v4l],[use video4linux])], + [with_v4l=$withval], +- [with_v4l=auto]) ++ [with_v4l="no"]) ++AM_CONDITIONAL([WITH_V4L], [test x"$with_v4l" = x"yes"]) + + # does the user want OpenCV to use QuickTime video libraries? + AC_ARG_WITH([quicktime], + [AS_HELP_STRING([--with-quicktime],[use QuickTime libraries])], + [with_quicktime=$withval], +- [with_quicktime=yes]) ++ [with_quicktime="no"]) ++AM_CONDITIONAL([WITH_QUICKTIME], [test x"$with_quicktime" = x"yes"]) + + # does the user want OpenCV to use the Carbon GUI of Mac OS X? + AC_ARG_WITH([carbon], + [AS_HELP_STRING([--with-carbon],[use Carbon windows])], + [with_carbon=$withval], +- [with_carbon=yes]) ++ [with_carbon="no"]) ++AM_CONDITIONAL([WITH_CARBON], [test x"$with_carbon" = x"yes"]) + + # does the user want OpenCV to use GTK+ 2.0 for the GUI? + AC_ARG_WITH([gtk], + [AS_HELP_STRING([--with-gtk],[use gtk+ 2.0 windows])], + [with_gtk=$withval], +- [with_gtk=auto]) ++ [with_gtk="no"]) ++AM_CONDITIONAL([WITH_GTK], [test x"$with_gtk" = x"yes"]) + + + ###################################################################### +@@ -187,7 +197,7 @@ + AC_MSG_RESULT([yes]) + if test x"$ac_cv_c_compiler_gnu" = "xyes"; then + CPPFLAGS="-DDEBUG -D_DEBUG $CPPFLAGS" +- CXXFLAGS="-ggdb -O0 $CXXFLAGS" ++ CXXFLAGS="-ggdb -O0 -g $CXXFLAGS" + fi + else + AC_MSG_RESULT([no]) +@@ -202,7 +212,7 @@ + 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="-march=i686 -ffast-math -fomit-frame-pointer $CXXFLAGS" + fi + ;; + powerpc-*-*) +@@ -340,7 +350,7 @@ + + # if QuickTime is present, it will override everything else, + # (unless '--without-quicktime' was given) +-if test x"$with_quicktime" = "xyes"; then ++if test x"$with_quicktime" = x"yes"; then + + # check other ./configure flags + if test x"$with_ffmpeg" = "xyes"; then +@@ -690,7 +700,7 @@ + AM_CONDITIONAL([BUILD_PYTHON_WRAPPERS], [test x"$have_python" = "xyes"]) + + # check for swig itself +-SWIG="" ++SWIG="no" + if test x"$with_swig" = "xyes"; then + AC_MSG_NOTICE([Checking for SWIG]) + +@@ -821,6 +831,7 @@ + Use dc1394 & raw1394: ${have_dc1394} + Use v4l: ${have_v4l} + Use v4l2: ${have_v4l2} ++ Use gtk: ${have_gtk} + + Wrappers for other languages ========================================= + SWIG ${SWIG} + diff --git a/sci-libs/opencv/files/opencv-1.0.0-fixpythonmultilib.patch b/sci-libs/opencv/files/opencv-1.0.0-fixpythonmultilib.patch new file mode 100644 index 000000000..6dfa67e12 --- /dev/null +++ b/sci-libs/opencv/files/opencv-1.0.0-fixpythonmultilib.patch @@ -0,0 +1,14 @@ +--- opencv-1.0.0-orig/interfaces/swig/python/Makefile.am 2006-08-10 09:29:20.000000000 -0400 ++++ opencv-1.0.0/interfaces/swig/python/Makefile.am 2008-06-07 07:43:34.000000000 -0400 +@@ -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/sci-libs/opencv/files/opencv-1.0.0-havepngexrdefs.patch b/sci-libs/opencv/files/opencv-1.0.0-havepngexrdefs.patch new file mode 100644 index 000000000..f2e19b644 --- /dev/null +++ b/sci-libs/opencv/files/opencv-1.0.0-havepngexrdefs.patch @@ -0,0 +1,49 @@ +diff -aur opencv-1.0.0-orig/otherlibs/highgui/Makefile.am opencv-1.0.0/otherlibs/highgui/Makefile.am +--- opencv-1.0.0-orig/otherlibs/highgui/Makefile.am 2006-10-31 10:49:51.000000000 -0500 ++++ opencv-1.0.0/otherlibs/highgui/Makefile.am 2008-06-07 10:15:18.000000000 -0400 +@@ -4,8 +4,8 @@ + cvcap_v4l.cpp cvcap_xine.cpp \ + window_carbon.cpp window_gtk.cpp window_w32.cpp + +-INCLUDES = -I. -I$(top_srcdir)/cxcore/include \ +- -I$(top_srcdir)/cv/include @GTHREAD_CFLAGS@ @GTK_CFLAGS@ \ ++INCLUDES = -I. -I$(top_srcdir)/cxcore/include -I$(top_srcdir) \ ++ -I$(top_srcdir)/cv/include -I/usr/include/OpenEXR @GTHREAD_CFLAGS@ @GTK_CFLAGS@ \ + @QUICKTIME_CFLAGS@ @CARBON_CFLAGS@ + + noinst_HEADERS = \ +diff -aur opencv-1.0.0-orig/otherlibs/highgui/grfmt_exr.cpp opencv-1.0.0/otherlibs/highgui/grfmt_exr.cpp +--- opencv-1.0.0-orig/otherlibs/highgui/grfmt_exr.cpp 2006-10-17 07:58:55.000000000 -0400 ++++ opencv-1.0.0/otherlibs/highgui/grfmt_exr.cpp 2008-06-07 10:12:42.000000000 -0400 +@@ -40,6 +40,7 @@ + //M*/ + + #include "_highgui.h" ++#include "cvconfig.h" + + #ifdef HAVE_ILMIMF + +diff -aur opencv-1.0.0-orig/otherlibs/highgui/grfmt_png.cpp opencv-1.0.0/otherlibs/highgui/grfmt_png.cpp +--- opencv-1.0.0-orig/otherlibs/highgui/grfmt_png.cpp 2006-10-11 12:51:43.000000000 -0400 ++++ opencv-1.0.0/otherlibs/highgui/grfmt_png.cpp 2008-06-07 09:56:54.000000000 -0400 +@@ -40,6 +40,7 @@ + //M*/ + + #include "_highgui.h" ++#include "cvconfig.h" + + #ifdef HAVE_PNG + +@@ -50,10 +51,10 @@ + and png2bmp sample from libpng distribution (Copyright (C) 1999-2001 MIYASAKA Masaru) + \****************************************************************************************/ + +-#if defined WIN32 || defined HAVE_PNG_H ++#ifdef HAVE_PNG_H + #include + #else +-#include ++#include + #endif + #include "grfmt_png.h" + diff --git a/sci-libs/opencv/metadata.xml b/sci-libs/opencv/metadata.xml new file mode 100644 index 000000000..370e40cff --- /dev/null +++ b/sci-libs/opencv/metadata.xml @@ -0,0 +1,16 @@ + + + + sci + + gentoofan23@gmail.com + Thomas Anderson + + OpenCV (Open Source Computer Vision) is a library of + programming functions mainly aimed at real time computer vision. + Example applications of the OpenCV library are Human-Computer Interaction + (HCI); Object Identification, Segmentation and Recognition; Face + Recognition; Gesture Recognition; Motion Tracking, Ego Motion, Motion + Understanding; Structure From Motion (SFM); and Mobile Robotics. + + diff --git a/sci-libs/opencv/opencv-1.0.0.ebuild b/sci-libs/opencv/opencv-1.0.0.ebuild new file mode 100644 index 000000000..c8331bc5d --- /dev/null +++ b/sci-libs/opencv/opencv-1.0.0.ebuild @@ -0,0 +1,83 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="1" +inherit eutils flag-o-matic autotools multilib + +DESCRIPTION="A collection of algorithms and sample code for various computer vision problems." +HOMEPAGE="http://www.intel.com/technology/computing/opencv/index.htm" +SRC_URI="mirror://sourceforge/${PN}library/${P}.tar.gz" + +##If video for linux is enabled, add GPL-2, since it will need to use GPL-2 +##stuff, same for v4l +LICENSE="v4l? ( GPL-2 ) xine? ( GPL-2 ) Intel" +SLOT="0" +KEYWORDS="~amd64" +IUSE="debug examples ffmpeg gtk ieee1394 jpeg jpeg2k openexr png python tiff xine v4l zlib" + +COMMON_DEPEND="ffmpeg? ( media-video/ffmpeg ) + gtk? ( x11-libs/gtk+:2 ) + ieee1394? ( >=sys-libs/libraw1394-1.2.0 media-libs/libdc1394:1 ) + jpeg? ( media-libs/jpeg ) + jpeg2k? ( media-libs/jasper ) + openexr? ( media-libs/openexr ) + png? ( media-libs/libpng:1.2 ) + python? ( >=dev-lang/python-2.3 >=dev-lang/swig-1.3.30 ) + tiff? ( media-libs/tiff ) + xine? ( media-libs/xine-lib ) + zlib? ( sys-libs/zlib )" + +DEPEND="${COMMON_DEPEND} + gtk? ( dev-util/pkgconfig )" +RDEPEND="${COMMON_DEPEND}" + +RESTRICT="mirror" + +src_unpack() { + unpack ${A} + cd "${S}" + + # remove the install-hook that runs ldconfig. + sed -i '/install-hook:/,/^$/d' Makefile.am + + epatch "${FILESDIR}"/${P}-cvcapffmpeg.patch + epatch "${FILESDIR}"/${P}-fixpythonmultilib.patch + epatch "${FILESDIR}"/${P}-automagicdependencies.patch + epatch "${FILESDIR}"/${P}-havepngexrdefs.patch + + eautoreconf || die "eautoreconf failed" +} + +src_compile() { + use debug && filter-ldflags -O1 -Wl --enable-new-dtags -s + + use python && local myconf="--with-swig --with-python" + + econf \ + ${myconf} \ + $(use_with gtk) \ + $(use_with xine) \ + $(use_with ffmpeg) \ + $(use_with ieee1394 1394libs) \ + $(use_with v4l) \ + $(use_with v4l v4l2) \ + $(use_enable examples) \ + $(use_enable debug) \ + $(use_enable zlib) \ + $(use_enable jpeg) \ + $(use_enable png) \ + $(use_enable openexr) \ + $(use_enable tiff) \ + $(use_enable jpeg2k jasper) + emake || die "Emake failed" +} + +src_test() { + emake check || die "Tests failed" +} + +src_install() { + emake DESTDIR="${D}" install || die "Install failed" + dodoc AUTHORS NEWS TODO +} -- cgit v1.2.3-65-gdbad