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.
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.
Created attachment 193679 [details, diff] A patch for the Makefile (and some files it might include) to make it build properly
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.
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.
Created attachment 193769 [details, diff] Updated patch Consistently use DISTDIR; move CFLAGS usage from CC to the build targets.
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