Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 1079 - CUnit 1.0-4 New Package (C Unit Testing Framework)
Summary: CUnit 1.0-4 New Package (C Unit Testing Framework)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High enhancement (vote)
Assignee: Karl Trygve Kalleberg (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-03-11 15:59 UTC by Yannick Koehler (RETIRED)
Modified: 2003-02-04 19:42 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yannick Koehler (RETIRED) gentoo-dev 2002-03-11 15:59:49 UTC
I can't add attachment to bugzilla here don't know why.  So I cut and paste the
file.

I put it in dev-util.

digest:
MD5 f1368c3da52e1ce5c8296a2eb8a56767 CUnit-1.0-4.tar.gz 72483

scripts:
# Copyright 2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Author Yannick Koehler <ykoehler@hotmail.com> (mostly inspired by existing
ebuild scripts)
# $Header$

DESCRIPTION="CUnit 1.0-4 C Unit Test Framework"
SRC_URI="http://prdownloads.sourceforge.net/cunit/CUnit-1.0-4.tar.gz"
HOMEPAGE="http://cunit.sourceforge.net"

DEPEND="virtual/glibc"

src_compile() {
    cd ${WORKDIR}/CUnit-1.0-4
    try ./configure
    cd ${WORKDIR}/CUnit-1.0-4
    try make
}

src_install() {
    cd ${WORKDIR}/CUnit-1.0-4
    try make install
}
Comment 1 Daniel Robbins (RETIRED) gentoo-dev 2002-03-12 01:16:33 UTC
Fixes:

"try foo" => "foo || die"
"$Header$" => "$Header: $"

add:

S=${WORKDIR}/CUnit-1.0-4

remove: 

all "cd ${WORKDIR}/CUnit-1.0-4" lines

then:

try enabling the sandbox in Portage and I think you'll see that the "make
install" is not installing its files to $D as it should.  The ebuild should
install all files to $D (a special image directory).  The files are then
carefully copied to your main filesystem by Portage itself, allowing it to
record digests, protect config files, etc.

I'm marking this bug as invalid, mainly so I'll see it when you resubmit a new one.

Best Regards,

Daniel
Comment 2 Yannick Koehler (RETIRED) gentoo-dev 2002-03-12 09:23:29 UTC
Is this one better?

# Copyright 2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Author Yannick Koehler <ykoehler@hotmail.com> (mostly inspired by existing
ebuild scripts)
# $Header$

patchversion=${PV##*_p}
MYPV=${PV%_p*}
MYP=${PN}-${MYPV}-${patchversion}
S=${WORKDIR}/${MYP}
DESCRIPTION="CUnit - C Unit Test Framework"
SRC_URI="http://prdownloads.sourceforge.net/cunit/${MYP}.tar.gz"
HOMEPAGE="http://cunit.sourceforge.net"

DEPEND="virtual/glibc"

src_compile() {
    ./configure --prefix=$D || die
    make || die
}

src_install() {
    make install || die
}

The script was renamed to CUnit-1.0_p4.ebuild and the digest to digest-CUnit-1.0_p4
Comment 3 Tod M. Neidt (RETIRED) gentoo-dev 2002-03-12 13:39:06 UTC
Hi Yannick!

use:

./configure --prefix=/usr \
            --mandir=/usr/share/man \
            --infodir=/usr/share/info \
            || die

and 

make DESTDIR=${D} install || die

You normally don't want to pass the temp directory in configuration step,
because in addition to specifying where to install some apps hardcode those
paths in the binaries and libs.  Usually overide the ./configure paths in the
installation step as below.  The top level Makefile has a line "DESTDIR =" in it
so the above should work, but you'll need to test.  CUnit has man pages but not
sure if it installs info pages so the --infodir flag may be superfluous although
it won't hurt anything.

Hope that helps


Comment 4 Karl Trygve Kalleberg (RETIRED) gentoo-dev 2002-03-16 11:38:32 UTC
Ebuild freeze until 1.0 is out.
Comment 5 Karl Trygve Kalleberg (RETIRED) gentoo-dev 2002-04-13 16:29:50 UTC
Available as dev-util/cunit-1.0.0.6 (their versioning scheme is sucky).