summaryrefslogtreecommitdiff
path: root/media-gfx
diff options
context:
space:
mode:
authorMarcin Deranek <gringo@slonko.net>2019-02-01 21:59:04 +0100
committerMarcin Deranek <gringo@slonko.net>2019-02-01 21:59:04 +0100
commit2bf93a46fe739c2806e8675c62b3eca6f4515c0a (patch)
treeac7ac45a122b9ca304230adbefd920874447aa68 /media-gfx
parente72260a49bfb2d5566a26c6ec3d3f5c63928bbd1 (diff)
downloadportage-2bf93a46fe739c2806e8675c62b3eca6f4515c0a.tar.gz
portage-2bf93a46fe739c2806e8675c62b3eca6f4515c0a.tar.bz2
portage-2bf93a46fe739c2806e8675c62b3eca6f4515c0a.zip
New ebuild
Diffstat (limited to 'media-gfx')
-rw-r--r--media-gfx/scangearmp2/Manifest1
-rw-r--r--media-gfx/scangearmp2/scangearmp2-9999.ebuild108
2 files changed, 109 insertions, 0 deletions
diff --git a/media-gfx/scangearmp2/Manifest b/media-gfx/scangearmp2/Manifest
new file mode 100644
index 0000000..4d93277
--- /dev/null
+++ b/media-gfx/scangearmp2/Manifest
@@ -0,0 +1 @@
+EBUILD scangearmp2-9999.ebuild 2644 BLAKE2B dd0978f50cb094c496b7333a315c6fff838d0f7f72f3425afba73e4bfaf8426f73c7a36b78089b5806052027f7b21e25f0cec9f4a9790a7447ed9914e4ae711f SHA512 86e7abcd2aed8181e3449c8f8a986f4a04bbb88358227ca5af3763a2ef3738305598424409bda772dadc88a74b98e3e7ea1abe268f8bdccc1c4e21c5624acdda
diff --git a/media-gfx/scangearmp2/scangearmp2-9999.ebuild b/media-gfx/scangearmp2/scangearmp2-9999.ebuild
new file mode 100644
index 0000000..424b396
--- /dev/null
+++ b/media-gfx/scangearmp2/scangearmp2-9999.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="4"
+
+inherit eutils flag-o-matic autotools multilib
+
+DESCRIPTION="Canon InkJet Scanner Driver and ScanGear MP for Linux (Pixus/Pixma-Series)."
+HOMEPAGE="http://support-au.canon.com.au/contents/AU/EN/0100303302.html"
+RESTRICT="nomirror confcache"
+
+if [[ ${PV} == 9999* ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/Ordissimo/${PN}.git"
+ S="${WORKDIR}/${P}"
+else
+ SRC_URI="http://gdlp01.c-wss.com/gds/3/0100009933/01/${PN}-source-${PV}-1.tar.gz"
+ S="${WORKDIR}/${PN}-source-${PV}-1"
+fi
+
+LICENSE="UNKNOWN" # GPL-2 source and proprietary binaries
+
+SLOT="2"
+KEYWORDS="~x86 ~amd64"
+IUSE="+sane usb"
+DEPEND=">=dev-libs/libusb-1.0.0
+ >=x11-libs/gtk+-2.16.0"
+
+pkg_setup() {
+ if [ -z "$LINGUAS" ]; then # -z tests to see if the argument is empty
+ ewarn "You didn't specify 'LINGUAS' in your make.conf. Assuming"
+ ewarn "English localisation, i.e. 'LINGUAS=\"en\"'."
+ LINGUAS="en"
+ fi
+
+ _libdir="/usr/$(get_libdir)"
+ _udevdir="/lib/udev/rules.d"
+}
+
+src_prepare() {
+ cd ${PN}
+ eautoreconf
+}
+
+src_configure() {
+ cd scangearmp2
+
+ if use x86; then
+ LDFLAGS="-L$(pwd)/../com/libs_bin32"
+ elif use amd64 ; then
+ LDFLAGS="-L$(pwd)/../com/libs_bin64"
+ else
+ die "Not supported arch"
+ fi
+ econf LDFLAGS="${LDFLAGS}"
+}
+
+src_compile() {
+ cd ${PN}
+ make
+}
+
+src_install() {
+ cd ${PN}
+ make DESTDIR=${D} install || die "Couldn't make install scangearmp2"
+
+ cd ..
+
+ dodir ${_libdir}
+ if use x86; then
+ cp -a com/libs_bin32/* ${D}${_libdir}
+ else
+ cp -a com/libs_bin64/* ${D}${_libdir}
+ fi
+
+ # usb
+ if use usb; then
+ install -D -m 644 scangearmp2/etc/80-canon_mfp2.rules ${D}${_udevdir}/80-canon_mfp2.rules
+ fi
+ # sane
+ if use sane; then
+ install -D -m 755 scangearmp2/src/.libs/libsane-canon_pixma.so.1.0.0 ${D}${_libdir}/sane/libsane-canon_pixma.so.1.0.0
+ ln -sf ${_libdir}/sane/libsane-canon_pixma.so.1.0.0 ${D}${_libdir}/sane/libsane-canon_pixma.so.1
+ ln -sf ${_libdir}/sane/libsane-canon_pixma.so.1.0.0 ${D}${_libdir}/sane/libsane-canon_pixma.so
+ install -d ${D}/etc/sane.d/dll.d
+ echo canon_pixma > ${D}/etc/sane.d/dll.d/canon_pixma.conf
+ fi
+}
+
+pkg_postinst() {
+ if use usb; then
+ if [ -x /sbin/udevadm ]; then
+ einfo ""
+ einfo "Reloading usb rules..."
+ /sbin/udevadm control --reload-rules 2> /dev/null
+ /sbin/udevadm trigger --action=add --subsystem-match=usb 2>/dev/null
+ else
+ einfo ""
+ einfo "Please, reload usb rules manually."
+ fi
+ fi
+
+ einfo ""
+ einfo "If you experience any problems, please visit:"
+ einfo " http://forums.gentoo.org/viewtopic-p-3217721.html"
+ einfo ""
+}