diff --git a/app-text/zeal/Manifest b/app-text/zeal/Manifest
new file mode 100644
index 0000000..34a389f
--- /dev/null
+++ b/app-text/zeal/Manifest
@@ -0,0 +1 @@
+DIST zeal-1.0.0.tar.gz 1062839 SHA256 b9d3fd3b74b0d04fe06b6449088ddea197b0c3147130585956b6b929234fbd1e SHA512 7b9c1f1c154043324946ef9dc6495d81cc7cac53099e3f1ec686fdb6c2b9fb7a3de479d78a1fc3b22308951a57658b762d05f5b30669bc23390007c81dd4ce0f WHIRLPOOL b9cd5a80c17507513543ffd1589852c6b7bac0fed4fddf69bfbb6d606f61e1116b32140347e14fb8dee5c1e78c5386c6780ed58ad0935028e55e02c991c0743f
diff --git a/app-text/zeal/metadata.xml b/app-text/zeal/metadata.xml
new file mode 100644
index 0000000..8a16049
--- /dev/null
+++ b/app-text/zeal/metadata.xml
@@ -0,0 +1,17 @@
+
+
+
+
+ ahvenas@gmail.com
+ Henrik Pihl
+
+
+Zeal is a simple offline API documentation browser inspired by Dash (OS X app), available for Linux and Windows.
+Quickly search documentation using Alt+Space (or customised) hotkey to display Zeal from any place in your workspace.
+- Search in multiple sets of documentation at once.
+- Don't be dependent on your internet connection.
+- Integrate Zeal with Emacs, Sublime Text, or Vim.
+All documentation available for Dash is also available for Zeal.
+You can also generate your own docsets using the same format Dash uses.
+
+
diff --git a/app-text/zeal/zeal-1.0.0.ebuild b/app-text/zeal/zeal-1.0.0.ebuild
new file mode 100644
index 0000000..f8a9fa0
--- /dev/null
+++ b/app-text/zeal/zeal-1.0.0.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+inherit qmake-utils
+
+DESCRIPTION="Zeal is a simple documentation browser inspired by Dash"
+HOMEPAGE="http://zealdocs.org/"
+SRC_URI="https://github.com/jkozera/zeal/archive/20141104.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/zeal-20141104/zeal"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND=">=dev-libs/libappindicator-12.10
+ >=x11-libs/xcb-util-keysyms-0.3.9
+ >=dev-libs/quazip-0.6.2-r1
+ >=dev-qt/qtcore-4.8.6-r1
+ >=dev-qt/qtcore-5.4:5
+ >=dev-qt/qtgui-5.4:5
+ >=dev-qt/qtscript-5.4:5
+ >=dev-qt/qtwidgets-5.4:5
+ >=dev-qt/qtxml-5.4:5
+ >=dev-qt/qtwebkit-5.4:5
+ >=dev-qt/qtsql-5.4:5
+ >=dev-qt/qtconcurrent-5.4:5
+ dev-libs/openssl:0[-bindist]
+ net-misc/openssh[-bindist]"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+rm -rf quazip
+epatch "${FILESDIR}/${PV}-library-fixes.patch" ..
+}
+
+src_configure() {
+eqmake5
+}
+
+src_install() {
+emake INSTALL_ROOT="${D}" install
+}
diff --git a/app-text/zeal/zeal-9999.ebuild b/app-text/zeal/zeal-9999.ebuild
new file mode 100644
index 0000000..43f1e32
--- /dev/null
+++ b/app-text/zeal/zeal-9999.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+inherit qmake-utils git-r3
+
+DESCRIPTION="Zeal is a simple documentation browser inspired by Dash"
+HOMEPAGE="http://zealdocs.org/"
+EGIT_REPO_URI="git://github.com/jkozera/zeal.git"
+EGIT_BRANCH="master"
+S="${WORKDIR}/zeal-9999/src"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND=">=dev-libs/libappindicator-12.10
+ >=x11-libs/xcb-util-keysyms-0.3.9
+ >=dev-qt/qtcore-4.8.6-r1:4
+ >=dev-qt/qtcore-5.4:5
+ >=dev-qt/qtgui-5.4:5
+ >=dev-qt/qtscript-5.4:5
+ >=dev-qt/qtwidgets-5.4:5
+ >=dev-qt/qtxml-5.4:5
+ >=dev-qt/qtwebkit-5.4:5
+ >=dev-qt/qtsql-5.4:5
+ >=dev-qt/qtconcurrent-5.4:5
+ dev-libs/openssl:0
+ net-misc/openssh"
+RDEPEND="${DEPEND}"
+
+src_configure() {
+eqmake5
+}
+
+src_install() {
+emake INSTALL_ROOT="${D}" install
+}
diff --git a/media-gfx/brother-scan3-bin/Manifest b/media-gfx/brother-scan3-bin/Manifest
new file mode 100644
index 0000000..91e2ce0
--- /dev/null
+++ b/media-gfx/brother-scan3-bin/Manifest
@@ -0,0 +1,2 @@
+DIST brscan3-0.2.11-5.x86_64.rpm 71491 SHA256 2c8140616f7c4a6ddb757280504b561c448ed2edb7cc508f93c5ad9d3bc94ada SHA512 ac5dbddec5001acce52da20b341fed9a0cd536ddc148b527f85319b8dbfb72c8302225d344f6ebd48d11b4537c542a3309d26a6a707890f522726fe4dbb6cfd1 WHIRLPOOL 916da38319d25c5eab37badc601dbcaa94dbca26946226ec9b94b0be6fda839ca0bb1c8ee475e0d51f1482755228100cd07b4c91330ad54703865d962a1ec01c
+EBUILD brother-scan3-bin-0.2.11.5.ebuild 1421 SHA256 1fde379e3f360ce68936d399f5f51b63231c45a33a87d9954fbe29c0510df7c2 SHA512 e7951bb41efc8676f455c68143d7827908686d825494348f262f8a4d27fcff89471d981ffddd12c390c5cccdb37ee494374ae7982f75d0f7c481feb604fa409f WHIRLPOOL ada517b5a321603176781cafdfd98eaf818d6c6b4059e7d6b0384594d02ab6b81bfc2ab793377be05f5ba8349a74d4f11aff3b66409bcac5023f176a498a8add
diff --git a/media-gfx/brother-scan3-bin/brother-scan3-bin-0.2.11.5.ebuild b/media-gfx/brother-scan3-bin/brother-scan3-bin-0.2.11.5.ebuild
new file mode 100644
index 0000000..ad9a852
--- /dev/null
+++ b/media-gfx/brother-scan3-bin/brother-scan3-bin-0.2.11.5.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+#based on ebuilds from the funtoo and flow overlay
+
+inherit rpm versionator
+
+MY_PV="$(replace_version_separator 3 -)"
+MY_PN=brscan3
+
+DESCRIPTION="Brother scanner tool (brscan3)"
+
+HOMEPAGE="http://support.brother.com"
+
+#this version is only for x86_64 available
+SRC_URI="amd64? ( http://download.brother.com/welcome/dlf006644/${MY_PN}-${MY_PV}.x86_64.rpm ) "
+LICENSE="GPL-2"
+
+SLOT="0"
+
+KEYWORDS="-* amd64"
+
+IUSE=""
+
+RESTRICT="mirror strip"
+
+DEPEND="media-gfx/sane-backends[usb]"
+RDEPEND="${DEPEND}
+ dev-libs/libusb-compat"
+
+S=${WORKDIR}
+
+src_unpack() {
+ rpm_unpack ${A}
+}
+
+src_install() {
+ cp -r usr "${D}" || die
+
+ mkdir -p "${D}/etc/sane.d/dll.d"
+ echo "brother3" >"${D}/etc/sane.d/dll.d/brscan3.conf"
+}
+
+pkg_postinst() {
+ "${ROOT}/usr/local/Brother/sane/setupSaneScan3" -i
+ #this is already done with the previous line
+ #einfo "In order to use scanner you need to add it first with setupSaneScan3."
+
+ einfo "Example with MFC-9320CW over network:"
+ einfo " /usr/local/Brother/sane/brsaneconfig3 -a name=mfcscan model=MFC-9320CW ip=192.168.250.4"
+ einfo " chmod 644 /usr/local/Brother/sane/brsanenetdevice3.cfg"
+
+ #only for usb access
+# elog "You may need to be in the scanner or plugdev group in order to use the scanner"
+}
+
+pkg_prerm() {
+ ${ROOT}/usr/local/Brother/sane/setupSaneScan3 -e
+}
diff --git a/media-gfx/brother-scan4-bin/Manifest b/media-gfx/brother-scan4-bin/Manifest
new file mode 100644
index 0000000..1f024ef
--- /dev/null
+++ b/media-gfx/brother-scan4-bin/Manifest
@@ -0,0 +1,3 @@
+DIST brscan4-0.4.3-2.i386.rpm 67992 SHA256 106699506704439eeb83dc14147b038bcd0f401fbeb699f6ebae1898571be552 SHA512 9c52588d140dbcfc24acc9c96b83b8a19d25fba0c3fba4bf5afe29dbf3d8bc853b4203ee34419e14c1f1e773676dd5446de102de0887aa728735b223d4a1c1ce WHIRLPOOL 5c7b46275ba3d47ce7806657984b46350085afb434a5a154f65a080f097e35a8ea01c44832c2abd82df51d0e742486e3ed796358b2dccc4184c1b4dcf1205410
+DIST brscan4-0.4.3-2.x86_64.rpm 79752 SHA256 0ce10c81189903d19663ab52a6064ad9124e09eb6b1bea4ac9b26c605f3b04f2 SHA512 f901947b0764c8cd5c7f13413ab20dfe93e5a6574ec559319b69b93b0a0051f96439c90ee70ddf6bf9b5eb874965e07f868658d18acba8408f76636a1a2e1699 WHIRLPOOL 549c972d45130dbf16dc146185778360b0f7e2433536f050b5f029e33f44427b65ff22d20f7ad69dfbfe846a40a3e1b9a0933c392d4719f780eb38f4df18cbff
+EBUILD brother-scan4-bin-0.4.3-r1.ebuild 1242 SHA256 ebd0c5a7aa7ce042084f97d2028596f9c6acd03403941031f34d356bf8d26e93 SHA512 4575f7f0a43d839a2e451e9ceb13be0a930bf1f104c5977272fef1201fb36d3422813d21b68aae7d3e493cdfd0b08bd2f43c76503b2e5f645a1f28f4c884cde0 WHIRLPOOL 1b566b80f6a9add8cb991132fe84a688e059dcde8db6e72f3f6287a7f82bf32e529c52ceac417939fff6061f490162c2ca7c58d263e8db80add75f3ef11c4e77
diff --git a/media-gfx/brother-scan4-bin/brother-scan4-bin-0.4.3-r1.ebuild b/media-gfx/brother-scan4-bin/brother-scan4-bin-0.4.3-r1.ebuild
new file mode 100644
index 0000000..ef5fa05
--- /dev/null
+++ b/media-gfx/brother-scan4-bin/brother-scan4-bin-0.4.3-r1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+#based on ebuilds from the funtoo and flow overlay
+
+inherit rpm versionator
+
+MY_PR="2"
+MY_PN=brscan4
+
+DESCRIPTION="Brother scanner tool (brscan4)"
+
+HOMEPAGE="http://support.brother.com"
+
+#this version is for x86_64
+SRC_URI="amd64? ( http://download.brother.com/welcome/dlf006648/${MY_PN}-${PV}-${MY_PR}.x86_64.rpm )
+x86? ( http://download.brother.com/welcome/dlf006647/${MY_PN}-${PV}-${MY_PR}.i386.rpm ) "
+LICENSE="GPL-2"
+
+SLOT="0"
+
+KEYWORDS="-* x86 amd64"
+
+IUSE=""
+
+RESTRICT="mirror strip"
+
+DEPEND="dev-libs/libusb-compat
+ media-gfx/sane-backends[usb]"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}
+
+src_unpack() {
+ rpm_unpack ${A}
+}
+
+src_install() {
+ cp -r usr "${D}" || die
+ cp -r etc "${D}" || die
+ cp -r opt "${D}" || die
+
+ # so no files from the sane package are touched
+ mkdir -p "${D}/etc/sane.d/dll.d"
+ echo "brother4" >"${D}/etc/sane.d/dll.d/brscan4.conf"
+}
+
+pkg_postinst() {
+ einfo "Example with MFC-7460DN over network:"
+ einfo " /opt/brother/scanner/brscan4/brsaneconfig4 -a name=mfcscan model=MFC-7460DN ip=192.168.10.6"
+
+ elog "You may need to be in the scanner or plugdev group in order to use the scanner"
+}
diff --git a/net-print/brother-dcp9055cdn-bin/Manifest b/net-print/brother-dcp9055cdn-bin/Manifest
new file mode 100644
index 0000000..f8fa91e
--- /dev/null
+++ b/net-print/brother-dcp9055cdn-bin/Manifest
@@ -0,0 +1,3 @@
+DIST dcp9055cdncupswrapper-1.1.1-5.i386.rpm 14509 SHA256 fd4618097c3088bba3277b3f31d27ea119f38ef41e5f0184f464d91faeef4b7c SHA512 1f44a97ce3d7975b0c937743dc07ba054e8af99a6e05ed4a6b695255b95ae2f60e29099d17ff7ab3277b369dbb9299cbbded313de136522f926d85182c03874e WHIRLPOOL b6071fce6397b3fe324d02c4061e9b60b5baa9f4cbc7fa913083c1b55fe7f782f5d89f3faa8b69543ac950873ee5e8b23689eddb092a164e98f9bd82e59a799d
+DIST dcp9055cdnlpr-1.1.1-5.i386.rpm 760646 SHA256 e2f8e0a4ad3e8d7f1680a0fecc5f8cc4baab8e02a6a3d200059fea72082fabbc SHA512 e9129ac527cbf6a951def25d7acd30b2db38d5ef32fbc3dd18011b317a08e63bfacc529009afd65ba23feb7e6efccbcfabbada3964b4d0b1284050f529d35b13 WHIRLPOOL 50ff9f7489e6415925cc0f1dbfb0da831e8d84cf393ad45c5c64414717eb7fc30fa418d936dd04d33db3f9cbf0b096da058534c191b7d0d7462e878a28d27840
+EBUILD brother-dcp9055cdn-bin-1.1.1.ebuild 1735 SHA256 0b3905fc6eba5713159460bb4a98260e9cd6f7a36d195767ecd65b904b587618 SHA512 25a21e9622b92478ebed20f984fdad0428557224e3f1a539483a7702fe5813df994726c52fbf663af9544a0bd665b7799aaf0b43db40ef0b48bbaa412373ca84 WHIRLPOOL 93467f2f6adda228cf974a44e4dc31add10f56d35ca9ff9b23af5bb02a13c4ba80721aa302d926ac9e45a69a9552244c8d7bd12e4441239f7376e6fe9e05a1c6
diff --git a/net-print/brother-dcp9055cdn-bin/brother-dcp9055cdn-bin-1.1.1.ebuild b/net-print/brother-dcp9055cdn-bin/brother-dcp9055cdn-bin-1.1.1.ebuild
new file mode 100644
index 0000000..68e9e7e
--- /dev/null
+++ b/net-print/brother-dcp9055cdn-bin/brother-dcp9055cdn-bin-1.1.1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+inherit eutils rpm linux-info
+
+DESCRIPTION="Brother printer driver for DCP-9055CDN"
+
+HOMEPAGE="http://support.brother.com"
+
+SRC_URI="http://www.brother.com/pub/bsc/linux/dlf/dcp9055cdnlpr-1.1.1-5.i386.rpm
+ http://www.brother.com/pub/bsc/linux/dlf/dcp9055cdncupswrapper-1.1.1-5.i386.rpm"
+
+LICENSE="brother-eula GPL-2"
+
+SLOT="0"
+
+KEYWORDS="amd64 x86"
+
+RESTRICT="mirror strip"
+
+DEPEND="net-print/cups"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}
+
+pkg_setup() {
+ CONFIG_CHECK=""
+ if use amd64; then
+ CONFIG_CHECK="${CONFIG_CHECK} ~IA32_EMULATION"
+ fi
+
+ linux-info_pkg_setup
+}
+
+src_unpack() {
+ rpm_unpack ${A}
+}
+
+src_prepare() {
+ # adapted from the archlinux package
+ # https://aur.archlinux.org/packages/brother-brgenml1/
+ #epatch "${FILESDIR}/brother_lpdwrapper_BrGenML1.patch"
+ return
+}
+
+
+src_install() {
+ mkdir -p ${D}/usr/local/Brother/Printer/dcp9055cdn/cupswrapper || die
+ cp -r usr "${D}" || die
+
+ chmod 755 ${D}/usr/local/Brother/Printer/dcp9055cdn/lpd || die
+ chmod 755 ${D}/usr/local/Brother/Printer/dcp9055cdn/inf || die
+ chmod 755 ${D}/usr/local/Brother/Printer/dcp9055cdn/ || die
+ chmod 755 ${D}/usr/local/Brother/Printer/ || die
+ chmod 755 ${D}/usr/local/Brother || die
+
+ ${D}/usr/local/Brother/Printer/dcp9055cdn/cupswrapper/cupswrapperdcp9055cdn || die
+ chmod 755 ${D}/usr/local/Brother/Printer/dcp9055cdn/cupswrapper || die
+
+ mkdir -p ${D}/var/spool/lpd || die
+ mkdir -p ${D}/usr/lib64/cups/filter || die
+ ( ln -s ${D}/usr/lib64/cups/filter/brlpdwrapperdcp9055cdn ${D}/usr/libexec/cups/filter/brlpdwrapperdcp9055cdn ) || die
+}
+
+pkg_postinst() {
+ einfo "Brother DCP-9055CDN printer installed"
+}
+
diff --git a/net-print/brother-genml1-bin/Manifest b/net-print/brother-genml1-bin/Manifest
new file mode 100644
index 0000000..4972ce5
--- /dev/null
+++ b/net-print/brother-genml1-bin/Manifest
@@ -0,0 +1,4 @@
+AUX brother_lpdwrapper_BrGenML1.patch 1261 SHA256 38da0785549b1fe8a75024d9b8547d9870b3eff6af4ca8197efc52ed272d8d05 SHA512 7b9b3f212a4a92d88dabd87dbaba5a7b4bf65f0d5789c057a342796a1e5f67110fe6bab1b4ebdeef5292bf1d1bbd46e5b2c5114a5cf49376961a738a915ba518 WHIRLPOOL b671ccf0f38db3178641be5b1ab92feeb03bd73a24e62f743a2073efbf4df3f93a09bbbe5f4987a6b7a7deacd88565805460273ccecedd2725552e89cd247ce2
+DIST brgenml1cupswrapper-3.1.0-1.i386.rpm 17925 SHA256 397cb2d91e0748f4c0498d831647efbc62af9e02f576ad52dc520bcac876f795 SHA512 9e3b743f1ba9369bc937037996650ed07ab49795ce5098ade259c8bdfa46f24a3141e63682c28459b7ab0fe43a154448516a931c9175a3bc6e2fd425c1381c84 WHIRLPOOL 96be5567ca8c959f8b001acfb9e3a5581a9bbab31fb6f6fd950bc15e77e7ffd20440083b72f5eefeba68b86cb42be7f92e896c77477155ec3db75d8359ba708f
+DIST brgenml1lpr-3.1.0-1.i386.rpm 38800 SHA256 18823eb345e4e4391d7a6a3a1d442a96b2224e12a0600542f0d3d700cf158706 SHA512 b672b7f91aa7701c070d7ae19ebfd18d82d2ed69156114abfc7aa82fe61dfabb8d2e8fd425325c8f34e93b9fa9c6b5d32493172337058edf4fb4ec7d0c3cf05f WHIRLPOOL c1203e82f242386b3b870dbf63d938ac3e3cf63cc418eb0a4943210aa4ed3f92a7c662af0aad33f934d95f14402df32c0f52b7fc95476d116e55a925621c1303
+EBUILD brother-genml1-bin-3.1.0-r1.ebuild 2195 SHA256 e4d6c1c8d107fc4e43ead87ea3553979f9c146ec79690542431c20d008ba0764 SHA512 485745407ff9501c0b7670e8d1a2a7f5afa735502a30aa940395f9d4daa6f6d5399fda23b91c4d02ba4f46b306f8ad31db65bb7f0473f8e58bf3e7819c505d0a WHIRLPOOL af152cae999a4dc4f99240ab75dbeffc320163806a03d229a2fed9ee8330a6bc2f61b7231355496e1812a0a78dde35c7a5da89044d273e7bdc02fb1b6b62a5a4
diff --git a/net-print/brother-genml1-bin/brother-genml1-bin-3.1.0-r1.ebuild b/net-print/brother-genml1-bin/brother-genml1-bin-3.1.0-r1.ebuild
new file mode 100644
index 0000000..628cd97
--- /dev/null
+++ b/net-print/brother-genml1-bin/brother-genml1-bin-3.1.0-r1.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+inherit eutils rpm linux-info multilib
+
+DESCRIPTION="Generic Brother printer driver for DCP-7060D, DCP-7065DN, DCP-8080DN, DCP-L2520DW, DCP-L2540DW, HL-2230, HL-2240, HL-2240D, HL-2270DW, HL-2280DW, HL-5370DW/HL-5370DWT, HL-5440D, HL-5450DN, HL-5470DW, HL-6180DW, HL-L2320D, HL-L2360DW, HL-L2380DW, MFC-7360N, MFC-7460DN, MFC-7860DW, MFC-8480DN, MFC-8510DN, MFC-8710DW, MFC-8890DW, MFC-8910DW, MFC-8950DW, MFC-L2700DW, MFC-L2720DW, MFC-L2740DW"
+
+HOMEPAGE="http://support.brother.com"
+
+SRC_URI="http://download.brother.com/welcome/dlf101124/brgenml1lpr-3.1.0-1.i386.rpm
+ http://download.brother.com/welcome/dlf101126/brgenml1cupswrapper-3.1.0-1.i386.rpm"
+
+LICENSE="brother-eula GPL-2"
+
+SLOT="0"
+
+KEYWORDS="amd64 x86"
+
+IUSE="avahi"
+
+RESTRICT="mirror strip"
+
+DEPEND="net-print/cups
+ avahi? ( net-dns/avahi
+ sys-auth/nss-mdns )"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}
+
+pkg_setup() {
+ CONFIG_CHECK=""
+ if use amd64; then
+ CONFIG_CHECK="${CONFIG_CHECK} ~IA32_EMULATION"
+ if ! has_multilib_profile; then
+ die "This package CANNOT be installed on pure 64-bit system. You need multilib enabled."
+ fi
+ fi
+
+ linux-info_pkg_setup
+}
+
+src_unpack() {
+ rpm_unpack ${A}
+}
+
+src_prepare() {
+ # adapted from the archlinux package
+ # https://aur.archlinux.org/packages/brother-brgenml1/
+ epatch "${FILESDIR}/brother_lpdwrapper_BrGenML1.patch"
+}
+
+
+src_install() {
+ cp -r var "${D}" || die
+ cp -r opt "${D}" || die
+ cp -r etc "${D}" || die
+
+
+ mkdir -p ${D}/usr/libexec/cups/filter || die
+ ( cd ${D}/usr/libexec/cups/filter/ && ln -s ../../../../opt/brother/Printers/BrGenML1/cupswrapper/brother_lpdwrapper_BrGenML1 ) || die
+
+ mkdir -p ${D}/usr/share/cups/model || die
+ ( cd ${D}/usr/share/cups/model && ln -s ../../../../opt/brother/Printers/BrGenML1/cupswrapper/brother-BrGenML1-cups-en.ppd ) || die
+}
+
+pkg_postinst() {
+ einfo "If you don't use avahi with nss-mdns you have to use a static IP addresss in your printer confiugration"
+ einfo "If you want to use a broadcasted name add .local to it"
+ einfo "You can test if it's working with ping printername.local"
+}
+
diff --git a/net-print/brother-genml1-bin/files/brother_lpdwrapper_BrGenML1.patch b/net-print/brother-genml1-bin/files/brother_lpdwrapper_BrGenML1.patch
new file mode 100644
index 0000000..de6f447
--- /dev/null
+++ b/net-print/brother-genml1-bin/files/brother_lpdwrapper_BrGenML1.patch
@@ -0,0 +1,44 @@
+--- /home/tmp/portage/net-print/brother-mfc7460dn-bin-3.1.0-r1/work/opt/brother/Printers/BrGenML1/cupswrapper/brother_lpdwrapper_BrGenML1 2014-05-14 00:36:11.000000000 -0400
++++ /opt/brother/Printers/BrGenML1/cupswrapper/brother_lpdwrapper_BrGenML1 2014-10-07 19:35:40.899637092 -0400
+@@ -50,8 +50,9 @@
+ }
+ chomp($basedir);
+
+-$basedir =~ s/$PRINTER\/cupswrapper\/.*$/$PRINTER\//g;
+-
++#$basedir =~ s/$PRINTER\/cupswrapper\/.*$/$PRINTER\//g;
++my $PRINTER = "BrGenML1";
++my $basedir = "/opt/brother/Printers/$PRINTER";
+
+ %units = ( pt => \&pt2dot,
+ mm => \&mm2dot,
+@@ -77,16 +78,16 @@
+
+ my $cmdoptions=$ARGV[4];
+ my $PPD = $ENV{PPD};
+-my $PRINTER=$basedir;
++#my $PRINTER=$basedir;
+ my $CUPSINPUT='';
+ if ( @ARGV >= 6 ){
+ $CUPSINPUT=$ARGV[7];
+ }
+
+
+-$PRINTER =~ s/^\/opt\/.*\/Printers\///g;
+-$PRINTER =~ s/\/cupswrapper//g;
+-$PRINTER =~ s/\///g;
++#$PRINTER =~ s/^\/opt\/.*\/Printers\///g;
++#$PRINTER =~ s/\/cupswrapper//g;
++#$PRINTER =~ s/\///g;
+
+ for (my $i = 0 ; $i < @ARGV ; $i ++){
+ logprint( 0 , "ARG$i = $ARGV[$i]\n");
+@@ -733,7 +734,7 @@
+ my $lpddir = $basedir;
+ my %lpr_options = %$lpr_options_ref;
+
+- $lpddir = $basedir."/lpd/";
++ $lpddir = $basedir."/lpd";
+ my $lpdconf = $lpddir.'/'.$LPDCONFIGEXE;
+
+
diff --git a/net-print/brother-hl4570cdw-bin/Manifest b/net-print/brother-hl4570cdw-bin/Manifest
new file mode 100644
index 0000000..69c80a9
--- /dev/null
+++ b/net-print/brother-hl4570cdw-bin/Manifest
@@ -0,0 +1,3 @@
+DIST hl4570cdwcupswrapper-1.1.1-5.i386.rpm 14494 SHA256 51c08d974ec3aa14e6d07437f9ef720214dc6fbe591e5da44d61a9de34ed5772 SHA512 dc9447cce7b70899fa77d4d6ba5f5a41d4709ed60d408efe98e6cb03a6740278b556ae065c66b4aee3f644bbd0cbc563ca7fa953c1559d3573872314ccbb6a08 WHIRLPOOL 9c593bebd9b55b3c9a1a42582ba8c7fd6350c3291ef6a4657f4dd0362155ffcb2aa145b490b0a87f1cd31f15fb1e62cb7f9caa50ccda5c5eb76763384c9b6132
+DIST hl4570cdwlpr-1.1.1-5.i386.rpm 760607 SHA256 1075cee23fddda5d7de69cc251c022e3a8bdfd36aac689f126d14e8639bfd794 SHA512 7a46a6ce98d1f053ff72c5aa689a557ffa966672557c04132a078637b1a6486581794d1828a0fc8e8d9c37e97a541649d7a97e4424ff35e1c6da3c01c998578e WHIRLPOOL 139684edd94af584e3fd419c8c9d4908c52890320ecc6be9c640cec061a2a3c3e0910080fd2e9b9da5fcdbd15b9f697e6b1cc3480aa173c12b254da19e6e15b8
+EBUILD brother-hl4570cdw-bin-1.1.1.ebuild 1074 SHA256 28d160c6724a48e5c4db4821a800b6d90f73251c83f152f7cb8ff0ea5e3c8f7a SHA512 027a64989b982abc3519ee20427757c4b63c1629c745eb44e0f8f68e5a73dcbec5bf659eff86da4dc89de50660082f462c5df347e9d1a6ac0c64b90d570cd758 WHIRLPOOL f2c15b20c4dfedf6c369974d15ec5c92315abc5afb859710db6192b2bdf43b88b33a2aa6cb2d5a3259f51ca12d1a4990c72503826640a8fac1029b490050e4e1
diff --git a/net-print/brother-hl4570cdw-bin/brother-hl4570cdw-bin-1.1.1.ebuild b/net-print/brother-hl4570cdw-bin/brother-hl4570cdw-bin-1.1.1.ebuild
new file mode 100644
index 0000000..fe2b79b
--- /dev/null
+++ b/net-print/brother-hl4570cdw-bin/brother-hl4570cdw-bin-1.1.1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+inherit rpm
+
+DESCRIPTION="Brother printer driver for HL-4570CDW"
+
+HOMEPAGE="http://support.brother.com"
+
+SRC_URI="http://download.brother.com/welcome/dlf005943/hl4570cdwlpr-1.1.1-5.i386.rpm
+ http://download.brother.com/welcome/dlf005945/hl4570cdwcupswrapper-1.1.1-5.i386.rpm"
+
+LICENSE="brother-eula"
+
+SLOT="0"
+
+KEYWORDS="amd64"
+
+IUSE=""
+
+RESTRICT="mirror strip"
+
+DEPEND="net-print/cups"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}
+
+src_unpack() {
+ rpm_unpack ${A}
+}
+
+src_install() {
+ has_multilib_profile && ABI=x86
+
+ dosbin "${WORKDIR}/usr/bin/brprintconf_hl4570cdw"
+
+ cp -r usr "${D}" || die
+
+ mkdir -p ${D}/usr/libexec/cups/filter || die
+ ( cd ${D}/usr/libexec/cups/filter/ && ln -s ../../../../usr/local/Brother/Printer/hl4570cdw/lpd/filterhl4570cdw brlpdwrapperhl4570cdw ) || die
+
+ mkdir -p ${D}/usr/share/cups/model || die
+ ( cd ${D}/usr/share/cups/model && ln -s ../../../../usr/local/Brother/Printer/hl4570cdw/cupswrapper/hl4570cdw.ppd ) || die
+}
diff --git a/net-print/brother-mfc7460dn-bin/Manifest b/net-print/brother-mfc7460dn-bin/Manifest
new file mode 100644
index 0000000..ee2ebd9
--- /dev/null
+++ b/net-print/brother-mfc7460dn-bin/Manifest
@@ -0,0 +1,4 @@
+AUX brother_lpdwrapper_BrGenML1.patch 1261 SHA256 38da0785549b1fe8a75024d9b8547d9870b3eff6af4ca8197efc52ed272d8d05 SHA512 7b9b3f212a4a92d88dabd87dbaba5a7b4bf65f0d5789c057a342796a1e5f67110fe6bab1b4ebdeef5292bf1d1bbd46e5b2c5114a5cf49376961a738a915ba518 WHIRLPOOL b671ccf0f38db3178641be5b1ab92feeb03bd73a24e62f743a2073efbf4df3f93a09bbbe5f4987a6b7a7deacd88565805460273ccecedd2725552e89cd247ce2
+DIST brgenml1cupswrapper-3.1.0-1.i386.rpm 17925 SHA256 397cb2d91e0748f4c0498d831647efbc62af9e02f576ad52dc520bcac876f795 SHA512 9e3b743f1ba9369bc937037996650ed07ab49795ce5098ade259c8bdfa46f24a3141e63682c28459b7ab0fe43a154448516a931c9175a3bc6e2fd425c1381c84 WHIRLPOOL 96be5567ca8c959f8b001acfb9e3a5581a9bbab31fb6f6fd950bc15e77e7ffd20440083b72f5eefeba68b86cb42be7f92e896c77477155ec3db75d8359ba708f
+DIST brgenml1lpr-3.1.0-1.i386.rpm 38800 SHA256 18823eb345e4e4391d7a6a3a1d442a96b2224e12a0600542f0d3d700cf158706 SHA512 b672b7f91aa7701c070d7ae19ebfd18d82d2ed69156114abfc7aa82fe61dfabb8d2e8fd425325c8f34e93b9fa9c6b5d32493172337058edf4fb4ec7d0c3cf05f WHIRLPOOL c1203e82f242386b3b870dbf63d938ac3e3cf63cc418eb0a4943210aa4ed3f92a7c662af0aad33f934d95f14402df32c0f52b7fc95476d116e55a925621c1303
+EBUILD brother-mfc7460dn-bin-3.1.0-r1.ebuild 1702 SHA256 ea03c67f1e4bc2d22e99a0f1c476a956bd9b02249bcd325a0cfbef3f5759d404 SHA512 52eb128b3738fdf657c7a54ff3b3e84dd1e299d14b9897f49d88a976744282930880589630d22f4de677b4a752d0431286add5dfb47406bdf264698c8d1557d2 WHIRLPOOL 8bb2c3234c513e07c1c9b855a2cb6ad498745f8f8cce11a4fb373cbd9111b976c26295c16d222a01144dc996d341696db13d3eebd67066e5c48cb4537207b64f
diff --git a/net-print/brother-mfc7460dn-bin/brother-mfc7460dn-bin-3.1.0-r1.ebuild b/net-print/brother-mfc7460dn-bin/brother-mfc7460dn-bin-3.1.0-r1.ebuild
new file mode 100644
index 0000000..5dd51f9
--- /dev/null
+++ b/net-print/brother-mfc7460dn-bin/brother-mfc7460dn-bin-3.1.0-r1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+inherit eutils rpm linux-info
+
+DESCRIPTION="Brother printer driver for MFC-7460DN"
+
+HOMEPAGE="http://support.brother.com"
+
+SRC_URI="http://download.brother.com/welcome/dlf101124/brgenml1lpr-3.1.0-1.i386.rpm
+ http://download.brother.com/welcome/dlf101126/brgenml1cupswrapper-3.1.0-1.i386.rpm"
+
+LICENSE="brother-eula GPL-2"
+
+SLOT="0"
+
+KEYWORDS="amd64 x86"
+
+IUSE="avahi"
+
+RESTRICT="mirror strip"
+
+DEPEND="net-print/cups
+ avahi? ( net-dns/avahi
+ sys-auth/nss-mdns )"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}
+
+pkg_setup() {
+ CONFIG_CHECK=""
+ if use amd64; then
+ CONFIG_CHECK="${CONFIG_CHECK} ~IA32_EMULATION"
+ fi
+
+ linux-info_pkg_setup
+}
+
+src_unpack() {
+ rpm_unpack ${A}
+}
+
+src_prepare() {
+ # adapted from the archlinux package
+ # https://aur.archlinux.org/packages/brother-brgenml1/
+ epatch "${FILESDIR}/brother_lpdwrapper_BrGenML1.patch"
+}
+
+
+src_install() {
+ cp -r var "${D}" || die
+ cp -r opt "${D}" || die
+ cp -r etc "${D}" || die
+
+
+ mkdir -p ${D}/usr/libexec/cups/filter || die
+ ( cd ${D}/usr/libexec/cups/filter/ && ln -s ../../../../opt/brother/Printers/BrGenML1/cupswrapper/brother_lpdwrapper_BrGenML1 ) || die
+
+ mkdir -p ${D}/usr/share/cups/model || die
+ ( cd ${D}/usr/share/cups/model && ln -s ../../../../opt/brother/Printers/BrGenML1/cupswrapper/brother-BrGenML1-cups-en.ppd ) || die
+}
+
+pkg_postinst() {
+ einfo "If you don't use avahi with nss-mdns you have to use a static IP addresss in your printer confiugration"
+ einfo "If you want to use a broadcasted name add .local to it"
+ einfo "You can test if it's working with ping printername.local"
+}
+
diff --git a/net-print/brother-mfc7460dn-bin/files/brother_lpdwrapper_BrGenML1.patch b/net-print/brother-mfc7460dn-bin/files/brother_lpdwrapper_BrGenML1.patch
new file mode 100644
index 0000000..de6f447
--- /dev/null
+++ b/net-print/brother-mfc7460dn-bin/files/brother_lpdwrapper_BrGenML1.patch
@@ -0,0 +1,44 @@
+--- /home/tmp/portage/net-print/brother-mfc7460dn-bin-3.1.0-r1/work/opt/brother/Printers/BrGenML1/cupswrapper/brother_lpdwrapper_BrGenML1 2014-05-14 00:36:11.000000000 -0400
++++ /opt/brother/Printers/BrGenML1/cupswrapper/brother_lpdwrapper_BrGenML1 2014-10-07 19:35:40.899637092 -0400
+@@ -50,8 +50,9 @@
+ }
+ chomp($basedir);
+
+-$basedir =~ s/$PRINTER\/cupswrapper\/.*$/$PRINTER\//g;
+-
++#$basedir =~ s/$PRINTER\/cupswrapper\/.*$/$PRINTER\//g;
++my $PRINTER = "BrGenML1";
++my $basedir = "/opt/brother/Printers/$PRINTER";
+
+ %units = ( pt => \&pt2dot,
+ mm => \&mm2dot,
+@@ -77,16 +78,16 @@
+
+ my $cmdoptions=$ARGV[4];
+ my $PPD = $ENV{PPD};
+-my $PRINTER=$basedir;
++#my $PRINTER=$basedir;
+ my $CUPSINPUT='';
+ if ( @ARGV >= 6 ){
+ $CUPSINPUT=$ARGV[7];
+ }
+
+
+-$PRINTER =~ s/^\/opt\/.*\/Printers\///g;
+-$PRINTER =~ s/\/cupswrapper//g;
+-$PRINTER =~ s/\///g;
++#$PRINTER =~ s/^\/opt\/.*\/Printers\///g;
++#$PRINTER =~ s/\/cupswrapper//g;
++#$PRINTER =~ s/\///g;
+
+ for (my $i = 0 ; $i < @ARGV ; $i ++){
+ logprint( 0 , "ARG$i = $ARGV[$i]\n");
+@@ -733,7 +734,7 @@
+ my $lpddir = $basedir;
+ my %lpr_options = %$lpr_options_ref;
+
+- $lpddir = $basedir."/lpd/";
++ $lpddir = $basedir."/lpd";
+ my $lpdconf = $lpddir.'/'.$LPDCONFIGEXE;
+
+
diff --git a/net-print/brother-mfc9320cw-bin/Manifest b/net-print/brother-mfc9320cw-bin/Manifest
new file mode 100644
index 0000000..43b45cf
--- /dev/null
+++ b/net-print/brother-mfc9320cw-bin/Manifest
@@ -0,0 +1,3 @@
+DIST mfc9320cwcupswrapper-1.1.2-2.i386.rpm 14710 SHA256 bce8e1c2a636c76b34e468cfac372f9f1189515796f4032a1aeace5c397da360 SHA512 5c581358811179745b06c69b7f8815fe92c519f90170c7b53862271745840868892db752c1b5a0fc3e6415bc277355e31d1eda54cc76f1c75cbb01d8cfe8f4d9 WHIRLPOOL a788703e7775e61f3a7fa252d8b8577ef830330ef3f70935c476710810982179640655ce1bd6cd0cc28e231efe7f7c1c56e954f54535e7e3d3f39f29c1741fac
+DIST mfc9320cwlpr-1.1.2-1.i386.rpm 611479 SHA256 3f1f2aa3e0f49d7e4d4939f5c1fcb2807c43e0d3f8c5aea90de29ab812e34415 SHA512 3efabbf0a1a4e38b779f826329e531b5a509fe888e2d85fc1552654bd17776ecab449ede60342d7b4b5a7054e4500ee537df792a82f0bd5a9794a4b3908e5a51 WHIRLPOOL bb731903a3ef0ecdf09a7fb2d4b2cf9cfa05c2aebce630e0822c2c00676efa4b83e98cd2c9f3a4705fa7f1426a4d1fd5f6bcd1ef09bc2bb042f87b62c056854a
+EBUILD brother-mfc9320cw-bin-1.1.2.ebuild 1109 SHA256 112319a71f03ad7835168e3e77d8b9b68a945992b83c9b401ce7a986baf579f5 SHA512 1040e0a76139ac61205503e95e1f65d9124e4e9fcd834b272fff708eff055154f57e9da499cec71d2fffc2385d2b99843178034ebe089956433ec05ec370c64d WHIRLPOOL f76f0c21f605c9d1d7126dfcdceaafd4a812a99de7479946a574a1356a3092dd0e6acb2124bbccdea46383d93fed2c0449d7d65bfa9f932a9272efcd9bd3acfc
diff --git a/net-print/brother-mfc9320cw-bin/brother-mfc9320cw-bin-1.1.2.ebuild b/net-print/brother-mfc9320cw-bin/brother-mfc9320cw-bin-1.1.2.ebuild
new file mode 100644
index 0000000..7071c2b
--- /dev/null
+++ b/net-print/brother-mfc9320cw-bin/brother-mfc9320cw-bin-1.1.2.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+inherit rpm
+
+DESCRIPTION="Brother printer driver for MFC-9320CW"
+
+HOMEPAGE="http://support.brother.com"
+
+SRC_URI="http://download.brother.com/welcome/dlf006460/mfc9320cwlpr-1.1.2-1.i386.rpm
+ http://download.brother.com/welcome/dlf006462/mfc9320cwcupswrapper-1.1.2-2.i386.rpm"
+
+LICENSE="brother-eula"
+
+SLOT="0"
+
+KEYWORDS="amd64"
+
+IUSE=""
+
+RESTRICT="mirror strip"
+
+DEPEND="net-print/cups"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}
+
+src_unpack() {
+ rpm_unpack ${A}
+}
+
+src_install() {
+ has_multilib_profile && ABI=x86
+
+ dosbin "${WORKDIR}/usr/bin/brprintconf_mfc9320cw"
+
+ cp -r usr "${D}" || die
+ cp -r opt "${D}" || die
+
+
+ mkdir -p ${D}/usr/libexec/cups/filter || die
+ ( cd ${D}/usr/libexec/cups/filter/ && ln -s ../../../../opt/brother/Printers/mfc9320cw/lpd/filtermfc9320cw brlpdwrappermfc9320cw ) || die
+
+ mkdir -p ${D}/usr/share/cups/model || die
+ ( cd ${D}/usr/share/cups/model && ln -s ../../../../opt/brother/Printers/mfc9320cw/cupswrapper/brother_mfc9320cw_printer_en.ppd ) || die
+}
diff --git a/net-print/brother-mfc9340cdw-bin/Manifest b/net-print/brother-mfc9340cdw-bin/Manifest
new file mode 100644
index 0000000..6dbb443
--- /dev/null
+++ b/net-print/brother-mfc9340cdw-bin/Manifest
@@ -0,0 +1,3 @@
+DIST mfc9340cdwcupswrapper-1.1.2-1.i386.rpm 16331 SHA256 b3c3362ee5776d737672ef719e7c59fde3cc832bb03e2f30dbef4327c7ebfcf8 SHA512 7cc316aece5fb87d38bba6474a4ed771eb0c394dfbc43077075468da91b40028b17007602afa8ba6aacdb822e9fe2631c36991b34cfe50bd997ed5107f8636a9 WHIRLPOOL d86849fc9dd68e87252af0d8392db7caa1cacd5dca358a0ca3245d5c7caef2768c9b83d3f3e319891ce1f9e931f23146a018f5b4342ce1a066824cd6a8fa9230
+DIST mfc9340cdwlpr-1.1.2-1.i386.rpm 699277 SHA256 f0ef7debe2ce49624c9fed63f5338267195430577afe1e97bdfb14bb35a325b1 SHA512 8d820308679e6ef9dec5b08d943e9d70abf3371efe9268f934f40e618c38d73da5d1b3ca88120d47abe357746e981282b7ae67ff46eeb523f91fe34e15e330c5 WHIRLPOOL bee50925f95a120e80f0477f2da447ea9c55358488d7c57dc3d89fa79b0bba01bfac79ffac55ffd3c0fcf66b23ce584a25ffe61a466188b90b8bc72a3111cbf4
+EBUILD brother-mfc9340cdw-bin-1.1.2.ebuild 1114 SHA256 048a0b598f6a04fc8a30b637b8fa02bd9ff3eb405a6745b47461a05bc3291568 SHA512 aea352118005c4b8cd233b0a1a5e482f6a0df6f4611e829624bc49fa65e679fb89d2ea90e963408b7d408a9f8a4007e6179eaa0f9791a439962b9d50cd85bd2d WHIRLPOOL bb51bac681453ffb412bf7a502d2fe39f1e8f9fd10202da4bb2946a05f1b7b4795270d17acddabd837c59347dcc7934e9b0ada2963780115717c38c4877b7ae8
diff --git a/net-print/brother-mfc9340cdw-bin/brother-mfc9340cdw-bin-1.1.2.ebuild b/net-print/brother-mfc9340cdw-bin/brother-mfc9340cdw-bin-1.1.2.ebuild
new file mode 100644
index 0000000..04a88ae
--- /dev/null
+++ b/net-print/brother-mfc9340cdw-bin/brother-mfc9340cdw-bin-1.1.2.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+inherit rpm
+
+DESCRIPTION="Brother printer driver for MFC-9340CDW"
+
+HOMEPAGE="http://support.brother.com"
+
+SRC_URI="http://download.brother.com/welcome/dlf007026/mfc9340cdwlpr-1.1.2-1.i386.rpm
+http://download.brother.com/welcome/dlf007028/mfc9340cdwcupswrapper-1.1.2-1.i386.rpm"
+
+LICENSE="brother-eula"
+
+SLOT="0"
+
+KEYWORDS="amd64"
+
+IUSE=""
+
+RESTRICT="mirror strip"
+
+DEPEND="net-print/cups"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}
+
+src_unpack() {
+rpm_unpack ${A}
+}
+
+src_install() {
+has_multilib_profile && ABI=x86
+
+dosbin "${WORKDIR}/usr/bin/brprintconf_mfc9340cdw"
+
+cp -r usr "${D}" || die
+cp -r opt "${D}" || die
+
+
+mkdir -p ${D}/usr/libexec/cups/filter || die
+( cd ${D}/usr/libexec/cups/filter/ && ln -s ../../../../opt/brother/Printers/mfc9340cdw/lpd/filtermfc9340cdw brother_lpdwrapper_mfc9340cdw ) || die
+
+mkdir -p ${D}/usr/share/cups/model || die
+( cd ${D}/usr/share/cups/model && ln -s ../../../../opt/brother/Printers/mfc9340cdw/cupswrapper/brother_mfc9340cdw_printer_en.ppd ) || die
+}
\ No newline at end of file
diff --git a/sys-auth/google-authenticator/ChangeLog b/sys-auth/google-authenticator/ChangeLog
new file mode 100644
index 0000000..56e77ad
--- /dev/null
+++ b/sys-auth/google-authenticator/ChangeLog
@@ -0,0 +1,15 @@
+# ChangeLog for sys-auth/google-authenticator
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+ 28 Jul 2012; Manuel Rüger (mrueg) gentoo@rueg.eu
+ google-authenticator-1.0.ebuild:
+ Use pam.eclass, link to wiki article. Thanks to floppym
+
+*google-authenticator-1.0 (09 Jul 2012)
+
+ 09 Jul 2012; Manuel Rüger (mrueg) gentoo@rueg.eu
+ +google-authenticator-1.0.ebuild,
+ +files/google-authenticator-1.0-Makefile.patch, +metadata.xml:
+ New Ebuild for bug #419177, thanks to hasufell, floppym.
+
diff --git a/sys-auth/google-authenticator/Manifest b/sys-auth/google-authenticator/Manifest
new file mode 100644
index 0000000..c10fe09
--- /dev/null
+++ b/sys-auth/google-authenticator/Manifest
@@ -0,0 +1,5 @@
+AUX google-authenticator-1.0-Makefile.patch 2371 SHA256 d560e4099ce24535637a0841247db49837f2f91b26b47f36dd82d277e5e5a43a SHA512 761986713c7b4ebd25fd12d1ea926ff281f064a9f33ac904dd0ef055b588b67945d1cc03a90ecac185f4879c24615c77cd36a9137a2bbdc16d75f4cf63bca2ec WHIRLPOOL 1f5ca70527c8e4e69997ea20e1bcd92f99baeebd4e2f5f512bc956c4a4b6a822088340da8c46f65b52084358496291b07412f8c6fdbbdc1240439633f15aa278
+DIST libpam-google-authenticator-1.0-source.tar.bz2 32708 SHA256 80426045d13ce7a2bf56c692ccfb1751cef3c7484752ad40738facf729264d4b SHA512 92ec473b07e2e46f969cd0a1a6f5707892800418442ad7d046ebc1195bbd1654e396f53245056c7eee38decaeb1997102f9aa988b7da1d734dcd2b104402ef8c WHIRLPOOL fff94006035d0751ff690f81d827a33c5d304f86a48809fa889138bb29ae1f9c47315fb0c3548d29dae545cac63db9f35a9bb6e439f49cd4a6571241a43e4c6a
+EBUILD google-authenticator-1.0.ebuild 1129 SHA256 559108328e3342653ff7cb2230f0f74a25dc72476a8ed0a57c45538786cc8d6b SHA512 44342a92631be5bd67441dbfde7e91cbf567c11c76bb239b9c9e44396fa5205d7e557f4ea79ac653e9dfb332adcdf49ec26fab5556e58daa703efa7704642e23 WHIRLPOOL e098285011ec5e151d699137670ea2b7b2eb2557e049918a7f3d8bff5304d2c45bb3ef9bce2a0ab37d8b8d7be80b1713abc21eeb0c80a30cf956fa1b7a0952f9
+MISC ChangeLog 530 SHA256 7c159b5fb845cbf4214f995378607c6e33bde4bb8032aeb44913402895d124c8 SHA512 f0c8c14cf8ed5c9231d6698c12d888bdb3f2ed4c71d90b885d9624385e9374bf02888164fd2984581bbd6d163fdfcd04d1f07f5fdbca10c500dcf5da621638a1 WHIRLPOOL 5a160b4f49526e1d862b224f32c820f65d4758d6b0b1df707b6293dfe13c336259d73342b4f2c85cea7db003e0f80b17335264a8bcb055e4989e065f21e917bf
+MISC metadata.xml 214 SHA256 c1f09dc7d5313cd2da7b82259c7846ed23144d62b15e59680ada90e2b6b4d154 SHA512 aeb2fb354a9ddf41c45a071091a58b91eaf8b25d6d2c49e3e3daa547b591a54530144de4533573160b48dc356289c909612c4e3c80e387f081f88cb39263e130 WHIRLPOOL 54d8861daedd18ca38e4ada0fb71026c612b63946d47a9b34de90d1d6d85c8ce05c0a4b97730f554ea637d73ccce8ed207d33e707c2b8c1dd28af24cf44dd186
diff --git a/sys-auth/google-authenticator/files/google-authenticator-1.0-Makefile.patch b/sys-auth/google-authenticator/files/google-authenticator-1.0-Makefile.patch
new file mode 100644
index 0000000..b44e568
--- /dev/null
+++ b/sys-auth/google-authenticator/files/google-authenticator-1.0-Makefile.patch
@@ -0,0 +1,58 @@
+Sa 7. Jul 19:54:31 CEST 2012
+Manuel Rueger (gentoo@rueg.eu)
+Make CC overwritable
+Drop -g and -O2
+
+--- Makefile.old 2012-06-02 08:10:18.115493988 +0200
++++ Makefile 2012-07-07 18:51:19.923536018 +0200
+@@ -18,9 +18,7 @@
+
+ .SUFFIXES: .so
+
+-ifeq ($(origin CC), default)
+- CC := gcc
+-endif
++CC ?= gcc
+
+ DEF_CFLAGS := $(shell [ `uname` = SunOS ] && \
+ echo ' -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT') \
+@@ -70,14 +68,14 @@
+ libpam-google-authenticator-*-source.tar.bz2
+
+ google-authenticator: google-authenticator.o base32.o hmac.o sha1.o
+- $(CC) -g $(DEF_LDFLAGS) -o $@ $+ $(LDL_LDFLAGS)
++ $(CC) $(DEF_LDFLAGS) -o $@ $+ $(LDL_LDFLAGS)
+
+ demo: demo.o pam_google_authenticator_demo.o base32.o hmac.o sha1.o
+- $(CC) -g $(DEF_LDFLAGS) -rdynamic -o $@ $+ $(LDL_LDFLAGS)
++ $(CC) $(DEF_LDFLAGS) -rdynamic -o $@ $+ $(LDL_LDFLAGS)
+
+ pam_google_authenticator_unittest: pam_google_authenticator_unittest.o \
+ base32.o hmac.o sha1.o
+- $(CC) -g $(DEF_LDFLAGS) -rdynamic -o $@ $+ -lc $(LDL_LDFLAGS)
++ $(CC) $(DEF_LDFLAGS) -rdynamic -o $@ $+ -lc $(LDL_LDFLAGS)
+
+ pam_google_authenticator.so: base32.o hmac.o sha1.o
+ pam_google_authenticator_testing.so: base32.o hmac.o sha1.o
+@@ -85,10 +83,10 @@
+ pam_google_authenticator.o: pam_google_authenticator.c base32.h hmac.h sha1.h
+ pam_google_authenticator_demo.o: pam_google_authenticator.c base32.h hmac.h \
+ sha1.h
+- $(CC) -DDEMO --std=gnu99 -Wall -O2 -g -fPIC -c $(DEF_CFLAGS) -o $@ $<
++ $(CC) -DDEMO --std=gnu99 -Wall -fPIC -c $(DEF_CFLAGS) -o $@ $<
+ pam_google_authenticator_testing.o: pam_google_authenticator.c base32.h \
+ hmac.h sha1.h
+- $(CC) -DTESTING --std=gnu99 -Wall -O2 -g -fPIC -c $(DEF_CFLAGS) \
++ $(CC) -DTESTING --std=gnu99 -Wall -fPIC -c $(DEF_CFLAGS) \
+ -o $@ $<
+ pam_google_authenticator_unittest.o: pam_google_authenticator_unittest.c \
+ pam_google_authenticator_testing.so \
+@@ -100,6 +98,6 @@
+ sha1.o: sha1.c sha1.h
+
+ .c.o:
+- $(CC) --std=gnu99 -Wall -O2 -g -fPIC -c $(DEF_CFLAGS) -o $@ $<
++ $(CC) --std=gnu99 -Wall -fPIC -c $(DEF_CFLAGS) -o $@ $<
+ .o.so:
+- $(CC) -shared -g $(DEF_LDFLAGS) -o $@ $+ -lpam
++ $(CC) -shared $(DEF_LDFLAGS) -o $@ $+ -lpam
diff --git a/sys-auth/google-authenticator/google-authenticator-1.0.ebuild b/sys-auth/google-authenticator/google-authenticator-1.0.ebuild
new file mode 100644
index 0000000..ae86995
--- /dev/null
+++ b/sys-auth/google-authenticator/google-authenticator-1.0.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+
+inherit eutils toolchain-funcs pam
+
+DESCRIPTION="PAM Module for two step verification via mobile platform"
+HOMEPAGE="http://code.google.com/p/google-authenticator/"
+SRC_URI="http://${PN}.googlecode.com/files/libpam-${P}-source.tar.bz2"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="virtual/pam"
+
+RDEPEND="${DEPEND}"
+
+RESTRICT="test"
+# Test fails with:
+# pam_google_authenticator_unittest: pam_google_authenticator_unittest.c:317: main: Assertion `pam_sm_open_session(((void *)0), 0, targc, targv) == 0' failed.
+# No user name available when checking verification code
+
+S=${WORKDIR}/libpam-${P}
+
+src_prepare(){
+ epatch "${FILESDIR}"/${P}-Makefile.patch
+ tc-export CC
+}
+
+src_install(){
+ dopammod pam_google_authenticator.so
+ dobin google-authenticator
+ dodoc README
+ dohtml totp.html
+}
+
+pkg_postinst(){
+ elog "For further information see"
+ elog "http://wiki.gentoo.org/wiki/Google_Authenticator"
+ elog ""
+ elog "If you want support for QR-Codes, install media-gfx/qrencode."
+}
diff --git a/sys-auth/google-authenticator/metadata.xml b/sys-auth/google-authenticator/metadata.xml
new file mode 100644
index 0000000..cc3fe24
--- /dev/null
+++ b/sys-auth/google-authenticator/metadata.xml
@@ -0,0 +1,7 @@
+
+
+
+
+ maintainer-wanted@gentoo.org
+
+