Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 272850 - similarity-tester [new ebuild]
Summary: similarity-tester [new ebuild]
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Default Assignee for New Packages
URL: http://www.cs.vu.nl/~dick/sim.html
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-06 04:17 UTC by Jonathan Lovelace
Modified: 2009-06-08 00:02 UTC (History)
1 user (show)

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


Attachments
The ebuild (similarity-tester-2.26.ebuild,690 bytes, text/plain)
2009-06-06 04:20 UTC, Jonathan Lovelace
Details
A patch for the Makefile (and some files it might include) to make it build properly (fix-configuration.patch,4.11 KB, patch)
2009-06-06 04:20 UTC, Jonathan Lovelace
Details | Diff
Updated ebuild (similarity-tester-2.26.ebuild,698 bytes, text/plain)
2009-06-07 00:47 UTC, Jonathan Lovelace
Details
Updated patch (fix-configuration.patch,5.17 KB, patch)
2009-06-07 00:49 UTC, Jonathan Lovelace
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Lovelace 2009-06-06 04:17:43 UTC
sim, or similarity-tester, is a tool for finding similarities between files,
including a variety of source code languages and plain text. 

Reproducible: Always

Steps to Reproduce:
1. emerge -av similarity-tester
2.
3.




I've created an ebuild that (with a patch to the Makefile) builds and installs the
software properly, but it apparently rebuilds everything from scratch and runs 
the tests in both the build and install phases. I couldn't figure out how to cure 
it of this double build, or how to separate out the tests into their own phase. I 
also didn't have it run "lint" or itself on the source; those might be useful 
additions to the test phase. My patch also probably needs some work.
Comment 1 Jonathan Lovelace 2009-06-06 04:20:09 UTC
Created attachment 193677 [details]
The ebuild

As far as I can tell it just depends on a C compiler, a C library, and some "lex". I'm not sure what of those needs to go into the dependency variables.
Comment 2 Jonathan Lovelace 2009-06-06 04:20:50 UTC
Created attachment 193679 [details, diff]
A patch for the Makefile (and some files it might include) to make it build properly
Comment 3 Kevin Pyle 2009-06-07 00:23:59 UTC
Does the program actually need sys-devel/flex at runtime?  I can easily believe that this program will need flex at build time, but unless execution of similarity-tester generates inputs to be fed back into flex for the creation of additional programs, it is unlikely that you need flex at runtime.  Set RDEPEND="" if you do not need flex at runtime.

Although not required for basic functionality, it would be good to have the ebuild set CC via the functions from toolchain-funcs.eclass.  This ensures that the compiler is called by its long name.  This is required for cross compilation, is helpful to ensure proper results in a heterogenous distcc farm, and avoids Diego filing bugs about your package not respecting $CC. ;)

There appear to be some typographic errors in your patch.  In some places, you use DISTDIR, but in others, you use DESTDIR.  Your ebuild uses DISTDIR.  For purposes of installing into a staging area, DESTDIR is the traditional name.

Separately, in the changes to sysidf.mk, you set CC = $(CC) $(CFLAGS).  Although this may work, it is traditional not to pass CFLAGS as part of $CC, but rather to have the relevant rules include $CFLAGS.  Without inspecting the build system, I cannot guarantee that what I suggest in this paragraph will work without additional patching to the build system.
Comment 4 Jonathan Lovelace 2009-06-07 00:47:12 UTC
Created attachment 193768 [details]
Updated ebuild

Fixed RDEPEND, attempted to fix CC, consistently use DESTDIR. The source URL should use the package version somehow, but I don't know how to use regular expressions to do so.
Comment 5 Jonathan Lovelace 2009-06-07 00:49:26 UTC
Created attachment 193769 [details, diff]
Updated patch

Consistently use DISTDIR; move CFLAGS usage from CC to the build targets.
Comment 6 Mike Auty (RETIRED) gentoo-dev 2009-06-08 00:02:14 UTC
Hi, I'm not really sure which category this belongs in, so I don't know of anyone who might be interested in picking it up.

You might find you that submitting this to project sunrise [1] might give you a larger audience for the ebuild, and allow you to continue maintaining it...

[1] http://overlays.gentoo.org/proj/sunrise/wiki/SunriseFaq