z88dk forums

z80 Development Kit

You are not logged in.

#1 2010-07-01 23:30:30

wilsonsamm
New member
Registered: 2010-07-01
Posts: 1

Gentoo ebuild

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:

# 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 (2010-07-01 23:53:30)

Offline

 

#2 2010-08-17 22:28:53

dom
Administrator
Registered: 2007-07-15
Posts: 658
Website

Re: Gentoo ebuild

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.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson