sys-block/superdrive-enabler - 20230714 (tatsh-overlay)

Search

Install

Install this version:

emerge -a =sys-block/superdrive-enabler-20230714

If this version is masked, you can unmask it using the autounmask tool or standard emerge options:

autounmask =sys-block/superdrive-enabler-20230714

Or alternatively:

emerge --autounmask-write -a =sys-block/superdrive-enabler-20230714

Package Information

Description:
Hack for Apple's Superdrive to work with other systems than OS X.
Homepage:
https://github.com/onmomo/superdrive-enabler
License:
MIT

Ebuild Details

Version EAPI Keywords Slot
20230714 8 ~amd64 ~arm ~arm64 ~ppc64 ~x86 0
View Raw Ebuild
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8
inherit linux-info toolchain-funcs

DESCRIPTION="Hack for Apple's Superdrive to work with other systems than OS X."
HOMEPAGE="https://github.com/onmomo/superdrive-enabler"
SHA="3e6b355e08820e1d9a763f240ecf56e51bd5f8a9"
SRC_URI="https://github.com/onmomo/superdrive-enabler/archive/${SHA}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/${PN}-${SHA}"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
IUSE="+udev"

CONFIG_CHECK="~BLK_DEV_SR"

src_prepare() {
	sed -e '7s/\(.*\)/#include <unistd.h>/' -i src/superdriveEnabler.c
	default
}

src_compile() {
	emake CCMD="$(tc-getCC)" \
		OUTPUT_PATH="$(pwd -P)/" \
		CXXFLAGS="$CXXFLAGS" \
		LDFLAGS="$LDFLAGS"
}

src_install() {
	dobin "${PN}"
	einstalldocs
	if use udev; then
		insinto /lib/udev/rules.d
		doins "${FILESDIR}/90-superdrive.rules"
		udevadm control --reload-rules
	fi
}

pkg_postinst() {
	if ! use udev; then
		einfo
		einfo "To unlock a SuperDrive device manually, type:"
		einfo
		einfo "${PN} <DEVICE_PATH>"
		einfo
		einfo "(such as /dev/sr0)"
		einfo
	fi
}

USE Flags

Manage flags for this package: euse -i <flag> -p sys-block/superdrive-enabler | euse -E <flag> -p sys-block/superdrive-enabler | euse -D <flag> -p sys-block/superdrive-enabler

Global/Standard Flags

udev
Default: Enabled (+)

Inherited Eclasses

Manifest for 20230714

Type File Size Source URLs
DIST superdrive-enabler-20230714.tar.gz 7764 bytes https://github.com/onmomo/superdrive-enabler/archive/3e6b355e08820e1d9a763f240ecf56e51bd5f8a9.tar.gz