summaryrefslogtreecommitdiff
path: root/media-gfx
diff options
context:
space:
mode:
Diffstat (limited to 'media-gfx')
-rw-r--r--media-gfx/epsonscan2-non-free-plugin/Manifest3
-rw-r--r--media-gfx/epsonscan2-non-free-plugin/epsonscan2-non-free-plugin-1.0.0.6.ebuild38
-rw-r--r--media-gfx/epsonscan2-non-free-plugin/metadata.xml15
-rw-r--r--media-gfx/epsonscan2/Manifest5
-rw-r--r--media-gfx/epsonscan2/epsonscan2-6.6.42.0.ebuild65
-rw-r--r--media-gfx/epsonscan2/epsonscan2-6.7.63.0.ebuild70
-rw-r--r--media-gfx/epsonscan2/metadata.xml18
-rw-r--r--media-gfx/img2pdf/Manifest3
-rw-r--r--media-gfx/img2pdf/img2pdf-0.5.1.ebuild55
-rw-r--r--media-gfx/img2pdf/metadata.xml24
-rw-r--r--media-gfx/scangearmp2/Manifest3
-rw-r--r--media-gfx/scangearmp2/metadata.xml12
-rw-r--r--media-gfx/scangearmp2/scangearmp2-9999.ebuild99
13 files changed, 334 insertions, 76 deletions
diff --git a/media-gfx/epsonscan2-non-free-plugin/Manifest b/media-gfx/epsonscan2-non-free-plugin/Manifest
new file mode 100644
index 0000000..8af8763
--- /dev/null
+++ b/media-gfx/epsonscan2-non-free-plugin/Manifest
@@ -0,0 +1,3 @@
+DIST epsonscan2-bundle-6.7.63.0.x86_64.rpm.tar.gz 23147473 BLAKE2B 88ee08ce239452aec75903050e0fdc354350da6e6f46d90595988c259a97629166677c0e357ebc1b4b756dca8f96e9ddb66a0bf31c91202c635d79c761be2f05 SHA512 681f094b94daf2ae1753a9aa188e466857ef167c499d39ad48dbfca0b538eb086375afb37b426b18065ab6f656a28f766a6a778022aa18daa2a91512c49b33cd
+EBUILD epsonscan2-non-free-plugin-1.0.0.6.ebuild 983 BLAKE2B daa168297686c53849a6ec72752bd9be2f616a3c17c380c52fea79442e8630db045067ebb2f4bb59aa7084a54c60711837003ec9ad6a204dc2ce4bcc8f25f0c4 SHA512 9a1caf6e83ffd7869bb3d7fba09db5281452a6b81f2cf77547b7554c51391e060577e859fef0636c5c91f4d14bc4fb9b663467d573dc177de99b6ede40d550f8
+MISC metadata.xml 618 BLAKE2B bd895968aff2820d7857b196d6cb272e53c59da49777aa893958efbb29ad987c28bbbb75e40d98e927b60785743a5ac1e7fac5b4ad5d135fac64e04ab38f9197 SHA512 01b4a34c97d0e47d451dfaf611569d898c7b863530d6544a2882b6fab75c38dc1ca89927ab361afb62f8333374286f7e0f26a87a7833c40ad95117a138949a51
diff --git a/media-gfx/epsonscan2-non-free-plugin/epsonscan2-non-free-plugin-1.0.0.6.ebuild b/media-gfx/epsonscan2-non-free-plugin/epsonscan2-non-free-plugin-1.0.0.6.ebuild
new file mode 100644
index 0000000..b9fadfa
--- /dev/null
+++ b/media-gfx/epsonscan2-non-free-plugin/epsonscan2-non-free-plugin-1.0.0.6.ebuild
@@ -0,0 +1,38 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit rpm
+
+DESCRIPTION="Plugins for Epson Scan 2"
+
+HOMEPAGE="https://support.epson.net/linux/en/epsonscan2.php"
+# This is distributed as part of the "bundle driver"; since we already have the
+# opensource part separately we just install the nonfree part here.
+
+EPSONSCAN2_VERSION="6.7.63.0"
+REL="1"
+
+SRC_URI="https://download3.ebz.epson.net/dsc/f/03/00/15/17/66/aef42e9eaebe3f7365ef597c7dbd8578e252beff/epsonscan2-bundle-${EPSONSCAN2_VERSION}.x86_64.rpm.tar.gz"
+S=${WORKDIR}
+
+LICENSE="EPSON"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="media-gfx/epsonscan2"
+RESTRICT="bindist mirror strip"
+
+src_unpack() {
+ default
+ rpm_unpack "./epsonscan2-bundle-${EPSONSCAN2_VERSION}.x86_64.rpm/plugins/${P}-${REL}.x86_64.rpm"
+}
+
+src_install() {
+ mv usr/share/doc/${P}-${REL} usr/share/doc/${P}
+ insinto /
+ doins -r usr
+ # Fix permissions
+ find "${ED}/usr/lib"* -type f -exec chmod 0755 {} +
+}
diff --git a/media-gfx/epsonscan2-non-free-plugin/metadata.xml b/media-gfx/epsonscan2-non-free-plugin/metadata.xml
new file mode 100644
index 0000000..2bc386c
--- /dev/null
+++ b/media-gfx/epsonscan2-non-free-plugin/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person" proxied="yes">
+ <email>marcin.deranek@slonko.net</email>
+ <name>Marcin Deranek</name>
+ </maintainer>
+ <longdescription lang="en">
+ This software provides applications to easily turn hard-copy documents
+ and imagery into formats that are more amenable to computer processing.
+ Included are a native driver for a number of EPSON scanners and a
+ compatibility driver to interface with software built around the SANE
+ standard.
+ </longdescription>
+</pkgmetadata>
diff --git a/media-gfx/epsonscan2/Manifest b/media-gfx/epsonscan2/Manifest
new file mode 100644
index 0000000..8873156
--- /dev/null
+++ b/media-gfx/epsonscan2/Manifest
@@ -0,0 +1,5 @@
+DIST epsonscan2-6.6.42.0-1.src.tar.gz 2448446 BLAKE2B 8fa1718c9e153c9fca1a90e1cce3642e7cf8ae2f7ad95295a24735e6aae3a115f5a0282b5f59227441aef82d1cb05684cac32c018589428883c0bdb0285e4d7b SHA512 ae93d9c1aed6f1a420ad390af9f72ca9c5d28a3735f51df2fbfe23d26ae12ba45bc9a7f42776745a64d97141db2ec61a6fd3699f310d854b0f1e7e5b5cacb195
+DIST epsonscan2-6.7.63.0-1.src.tar.gz 2559661 BLAKE2B d765082c258e77bc98a64457388bddf465d258b62617460b0d8d3b82c3d6e1833e69515995349d5536069e2a4aede705abc3c962a12107fdf0af45e8fe8d8eac SHA512 99fb6a8e75b5e4a2e9f3bef593f948f75e8785d7b09397dc3c3f68e04a483f4e479e655bc2779635ce6c3e3d16e2f4b8c4f70609d4d4abfd3ee94f5f80c0faa6
+EBUILD epsonscan2-6.6.42.0.ebuild 1490 BLAKE2B c042fc31f498c638487fc39f48bcb50a03a57f0ee3632de911d8db9eb127ee8f6b4e1fa8cf921e0d11babce6ca8f86702b9c3834d67b6cb84544fc5b11da936e SHA512 3ce0b21dc7f0a3f6905333e8fedd50f7ab23e731a91f8b719f657f44bcf58e79dc2ca7f6cb32989dc5db43969bc6f05065f748db1ba9365ed28b7f3be827110d
+EBUILD epsonscan2-6.7.63.0.ebuild 1567 BLAKE2B cb9ce37f9794cf09b8e29fc55344b247b3b3da9f886b52dc5dfc1c513e289fb6e0b61ebdc3782799649eee609c8335fbb04cdfce3cb0714016641a5b0d99cf37 SHA512 bd8bb9c38ce631c6f2aa79640287d94c827946dd1b609bc00393e7aeb69a2417cdff90cf6e3067c94f7a8dd8de76d706fe6d35a17b7123d784686d1b43f2df2b
+MISC metadata.xml 787 BLAKE2B 86ad1919846630b77745e19fed9f3cfb9c76b28e3aff3c9709e68c230361226240e4d8101f2bdc6fd5d4b25a283c43bab755eb8c5794d762631cfc6f66e231ac SHA512 545659f051bdc470ea1f988866de2966f1fd812e6b863f7d5851a498d55a25e02208d669b14a7c3e5a79b3d4afde732bbe08818b4236ae4dd02066cdedc8aac6
diff --git a/media-gfx/epsonscan2/epsonscan2-6.6.42.0.ebuild b/media-gfx/epsonscan2/epsonscan2-6.6.42.0.ebuild
new file mode 100644
index 0000000..1337de4
--- /dev/null
+++ b/media-gfx/epsonscan2/epsonscan2-6.6.42.0.ebuild
@@ -0,0 +1,65 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+MY_VERSION="${PV}-1"
+
+DESCRIPTION="Epson scanner management utility"
+HOMEPAGE="https://support.epson.net/linux/en/epsonscan2.php"
+SRC_URI="https://support.epson.net/linux/src/scanner/${PN}/${PN}-${MY_VERSION}.src.tar.gz"
+S="${WORKDIR}/${PN}-${MY_VERSION}"
+
+inherit cmake desktop udev
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="amd64"
+
+DEPEND="
+ dev-libs/boost
+ dev-libs/rapidjson
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtwidgets:5
+ media-gfx/sane-backends
+ media-libs/libharu
+ media-libs/libjpeg-turbo:=
+ media-libs/libpng
+ media-libs/tiff
+ sys-libs/zlib
+ virtual/libusb:1
+"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ cmake_src_prepare
+ sed -i \
+ -e '/\(execute_process.*\)${EPSON_INSTALL_ROOT}/d' \
+ -e "s|^\(set(EPSON_VERSION \).*|\1-${PV})|g" \
+ CMakeLists.txt || die
+ # Force usage of system libraries
+ rm -rf thirdparty/{HaruPDF,rapidjson,zlib}
+ sed -i \
+ -e '/thirdparty\/HaruPDF/d' \
+ -e '/thirdparty\/zlib/d' \
+ -e 's|^\([[:blank:]]*\)\(usb-1.0\)|\1\2\n\1hpdf\n\1z|' \
+ src/Controller/CMakeLists.txt || die
+}
+
+src_install() {
+ cmake_src_install
+ # Sane symlinks
+ dosym ../epsonscan2/libsane-epsonscan2.so /usr/$(get_libdir)/sane/libsane-epsonscan2.so.1
+ dosym ../epsonscan2/libsane-epsonscan2.so /usr/$(get_libdir)/sane/libsane-epsonscan2.so.1.0.0
+ # Desktop icon
+ domenu desktop/rpm/x86_64/epsonscan2.desktop
+}
+
+pkg_postinst() {
+ udev_reload
+}
+
+pkg_postrm() {
+ udev_reload
+}
diff --git a/media-gfx/epsonscan2/epsonscan2-6.7.63.0.ebuild b/media-gfx/epsonscan2/epsonscan2-6.7.63.0.ebuild
new file mode 100644
index 0000000..fb4e7cb
--- /dev/null
+++ b/media-gfx/epsonscan2/epsonscan2-6.7.63.0.ebuild
@@ -0,0 +1,70 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+MY_PROG="${P}-1"
+
+DESCRIPTION="Epson scanner management utility"
+HOMEPAGE="https://support.epson.net/linux/en/epsonscan2.php"
+SRC_URI="https://download3.ebz.epson.net/dsc/f/03/00/15/17/69/0ef02802c476a6564f13cac929859c394f40326a/${MY_PROG}.src.tar.gz"
+S="${WORKDIR}/${MY_PROG}"
+
+inherit cmake desktop udev
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="bundled-libs"
+
+DEPEND="
+ dev-libs/boost
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtwidgets:5
+ media-gfx/sane-backends
+ media-libs/libjpeg-turbo:=
+ media-libs/libpng
+ media-libs/tiff
+ virtual/libusb:1
+ !bundled-libs? (
+ media-libs/libharu
+ sys-libs/zlib
+ )
+"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ sed -i \
+ -e '/\(execute_process.*\)${EPSON_INSTALL_ROOT}/d' \
+ -e "s|^\(set(EPSON_VERSION \).*|\1-${PV})|g" \
+ CMakeLists.txt || die
+ if ! use bundled-libs; then
+ # Force usage of system libraries
+ rm -rf thirdparty/{HaruPDF,zlib}
+ sed -i \
+ -e '/thirdparty\/HaruPDF/d' \
+ -e '/thirdparty\/zlib/d' \
+ -e 's|^\([[:blank:]]*\)\(usb-1.0\)|\1\2\n\1hpdf\n\1z|' \
+ src/Controller/CMakeLists.txt || die
+ fi
+
+ cmake_src_prepare
+}
+
+src_install() {
+ cmake_src_install
+ # Sane symlinks
+ dosym ../epsonscan2/libsane-epsonscan2.so /usr/$(get_libdir)/sane/libsane-epsonscan2.so.1
+ dosym ../epsonscan2/libsane-epsonscan2.so /usr/$(get_libdir)/sane/libsane-epsonscan2.so.1.0.0
+ # Desktop icon
+ domenu desktop/rpm/x86_64/epsonscan2.desktop
+}
+
+pkg_postinst() {
+ udev_reload
+}
+
+pkg_postrm() {
+ udev_reload
+}
diff --git a/media-gfx/epsonscan2/metadata.xml b/media-gfx/epsonscan2/metadata.xml
new file mode 100644
index 0000000..50c82b5
--- /dev/null
+++ b/media-gfx/epsonscan2/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person" proxied="yes">
+ <email>marcin.deranek@slonko.net</email>
+ <name>Marcin Deranek</name>
+ </maintainer>
+ <longdescription lang="en">
+ Epson Scan 2 is Linux software for Epson scanners and multifunction printer.
+ Epson Scan 2 has own front-end, it allows to set various scanner settings
+ with graphical user interface and save the scanned images to the various file type.
+ It supports USB and network connection for the network capable scanners.
+ Scanner can be controlled via not only own front-end but also command line option.
+ </longdescription>
+ <use>
+ <flag name="bundled-libs">Use bundled libs</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-gfx/img2pdf/Manifest b/media-gfx/img2pdf/Manifest
new file mode 100644
index 0000000..044003b
--- /dev/null
+++ b/media-gfx/img2pdf/Manifest
@@ -0,0 +1,3 @@
+DIST img2pdf-0.5.1.tar.gz 104241 BLAKE2B 1ea89107654c91cea8b5f074c05c7376452dd2ebd40dafaadedb39ac3ee383c3c02c1375b130da73339e1f87eb1a6ffbe0553cdedf6ec997bc0731d1d100327f SHA512 e17a920929f6ab08f501b205c38f9cf2fd5a6bd8d41ac4819a5d7463a3cfbeb5376cd5bbee36ab303248610f1d5c8a71a38ff85b14be564e2f39c6eb537ffcaf
+EBUILD img2pdf-0.5.1.ebuild 1224 BLAKE2B 8db8405989299897696f0d2aa7c2415501333d3b5a50454e5d68276f9c6ad62e37f3d0e25ca9fe2339b3eb782ae10b50a4c45987bd74850f7002041cb5bfc2ee SHA512 cda53c6996f62fc73b042318362c1acee3795c9da5abd1a5377d9b88c62222b5d671984983facb321960010e483e918e8106a5525a4864f7466a889ac10abc86
+MISC metadata.xml 1019 BLAKE2B 5c6db1304339112586563d41c64ee3b89f3e714d6587d6a4a0bac2159fe57c7ebeaf9e2bb14f225c2a05dce11147c9a02b63961b47588bd5bb6dc9f2ebb265d0 SHA512 1b8b8c137f24b682c97944fa38997c86aaeba8cbb2c86fc20277c992f23d07a7382315287734ab37cf9bec3be0593181dd875ca8453351e37ac27a6d1ec5ae6f
diff --git a/media-gfx/img2pdf/img2pdf-0.5.1.ebuild b/media-gfx/img2pdf/img2pdf-0.5.1.ebuild
new file mode 100644
index 0000000..99b1998
--- /dev/null
+++ b/media-gfx/img2pdf/img2pdf-0.5.1.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{9..11} )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="Losslessly convert raster images to PDF"
+HOMEPAGE="https://gitlab.mister-muffin.de/josch/img2pdf"
+
+LICENSE="LGPL-3+"
+SLOT="0"
+KEYWORDS="amd64 ppc64 x86"
+IUSE="gui"
+
+BDEPEND="
+ test? (
+ app-text/ghostscript-gpl
+ app-text/mupdf
+ app-text/poppler[cairo,png,tiff]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/pdfrw[${PYTHON_USEDEP}]
+ dev-python/pillow[tiff,${PYTHON_USEDEP}]
+ dev-python/scipy[${PYTHON_USEDEP}]
+ media-gfx/imagemagick[jpeg,jpeg2k,lcms,png,-q8,-q32,tiff]
+ media-libs/exiftool
+ media-libs/netpbm[jpeg]
+ sys-libs/libfaketime
+ )
+"
+RDEPEND="
+ dev-python/pikepdf[${PYTHON_USEDEP}]
+ dev-python/pillow[${PYTHON_USEDEP}]
+ media-libs/icc-profiles-openicc
+ gui? ( $(python_gen_impl_dep tk) )
+"
+
+distutils_enable_tests pytest
+
+EPYTEST_DESELECT=(
+ # Failing cmyk8 tests
+ src/img2pdf_test.py::test_miff_cmyk8
+)
+
+src_prepare() {
+ distutils-r1_python_prepare_all
+
+ # Remove gui executable if there's no demand/support for it.
+ if ! use gui; then
+ sed -i '/gui_scripts/d' setup.py || die
+ fi
+}
diff --git a/media-gfx/img2pdf/metadata.xml b/media-gfx/img2pdf/metadata.xml
new file mode 100644
index 0000000..c62baa9
--- /dev/null
+++ b/media-gfx/img2pdf/metadata.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person" proxied="yes">
+ <email>marcin.deranek@slonko.net</email>
+ <name>Marcin Deranek</name>
+ </maintainer>
+ <longdescription lang="en">
+ Losslessly convert raster images to PDF. The file size will not
+ unnecessarily increase. It can for example be used to create a PDF
+ document from a number of scans that are only available in JPEG format.
+ Existing solutions would either re-encode the input JPEG files (leading
+ to quality loss) or store them in the zip/flate format which results in
+ the PDF becoming unnecessarily large in terms of its file size.
+ </longdescription>
+ <upstream>
+ <maintainer status="active">
+ <email>josch@mister-muffin.de</email>
+ <name>Johannes Schauer</name>
+ </maintainer>
+ <remote-id type="pypi">img2pdf</remote-id>
+ <bugs-to>https://gitlab.mister-muffin.de/josch/img2pdf/issues</bugs-to>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/scangearmp2/Manifest b/media-gfx/scangearmp2/Manifest
index 4ba966b..8f2d3aa 100644
--- a/media-gfx/scangearmp2/Manifest
+++ b/media-gfx/scangearmp2/Manifest
@@ -1,2 +1,3 @@
AUX scangearmp2.desktop 252 BLAKE2B 7e2fbf2de587390bcb23c5b5b9cd36f27fa78e6eb3dba3a0128ffe4e8d4e0d607824506d81b0f115e0d2096025d8639c261eb0f7f27388aa39d733700a1f7edb SHA512 71233acc250948f894fad789ce8286486f9dc8ce2c5aca31faf0533a84915076a2a77e769b16c1564dbbd45d79c67eb666aa5101c2844b4d14858e3594ac6e71
-EBUILD scangearmp2-9999.ebuild 2295 BLAKE2B 29f6a21d6b4ca611bb98f3f2399e73a30d3e480472ed8374a87aee048216a864b7a023b4ee1cfa81d7fbbfde70618dccd53ed5e36eb4ecb96783be1f3cebcd9b SHA512 744a1fdec6647aad2db54687dd3bb8e9be169722ae3a5fe8962d2460791313c41eb1910a8aaa47cbe7250191d76a9586339ddc3f8956fd4608630bfc40ba6aec
+EBUILD scangearmp2-9999.ebuild 875 BLAKE2B 6af5eb7b41798bf3386987e5d54b8a01f051d952884f657e280b42adddc2e579a18d48032f27113d56732349354dd792755c41c8bba3f3e88397d33b254b0174 SHA512 13afd30716976050bcec2a109f7ae922ed02494bd68c9600ee0ddf3e426066de514d9200f4ef487ba51526b273c0852683f1218cc1d1f97dd2948f73e1d525bc
+MISC metadata.xml 425 BLAKE2B ce54e5b8eeb6b3a8ba4723eba69800693abfef525efb346fde94b46a9ac1b775edc2c1a80fe17b717d3be6202eb00374f36550b47e51cf4448c415e40917af1d SHA512 17471840788320665a18abc691deb2477399eaa2e2747d2ed20b313ab1b1329e86e713d4baa910b6ea1d22b573a78ec80eba0f37df06817cf5b389c1e21a6c7a
diff --git a/media-gfx/scangearmp2/metadata.xml b/media-gfx/scangearmp2/metadata.xml
new file mode 100644
index 0000000..7a4ccb4
--- /dev/null
+++ b/media-gfx/scangearmp2/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person" proxied="yes">
+ <email>marcin.deranek@slonko.net</email>
+ <name>Marcin Deranek</name>
+ </maintainer>
+ <upstream>
+ <bugs-to>https://github.com/Ordissimo/scangearmp2/issues</bugs-to>
+ <remote-id type="github">Ordissimo/scangearmp2</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/scangearmp2/scangearmp2-9999.ebuild b/media-gfx/scangearmp2/scangearmp2-9999.ebuild
index 5d6008a..bbc19aa 100644
--- a/media-gfx/scangearmp2/scangearmp2-9999.ebuild
+++ b/media-gfx/scangearmp2/scangearmp2-9999.ebuild
@@ -1,97 +1,46 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-inherit eutils flag-o-matic autotools multilib desktop
+CMAKE_MAKEFILE_GENERATOR="emake"
-DESCRIPTION="Canon InkJet Scanner Driver and ScanGear MP for Linux (Pixus/Pixma-Series)."
-HOMEPAGE="https://support-au.canon.com.au/contents/AU/EN/0100303302.html"
-RESTRICT="mirror"
-
-if [[ ${PV} == 9999* ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/Ordissimo/${PN}.git"
- S="${WORKDIR}/${P}"
-else
- SRC_URI="https://gdlp01.c-wss.com/gds/3/0100009933/01/${PN}-source-${PV}-1.tar.gz"
- S="${WORKDIR}/${PN}-source-${PV}-1"
-fi
+inherit cmake desktop git-r3 udev
+DESCRIPTION="Canon InkJet Scanner Driver and ScanGear MP for Linux (Pixus/Pixma-Series)."
+HOMEPAGE="https://github.com/Ordissimo/scangearmp2"
+EGIT_REPO_URI="https://github.com/Ordissimo/${PN}.git"
LICENSE="GPL-2"
-
SLOT="2"
-KEYWORDS="~amd64 ~x86"
-IUSE="+sane usb"
+RESTRICT="mirror"
+
DEPEND="
+ dev-util/intltool
+ media-gfx/sane-backends
+ media-libs/libjpeg-turbo:=
+ sys-devel/gettext
virtual/libusb:1
- >=x11-libs/gtk+-2.16.0"
-
-src_prepare() {
- cd ${PN}
- eapply_user
- eautoreconf
-}
+ x11-libs/gtk+:3
+"
src_configure() {
- cd ${PN}
-
- 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}"
+ cmake_src_configure
}
src_compile() {
- pushd ${PN}
- make || die "Couldn't build ${PN}"
- popd
+ emake -C"${BUILD_DIR}" || die "Couldn't build ${PN}"
}
src_install() {
- pushd ${PN}
- make DESTDIR="${D}" install || die "Couldn't make install ${PN}"
- popd
+ cd "${BUILD_DIR}"
+ emake DESTDIR="${D}" install || die "Couldn't install ${PN}"
domenu "${FILESDIR}"/${PN}.desktop
-
- _libdir="/usr/$(get_libdir)"
- _udevdir="/lib/udev/rules.d"
-
- 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
+ udev_reload
+}
+
+pkg_postrm() {
+ udev_reload
}