summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlastair Tse <liquidx@gentoo.org>2004-01-09 03:33:25 +0000
committerAlastair Tse <liquidx@gentoo.org>2004-01-09 03:33:25 +0000
commit0b11c363d5a55307bb6d487afb17c842a201b98d (patch)
treed4a04a426e50a149ab6fd32790acae206bff0717
parentremoving _pre1 (Manifest recommit) (diff)
downloadgentoo-2-0b11c363d5a55307bb6d487afb17c842a201b98d.tar.gz
gentoo-2-0b11c363d5a55307bb6d487afb17c842a201b98d.tar.bz2
gentoo-2-0b11c363d5a55307bb6d487afb17c842a201b98d.zip
new revision. backported missing canon powershot ids from CVS (Bug #35624) and moved usb usermap id generation to pkg_postinst() to solve (bug #36685).
-rw-r--r--media-libs/libgphoto2/ChangeLog12
-rw-r--r--media-libs/libgphoto2/Manifest7
-rw-r--r--media-libs/libgphoto2/files/digest-libgphoto2-2.1.3-r11
-rw-r--r--media-libs/libgphoto2/files/libgphoto2-2.1.3-canon.patch191
-rw-r--r--media-libs/libgphoto2/libgphoto2-2.1.3-r1.ebuild114
5 files changed, 322 insertions, 3 deletions
diff --git a/media-libs/libgphoto2/ChangeLog b/media-libs/libgphoto2/ChangeLog
index 21a13770ab3d..c819e765f04b 100644
--- a/media-libs/libgphoto2/ChangeLog
+++ b/media-libs/libgphoto2/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for media-libs/libgphoto2
# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/libgphoto2/ChangeLog,v 1.19 2003/11/29 23:03:17 brad_mssw Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/libgphoto2/ChangeLog,v 1.20 2004/01/09 03:33:25 liquidx Exp $
+
+*libgphoto2-2.1.3-r1 (09 Jan 2004)
+
+ 09 Jan 2004; Alastair Tse <liquidx@gentoo.org> libgphoto2-2.1.3-r1.ebuild,
+ files/libgphoto2-2.1.3-canon.patch:
+ new revision. backported missing canon powershot ids from CVS (Bug #35624) and
+ moved usb usermap id generation to pkg_postinst() to solve (bug #36685).
+ please note that now the usermaps are stored in
+ /etc/hotplug/usb/usbcam-gphoto2.usermap and users should not edit this file
+ but add custom ids in /etc/hotplug/usb/usbcam.usermap
29 Nov 2003; Brad House <brad_mssw@gentoo.org> libgphoto2-2.1.3.ebuild:
mark stable on amd64
diff --git a/media-libs/libgphoto2/Manifest b/media-libs/libgphoto2/Manifest
index 74009a326c8c..cbd1777e42b8 100644
--- a/media-libs/libgphoto2/Manifest
+++ b/media-libs/libgphoto2/Manifest
@@ -1,12 +1,15 @@
MD5 cdaf21e97518f53e7a167e991262bcc7 ChangeLog 3421
MD5 829031ca68853e6d35c5d4adf780d8d9 libgphoto2-2.1.1-r2.ebuild 1393
MD5 de22849ddbd381dd81fb8a5af66405e8 libgphoto2-2.1.2-r1.ebuild 2271
-MD5 80850151bae2bd61c4ac796f83656ef6 metadata.xml 217
+MD5 0a9e20125b53f1c60d9cee89cbb302d2 libgphoto2-2.1.3-r1.ebuild 3010
MD5 5e5e03775967a095c9c01bfc58e488ee libgphoto2-2.1.3.ebuild 2890
+MD5 80850151bae2bd61c4ac796f83656ef6 metadata.xml 217
MD5 8fc24b590738d4420bb8df6521fbbda0 files/canon.powershot.usermap 4575
MD5 6376376d006db7592d2ed520086e03e7 files/digest-libgphoto2-2.1.1-r2 70
MD5 1e1dae62e219b69ed37673f1d0fe01f9 files/digest-libgphoto2-2.1.2-r1 70
+MD5 ba2eb5dbe5b2b2214d41dafc6ec6993d files/digest-libgphoto2-2.1.3 70
+MD5 ba2eb5dbe5b2b2214d41dafc6ec6993d files/digest-libgphoto2-2.1.3-r1 70
MD5 ededea10cd8bf8a2f0d3f106c10b20ff files/libgphoto2-2.1.1-norpm.patch 533
MD5 e860333a276c3461b4fc8cfdd0b09263 files/libgphoto2-2.1.2-canon.patch 4929
MD5 91db4be9fea579f0440cef2d114fcab3 files/libgphoto2-2.1.2-norpm.patch 533
-MD5 ba2eb5dbe5b2b2214d41dafc6ec6993d files/digest-libgphoto2-2.1.3 70
+MD5 87ac1b1973425d0a92a16186cbdbea6f files/libgphoto2-2.1.3-canon.patch 6528
diff --git a/media-libs/libgphoto2/files/digest-libgphoto2-2.1.3-r1 b/media-libs/libgphoto2/files/digest-libgphoto2-2.1.3-r1
new file mode 100644
index 000000000000..2bef17c44e3f
--- /dev/null
+++ b/media-libs/libgphoto2/files/digest-libgphoto2-2.1.3-r1
@@ -0,0 +1 @@
+MD5 af200308629fcbe0b88d3802bba04779 libgphoto2-2.1.3.tar.bz2 1797303
diff --git a/media-libs/libgphoto2/files/libgphoto2-2.1.3-canon.patch b/media-libs/libgphoto2/files/libgphoto2-2.1.3-canon.patch
new file mode 100644
index 000000000000..7bd93a740e15
--- /dev/null
+++ b/media-libs/libgphoto2/files/libgphoto2-2.1.3-canon.patch
@@ -0,0 +1,191 @@
+===================================================================
+RCS file: /cvsroot/gphoto/libgphoto2/camlibs/canon/canon.c,v
+retrieving revision 1.227
+retrieving revision 1.233
+diff -u -r1.227 -r1.233
+--- gphoto/libgphoto2/camlibs/canon/canon.c 2003/10/10 10:54:32 1.227
++++ gphoto/libgphoto2/camlibs/canon/canon.c 2003/11/08 11:55:27 1.233
+ #include "config.h"
+@@ -78,11 +78,11 @@
+ * such that their camera name occurs in the list of supported
+ * cameras.
+ *
+- * Note:
+- * - at least some serial cameras require a certain name for correct
++ * Notes:
++ * - At least some serial cameras require a certain name for correct
+ * detection.
+- * - newer Canon cameras USB also support a PTP mode. see ptp/ptp2 camlibs.
+- * - no IEEE1394 cameras supported yet
++ * - Newer Canon USB cameras also support a PTP mode. See ptp2 camlib.
++ * - No IEEE1394 cameras supported yet.
+ **/
+
+ #define S32K (32 * 1024)
+@@ -135,36 +135,35 @@
+ {"Canon:PowerShot S200", CANON_PS_S200, 0x04A9, 0x3065, CAP_SUP, S10M, S32K, S2M, NULL},
+ {"Canon:Digital IXUS v2", CANON_PS_S200, 0x04A9, 0x3065, CAP_SUP, S10M, S32K, S2M, NULL},
+ {"Canon:Digital IXUS 330", CANON_PS_S330, 0x04A9, 0x3066, CAP_SUP, S10M, S32K, S2M, NULL},
+- /* Canon MVX2i in some mode is 0x3067 - probably PTP */
+
+ /* 306a is in MacOS Info.plist, but I don't know what it is --swestin. */
+ {"Canon:Digital unknown 3", CANON_PS_UNK3, 0x04A9, 0x306a, CAP_SUP, S10M, S32K, S2M, NULL},
+- /* Apparently the MVX2i is the same as Optura 200 MC (Philippe
+- * Gramoulle), so share the code. */
++ /* Canon MVX2i in some mode is 0x3067 - probably PTP */
+ {"Canon:MVX2i", CANON_OPT_200, 0x04A9, 0x306B, CAP_SUP, S99M, S32K, S2M, NULL},
+ {"Canon:Optura 200 MC", CANON_OPT_200, 0x04A9, 0x306B, CAP_SUP, S99M, S32K, S2M, NULL},
+ {"Canon:PowerShot S45 (normal mode)", CANON_PS_S45, 0x04A9, 0x306C, CAP_SUP, S99M, S32K, S2M, NULL},
+- /* 0x306D is S45 in PTP mode */
++ /* 0x306D is S45 in PTP mode */
+ {"Canon:PowerShot G3 (normal mode)", CANON_PS_G3, 0x04A9, 0x306E, CAP_SUP, S99M, S32K, S2M, NULL},
+- /* 0x306F is G3 in PTP mode */
++ /* 0x306F is G3 in PTP mode */
+ {"Canon:PowerShot S230 (normal mode)", CANON_PS_S230, 0x04A9, 0x3070, CAP_SUP, S99M, S32K, S2M, NULL},
+ {"Canon:Digital IXUS v3 (normal mode)", CANON_PS_S230, 0x04A9, 0x3070, CAP_SUP, S99M, S32K, S2M, NULL},
+- /* 0x3071 is S230/IXUS v3 in PTP mode */
++ /* 0x3071 is S230/IXUS v3 in PTP mode */
+
+ {"Canon:PowerShot SD100 (normal mode)", CANON_PS_SD100, 0x04A9, 0x3072, CAP_SUP, S99M, S32K, S2M, NULL},
+ {"Canon:Digital IXUS II (normal mode)", CANON_PS_SD100, 0x04A9, 0x3072, CAP_SUP, S99M, S32K, S2M, NULL},
+ /* added from report on mailinglist. XXX: assuming capture works -Marcus */
+- /* reports suggest that they provide 1 interface which does
+- * both PTP and Canon access modes.
+- */
++ /* PS A70 uses the same ProductID for PTP and Canon, with protocol autodetection */
+ {"Canon:PowerShot A70", CANON_PS_A70, 0x04A9, 0x3073, CAP_SUP, S99M, S32K, S2M, NULL},
++ /* PS A60 uses the same ProductID for PTP and Canon, with protocol autodetection */
+ {"Canon:PowerShot A60", CANON_PS_A60, 0x04A9, 0x3074, CAP_SUP, S99M, S32K, S2M, NULL},
+ /* reported working on SourceForge patch tracker. */
+- /* S400 product ID is 0x3075; this responds both to Canon
+- * protocol and PTP. */
+ {"Canon:Digital IXUS 400", CANON_PS_S400, 0x04A9, 0x3075, CAP_SUP, S99M, S32K, S2M, NULL},
++ /* PS S400 used the same ProductID for PTP and Canon, with protocol autodetection */
+ {"Canon:PowerShot S400", CANON_PS_S400, 0x04A9, 0x3075, CAP_SUP, S99M, S32K, S2M, NULL},
+
++ {"Canon:PowerShot A300", CANON_PS_A300, 0x04A9, 0x3076, CAP_SUP, S99M, S32K, S2M, NULL},
++ {"Canon:PowerShot S50 (normal mode)", CANON_PS_S50, 0x04A9, 0x3077, CAP_SUP, S99M, S32K, S2M, NULL},
++
+ /* 3078 and 307a are in MacOS Info.plist, but I don't know
+ * what they are --swestin. */
+ {"Canon:PowerShot unknown 4", CANON_PS_UNK4, 0x04A9, 0x3078, CAP_SUP, S10M, S32K, S2M, NULL},
+@@ -172,13 +171,16 @@
+ {"Canon:PowerShot unknown 5", CANON_PS_UNK5, 0x04A9, 0x307a, CAP_SUP, S10M, S32K, S2M, NULL},
+ /* MV630i seems to be a DV camcorder */
+ {"Canon:MV630i", CANON_MV630I, 0x04A9, 0x307b, CAP_SUP, S99M, S32K, S2M, NULL},
++ {"Canon:Optura 20", CANON_OPT_20, 0x04A9, 0x307f, CAP_SUP, S99M, S32K, S2M, NULL},
+
+ {"Canon:EOS 10D", CANON_EOS_10D, 0x04A9, 0x3083, CAP_SUP, S10M, S32K, S2M, NULL},
+ /* 0x3099 is the EOS 300D/Digital Rebel in PTP mode */
+ {"Canon:EOS 300D (normal mode)", CANON_EOS_300D, 0x04A9, 0x3084, CAP_SUP, S10M, S32K, S2M, NULL},
+ {"Canon:EOS Digital Rebel (normal mode)",CANON_EOS_300D,0x04A9, 0x3084, CAP_SUP, S10M, S32K, S2M, NULL},
+ {"Canon:EOS Kiss Digital (normal mode)",CANON_EOS_300D, 0x04A9, 0x3084, CAP_SUP, S10M, S32K, S2M, NULL},
+- {"Canon:PowerShot A80 (normal mode)",CANON_PS_A80, 0x04A9, 0x309A, CAP_SUP, S99M, S32K, S2M, NULL},
++ /* PS G5 uses the same ProductID for PTP and Canon, with protocol autodetection */
++ {"Canon:PowerShot G5 (normal mode)", CANON_PS_G5, 0x04A9, 0x3085, CAP_SUP, S99M, S32K, S2M, NULL},
++ {"Canon:PowerShot A80 (normal mode)",CANON_PS_A80, 0x04A9, 0x309A, CAP_SUP, S99M, S32K, S2M, NULL},
+
+ {NULL}
+ /* *INDENT-ON* */
+@@ -312,6 +314,7 @@
+ case CANON_PS_S45:
+ case CANON_PS_S400:
+ case CANON_PS_G3:
++ case CANON_PS_G5:
+ break;
+ default:
+ GP_DEBUG ("canon_int_filename2audioname: camera model doesn't support audio files",
+@@ -864,10 +867,10 @@
+ }
+
+ /**
+- * canon_int_find_new_image
+- * @camera Camera * to this camera
+- * @initial_state Camera directory dump before image capture
+- * @final_state Directory dump after image capture
++ * canon_int_find_new_image:
++ * @camera: Camera * to this camera
++ * @initial_state: Camera directory dump before image capture
++ * @final_state: Directory dump after image capture
+ * @path: Will be filled in with the path and filename of the captured
+ * image, in canonical gphoto2 format.
+ *
+@@ -957,7 +960,7 @@
+ }
+
+ /**
+- * canon_int_capture_image
++ * canon_int_capture_image:
+ * @camera: camera to work with
+ * @path: gets filled in with the path and filename of the captured
+ * image, in canonical gphoto2 format.
+@@ -1095,8 +1098,8 @@
+ /**
+ * canon_int_set_file_attributes:
+ * @camera: camera to work with
++ * @dir: directory to work in
+ * @file: file to work on
+- * @dir: directory to work in
+ * @attrs: #canonDirentAttributeBits with the bits to set
+ * @context: context for error reporting
+ *
+--- gphoto/libgphoto2/camlibs/canon/canon.h 2003/10/10 10:54:32 1.83
++++ gphoto/libgphoto2/camlibs/canon/canon.h 2003/11/08 11:55:27 1.86
+@@ -32,6 +32,12 @@
+ /* #define CAMERA_ON_AC 16 obsolete; we now just use*/
+ /* #define CAMERA_ON_BATTERY 48 the bit that makes the difference */
+
++/**
++ * CAMERA_MASK_BATTERY
++ *
++ * Bit mask to use to find battery/AC flag
++ *
++ */
+ #define CAMERA_MASK_BATTERY 32
+
+ /**
+@@ -87,17 +93,21 @@
+ * @CANON_PS_S330: Digital IXUS 330
+ * @CANON_PS_S45: PowerShot S45
+ * @CANON_PS_G3: PowerShot G3
++ * @CANON_PS_G5: PowerShot G5
+ * @CANON_PS_S230: PowerShot S230, Digital IXUS v3
+- * @CANON_PS_A60: PowerShot A60
+ * @CANON_MV630I: MV630i camcorder
+ * @CANON_EOS_10D: EOS 10D
+ * @CANON_OPT_200: Optura 200 MC, MVX2i
++ * @CANON_OPT_20: Optura 20
+ * @CANON_PS_UNK1: Unknown camera seen in Mac OS X Image Capture
+ * @CANON_PS_UNK2: Unknown camera seen in Mac OS X Image Capture
+ * @CANON_PS_UNK3: Unknown camera seen in Mac OS X Image Capture
+ * @CANON_PS_UNK4: Unknown camera seen in Mac OS X Image Capture
+ * @CANON_PS_UNK5: Unknown camera seen in Mac OS X Image Capture
+ * @CANON_EOS_300D: EOS 300D / Digital Rebel / KISS Rebel
++ * @CANON_PS_S50: PowerShot S50
++ * @CANON_PS_S400: PowerShot S400, Digital IXUS 400
++ * @CANON_PS_SD100: PowerShot SD100, Digital IXUS II
+ *
+ * Enumeration of all camera types currently supported.
+ *
+@@ -146,7 +156,9 @@
+ /* other cameras */
+ CANON_PS_S400,
+ CANON_PS_SD100,
+- CANON_EOS_300D
++ CANON_EOS_300D,
++ CANON_PS_G5,
++ CANON_OPT_20
+ } canonCamModel;
+
+ /**
+@@ -273,10 +285,8 @@
+ */
+ int list_all_files; /* whether to list all files, not just know types */
+
+-#ifdef CANON_EXPERIMENTAL_UPLOAD
+ int upload_keep_filename; /* 0=DCIF compatible filenames (AUT_*),
+ 1=keep original filename */
+-#endif /* CANON_EXPERIMENTAL_UPLOAD */
+
+ char *cached_drive; /* usually something like C: */
+ int cached_ready; /* whether the camera is ready to rock */
diff --git a/media-libs/libgphoto2/libgphoto2-2.1.3-r1.ebuild b/media-libs/libgphoto2/libgphoto2-2.1.3-r1.ebuild
new file mode 100644
index 000000000000..be45a132554b
--- /dev/null
+++ b/media-libs/libgphoto2/libgphoto2-2.1.3-r1.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/libgphoto2/libgphoto2-2.1.3-r1.ebuild,v 1.1 2004/01/09 03:33:25 liquidx Exp $
+
+inherit libtool
+
+MAKEOPTS="${MAKEOPTS} -j1" # or the documentation fails.
+
+DESCRIPTION="Library that implements support for numerous digital cameras."
+HOMEPAGE="http://www.gphoto.org/"
+SRC_URI="mirror://sourceforge/gphoto/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~ppc ~sparc ~amd64"
+IUSE="nls doc jpeg"
+
+# needs >usbutils-0.11-r2 to avoid /usr/lib/libusb*
+# conflicts with dev-libs/libusb
+RDEPEND=">=dev-libs/libusb-0.1.6
+ >=sys-apps/usbutils-0.11-r2
+ sys-apps/hotplug
+ jpeg? ( >=media-libs/libexif-0.5.9 )"
+
+DEPEND="${RDEPEND}
+ >=sys-devel/patch-2.5.9
+ dev-util/pkgconfig
+ doc? ( dev-util/gtk-doc )"
+
+# By default, drivers for all supported cards will be compiled.
+# If you want to only compile for specific card(s), set GPHOTO_LIBS
+# environment to a comma-separated list (no spaces) of drivers that
+# you want to build.
+#
+# For example:
+#
+# env GPHOTO_LIBS='canon,ptp2' emerge libgphoto2
+#
+# drivers: agfa-cl20, barbie, canon, casio, digita, dimera,
+# directory, fuji, gsmart300, jamcam,
+# jd11, kodak, konica, mustek, largan,
+# minolta, panasonic, pccam300, pccam600,
+# polaroid, ptp2, ricoh, samsung, smal,
+# sierra, sipix, sonydscf1, sonydscf55,
+# soundvision, spca50x, sq905, stv0680, sx330z
+#
+[ -z "${GPHOTO_LIBS}" ] && GPHOTO_LIBS="all"
+
+
+src_unpack() {
+ unpack ${A}
+ EPATCH_OPTS="-d ${S}" epatch ${FILESDIR}/${PN}-2.1.2-norpm.patch
+ # canon camera ids backported from CVS (bug #35624)
+ EPATCH_OPTS="-d ${S}" epatch ${FILESDIR}/${PN}-2.1.3-canon.patch
+}
+
+src_compile() {
+ elibtoolize
+
+ local myconf
+
+ myconf="--with-rpmbuild=/bin/false"
+
+ myconf="--with-drivers=${GPHOTO_LIBS}"
+
+ use jpeg \
+ && myconf="${myconf} --with-exif-prefix=/usr" \
+ || myconf="${myconf} --without-exif"
+
+ myconf="${myconf} `use_enable nls`"
+ myconf="${myconf} `use_enable doc docs`"
+
+ econf ${myconf}
+ emake || die "make failed"
+}
+
+src_install() {
+ make DESTDIR=${D} \
+ gphotodocdir=/usr/share/doc/${PF} \
+ HTML_DIR=/usr/share/doc/${PF}/sgml \
+ hotplugdocdir=/usr/share/doc/${PF}/linux-hotplug \
+ install || die "install failed"
+
+ # manually move apidocs
+ if [ -n "`use doc`" ]; then
+ dodir /usr/share/doc/${PF}/api
+ mv ${D}/usr/share/doc/libgphoto2/html/api/* ${D}/usr/share/doc/${PF}/api/
+ mv ${D}/usr/share/doc/libgphoto2_port/html/api/* ${D}/usr/share/doc/${PF}/api/
+ fi
+ rm -rf ${D}/usr/share/doc/libgphoto2
+ rm -rf ${D}/usr/share/doc/libgphoto2_port
+
+ dodoc ChangeLog NEWS* README AUTHORS TESTERS MAINTAINERS HACKING CHANGES
+
+ # install hotplug support
+ insinto /etc/hotplug/usb
+ newins ${S}/packaging/linux-hotplug/usbcam.console usbcam
+ chmod +x ${D}/etc/hotplug/usb/usbcam
+}
+
+pkg_postinst() {
+ einfo "Generating usbcam-gphoto2.usermap .."
+ HOTPLUG_USERMAP="/etc/hotplug/usb/usbcam-gphoto2.usermap"
+ if [ -x ${ROOT}/usr/lib/libgphoto2/print-usb-usermap ]; then
+ echo "# !!! DO NOT EDIT THIS FILE !!! This file is automatically generated." > ${ROOT}/${HOTPLUG_USERMAP}
+ echo "# Put your custom entries in /etc/hotplug/usb/usbcam.usermap" >> ${ROOT}/${HOTPLUG_USERMAP}
+ ${ROOT}/usr/lib/libgphoto2/print-usb-usermap >> ${ROOT}/${HOTPLUG_USERMAP}
+ else
+ eerror "Unable to find ${ROOT}/usr/lib/libgphoto2/print-usb-usermap"
+ eerror "and therefore unable to generate hotplug usermap."
+ eerror "You will have to manually generate it by running:"
+ eerror " /usr/lib/libgphoto2/print-usb-usermap > ${HOTPLUG_USERMAP}"
+ fi
+}