Gentoo ebuild

Problems installing on other platforms
Post Reply
wilsonsamm
New member
Posts: 1
Joined: Thu Jul 01, 2010 9:58 pm

Gentoo ebuild

Post by wilsonsamm »

Well, this is my first post on the Z88dk forums! I hope I will make valuable contributions to the scene.
Over here at Gentoo Linux we don't have Z88dk in our distro. That's what I want to change. Here is the relevant page on our bugzilla. http://bugs.gentoo.org/show_bug.cgi?id=303223

The way our package manager, portage, works is that for each package there is a bash script that installs the package. But the script fails because one or more of the variables Z80_OZFILES, ZCCCFG, and PATH is not set right. What is wrong here?

Code: Select all

# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

DESCRIPTION="z88dk - the z80 dvelopment kit."
HOMEPAGE="http://www.z88dk.org/forum/index.php"
SRC_URI="http://downloads.sourceforge.net/project/z88dk/z88dk/1.9/z88dk-src-1.9.tgz"

LICENSE=""
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE=""

DEPEND=""
RDEPEND=""

src_compile() {
        S="${WORKDIR}/${PN}"
        Z80_OZFILES="${S}/lib/"
        ZCCCFG="${S}/lib/config/"
        PATH="${S}/bin:$PATH"
        cd ${S}
        ./build.sh || die "build.sh failed!"
        emake libs || die "failed to build libs!"
}

src_install() {
        emake install || die "failed to install"
        emake install-libs || die "failed to install libs."
}
So in my bash script, first my src_compile() will be called, and then src_install(). Environment variable $S contains the path to the temporary working directory (where the tarball is extracted to).

(by the by, we are discouraged from using make. We have emake. What the difference is, I don't know exactly.)
Last edited by wilsonsamm on Thu Jul 01, 2010 10:53 pm, edited 1 time in total.
User avatar
dom
Well known member
Posts: 1195
Joined: Sun Jul 15, 2007 10:01 pm

Post by dom »

Sorry, I completely missed this post.

Do the z88dk variables need to be exported for it to work?

Alternatively, if you set PREFIX appropriately then these variables won't be needed.
Post Reply