aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgentoofan23 <gentoofan23@32389bae-6d03-0410-99cf-db05cde120eb>2008-06-12 16:55:50 +0000
committergentoofan23 <gentoofan23@32389bae-6d03-0410-99cf-db05cde120eb>2008-06-12 16:55:50 +0000
commitdb95711f6b8abb56be60f5593b78b28bce0399b6 (patch)
tree252b876d8cbfeb4383230b58966a9afa1b96837d /sci-libs
parentAdd demos local USE flag description for opencv (diff)
downloadsci-db95711f6b8abb56be60f5593b78b28bce0399b6.tar.gz
sci-db95711f6b8abb56be60f5593b78b28bce0399b6.tar.bz2
sci-db95711f6b8abb56be60f5593b78b28bce0399b6.zip
Add demos USE flag for sample opencv applications, change to a better format(unified) for the cvcapffmpeg patch
git-svn-id: http://overlays.gentoo.org/svn/proj/science/overlay@1137 32389bae-6d03-0410-99cf-db05cde120eb
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/opencv/ChangeLog5
-rw-r--r--sci-libs/opencv/Manifest6
-rw-r--r--sci-libs/opencv/files/opencv-1.0.0-cvcapffmpeg.patch63
-rw-r--r--sci-libs/opencv/files/opencv-1.0.0-cvcapffmpegundefinedsymbols.patch85
-rw-r--r--sci-libs/opencv/opencv-1.0.0-r1.ebuild (renamed from sci-libs/opencv/opencv-1.0.0.ebuild)8
5 files changed, 98 insertions, 69 deletions
diff --git a/sci-libs/opencv/ChangeLog b/sci-libs/opencv/ChangeLog
index dcb293ce8..cabf9c1ab 100644
--- a/sci-libs/opencv/ChangeLog
+++ b/sci-libs/opencv/ChangeLog
@@ -4,6 +4,11 @@
12 Jun 2008; Thomas Anderson (gentoofan23) <gentoofan23@gmail.com>
ChangeLog:
+ Add demos USE flag for sample opencv applications, change to a better
+ format(unified) for the cvcapffmpeg patch
+
+ 12 Jun 2008; Thomas Anderson (gentoofan23) <gentoofan23@gmail.com>
+ ChangeLog:
Fixxor AC_CONFIG_MACRO_DIR conflicts with ACLOCAL_AMFLAGS
08 Jun 2008; Thomas Anderson (gentoofan23) <gentoofan23@gmail.com>
diff --git a/sci-libs/opencv/Manifest b/sci-libs/opencv/Manifest
index 41eacc86e..11c18becc 100644
--- a/sci-libs/opencv/Manifest
+++ b/sci-libs/opencv/Manifest
@@ -1,9 +1,9 @@
AUX opencv-1.0.0-automagicdependencies.patch 16847 RMD160 2c2a0a24b2f81ac67cab19fb5b9e2bbca90012f4 SHA1 0f094ed964003253f3b78423ff0a5483371aa0a2 SHA256 4ec70684d2c138891a04dc931df6a050a33b10744f2acdd998f02b9370edeeaf
-AUX opencv-1.0.0-cvcapffmpeg.patch 2189 RMD160 5865726b2334816bc92975657f40764700239e31 SHA1 ca60a2d270199c114771883ec14c431e03961e3d SHA256 ec499a152e17789ebe4054b5bb04da9933a54ee4e3ed8fdbd1ccc2fa64736d86
+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 2224 RMD160 fc28284cbc3cae09872363c27db74f62f971a61e SHA1 b118299ae0602e06f2319d127844580db7f6a87e SHA256 7b390554d3bb087e905432c679e7474f00133046081c5d81a41271c80029b9c7
-MISC ChangeLog 371 RMD160 db8f0985b48ec45ed1b29b8d8047e96af4caefee SHA1 0d0e255d471e036cda3e923b80b945a7f88be9a7 SHA256 f14ec01b76506f996ee51be820169eb73cb280e9b00cac08cc4f3812a9bfc8ea
+EBUILD opencv-1.0.0-r1.ebuild 2335 RMD160 8888536e007cba11fd742767d3f2a04320678290 SHA1 521328a2a3889be4ed5f3a00a8381e8ae6e6e638 SHA256 79fa69fbef90fd7966b9afbf4a18453f9b15884adbcae50aa521cd8d88dee42a
+MISC ChangeLog 570 RMD160 37d1281f608069296d5b38061fea7c2ae36b7ac3 SHA1 27e467426c61805075b18940de7c733eb5c3c19c SHA256 d63feb1d6a74bb5dfcca082319fa83792b7961f7e50758103176b45622a4d735
MISC metadata.xml 691 RMD160 759e574f771a8d57512b84db50a97acec7ba6a78 SHA1 9faa300f7489783893ac6684198d75c90600ae31 SHA256 d79926876ff2fdc9c9ef5a8660fee8959d05b9605db49651b2cd4fb360fd3696
diff --git a/sci-libs/opencv/files/opencv-1.0.0-cvcapffmpeg.patch b/sci-libs/opencv/files/opencv-1.0.0-cvcapffmpeg.patch
deleted file mode 100644
index df06e6462..000000000
--- a/sci-libs/opencv/files/opencv-1.0.0-cvcapffmpeg.patch
+++ /dev/null
@@ -1,63 +0,0 @@
---- 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 <ffmpeg/avcodec.h>
-> #include <ffmpeg/swscale.h>
-> #include <sys/types.h> /* size_t */
-> #include <sys/errno.h>
-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-cvcapffmpegundefinedsymbols.patch b/sci-libs/opencv/files/opencv-1.0.0-cvcapffmpegundefinedsymbols.patch
new file mode 100644
index 000000000..4f5cbf665
--- /dev/null
+++ b/sci-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/sci-libs/opencv/opencv-1.0.0.ebuild b/sci-libs/opencv/opencv-1.0.0-r1.ebuild
index c8331bc5d..7d0b6dfe0 100644
--- a/sci-libs/opencv/opencv-1.0.0.ebuild
+++ b/sci-libs/opencv/opencv-1.0.0-r1.ebuild
@@ -14,7 +14,7 @@ SRC_URI="mirror://sourceforge/${PN}library/${P}.tar.gz"
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"
+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 )
@@ -41,10 +41,11 @@ src_unpack() {
# 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
+ epatch "${FILESDIR}"/${P}-addoptionalsamples.patch
+ epatch "${FILESDIR}"/${P}-cvcapffmpegundefinedsymbols.patch
eautoreconf || die "eautoreconf failed"
}
@@ -62,8 +63,9 @@ src_compile() {
$(use_with ieee1394 1394libs) \
$(use_with v4l) \
$(use_with v4l v4l2) \
- $(use_enable examples) \
+ $(use_enable examples samples) \
$(use_enable debug) \
+ $(use_enable demos apps) \
$(use_enable zlib) \
$(use_enable jpeg) \
$(use_enable png) \