summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Anderson <tanderson@gentoo.org>2008-06-23 00:27:07 +0000
committerThomas Anderson <tanderson@gentoo.org>2008-06-23 00:27:07 +0000
commit2d3b582cd559834bc7eb5827c307c5b3caa375d3 (patch)
tree6f292e69daa0b44787c923ca108ea13c40d7274b /media-libs
parentMask >www-client/opera-9.50 (snapshots). (diff)
downloadhistorical-2d3b582cd559834bc7eb5827c307c5b3caa375d3.tar.gz
historical-2d3b582cd559834bc7eb5827c307c5b3caa375d3.tar.bz2
historical-2d3b582cd559834bc7eb5827c307c5b3caa375d3.zip
Import changes from science overlay, fixes tons of automagic bugs as well as multilib bugs. Keyworded ~amd64
Package-Manager: portage-2.1.4.4
Diffstat (limited to 'media-libs')
-rw-r--r--media-libs/opencv/ChangeLog15
-rw-r--r--media-libs/opencv/Manifest20
-rw-r--r--media-libs/opencv/files/opencv-1.0.0-addoptionalsamples.patch31
-rw-r--r--media-libs/opencv/files/opencv-1.0.0-automagicdependencies.patch483
-rw-r--r--media-libs/opencv/files/opencv-1.0.0-cvcapffmpegundefinedsymbols.patch85
-rw-r--r--media-libs/opencv/files/opencv-1.0.0-enableuseflags.patch137
-rw-r--r--media-libs/opencv/files/opencv-1.0.0-fixpythonmultilib.patch14
-rw-r--r--media-libs/opencv/files/opencv-1.0.0-havepngexrdefs.patch49
-rw-r--r--media-libs/opencv/opencv-1.0.0-r1.ebuild86
-rw-r--r--media-libs/opencv/opencv-1.0.0.ebuild64
10 files changed, 917 insertions, 67 deletions
diff --git a/media-libs/opencv/ChangeLog b/media-libs/opencv/ChangeLog
index b4d2e6ab4fde..145591fc5b63 100644
--- a/media-libs/opencv/ChangeLog
+++ b/media-libs/opencv/ChangeLog
@@ -1,6 +1,19 @@
# ChangeLog for media-libs/opencv
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/opencv/ChangeLog,v 1.3 2008/06/20 12:05:12 drac Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/opencv/ChangeLog,v 1.4 2008/06/23 00:27:07 gentoofan23 Exp $
+
+*opencv-1.0.0-r1 (23 Jun 2008)
+
+ 23 Jun 2008; Thomas Anderson <gentoofan23@gentoo.org>
+ +files/opencv-1.0.0-addoptionalsamples.patch,
+ +files/opencv-1.0.0-automagicdependencies.patch,
+ +files/opencv-1.0.0-cvcapffmpegundefinedsymbols.patch,
+ +files/opencv-1.0.0-enableuseflags.patch,
+ +files/opencv-1.0.0-fixpythonmultilib.patch,
+ +files/opencv-1.0.0-havepngexrdefs.patch, -opencv-1.0.0.ebuild,
+ +opencv-1.0.0-r1.ebuild:
+ Import changes from science overlay, fixes tons of automagic bugs as well as
+ multilib bugs. Keyworded ~amd64
20 Jun 2008; Samuli Suominen <drac@gentoo.org> opencv-1.0.0.ebuild:
QAbaddep; pkgconfig is only a build-time depend.
diff --git a/media-libs/opencv/Manifest b/media-libs/opencv/Manifest
index 038658c0ab69..5750397967d5 100644
--- a/media-libs/opencv/Manifest
+++ b/media-libs/opencv/Manifest
@@ -1,4 +1,20 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+AUX opencv-1.0.0-addoptionalsamples.patch 1070 RMD160 6e2bb79f18bab6cb2beeb2aac5428434e049891c SHA1 1d0e51a26fd4d50d1bff4f2da44beca844946586 SHA256 e25e1236188e943a8e707f852ff25fc97d646f698bf6805e2cd8a2a8628bb540
+AUX opencv-1.0.0-automagicdependencies.patch 19265 RMD160 7d9685568f47b8efd494e1b5a08ea1efe791f9a0 SHA1 e92d613747707f7701bb5ba0b9b484b7315e1748 SHA256 862596926e8cd25ff019a5e232fc03522be0103ff084dbfbd36340bfab99d547
+AUX opencv-1.0.0-cvcapffmpegundefinedsymbols.patch 2762 RMD160 cd6d3624205ecc69e5513d0e7424d85c3ea4d932 SHA1 c31d0fe278e1e7f005c668255214ec204a1d70d8 SHA256 90fc7035d3084f71319eea5a33f8440522e93dd5ec090a89fdd36a4bd84cb8ee
+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 1911 RMD160 42e8c9f62e8ff419bb294ae96202d1902cb4df88 SHA1 7e28c20831dea6d6f69679307d1638e9b4d71b80 SHA256 a6100060f953f726f1364b787f90be525902f9a730eaaf19bd944ef25aa3d709
-MISC ChangeLog 597 RMD160 4f668a73415693d81970d72dd08d8883c45ec499 SHA1 7453d69f7c3a4204b55499f52dd895fb0445af0d SHA256 3f8eae78f77bb689eecc821e3bcc5172ce79f7bcbc571f68e6f15ec4f9a9319e
+EBUILD opencv-1.0.0-r1.ebuild 2521 RMD160 c3e5e984955b7cc3104056082c4f6202e5714549 SHA1 44331282553abfc156abec98db2e6bafefcb4de2 SHA256 3f49a0eab2554e240d1e06b25f116dc3595bf65c3ee879c150c92e47e84c1bad
+MISC ChangeLog 1146 RMD160 af56183c43ad1eac481b8ec35b72a3f6dd3253c4 SHA1 50f183c461d61d9708e0a6054ade567ca774e14d SHA256 4912708ad6d4c45503063961f3357d27ed8ac19b3b3bb4ccdf32f859bdd11a01
MISC metadata.xml 652 RMD160 5cfb86ff65264086bc032c406763d3cc46b075d2 SHA1 771ee2dc24641518bbacc47bbffa356d0c071a35 SHA256 b63ce92a359d882b519ef92ef358a73ce854bd875e19c283c72217b0d7965bdc
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.9 (GNU/Linux)
+
+iEYEARECAAYFAkhe8VIACgkQF6yMcaBxwHnP4gCfZUFT8NDqkCB6uVsrI6Jj5n1e
+EJMAnRs39bU+fKW155UdcD8ZbP+ysn+A
+=Wp4x
+-----END PGP SIGNATURE-----
diff --git a/media-libs/opencv/files/opencv-1.0.0-addoptionalsamples.patch b/media-libs/opencv/files/opencv-1.0.0-addoptionalsamples.patch
new file mode 100644
index 000000000000..012aa7051797
--- /dev/null
+++ b/media-libs/opencv/files/opencv-1.0.0-addoptionalsamples.patch
@@ -0,0 +1,31 @@
+diff -aur opencv-1.0.0-orig/samples/c/Makefile.am opencv-1.0.0/samples/c/Makefile.am
+--- opencv-1.0.0-orig/samples/c/Makefile.am 2006-10-18 10:27:23.000000000 -0400
++++ opencv-1.0.0/samples/c/Makefile.am 2008-06-09 11:58:36.000000000 -0400
+@@ -1,3 +1,5 @@
++if INSTALL_SAMPLES
++
+ csamplesdir=$(pkgdatadir)/samples/c
+
+ dist_csamples_DATA = airplane.jpg baboon.jpg lena.jpg fruits.jpg stuff.jpg \
+@@ -10,4 +12,5 @@
+ inpaint.cpp laplace.c letter_recog.cpp lkdemo.c minarea.c morphology.c motempl.c \
+ mushroom.cpp pyramid_segmentation.c squares.c watershed.cpp
+
++endif
+
+diff -aur opencv-1.0.0-orig/samples/python/Makefile.am opencv-1.0.0/samples/python/Makefile.am
+--- opencv-1.0.0-orig/samples/python/Makefile.am 2006-10-04 04:02:12.000000000 -0400
++++ opencv-1.0.0/samples/python/Makefile.am 2008-06-09 12:00:25.000000000 -0400
+@@ -1,3 +1,5 @@
++if INSTALL_SAMPLES
++if WITH_PYTHON
+ csamplesdir=$(pkgdatadir)/samples/python
+
+ dist_csamples_SCRIPTS = \
+@@ -29,3 +31,6 @@
+ pyramid_segmentation.py \
+ squares.py \
+ watershed.py
++
++endif
++endif
diff --git a/media-libs/opencv/files/opencv-1.0.0-automagicdependencies.patch b/media-libs/opencv/files/opencv-1.0.0-automagicdependencies.patch
new file mode 100644
index 000000000000..6f9605d66709
--- /dev/null
+++ b/media-libs/opencv/files/opencv-1.0.0-automagicdependencies.patch
@@ -0,0 +1,483 @@
+--- opencv-1.0.0-orig/configure.in 2006-11-03 10:54:33.000000000 -0500
++++ opencv-1.0.0/configure.in 2008-06-12 14:25:31.000000000 -0400
+@@ -20,7 +20,6 @@
+ 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.1 $)
+@@ -81,15 +80,22 @@
+ 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"])
+
++AC_ARG_ENABLE([samples],
++ [AS_HELP_STRING([--enable-samples],[install sample source code])],
++ [enable_samples=$enableval],
++ [enable_samples="no"])
++AM_CONDITIONAL([INSTALL_SAMPLES], [test x"$enable_samples" = x"yes"])
++
+
+ # the following checks reflect the dependencies of OpenCV on other
+ # libraries that do the actual work for video I/O or windowing
+@@ -101,55 +107,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 +355,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
+@@ -423,129 +438,62 @@
+ AC_SUBST(XINE_LIBS)
+ AM_CONDITIONAL([BUILD_XINE], [test x"$have_xine" = "xyes"])
+
+-# unfortunately, xine does not feature video writing,
+-# so we have to resort to FFMPEG here
+-if test x"$with_ffmpeg" = "xno"; then
+- have_ffmpeg=no
+- # FFMPEGLIBS=""
+-else
+-
+- # check if ./configure arguments are valid
+- if test x"$with_ffmpeg" = "xauto"; then
+- with_ffmpeg=yes
+- fi
+- if test x"$with_ffmpeg" = "xyes"; then
+- AC_CHECK_HEADER(ffmpeg/avcodec.h,
+- AC_CHECK_LIB(avcodec, avcodec_decode_video,
+- [
+- AC_CHECK_LIB(avformat, av_open_input_file,
+- [
+- have_ffmpeg=yes
+- AC_DEFINE(HAVE_FFMPEG,,[FFMpeg video library])
+- FFMPEGLIBS="-lavcodec -lavformat"
+- ],
+- [ have_ffmpeg=no ],
+- [-lavcodec])
+- ],
+- [ have_ffmpeg=no ]),
+- [ have_ffmpeg=no ])
+- else
+- # if we get here then --with-ffmpeg was not called with 'yes','no' or 'auto'
+- AC_MSG_WARN([unexpected arguments for option --with-ffmpeg, continuing assuming 'no'])
+- have_ffmpeg=no
+- fi
++if test x"$with_ffmpeg" = x"yes"; then
++ AC_CHECK_HEADER(ffmpeg/avcodec.h,, [AC_MSG_ERROR([FFmpeg requested but header file ffmpeg/avcodec.h not found])])
++ AC_CHECK_HEADER(ffmpeg/swscale.h,, [AC_MSG_ERROR([FFmpeg requested but header file ffmpeg/swscale.h not found])])
++ AC_CHECK_LIB(avcodec, avcodec_decode_video,, [AC_MSG_ERROR([FFmpeg requested but ffmpeg libraries not found])])
++ AC_CHECK_LIB(avformat, av_open_input_file,, [AC_MSG_ERROR([FFmpeg requested but ffmpeg libraries not found])])
++ AC_CHECK_LIB(swscale, sws_getContext,, [AC_MSG_ERROR([FFmpeg requested but ffmpeg libraries not found])])
++ AC_DEFINE(HAVE_FFMPEG,,[FFMpeg video library])
++ FFMPEGLIBS="-lavcodec -lavformat -lswscale"
++ have_ffmpeg=yes
+ fi
+ AC_SUBST(FFMPEGLIBS)
+ AM_CONDITIONAL([BUILD_FFMPEG], [test x"$have_ffmpeg" = "xyes"])
+
+ # 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 <asm/types.h>
+- #include <sys/time.h>
+- ]])
+- 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 +506,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 +646,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 +763,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}
+@@ -828,6 +784,7 @@
+
+ Additional build settings ============================================
+ Build demo apps ${enable_apps}
++ Install source snippets ${enable_samples}
+
+ Now run make ...
+ ])
diff --git a/media-libs/opencv/files/opencv-1.0.0-cvcapffmpegundefinedsymbols.patch b/media-libs/opencv/files/opencv-1.0.0-cvcapffmpegundefinedsymbols.patch
new file mode 100644
index 000000000000..4f5cbf66586f
--- /dev/null
+++ b/media-libs/opencv/files/opencv-1.0.0-cvcapffmpegundefinedsymbols.patch
@@ -0,0 +1,85 @@
+--- otherlibs/highgui/cvcap_ffmpeg.cpp 2006-07-24 18:27:39.000000000 -0400
++++ otherlibs/highgui/cvcap_ffmpeg.cpp 2008-06-12 12:25:42.000000000 -0400
+@@ -41,9 +41,14 @@
+
+ #include "_highgui.h"
+
++#define __STDC_CONSTANT_MACROS
+
+ extern "C" {
+ #include <ffmpeg/avformat.h>
++#include <ffmpeg/avcodec.h>
++#include <ffmpeg/swscale.h>
++#include <sys/types.h> /* size_t */
++#include <sys/errno.h>
+ }
+
+ #ifdef NDEBUG
+@@ -52,6 +57,8 @@
+ #define CV_WARN(message) fprintf(stderr, "warning: %s (%s:%d)\n", message, __FILE__, __LINE__)
+ #endif
+
++static struct SwsContext *img_convert_ctx;
++
+ typedef struct CvCaptureAVI_FFMPEG
+ {
+ CvCaptureVTable * vtable;
+@@ -214,19 +221,21 @@
+ {
+ if( !capture || !capture->video_st || !capture->picture->data[0] )
+ return 0;
+-#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);
++
+ return &capture->frame;
+ }
+
+@@ -713,9 +722,20 @@
+ PIX_FMT_BGR24, image->width, image->height);
+
+ // convert to the color format needed by the codec
+- 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 )
++ {
+ CV_ERROR(CV_StsUnsupportedFormat, "FFMPEG::img_convert pixel format conversion from BGR24 not handled");
+ }
+ }
diff --git a/media-libs/opencv/files/opencv-1.0.0-enableuseflags.patch b/media-libs/opencv/files/opencv-1.0.0-enableuseflags.patch
new file mode 100644
index 000000000000..046e6320e884
--- /dev/null
+++ b/media-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/media-libs/opencv/files/opencv-1.0.0-fixpythonmultilib.patch b/media-libs/opencv/files/opencv-1.0.0-fixpythonmultilib.patch
new file mode 100644
index 000000000000..6dfa67e120de
--- /dev/null
+++ b/media-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/media-libs/opencv/files/opencv-1.0.0-havepngexrdefs.patch b/media-libs/opencv/files/opencv-1.0.0-havepngexrdefs.patch
new file mode 100644
index 000000000000..f2e19b64440f
--- /dev/null
+++ b/media-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 <png.h>
+ #else
+-#include <libpng/png.h>
++#include <libpng12/png.h>
+ #endif
+ #include "grfmt_png.h"
+
diff --git a/media-libs/opencv/opencv-1.0.0-r1.ebuild b/media-libs/opencv/opencv-1.0.0-r1.ebuild
new file mode 100644
index 000000000000..7afaac2cf73c
--- /dev/null
+++ b/media-libs/opencv/opencv-1.0.0-r1.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/opencv/opencv-1.0.0-r1.ebuild,v 1.1 2008/06/23 00:27:07 gentoofan23 Exp $
+
+EAPI="1"
+inherit eutils flag-o-matic autotools
+
+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 ~x86"
+IUSE="debug demos 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}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # remove the install-hook that runs ldconfig.
+ sed -i '/install-hook:/,/^$/d' Makefile.am
+
+ epatch "${FILESDIR}"/${P}-fixpythonmultilib.patch
+ epatch "${FILESDIR}"/${P}-automagicdependencies.patch
+ epatch "${FILESDIR}"/${P}-havepngexrdefs.patch
+ epatch "${FILESDIR}"/${P}-addoptionalsamples.patch
+ epatch "${FILESDIR}"/${P}-cvcapffmpegundefinedsymbols.patch
+
+ eautoreconf || die "eautoreconf failed"
+}
+
+src_compile() {
+ use debug && filter-ldflags -O1 -Wl --enable-new-dtags -s
+
+ local myconf="--without-quicktime"
+ use python && myconf="${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 samples) \
+ $(use_enable debug) \
+ $(use_enable demos apps) \
+ $(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 ChangeLog README NEWS TODO
+ insinto /usr/share/doc/${P}
+ doins -r docs/
+}
diff --git a/media-libs/opencv/opencv-1.0.0.ebuild b/media-libs/opencv/opencv-1.0.0.ebuild
deleted file mode 100644
index 72bb2b5e629d..000000000000
--- a/media-libs/opencv/opencv-1.0.0.ebuild
+++ /dev/null
@@ -1,64 +0,0 @@
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/opencv/opencv-1.0.0.ebuild,v 1.4 2008/06/20 12:05:12 drac Exp $
-
-inherit eutils
-
-DESCRIPTION="OpenCV is a library of programming functions mainly aimed at real time computer vision."
-HOMEPAGE="http://opencvlibrary.sourceforge.net/"
-SRC_URI="mirror://sourceforge/opencvlibrary/${P}.tar.gz"
-
-LICENSE="Intel"
-SLOT="0"
-KEYWORDS="~x86"
-IUSE="ffmpeg gtk ieee1394 python swig v4l v4l2 xine"
-
-RDEPEND="media-libs/jasper
- media-libs/jpeg
- media-libs/libpng
- media-libs/tiff
- sys-libs/zlib
- ffmpeg? ( >=media-video/ffmpeg-0.4.9 )
- ieee1394? ( media-libs/libdc1394 )
- ieee1394? ( sys-libs/libraw1394 )
- gtk? ( >=x11-libs/gtk+-2 )
- python? ( >=dev-lang/python-2.3 )
- swig? ( dev-lang/swig )
- xine? ( media-libs/xine-lib )"
-DEPEND="${RDEPEND}
- dev-util/pkgconfig"
-
-src_compile() {
- local myconf="--without-quicktime"
-
- if use ffmpeg ; then
- ## TODO: jmglov 2008/06/18
- ## Remove this junk once bug # 227975 is resolved
- ewarn "${PN} currently will not build with ffmpeg support"
- ewarn "Please enable the 'xine' USE flag instead"
- ewarn "Working on this in bug # 227975"
- die "configuration failed; see above"
- ## TODO: jmglov 2008/06/18
-
- myconf="${myconf} --with-ffmpeg --without-xine"
- elif use xine ; then
- myconf="${myconf} --with-xine --without-ffmpeg"
- else
- die "You must set one of the 'ffmpeg' or 'xine' USE flags"
- fi
-
- myconf="${myconf} $(use_with ieee1394 1394libs)"
- myconf="${myconf} $(use_with python)"
- myconf="${myconf} $(use_with swig)"
- myconf="${myconf} $(use_with v4l)"
-
- econf ${myconf} || die "econf failed"
-
- emake || die "emake failed"
-}
-
-src_install() {
- emake DESTDIR="${D}" install
- dodoc AUTHORS ChangeLog COPYING INSTALL NEWS README THANKS TODO
- dodoc -r docs
-}