guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH]: gnu: shogun: Remove non-free source files.


From: Mark H Weaver
Subject: Re: [PATCH]: gnu: shogun: Remove non-free source files.
Date: Sat, 09 May 2015 12:41:37 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

address@hidden (Ludovic Courtès) writes:

> Mark H Weaver <address@hidden> skribis:
>
>> Ricardo Wurmus <address@hidden> writes:
>
> [...]
>
>>> There are functions in src/shogun/kernel/Kernel.{cpp,h} that are also
>>> released under non-free terms, but they are enclosed in #ifdef
>>> statements and the make flags we pass disable these functions at build
>>> time.
>>
>> This is not sufficient.  We will need to completely remove the non-free
>> functions from the source code using a snippet.  We cannot use a patch
>> because the patch would contain the non-free code.
>
> Indeed (I thought Kernel.{cpp,h} were the files being removed.)
>
> I guess there are two ways to address this: have a snippet that reads
> these two files line by line (with ‘read-line’ from (ice-9 rdelim)) and
> dismisses files within the #ifdef.
>
> If that turns out to be impractical, for instance because there are
> nested #ifdefs or computed conditionals, then we’ll have to host a
> cleaned up source tarball or repo somewhere.

There's another option that might be better: instead of reading the file
line-by-line, read the entire file into a single string, and then use
regexps to find the relevant section and remove it.  It might even be
possible to do it with a single regexp substitution.

      Mark



reply via email to

[Prev in Thread] Current Thread [Next in Thread]