diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /media-gfx/zbar |
reinit the tree, so we can have metadata
Diffstat (limited to 'media-gfx/zbar')
-rw-r--r-- | media-gfx/zbar/Manifest | 13 | ||||
-rw-r--r-- | media-gfx/zbar/files/zbar-0.10-errors.patch | 10 | ||||
-rw-r--r-- | media-gfx/zbar/files/zbar-0.10-no-v4l1-check.patch | 74 | ||||
-rw-r--r-- | media-gfx/zbar/files/zbar-0.10-python-crash.patch | 19 | ||||
-rw-r--r-- | media-gfx/zbar/files/zbar-0.10-v4l2-uvcvideo.patch | 49 | ||||
-rw-r--r-- | media-gfx/zbar/files/zbar-0.10_p20121015-ImageMagick-7.diff | 24 | ||||
-rw-r--r-- | media-gfx/zbar/metadata.xml | 11 | ||||
-rw-r--r-- | media-gfx/zbar/zbar-0.10-r6.ebuild | 72 | ||||
-rw-r--r-- | media-gfx/zbar/zbar-0.10_p20121015-r1.ebuild | 100 | ||||
-rw-r--r-- | media-gfx/zbar/zbar-0.10_p20121015-r2.ebuild | 114 |
10 files changed, 486 insertions, 0 deletions
diff --git a/media-gfx/zbar/Manifest b/media-gfx/zbar/Manifest new file mode 100644 index 000000000000..6a408dbb1059 --- /dev/null +++ b/media-gfx/zbar/Manifest @@ -0,0 +1,13 @@ +AUX zbar-0.10-errors.patch 178 SHA256 664434317c666147927fa23af138122c7248b06f37f8ae10a005713c1cb804ce SHA512 0978f9d52bed844448c5a92349806134e4b03bf069307fad2f3944b92b6f1c8dda094574ae4829860263d735ba7d20e71d435308185503634f9e46897479c7f1 WHIRLPOOL 1f9095a53d9320a4526fa773a0171a1176bda0b383982347b138175bed2aa0623cdacd23c48e35afd07f7a4dcd13f58d50dfa6dfd8ac1bd78152525bca41260a +AUX zbar-0.10-no-v4l1-check.patch 2270 SHA256 fe41b3855be44d0f61e6e21dfd3fd90fc56b6f01b1e6633e3d2ab9ed9617f5c8 SHA512 f2f66476769469d701206bf1efae16d384cfbaa138c877a0ea32bedcd39b5abfd6dae630e7d729b009ab50052db0166198949f49ddfb66d708792000808da74d WHIRLPOOL 3e2c65812ada05197085a6823b0c063f6264d72c55a91383d25c8b8576a4cb50ff707ad655993723fcae87f42f366f6ea637640db21ba6d15544443e07269db6 +AUX zbar-0.10-python-crash.patch 604 SHA256 a8f27e03a58be705ea9f7a4b139f5c831171a44bd15d775fb5477c406f3e321c SHA512 56e1848466b2178fb25a1f88f1a35113c01d370927b5778af96f1b96bcdaa8349308ac7ef14fb247bc5ec4165b2f7daa717159f3f7786ced9c043428afd641ba WHIRLPOOL f135563cbe4742412e6c2c41fabec6725d034bacbc9ee6d71aa315ce708a17e19807d06798c452089237b8a214c06f7d340c22f6985575b17d7118a448b394bd +AUX zbar-0.10-v4l2-uvcvideo.patch 1487 SHA256 cd732193667746ff51e48c1a7dde4db7716c420298dfc92ee31fb3dc2229aef5 SHA512 6a53eb54ed3ad83cacb9a09d0b119550d364e586990725f0a423a180fab790e18c2c6d8201d185a51bd26ea3955018416b2993fbdb5e5a555e13183b3bce7b1a WHIRLPOOL 31c69ae5de1701801457163fafff5d05daae0e387f785318c1bd3a2508fd2d1263f4873aacd52a862be301d5b882b9f283045ff4db6f9fb0d8d52b47b4b2798c +AUX zbar-0.10_p20121015-ImageMagick-7.diff 1064 SHA256 0f50dad0e82743ccb79cf3a2762ffcdd32936c511895e9ab49aea12ce003050a SHA512 90e09dabfaec0f1e68e8bdb040a2903377c658a39f9d0beb1a92546c26acf7e68115a6f6a745f930edc7c55353f51c7f58888fea564c259d1f5155ff1f35d6f9 WHIRLPOOL fcf1e17acae8d6a73626709d2c3817c42fdee430dc6308492d1bcaff7ec4a76dcca9baf5dfc40b11c800118e29207ed1aa84a16d0e596401395ae168db3f4b87 +DIST zbar-0.10.tar.bz2 592602 SHA256 234efb39dbbe5cef4189cc76f37afbe3cfcfb45ae52493bfe8e191318bdbadc6 SHA512 76cb8a469e3ac9ea7932a95c500cf933501249cdb8dce4df558bf5681bd44c62111327b494e6e887079a5fd30b32154887dcc12962e6d27b1453f55457483db4 WHIRLPOOL b4d8f6b2f6deb52fc7a60721888c3bbec2f4a94d5e29488167908e8a448ca698d64db7f78fb22408d4e3360eda44fd82195a0d762b71d203ca87d549461cde7f +DIST zbar-0.10_p20121015.zip 991578 SHA256 1e2ba2a6f27bcc93b74e57ff46cc69c0f5c8d22ae277aa3d6c9da6892b892abe SHA512 7bb74ea5b096093b283c44787547ad0b886281628d012aa7b03ddb477732feb1e12d4d5a661191d34b53b7b272a237f67840e219b0ac5e2803da478a1ddba7a1 WHIRLPOOL be6307740b7e15c344c05c60a842d2ad01c6954ada71677cb8dbcbd0720a35f7f86d673a0f92a98d5968dc8394e9917c2a80880cb17a8d54bdc16827aa5d1eeb +EBUILD zbar-0.10-r6.ebuild 1742 SHA256 b5a764e2a37849eceb52a09c3769b1e635d4374f4a302fdd27e6f0fc76ce31d1 SHA512 6a03ed2a6ed2b3a1c28cd58703600869148428030151f779324fc06d32d6fd1eae74584c40c53aba3f38b999229a01e2ce275fbb8e31885d951efa5ad42f9897 WHIRLPOOL be21915cb03f59d9525802726bbf452a1c12626db4821a475557ffd822b8fc5c5c515a4402a3d6105a946ab3ffcc2c00db1cafce9635701ec34f2b9de09fb3a2 +EBUILD zbar-0.10_p20121015-r1.ebuild 2397 SHA256 57b71678a2f386b5ca195f83b8668753494ff6bdfccae56ead367484886da215 SHA512 b5f6232d3fce9cb1842d5630537ff52056b185036506bae78f605dc5d2f0ec54f5d41edb2d58b6caa379e1f7dfdd266fcc9bd0d454eada9c73507924ae9dad55 WHIRLPOOL 54fa118770689e135ad134216229556a478c47c6ea576f7c144c489237fd9c7aa963b05dcdb70e215617d84916c52076d72bba5750c1ea57dc4c77b94de6bd2c +EBUILD zbar-0.10_p20121015-r2.ebuild 2850 SHA256 049447d10d637b6ab49b2a6aa7e6337dba05cc428fd3e543995790e44a32581f SHA512 dc4efb0cbbc4fb467731d5cccbd0e52d12b37c9f14a97e3b105b353fd65bfcf461f0c0bf2f6613af153941e86698f6f2ed9645ae6ed9d2fb39ad27e25375dde3 WHIRLPOOL 2e0c9ab84fc788231225ef9ea2f199c0f537c7f029db31d5013dc90cbbf30c9184b183770a90e84ae5ae745784f30d112bb22ee075474050874b9ceb35ae1254 +MISC ChangeLog 3070 SHA256 625772eb4b7eacc0abf227bdaeb19afdf7a9f93ea1171bac9a802fa538a75a46 SHA512 3fe54fee97f173d63ab22895c3c75028cde6898c79a879094c21b71b6fa7343c7e419da7394761bd2c02e3047bfa6bf5edfc7ea63735ab2cca9465c2f84d7f32 WHIRLPOOL a6927b2dc2cff20fdc2ac483c2ab8071e102094fcbfe3f10aceaf455272579c2acfbdf1551a645ea421c53492500a0de2b878d92d7a18842e23ca55e26f3cbd4 +MISC ChangeLog-2015 3339 SHA256 5638091cdf6e8f85673dc0eb4b54d7200ff1427bfdb2760da32f9aeae1c5b7c1 SHA512 e88fcfab7d6ad3b2ccc06ff0811cab2be33d050d635e98a5c6886b051b7a3e827368a8b4a0088c5e715513bbe37e10c06414c7e6c7700f975b2035f08f9006b9 WHIRLPOOL bed7336eb41796157f1d4aab2cb1676297067968ccf414210cd76269acc89319ca81df207132cddcd26fabdfab5dec987e322540496aaf307af5a0f6be74e44d +MISC metadata.xml 317 SHA256 270542feeac9397b6c57c4b6a43dbeaf1ccabd6814d0241567a011806dedee58 SHA512 911dee4073890017c8816d892b3e77e460328fc8e25e59c3ba74eafc909de73d743ac8c1c3015385bcbba1e7f175796704f6b1be6b1f37e0ce652da1749ee830 WHIRLPOOL 9413dad92be61e09c3bd6482d4ef8a55e4b01784dc85559ff7cdb79974ba2d7f174482b5549f5d00d7db88552e5e0ea5bcee544f9c85c0297173ca4f708f2f48 diff --git a/media-gfx/zbar/files/zbar-0.10-errors.patch b/media-gfx/zbar/files/zbar-0.10-errors.patch new file mode 100644 index 000000000000..63328ce664bb --- /dev/null +++ b/media-gfx/zbar/files/zbar-0.10-errors.patch @@ -0,0 +1,10 @@ +--- zbar-0.10/include/zbar/Exception.h ++++ zbar-0.10/include/zbar/Exception.h +@@ -32,6 +32,7 @@ + + #include <exception> + #include <new> ++#include <cstddef> + + namespace zbar { + diff --git a/media-gfx/zbar/files/zbar-0.10-no-v4l1-check.patch b/media-gfx/zbar/files/zbar-0.10-no-v4l1-check.patch new file mode 100644 index 000000000000..b25827a0b998 --- /dev/null +++ b/media-gfx/zbar/files/zbar-0.10-no-v4l1-check.patch @@ -0,0 +1,74 @@ +--- zbar-0.10/configure.ac ++++ zbar-0.10/configure.ac +@@ -147,19 +147,13 @@ + with_video="no" + AS_IF([test "x$enable_video" != "xno"], + [AS_IF([test "x$win32" = "xno"], +- [AC_CHECK_HEADERS([linux/videodev.h], [with_video="v4l1"], +- [AC_MSG_FAILURE([test for video support failed! +-rebuild your kernel to include video4linux support or +-configure --disable-video to skip building video support.])]) +- AC_CHECK_HEADERS([linux/videodev2.h], [with_video="v4l2"], ++ [AC_CHECK_HEADERS([linux/videodev2.h], [with_video="v4l2"], + [AC_MSG_WARN([v4l2 API not detected, upgrade your kernel!])])], + [AC_CHECK_HEADERS([vfw.h], [with_video="vfw"], + [AC_MSG_FAILURE([test for VfW video support failed! + configure --disable-video to skip building vidoe support.])])]) + ]) + AM_CONDITIONAL([HAVE_VIDEO], [test "x$enable_video" != "xno"]) +-AM_CONDITIONAL([HAVE_V4L1], +- [test "x$with_video" = "xv4l1" || test "x$with_video" = "xv4l2"]) + AM_CONDITIONAL([HAVE_V4L2], [test "x$with_video" = "xv4l2"]) + + dnl X +--- zbar-0.10/zbar/Makefile.am.inc ++++ zbar-0.10/zbar/Makefile.am.inc +@@ -53,12 +53,9 @@ + zbar_libzbar_la_SOURCES += zbar/processor/posix.h zbar/processor/posix.c + endif + +-if HAVE_V4L1 +-zbar_libzbar_la_SOURCES += zbar/video/v4l1.c + if HAVE_V4L2 + zbar_libzbar_la_SOURCES += zbar/video/v4l2.c + endif +-endif + if WIN32 + if HAVE_VIDEO + zbar_libzbar_la_SOURCES += zbar/video/vfw.c +--- zbar-0.10/zbar/video/v4l2.c ++++ zbar-0.10/zbar/video/v4l2.c +@@ -39,6 +39,9 @@ + # include <sys/mman.h> + #endif + #include <linux/videodev2.h> ++#include <sys/stat.h> ++#include <unistd.h> ++#include <fcntl.h> + + #include "video.h" + #include "image.h" +@@ -507,3 +507,23 @@ + vdo->dq = v4l2_dq; + return(0); + } ++ ++int _zbar_video_open (zbar_video_t *vdo, ++ const char *dev) ++{ ++ vdo->fd = open(dev, O_RDWR); ++ if(vdo->fd < 0) ++ return(err_capture_str(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__, ++ "opening video device '%s'", dev)); ++ zprintf(1, "opened camera device %s (fd=%d)\n", dev, vdo->fd); ++ ++ int rc = -1; ++ if(vdo->intf != VIDEO_V4L1) ++ rc = _zbar_v4l2_probe(vdo); ++ ++ if(rc && vdo->fd >= 0) { ++ close(vdo->fd); ++ vdo->fd = -1; ++ } ++ return(rc); ++} diff --git a/media-gfx/zbar/files/zbar-0.10-python-crash.patch b/media-gfx/zbar/files/zbar-0.10-python-crash.patch new file mode 100644 index 000000000000..a6f7a96e34db --- /dev/null +++ b/media-gfx/zbar/files/zbar-0.10-python-crash.patch @@ -0,0 +1,19 @@ +https://sourceforge.net/p/zbar/patches/37/ + +fix from Debian for crashes when importing the python module. +http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=702499 + +this doesn't happen on some arches as the data naturally ends up with zero +data after the structure, but on some (like arm), it isn't so we crash when +python walks the list. + +--- a/python/imagescanner.c ++++ b/python/imagescanner.c +@@ -68,6 +68,7 @@ imagescanner_get_results (zbarImageScanner *self, + + static PyGetSetDef imagescanner_getset[] = { + { "results", (getter)imagescanner_get_results, }, ++ { NULL }, + }; + + static PyObject* diff --git a/media-gfx/zbar/files/zbar-0.10-v4l2-uvcvideo.patch b/media-gfx/zbar/files/zbar-0.10-v4l2-uvcvideo.patch new file mode 100644 index 000000000000..4fde95e2b563 --- /dev/null +++ b/media-gfx/zbar/files/zbar-0.10-v4l2-uvcvideo.patch @@ -0,0 +1,49 @@ +--- zbar-0.10/zbar/video/v4l2.c 2009-10-23 18:16:44.000000000 +0000 ++++ zbar-0.10/zbar/video/v4l2.c 2015-03-07 05:46:36.000000000 +0000 +@@ -241,6 +241,21 @@ + return(0); + } + ++static int v4l2_request_buffers (zbar_video_t *vdo) ++{ ++ struct v4l2_requestbuffers rb; ++ memset(&rb, 0, sizeof(rb)); ++ rb.count = vdo->num_images; ++ rb.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; ++ rb.memory = V4L2_MEMORY_USERPTR; ++ if(ioctl(vdo->fd, VIDIOC_REQBUFS, &rb) < 0) ++ return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__, ++ "requesting video frame buffers (VIDIOC_REQBUFS)")); ++ if(rb.count) ++ vdo->num_images = rb.count; ++ return(0); ++} ++ + static int v4l2_set_format (zbar_video_t *vdo, + uint32_t fmt) + { +@@ -308,6 +323,8 @@ + return(-1); + if(vdo->iomode == VIDEO_MMAP) + return(v4l2_mmap_buffers(vdo)); ++ if(vdo->iomode == VIDEO_USERPTR) ++ return(v4l2_request_buffers(vdo)); + return(0); + } + +@@ -337,8 +354,13 @@ + else { + if(!vdo->iomode) + vdo->iomode = VIDEO_USERPTR; +- if(rb.count) +- vdo->num_images = rb.count; ++ /* releasing buffers ++ * lest the driver may later refuse to change format ++ */ ++ rb.count = 0; ++ if (ioctl(vdo->fd, VIDIOC_REQBUFS, &rb) < 0) ++ zprintf(0, "WARNING: releasing video buffers failed: error %d\n", ++ errno); + } + return(0); + } diff --git a/media-gfx/zbar/files/zbar-0.10_p20121015-ImageMagick-7.diff b/media-gfx/zbar/files/zbar-0.10_p20121015-ImageMagick-7.diff new file mode 100644 index 000000000000..a56ab7d913b0 --- /dev/null +++ b/media-gfx/zbar/files/zbar-0.10_p20121015-ImageMagick-7.diff @@ -0,0 +1,24 @@ +diff -r -U3 zbar-0.10_p20121015_orig/configure.ac zbar-0.10_p20121015/configure.ac +--- zbar-0.10_p20121015_orig/configure.ac 2016-08-28 16:59:23.969753652 +0200 ++++ zbar-0.10_p20121015/configure.ac 2016-08-28 17:17:15.384494517 +0200 +@@ -324,7 +324,7 @@ + dnl double check ImageMagick install (bug #2582232) + CPPFLAGS_save="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $MAGICK_CFLAGS" +- AC_CHECK_HEADER([wand/MagickWand.h], ++ AC_CHECK_HEADER([MagickWand/MagickWand.h], + [have_IM="yes"], + [have_IM="broken"]) + CPPFLAGS="$CPPFLAGS_save"])]) +diff -r -U3 zbar-0.10_p20121015_orig/zbarimg/zbarimg.c zbar-0.10_p20121015/zbarimg/zbarimg.c +--- zbar-0.10_p20121015_orig/zbarimg/zbarimg.c 2015-08-05 11:10:32.000000000 +0200 ++++ zbar-0.10_p20121015/zbarimg/zbarimg.c 2016-08-28 17:10:39.532787196 +0200 +@@ -44,7 +44,7 @@ + #endif + + #ifdef HAVE_IMAGEMAGICK +-# include <wand/MagickWand.h> ++# include <MagickWand/MagickWand.h> + + /* ImageMagick frequently changes API names - just use the original + * (more stable?) names to match GraphicsMagick diff --git a/media-gfx/zbar/metadata.xml b/media-gfx/zbar/metadata.xml new file mode 100644 index 000000000000..4c17cb6e9bf7 --- /dev/null +++ b/media-gfx/zbar/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>xmw@gentoo.org</email> + <name>Michael Weber</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">zbar</remote-id> + </upstream> +</pkgmetadata> diff --git a/media-gfx/zbar/zbar-0.10-r6.ebuild b/media-gfx/zbar/zbar-0.10-r6.ebuild new file mode 100644 index 000000000000..618e4f0f1ffe --- /dev/null +++ b/media-gfx/zbar/zbar-0.10-r6.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +PYTHON_COMPAT=( python2_7 ) + +inherit autotools eutils flag-o-matic python-single-r1 + +DESCRIPTION="Library and tools for reading barcodes from images or video" +HOMEPAGE="http://zbar.sourceforge.net/" +SRC_URI="mirror://sourceforge/zbar/${P}.tar.bz2" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="amd64 ~arm x86" +IUSE="gtk imagemagick jpeg python qt4 static-libs +threads v4l X xv" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +RDEPEND="gtk? ( dev-libs/glib:2 x11-libs/gtk+:2 ) + imagemagick? ( virtual/imagemagick-tools ) + jpeg? ( virtual/jpeg:0 ) + python? ( + ${PYTHON_DEPS} + gtk? ( >=dev-python/pygtk-2[${PYTHON_USEDEP}] ) + ) + qt4? ( dev-qt/qtcore:4 dev-qt/qtgui:4 ) + X? ( + x11-libs/libXext + xv? ( x11-libs/libXv ) + )" +DEPEND="${RDEPEND} + sys-devel/gettext + virtual/pkgconfig" + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +src_prepare() { + epatch "${FILESDIR}"/${P}-no-v4l1-check.patch \ + "${FILESDIR}"/${P}-errors.patch \ + "${FILESDIR}"/${P}-python-crash.patch \ + "${FILESDIR}"/${P}-v4l2-uvcvideo.patch + + use python && python_fix_shebang examples/upcrpc.py test/*.py + + sed -i -e '/AM_INIT_AUTOMAKE/s:-Werror ::' configure.ac || die #423581 + eautoreconf +} + +src_configure() { + append-cppflags -DNDEBUG + econf \ + $(use_with jpeg) \ + $(use_with gtk) \ + $(use_with imagemagick) \ + $(use_with python) \ + $(use_with qt4 qt) \ + $(use_enable static-libs static) \ + $(use_enable threads pthread) \ + $(use_with X x) \ + $(use_with xv xv) \ + $(use_enable v4l video) +} + +src_install() { + emake DESTDIR="${D}" install + dodoc HACKING NEWS README TODO + rm -r "${ED}"/usr/share/doc/${PN} + prune_libtool_files --all +} diff --git a/media-gfx/zbar/zbar-0.10_p20121015-r1.ebuild b/media-gfx/zbar/zbar-0.10_p20121015-r1.ebuild new file mode 100644 index 000000000000..d07b29d89057 --- /dev/null +++ b/media-gfx/zbar/zbar-0.10_p20121015-r1.ebuild @@ -0,0 +1,100 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +PYTHON_COMPAT=( python2_7 ) + +inherit autotools eutils flag-o-matic java-pkg-opt-2 multilib python-single-r1 + +DESCRIPTION="Library and tools for reading barcodes from images or video" +HOMEPAGE="http://zbar.sourceforge.net/" +SRC_URI="https://dev.gentoo.org/~xmw/zbar-0.10_p20121015.zip" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="gtk imagemagick java jpeg python qt4 static-libs +threads v4l X xv" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +CDEPEND="gtk? ( dev-libs/glib:2 x11-libs/gtk+:2 ) + imagemagick? ( virtual/imagemagick-tools ) + jpeg? ( virtual/jpeg:0 ) + python? ( + ${PYTHON_DEPS} + gtk? ( >=dev-python/pygtk-2[${PYTHON_USEDEP}] ) + ) + qt4? ( dev-qt/qtcore:4 dev-qt/qtgui:4 ) + X? ( + x11-libs/libXext + xv? ( x11-libs/libXv ) + )" +RDEPEND="${CDEPEND} + java? ( >=virtual/jre-1.4 )" +DEPEND="${CDEPEND} + java? ( >=virtual/jdk-1.4 ) + sys-devel/gettext + virtual/pkgconfig" + +pkg_setup() { + use python && python-single-r1_pkg_setup + java-pkg-opt-2_pkg_setup +} + +src_unpack() { + #vcs-snapshot doesn't work on .zip + default + mv * ${P} || die +} + +src_prepare() { + epatch "${FILESDIR}"/${PN}-0.10-errors.patch \ + "${FILESDIR}"/${PN}-0.10-python-crash.patch \ + "${FILESDIR}"/${PN}-0.10-v4l2-uvcvideo.patch + + if has_version '>=media-gfx/imagemagick-7.0.1.0' ; then + epatch "${FILESDIR}/${P}-ImageMagick-7.diff" + fi + + use python && python_fix_shebang examples/upcrpc.py test/*.py + java-pkg-opt-2_src_prepare + + sed -e '/AM_INIT_AUTOMAKE/s: -Werror : :' \ + -e '/^AM_CFLAGS=/s: -Werror::' \ + -i configure.ac || die + sed "s|javadir = \$(pkgdatadir)|javadir = /usr/$(get_libdir)/zbar|" \ + -i java/Makefile.am + eautoreconf +} + +src_configure() { + if use java; then + export JAVACFLAGS="$(java-pkg_javac-args)" + export JAVA_CFLAGS="$(java-pkg_get-jni-cflags)" + fi + + append-cppflags -DNDEBUG + econf \ + $(use_with java) \ + $(use_with jpeg) \ + $(use_with gtk) \ + $(use_with imagemagick) \ + $(use_with python) \ + $(use_with qt4 qt) \ + $(use_enable static-libs static) \ + $(use_enable threads pthread) \ + $(use_with X x) \ + $(use_with xv xv) \ + $(use_enable v4l video) +} + +src_install() { + emake DESTDIR="${D}" install + dodoc HACKING NEWS README TODO + rm -r "${ED}"/usr/share/doc/${PN} + prune_libtool_files --all +} + +pkg_preinst() { + java-pkg-opt-2_pkg_preinst +} diff --git a/media-gfx/zbar/zbar-0.10_p20121015-r2.ebuild b/media-gfx/zbar/zbar-0.10_p20121015-r2.ebuild new file mode 100644 index 000000000000..3a552305df63 --- /dev/null +++ b/media-gfx/zbar/zbar-0.10_p20121015-r2.ebuild @@ -0,0 +1,114 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 ) + +inherit autotools flag-o-matic java-pkg-opt-2 multilib-minimal \ + python-single-r1 virtualx + +DESCRIPTION="Library and tools for reading barcodes from images or video" +HOMEPAGE="http://zbar.sourceforge.net/" +SRC_URI="https://dev.gentoo.org/~xmw/zbar-0.10_p20121015.zip" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="gtk imagemagick java jpeg python qt4 static-libs test +threads v4l X xv" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} ) + test? ( X ${PYTHON_REQUIRED_USE} )" + +CDEPEND="gtk? ( dev-libs/glib:2[${MULTILIB_USEDEP}] + x11-libs/gtk+:2[${MULTILIB_USEDEP}] ) + imagemagick? ( virtual/imagemagick-tools ) + jpeg? ( virtual/jpeg:0[${MULTILIB_USEDEP}] ) + python? ( + ${PYTHON_DEPS} + gtk? ( >=dev-python/pygtk-2[${PYTHON_USEDEP}] ) + ) + qt4? ( dev-qt/qtcore:4[${MULTILIB_USEDEP}] + dev-qt/qtgui:4[${MULTILIB_USEDEP}] ) + X? ( + x11-libs/libXext[${MULTILIB_USEDEP}] + xv? ( x11-libs/libXv[${MULTILIB_USEDEP}] ) + )" +RDEPEND="${CDEPEND} + java? ( >=virtual/jre-1.4 )" +DEPEND="${CDEPEND} + java? ( >=virtual/jdk-1.4 ) + test? ( ${PYTHON_DEPS} ) + app-arch/unzip + sys-devel/gettext + virtual/pkgconfig" + +pkg_setup() { + if use python || use test; then + python-single-r1_pkg_setup + fi + java-pkg-opt-2_pkg_setup +} + +src_unpack() { + #vcs-snapshot doesn't work on .zip + default + mv * ${P} || die +} + +src_prepare() { + eapply "${FILESDIR}"/${PN}-0.10-errors.patch \ + "${FILESDIR}"/${PN}-0.10-python-crash.patch \ + "${FILESDIR}"/${PN}-0.10-v4l2-uvcvideo.patch + + if has_version '>=media-gfx/imagemagick-7.0.1.0' ; then + eapply "${FILESDIR}/${P}-ImageMagick-7.diff" + fi + + use python && python_fix_shebang examples/upcrpc.py test/*.py + java-pkg-opt-2_src_prepare + + sed -e '/AM_INIT_AUTOMAKE/s: -Werror : :' \ + -e '/^AM_CFLAGS=/s: -Werror::' \ + -i configure.ac || die + sed "s|javadir = \$(pkgdatadir)|javadir = /usr/$(get_libdir)/zbar|" \ + -i java/Makefile.am + eautoreconf +} + +multilib_src_configure() { + if multilib_is_native_abi && use java; then + export JAVACFLAGS="$(java-pkg_javac-args)" + export JAVA_CFLAGS="$(java-pkg_get-jni-cflags)" + fi + + append-cppflags -DNDEBUG + ECONF_SOURCE=${S} \ + econf \ + $(multilib_native_use_with java) \ + $(use_with jpeg) \ + $(use_with gtk) \ + $(multilib_native_use_with imagemagick) \ + $(multilib_native_use_with python) \ + $(use_with qt4 qt) \ + $(use_enable static-libs static) \ + $(use_enable threads pthread) \ + $(use_with X x) \ + $(use_with xv xv) \ + $(use_enable v4l video) + + # work-around out-of-source build issue + mkdir gtk pygtk qt test || die +} + +src_test() { + virtx multilib-minimal_src_test +} + +multilib_src_install_all() { + dodoc HACKING NEWS README TODO + find "${D}" -name '*.la' -delete || die +} + +pkg_preinst() { + java-pkg-opt-2_pkg_preinst +} |