2008-08-20 11:18:18 +02:00
|
|
|
# Copyright 1999-2008 Gentoo Foundation
|
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
# $Header: $
|
|
|
|
|
|
|
|
inherit eutils rpm multilib flag-o-matic toolchain-funcs
|
|
|
|
|
|
|
|
DESCRIPTION="LightScribe System Software (binary only library)."
|
|
|
|
HOMEPAGE="http://www.lightscribe.com/"
|
|
|
|
SRC_URI="http://download.lightscribe.com/ls/lightscribe-${PV}-linux-2.6-intel.rpm
|
|
|
|
http://download.lightscribe.com/ls/lightscribePublicSDK-${PV}-linux-2.6-intel.rpm"
|
|
|
|
|
2008-08-20 11:52:58 +02:00
|
|
|
LICENSE="lightscribe lightscribeSDK"
|
2008-08-20 11:18:18 +02:00
|
|
|
SLOT="0"
|
|
|
|
KEYWORDS="~x86 ~amd64"
|
|
|
|
IUSE="multilib"
|
|
|
|
|
|
|
|
DEPEND=""
|
|
|
|
|
|
|
|
RDEPEND="virtual/libc
|
|
|
|
x86? ( sys-libs/libstdc++-v3 )
|
2008-08-20 11:52:58 +02:00
|
|
|
amd64? ( multilib? ( app-emulation/emul-linux-x86-compat ) )"
|
2008-08-20 11:18:18 +02:00
|
|
|
|
|
|
|
RESTRICT="mirror strip"
|
|
|
|
|
|
|
|
src_unpack() {
|
|
|
|
rpm_src_unpack
|
2008-08-20 11:52:58 +02:00
|
|
|
epatch "${FILESDIR}"/liblightscribe-gcc43-1.patch
|
2008-08-20 11:18:18 +02:00
|
|
|
}
|
|
|
|
|
2008-08-20 11:52:58 +02:00
|
|
|
src_compile() {
|
|
|
|
ln -sf "${WORKDIR}"/usr/lib/liblightscribe.so.1 liblightscribe.so
|
|
|
|
append-flags -I"${WORKDIR}"/usr/include -pthread -m32
|
|
|
|
append-ldflags -L"${WORKDIR}" -lm -llightscribe
|
2008-08-20 11:18:18 +02:00
|
|
|
$(tc-getCXX) ${CXXFLAGS} ${LDFLAGS} -o lsprint \
|
2008-08-20 11:52:58 +02:00
|
|
|
"${WORKDIR}"/usr/share/doc/lightscribe-sdk/sample/lsprint/bmlite.cpp \
|
|
|
|
"${WORKDIR}"/usr/share/doc/lightscribe-sdk/sample/lsprint/lsprint.cpp || die "lsprint compile failed"
|
2008-08-20 11:18:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
src_install() {
|
|
|
|
has_multilib_profile && ABI="x86"
|
2008-08-20 11:52:58 +02:00
|
|
|
|
2008-08-20 11:18:18 +02:00
|
|
|
into /opt
|
|
|
|
dobin lsprint
|
|
|
|
exeinto /opt/liblightscribe/$(get_libdir)/lightscribe/updates
|
2008-08-20 11:52:58 +02:00
|
|
|
doexe "${WORKDIR}"/usr/lib/lightscribe/updates/fallback.sh
|
2008-08-20 11:18:18 +02:00
|
|
|
exeinto /opt/liblightscribe/$(get_libdir)/lightscribe
|
2008-08-20 11:52:58 +02:00
|
|
|
doexe "${WORKDIR}"/usr/lib/lightscribe/elcu.sh
|
2008-08-20 11:18:18 +02:00
|
|
|
into /opt/liblightscribe
|
2008-08-20 11:52:58 +02:00
|
|
|
dolib.so "${WORKDIR}"/usr/lib/liblightscribe.so.*
|
2008-08-20 11:18:18 +02:00
|
|
|
dosym liblightscribe.so.1 /opt/liblightscribe/$(get_libdir)/liblightscribe.so
|
|
|
|
insinto /usr/include/lightsribe
|
2008-08-20 11:52:58 +02:00
|
|
|
doins -r "${WORKDIR}"/usr/include/*
|
2008-08-20 11:18:18 +02:00
|
|
|
insinto /etc
|
2008-08-20 11:52:58 +02:00
|
|
|
doins -r "${WORKDIR}"/etc/*
|
2008-08-20 11:18:18 +02:00
|
|
|
dosed "s%/usr/lib%/opt/liblightscribe/$(get_libdir)%" /etc/lightscribe.rc
|
2008-08-20 11:52:58 +02:00
|
|
|
dodoc "${WORKDIR}"/usr/share/doc/*.*
|
|
|
|
dodoc "${WORKDIR}"/usr/share/doc/lightscribe-sdk/*.*
|
|
|
|
dodoc "${WORKDIR}"/usr/share/doc/lightscribe-sdk/docs/*
|
2008-08-20 11:18:18 +02:00
|
|
|
docinto sample/lsprint
|
2008-08-20 11:52:58 +02:00
|
|
|
dodoc "${WORKDIR}"/usr/share/doc/lightscribe-sdk/sample/lsprint/*
|
|
|
|
dodir /etc/env.d
|
|
|
|
echo "LDPATH=/opt/liblightscribe/$(get_libdir)" > "${D}"/etc/env.d/80liblightscribe
|
2008-08-20 11:18:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
pkg_postinst() {
|
2008-08-20 11:52:58 +02:00
|
|
|
einfo
|
|
|
|
einfo "This version also support Enhanced Contrast"
|
|
|
|
einfo "You can activate it by running:"
|
|
|
|
einfo "/opt/liblightscribe/$(get_libdir)/lightscribe/elcu.sh"
|
|
|
|
einfo
|
2008-08-20 11:18:18 +02:00
|
|
|
}
|