ccmalloc not in portage! sacrilege!
Created attachment 21381 [details] New ccmalloc ebuild This is my first ebuild.. tested here, seems to build and function fine!
Created attachment 21382 [details] initial ccmalloc Changelog
Comment on attachment 21382 [details] initial ccmalloc Changelog ># ChangeLog for dev-libs/ccmalloc ># Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2 ># $Header: /home/cvsroot/gentoo-x86/dev-libs/ccmalloc/ChangeLog,v 1.0 2003/11/27 13:32:49 noone Exp $ > >*ccmalloc-0.4.0 (27 Nov 2003) > > 27 Nov 2003; Darryl Bleau <darrylbleau@submersion.com> ChangeLog, ccmalloc-0.4.0.ebuild: > New ebuild for ccmalloc 0.4.0, easy tool to find memory problems.
Comment on attachment 21381 [details] New ccmalloc ebuild ># $Header: /home/cvsroot/gentoo-x86/dev-libs/ccmalloc/ccmalloc-0.4.0.ebuild,v 1.0 2003/11/27 13:06:01 noone Exp $ > >DESCRIPTION="Easy to use memory checking library" >SRC_URI="http://www.inf.ethz.ch/personal/biere/projects/ccmalloc/${P}.tar.gz" >HOMEPAGE="http://www.inf.ethz.ch/personal/biere/projects/ccmalloc/" > >IUSE="" >SLOT="0" >LICENSE="GPL-2" >KEYWORDS="~amd64 ~x86" > >DEPEND="virtual/glibc" > >src_compile() { > ./configure --prefix=${D}/usr/local >} > >src_install() { > dodoc BUGS FEATURES INSTALL LICENSE NEWS README TODO USAGE VERSION > make prefix=${D}/usr/local install >} > >pkg_postinst() { > ewarn "****************************************************************" > ewarn " You should copy 'ccmalloc.cfg' as '.ccmalloc' to your project " > ewarn " directory and read it carefully. " > ewarn " ccmalloc.cfg is in /usr/local/share/ccmalloc/ " > ewarn "****************************************************************" >}
This ebuild isn't going to work. It installed, and appeared to function, but there is a fatal flaw. ccmalloc uses the --prefix sent to the configure script in the Makefile. So, if you set --prefix=${D}/usr/local like I did, the makefile will put everything in the right place but ccmalloc itself will be looking in the workdir for live running. Probably not good. I'm pondering a way to fix this.. but I'm not exactly an ebuild expert, though I've read over a few and read the howto.. so I can pretend. Any help here?
Created attachment 21384 [details] New ebuild to overcome ccmalloc prefix issues Basically, I had a look through the makefile and I do some of the building by hand. I've testing emerging and unemerging on three boxes, as well as actually using the program. I don't know if this is the _preferred_ way of overcoming such problems, but it does seem to work. Makes the ebuild dependant on the original package, which may or may not be a good idea. Anyway, there it is. Works for me, so far.
Created attachment 21385 [details] new ebuild: make install dir a variable tested on a few more systems, still works, just thought I'd clean it up a bit by making an INST_DIR variable. This should be the last one :)
Created attachment 21386 [details] fix version number in changelog
there is something wrong in your ebuild: 1 in src_compile you should build everything you need 2 in the src_install you should NOT build anything, you just install in ${D} 3 Is there a reason to make prefix different from /usr ? please refer to the skel.ebuild in /usr/portage and http://dev.gentoo.org/~liquidx/ebuildmistakes.html
Created attachment 23521 [details] more correct ebuild I think this is more correct? I also changed the $Header part as per liquidx's page. Tested, builds and runs on x86 and amd64 (I only have those two platforms to test on).
Do I also need to put a DEPEND for sed and make?
You should add gcc as DEPEND and just have glibc as RDEPEND. another questiong is why you aren't using the configure scripts provided in the package and issue just a make install . Sorry for the delay but was busy with exams
I didn't use the make install script as per comment 5 and 6. I'm not sure how else to solve the problem. Is there a better way? Maybe I'm missing something.
you configure with the prefix=/usr and then you make DESTDIR=${D}/usr or make prefix=${D}/usr you can use our wrapper econf and einstall
Created attachment 35844 [details] Another ebuild attempt This looks a bit cleaner. Normal econf and einstall don't seem to work, since this is a non-standard configuration script. I'm not an ebuild expert, so don't kill me if there is some missing DEPEND or anything.
Thank you for the ebuild. I have added a slightly modified one to portage.