summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilles Dartiguelongue <eva@gentoo.org>2012-11-22 08:39:20 +0000
committerGilles Dartiguelongue <eva@gentoo.org>2012-11-22 08:39:20 +0000
commitaa6c759c3fa870c4c80a9b4b9ed8f730d6149bed (patch)
treee51d90cacfaa18258327b0217ce3e0ccae8d83bf /media-libs/libgphoto2
parentkeyword arm, bug #442934 (diff)
downloadhistorical-aa6c759c3fa870c4c80a9b4b9ed8f730d6149bed.tar.gz
historical-aa6c759c3fa870c4c80a9b4b9ed8f730d6149bed.tar.bz2
historical-aa6c759c3fa870c4c80a9b4b9ed8f730d6149bed.zip
Add preserved_old_lib calls. Move some checks to pkg_pretend and make better use of EAPI 4. Clean up ebuild and old revision.
Package-Manager: portage-2.2.0_alpha142/cvs/Linux x86_64 Manifest-Sign-Key: 0xC6085806
Diffstat (limited to 'media-libs/libgphoto2')
-rw-r--r--media-libs/libgphoto2/ChangeLog7
-rw-r--r--media-libs/libgphoto2/Manifest12
-rw-r--r--media-libs/libgphoto2/libgphoto2-2.4.12.ebuild208
-rw-r--r--media-libs/libgphoto2/libgphoto2-2.5.0.ebuild54
4 files changed, 40 insertions, 241 deletions
diff --git a/media-libs/libgphoto2/ChangeLog b/media-libs/libgphoto2/ChangeLog
index ae6117d7b72b..0445e430ac1c 100644
--- a/media-libs/libgphoto2/ChangeLog
+++ b/media-libs/libgphoto2/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for media-libs/libgphoto2
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/libgphoto2/ChangeLog,v 1.221 2012/10/28 16:01:48 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/libgphoto2/ChangeLog,v 1.222 2012/11/22 08:39:16 eva Exp $
+
+ 22 Nov 2012; Gilles Dartiguelongue <eva@gentoo.org>
+ -libgphoto2-2.4.12.ebuild, libgphoto2-2.5.0.ebuild:
+ Add preserved_old_lib calls. Move some checks to pkg_pretend and make better
+ use of EAPI 4. Clean up ebuild and old revision.
28 Oct 2012; Raúl Porcel <armin76@gentoo.org> libgphoto2-2.4.14.ebuild:
ia64/sparc stable wrt #427544
diff --git a/media-libs/libgphoto2/Manifest b/media-libs/libgphoto2/Manifest
index f70e177a0097..88c3958c7adf 100644
--- a/media-libs/libgphoto2/Manifest
+++ b/media-libs/libgphoto2/Manifest
@@ -6,19 +6,17 @@ AUX libgphoto2-2.4.7-no-test-build.patch 910 SHA256 a5d7ab59c51bb9751ade66082844
AUX libgphoto2-2.4.7-respect-bonjour.patch 643 SHA256 00b09825d9b6493a2a65577c6bf0b2a5549c6901b8b5fb839f886d989e29c055 SHA512 c6e07ffdfc8f81cee8624ce67df0480ca2fa98df1748906393ca196c73e11a482e62f59d1eb5bedc05ea3bb754ffdf4c23f4ed7f3a9d9264fbf81ed6554f4ead WHIRLPOOL 09a39eda0a3d40a8402b5483aa24d567b0da53926c7fcd85aebaca4a2510020fd8b273405d8407815f27ca1c57ab734565fe6b11fff158c9909391021c1008f2
AUX libgphoto2-2.4.8-increase_max_entries.patch 477 SHA256 596ab7c4edc7573044e89ac548505b82de18f791616126273ff4fe13c935b4f8 SHA512 9a23b5b1787e1582a984dc096be3365c2a372ece8dfefa42d1ef05e5ce92ff26fc3562ff04da06766df69b0d587fdece5252c706abd4c57a556e6fb2257c8614 WHIRLPOOL b354a40426e6f731e57adf85ae11e1f9c87154dc48d6149e3e33887df60427e06bb907a8878d56427b7eb8211b7f5b1228b9d758ac4230fd47f214f82546d721
AUX libgphoto2-2.4.9-dnl.patch 471 SHA256 6f657277d3262d8295b35d5bd49c79a229fef5a9b587191d9e1a91ed73564bf5 SHA512 85d6dd60c81f4b0c76894576483afa851fc3d4c7ff3644853a1db3147395ba5980b19dc4452094387a41fe26d3ab09a342f24acabcbf9d23e07c0f32e895327c WHIRLPOOL 168f23c3e2b720e2b4a1b9459ab5c10ace825d6f312a1bbcc93e139df0cb51759acaf3341d64cc51e39a4aecadbe5382f2f1b2f44a572ca8bea4e2c28a6e0ea2
-DIST libgphoto2-2.4.12.tar.bz2 4430444 SHA256 5b6c5d25e9f610e6b2d9e2b35ee77258b15f6ecb67de344395eddddc0345f322 SHA512 39f22bc13d31e900cee3244d2d92a55ae5c6cceb8887997894c3b1f4feb675c5a305ab57b7a4897551ecc259e20cd78b883e103132dfc532c2449c6411771e79 WHIRLPOOL 20f3276a10da79283b213cc4421bea13d4e017b9ddb8f3d6db0398334fcdf5f16dd8cb5e0a7668a85f589fa6cb9a13e8b014094dd0d8386ff8efedcbb10c5090
DIST libgphoto2-2.4.14.tar.bz2 4481384 SHA256 59b32d45252f67d066cc3bda7a59f8078e0cf4e7f23590a4b621633e81060292 SHA512 4abc89ee2d714deab98cdba84d0497b7262105ade3b3c43eaa8936b6e5359a8dc50c49c217fff37f013e0ce7404b82b4c7c2f90af49274a3ecb9f15e10747a73 WHIRLPOOL 0b9674c93f62cd060fc2134816b8dfd809e9276b8ffd943b9856ca57fac319dc4201aeab71a267a1d547bfcc7c4e80cd97d8a9d37528e16703adb57084630faf
DIST libgphoto2-2.5.0.tar.bz2 4635612 SHA256 e7df389f1b034be021066227c0908b8f21d3be0cd0c6ed56979c04c3a9f75b31 SHA512 160ca4efba3d3fecf9b9f53234169121c9910b15736b6bd9b813763ae80b50632243f6dc5b5ef8bc9bae4450bf1d17fd9c1fe1eadd682e2d0c48b813fe97998c WHIRLPOOL 9ae97dc37efd5fea380477a5077cfb9b595d5aafac9c7966dd41b224f77847a1011fba0e4a12db39975e3397f394f557c6a45700e0b083b8f84f530ed32cdd07
-EBUILD libgphoto2-2.4.12.ebuild 6131 SHA256 c07c35bfc5ed1d313b37bcdc54f5a4e35364219f3e6b45481efae71fc1116df8 SHA512 df2629ef3cd56a04cd84049c4957b78512a7a5e31716d39fde7d037c35b03522e65f3a2d2b2285aa70ddbd59e297db40e9b2a51b1fde686501d3224a81d4590b WHIRLPOOL 0beb5a8500410340bd77cc694b0c8920a975cf0c3ab4d01681346f2fec2e2dc3180e38497106500e43966c71f4db53cba915b3867483ed940711001c13ae63fe
EBUILD libgphoto2-2.4.14-r1.ebuild 6385 SHA256 940c8d07b6c2b4c1807ff7171247e0c66891a3a7ea0f2124ac910dc522e2891e SHA512 6cc6e7bee06c35c52df2e4c8989e289f2605dbe8016a97535fcac7565826e2273fe8add008e5c9c1b8f722f106a80b2c9d94ca88567233ae85ec19071365938e WHIRLPOOL 160b8ad1db54140fb08075cf25e1aa7c3ce23af4d9685a072c271a47ec1b714599b8df4cae1df5e44824bd7d7f2a31104d389c780877f7ef08319f68ce011184
EBUILD libgphoto2-2.4.14.ebuild 6130 SHA256 0c1065216d0d29d42e7d57d49fe0eb98527db3d1bdad9b9a32e4a66ba3c90b5d SHA512 7afc102bd331e977d8922b1d6bca8c4f142ef5cd0254e1ea29d201c18ec5a4a41956d602072a4601624288d5518dabffc67c0a53739e7a351155edbbd4635a7b WHIRLPOOL 32addc7bddbda8e4ca6363407f1af5cd72f0b18a83f3bbfc2f3792b077e8fc5c3c248deb6cd5cd6c2a0fc47d0ba43ff3a392fe02b5d5b930e8e96895ad75b07c
-EBUILD libgphoto2-2.5.0.ebuild 6353 SHA256 64ae050fa516bb0a7c55ba6e588c4f6c64456f3acde16cd0641063d2bf005793 SHA512 082fdde45d2961593ac6a5ba56d166db2e83d5f3d29b53215d16cc40adda590fe8ef8136220748cebf945abe154d8c3eedefa25562a0b328fa3c6042ac8bd479 WHIRLPOOL 67044687db69f27012d3c0b30e51077bc0876f707f93a56951c99fc9135e5beb5a5a5fbdb57644dc7224b33b2aaacb3034171acf9ec6c992259a5b13b88387dc
-MISC ChangeLog 35843 SHA256 d7e8d91af78af37c91baee80097ccc0b4d397525aa4cda58597a3b7e629caa23 SHA512 12c1e362ac9b91307b63a12759c8bdf5e20a4fa9945e5e173f53fda03f5d14a503b94bf59631cfc38eabf9f18b42cd8217a0e57d8da07ea4aa148aeaf7f64877 WHIRLPOOL adaf991d745dff18eb834c4102fd56de5b3be34468a602491c68d0a6a04d7b38294a532eea2299fb39e072e93704b17b2e6fe8a5b71a9b8cc717b1e016c768d3
+EBUILD libgphoto2-2.5.0.ebuild 6292 SHA256 a1f836d2fe98a51f1af28fcc3fb81286e1570f2e350d021caac4379de8371c95 SHA512 584dfd7cd30007afe8d218b56a2b7fe102854381b30e736a5c7c7334e457dc7739120253fc8c20f73578ea113ab7756c9d22aa7c8a151c85f849349d9f5e311e WHIRLPOOL 8a2e2d5f80e56236f2a3139bb8de0e00bc70dfbfb2054c4e8bb8ec91a9b629fc13f62e0f10d07749795220e651b9980cb21449b676f76f94bd677bfbbff99c2f
+MISC ChangeLog 36078 SHA256 78fa5266c0197652331eb9d0e51380e69500f3b7fe6a45af0a13e3e1a4144d5d SHA512 252245bdd222a25d0cef4e4c5093736da29a8c15016ed38418182c908b1f4948705ef3344d40606923dd13d58b9ab53eb6e3e987c5218766fdb9e088232c51df WHIRLPOOL e7cb15369d20034f6d99875e942eed1f9218c3d821d0a922758b99ad289b460aad194f2a2f863a0a349406239b3013d4b0146f535df77c7d83dcee11fdbfb5bc
MISC metadata.xml 182 SHA256 6ce4ccce668fc2a8c0598e348462ae041f477022bd8bc407c7c5e4ba98eabc5b SHA512 6b61b8de171da5556ddf719a13a0053fdf6d26c891f6c7ffedebe51c3f88f6d2b15451e43819705841c6818d3a5cf4d2466c92b5a1ee654ca6e5de7436570859 WHIRLPOOL 5487cc56cd31c1326162f3b15018e1d43a0e42086480ee53f6893e8eeee63a27bbec99844f3de3d40ea8e6ab6721087831f398b761ea0c827ce56e4e1473b8f7
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
-iEYEAREIAAYFAlCNVu4ACgkQuQc30/atMkDn+ACgufRXpeQzcip6vBj2aZhWltZ+
-sBMAn3w34z/89cmqyh/3p3tbjwlT5IXQ
-=+l18
+iEYEAREIAAYFAlCt5LUACgkQ1fmVwcYIWAa42gCePOF+PiKmDhFCL5ToeiGbLLWJ
+e2kAoLDEj2w7BS0p4uvsqCSa6OwHdMIs
+=k9Ux
-----END PGP SIGNATURE-----
diff --git a/media-libs/libgphoto2/libgphoto2-2.4.12.ebuild b/media-libs/libgphoto2/libgphoto2-2.4.12.ebuild
deleted file mode 100644
index b34f8316cd4a..000000000000
--- a/media-libs/libgphoto2/libgphoto2-2.4.12.ebuild
+++ /dev/null
@@ -1,208 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/libgphoto2/libgphoto2-2.4.12.ebuild,v 1.11 2012/07/15 18:04:46 armin76 Exp $
-
-# TODO
-# 1. Track upstream bug --disable-docs does not work.
-# http://sourceforge.net/tracker/index.php?func=detail&aid=1643870&group_id=8874&atid=108874
-
-EAPI="4"
-
-inherit autotools eutils multilib user
-
-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="alpha amd64 hppa ia64 ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd"
-IUSE="doc examples exif gd jpeg nls kernel_linux zeroconf"
-
-# By default, drivers for all supported cameras will be compiled.
-# If you want to only compile for specific camera(s), set CAMERAS
-# environment to a space-separated list (no commas) of drivers that
-# you want to build.
-IUSE_CAMERAS="
- adc65 agfa_cl20 aox ax203
- barbie
- canon casio_qv clicksmart310
- digigr8 digita dimagev dimera3500 directory
- enigma13
- fuji
- gsmart300
- hp215
- iclick
- jamcam jd11 jl2005a jl2005c
- kodak_dc120 kodak_dc210 kodak_dc240 kodak_dc3200 kodak_ez200 konica konica_qm150
- largan lg_gsm
- mars mustek
- panasonic_coolshot panasonic_l859 panasonic_dc1000 panasonic_dc1580 pccam300 pccam600 polaroid_pdc320 polaroid_pdc640 polaroid_pdc700 ptp2
- ricoh ricoh_g3
- samsung sierra sipix_blink sipix_blink2 sipix_web2 smal sonix sony_dscf1 sony_dscf55 soundvision spca50x sq905 st2205 stv0674 stv0680 sx330z
- template toshiba_pdrm11 topfield tp6801
-"
-
-for camera in ${IUSE_CAMERAS}; do
- IUSE="${IUSE} cameras_${camera}"
-done
-
-# libgphoto2 actually links to libtool
-RDEPEND="virtual/libusb:0
- cameras_ax203? ( media-libs/gd )
- cameras_st2205? ( media-libs/gd )
- zeroconf? ( net-dns/avahi[mdnsresponder-compat] )
- exif? ( >=media-libs/libexif-0.5.9 )
- gd? ( media-libs/gd[jpeg=] )
- jpeg? ( virtual/jpeg )
- sys-devel/libtool"
-DEPEND="${RDEPEND}
- virtual/pkgconfig
- sys-devel/flex
- >=sys-devel/gettext-0.14.1
- doc? ( app-doc/doxygen )"
-# FIXME: gtk-doc is broken
-# >=dev-util/gtk-doc-1.10 )"
-
-RDEPEND="${RDEPEND}
- !<sys-fs/udev-136"
-
-pkg_setup() {
- if ! echo "${USE}" | grep "cameras_" > /dev/null 2>&1; then
- einfo "No camera drivers will be built since you did not specify any."
- fi
-
- if use cameras_template || use cameras_sipix_blink; then
- einfo "Upstream considers sipix_blink & template driver as obsolete"
- fi
-
- enewgroup plugdev
-}
-
-src_prepare() {
- # Handle examples ourselves
- sed 's/^\(SUBDIRS =.*\)examples\(.*\)$/\1\2/' -i Makefile.am Makefile.in \
- || die "examples sed failed"
-
- # Fix pkgconfig file when USE="-exif"
- if ! use exif; then
- sed -i "s/, @REQUIREMENTS_FOR_LIBEXIF@//" libgphoto2.pc.in || die " libgphoto2.pc sed failed"
- fi
-
- # Fix USE=zeroconf, bug #283332
- epatch "${FILESDIR}/${PN}-2.4.7-respect-bonjour.patch"
-
- # Do not build test if not running make check, bug #226241
- epatch "${FILESDIR}/${PN}-2.4.7-no-test-build.patch"
-
- # Increase max entries from 1024 to 8192 to fix bug #291049
- epatch "${FILESDIR}/${PN}-2.4.8-increase_max_entries.patch"
-
- eautoreconf
-}
-
-src_configure() {
- local cameras
- local cam
- local cam_warn=no
- for cam in ${IUSE_CAMERAS} ; do
- if use "cameras_${cam}"; then
- cameras="${cameras},${cam}"
- else
- cam_warn=yes
- fi
- done
-
- if [ "${cam_warn}" = "yes" ]; then
- [ -z "${cameras}" ] || cameras="${cameras:1}"
- einfo "Enabled camera drivers: ${cameras:-none}"
- ewarn "Upstream will not support you if you do not compile all camera drivers first"
- else
- cameras="all"
- einfo "Enabled camera drivers: all"
- fi
-
- local myconf
- use doc || myconf="ac_cv_path_DOXYGEN=false"
- econf \
- --disable-docs \
- --disable-gp2ddb \
- $(use_with zeroconf bonjour) \
- --without-hal \
- $(use_enable nls) \
- $(use_with exif libexif auto) \
- $(use_with gd) \
- $(use_with jpeg) \
- --with-drivers=${cameras} \
- --with-doc-dir=/usr/share/doc/${PF} \
- --with-html-dir=/usr/share/doc/${PF}/html \
- --with-hotplug-doc-dir=/usr/share/doc/${PF}/hotplug \
- --with-rpmbuild=$(type -P true) \
- udevscriptdir=/lib/udev \
- ${myconf}
-
-# FIXME: gtk-doc is currently broken
-# $(use_enable doc docs)
-}
-
-src_compile() {
- emake
-
- if use doc; then
- doxygen doc/Doxyfile || die "Documentation generation failed"
- fi
-}
-
-src_install() {
- emake DESTDIR="${D}" install
-
- # Empty dependency_libs in .la files, bug #386665
- find "${ED}" -name '*.la' -exec sed -i -e "/^dependency_libs/s:=.*:='':" {} +
-
- # Clean up unwanted files
- rm "${D}/usr/share/doc/${PF}/"{ABOUT-NLS,COPYING} || die "rm failed"
- dodoc ChangeLog NEWS* README* AUTHORS TESTERS MAINTAINERS HACKING
-
- if use examples; then
- insinto /usr/share/doc/${PF}/examples
- doins examples/README examples/*.c examples/*.h
- fi
-
- # FIXME: fixup autoconf bug
- if ! use doc && [ -d "${D}/usr/share/doc/${PF}/apidocs.html" ]; then
- rm -fr "${D}/usr/share/doc/${PF}/apidocs.html"
- fi
- # end fixup
-
- UDEV_RULES="/lib/udev/rules.d/70-libgphoto2.rules"
- CAM_LIST="/usr/$(get_libdir)/libgphoto2/print-camera-list"
-
- if [ -x "${D}"${CAM_LIST} ]; then
- # Let print-camera-list find libgphoto2.so
- export LD_LIBRARY_PATH="${D}/usr/$(get_libdir)"
- # Let libgphoto2 find its camera-modules
- export CAMLIBS="${D}/usr/$(get_libdir)/libgphoto2/${PV}"
-
- einfo "Generating UDEV-rules ..."
- mkdir -p "${D}"/${UDEV_RULES%/*}
- echo -e "# do not edit this file, it will be overwritten on update\n#" \
- > "${D}"/${UDEV_RULES}
- "${D}"${CAM_LIST} udev-rules version 136 group plugdev >> "${D}"/${UDEV_RULES} \
- || die "failed to create udev-rules"
- else
- eerror "Unable to find print-camera-list"
- eerror "and therefore unable to generate hotplug usermap."
- eerror "You will have to manually generate it by running:"
- eerror " ${CAM_LIST} udev-rules version 136 group plugdev > ${UDEV_RULES}"
- fi
-
-}
-
-pkg_postinst() {
- elog "Don't forget to add yourself to the plugdev group "
- elog "if you want to be able to access your camera."
- local OLD_UDEV_RULES="${ROOT}"etc/udev/rules.d/99-libgphoto2.rules
- if [[ -f ${OLD_UDEV_RULES} ]]; then
- rm -f "${OLD_UDEV_RULES}"
- fi
-}
diff --git a/media-libs/libgphoto2/libgphoto2-2.5.0.ebuild b/media-libs/libgphoto2/libgphoto2-2.5.0.ebuild
index ade5422ed1ff..3b4e295e82d9 100644
--- a/media-libs/libgphoto2/libgphoto2-2.5.0.ebuild
+++ b/media-libs/libgphoto2/libgphoto2-2.5.0.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/libgphoto2/libgphoto2-2.5.0.ebuild,v 1.4 2012/09/04 15:42:46 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/libgphoto2/libgphoto2-2.5.0.ebuild,v 1.5 2012/11/22 08:39:16 eva Exp $
# TODO
# 1. Track upstream bug --disable-docs does not work.
@@ -8,7 +8,7 @@
EAPI="4"
-inherit autotools eutils multilib user toolchain-funcs
+inherit autotools eutils multilib udev user toolchain-funcs
DESCRIPTION="Library that implements support for numerous digital cameras"
HOMEPAGE="http://www.gphoto.org/"
@@ -67,7 +67,7 @@ DEPEND="${RDEPEND}
RDEPEND="${RDEPEND}
!<sys-fs/udev-136"
-pkg_setup() {
+pkg_pretend() {
if ! echo "${USE}" | grep "cameras_" > /dev/null 2>&1; then
einfo "No camera drivers will be built since you did not specify any."
fi
@@ -75,7 +75,9 @@ pkg_setup() {
if use cameras_template || use cameras_sipix_blink; then
einfo "Upstream considers sipix_blink & template driver as obsolete"
fi
+}
+pkg_setup() {
enewgroup plugdev
}
@@ -92,9 +94,6 @@ src_prepare() {
# Fix USE=zeroconf, bug #283332
epatch "${FILESDIR}/${PN}-2.4.7-respect-bonjour.patch"
- # Do not build test if not running make check, bug #226241
-# epatch "${FILESDIR}/${PN}-2.4.7-no-test-build.patch"
-
eautoreconf
}
@@ -119,9 +118,6 @@ src_configure() {
einfo "Enabled camera drivers: all"
fi
- local udevdir=/lib/udev
- has_version sys-fs/udev && udevdir="$($(tc-getPKG_CONFIG) --variable=udevdir udev)"
-
local myconf
use doc || myconf="ac_cv_path_DOXYGEN=false"
econf \
@@ -138,7 +134,7 @@ src_configure() {
--with-html-dir="${EPREFIX}"/usr/share/doc/${PF}/html \
--with-hotplug-doc-dir="${EPREFIX}"/usr/share/doc/${PF}/hotplug \
--with-rpmbuild=$(type -P true) \
- udevscriptdir="${EPREFIX}/${udevdir}" \
+ udevscriptdir="$(udev_get_udevdir)" \
${myconf}
# FIXME: gtk-doc is currently broken
@@ -146,7 +142,7 @@ src_configure() {
}
src_compile() {
- emake
+ default
if use doc; then
doxygen doc/Doxyfile || die "Documentation generation failed"
@@ -154,7 +150,7 @@ src_compile() {
}
src_install() {
- emake DESTDIR="${D}" install
+ default
# Empty dependency_libs in .la files, bug #386665
find "${ED}" -name '*.la' -exec sed -i -e "/^dependency_libs/s:=.*:='':" {} +
@@ -174,38 +170,46 @@ src_install() {
fi
# end fixup
- local udevdir=/lib/udev
- has_version sys-fs/udev && udevdir="$($(tc-getPKG_CONFIG) --variable=udevdir udev)"
+ local udev_rules cam_list
+ udev_rules="$(udev_get_udevdir)/rules.d/70-libgphoto2.rules"
+ cam_list="/usr/$(get_libdir)/libgphoto2/print-camera-list"
- UDEV_RULES="${udevdir}/rules.d/70-libgphoto2.rules"
- CAM_LIST="/usr/$(get_libdir)/libgphoto2/print-camera-list"
-
- if [ -x "${ED}"${CAM_LIST} ]; then
+ if [ -x "${ED}"${cam_list} ]; then
# Let print-camera-list find libgphoto2.so
export LD_LIBRARY_PATH="${ED}/usr/$(get_libdir)"
# Let libgphoto2 find its camera-modules
export CAMLIBS="${ED}/usr/$(get_libdir)/libgphoto2/${PV}"
einfo "Generating UDEV-rules ..."
- mkdir -p "${ED}"/${UDEV_RULES%/*}
+ mkdir -p "${ED}"/${udev_rules%/*}
echo -e "# do not edit this file, it will be overwritten on update\n#" \
- > "${ED}"/${UDEV_RULES}
- "${ED}"${CAM_LIST} udev-rules version 136 group plugdev >> "${ED}"/${UDEV_RULES} \
+ > "${ED}"/${udev_rules}
+ "${ED}"${cam_list} udev-rules version 136 group plugdev >> "${ED}"/${udev_rules} \
|| die "failed to create udev-rules"
else
eerror "Unable to find print-camera-list"
eerror "and therefore unable to generate hotplug usermap."
eerror "You will have to manually generate it by running:"
- eerror " ${CAM_LIST} udev-rules version 136 group plugdev > ${UDEV_RULES}"
+ eerror " ${cam_list} udev-rules version 136 group plugdev > ${udev_rules}"
fi
}
+pkg_preinst() {
+ preserve_old_lib \
+ /usr/$(get_libdir)/libgphoto2.so.2.4.0 \
+ /usr/$(get_libdir)/libgphoto2_port.so.0.8.0
+}
+
pkg_postinst() {
elog "Don't forget to add yourself to the plugdev group "
elog "if you want to be able to access your camera."
- local OLD_UDEV_RULES="${EROOT}"etc/udev/rules.d/99-libgphoto2.rules
- if [[ -f ${OLD_UDEV_RULES} ]]; then
- rm -f "${OLD_UDEV_RULES}"
+ local old_udev_rules="${EROOT}"etc/udev/rules.d/99-libgphoto2.rules
+ if [[ -f ${old_udev_rules} ]]; then
+ rm -f "${old_udev_rules}"
fi
+
+ preserve_old_lib_notify \
+ /usr/$(get_libdir)/libgphoto2.so.2.4.0 \
+ /usr/$(get_libdir)/libgphoto2_port.so.0.8.0
}