From: Mark H Weaver <mhw@netris.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: [PATCH]: gnu: shogun: Remove non-free source files.
Date: Sat, 09 May 2015 12:41:37 -0400 [thread overview]
Message-ID: <87mw1dputa.fsf@netris.org> (raw)
In-Reply-To: <871tipj1xq.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Sat, 09 May 2015 15:49:37 +0200")
ludo@gnu.org (Ludovic Courtès) writes:
> Mark H Weaver <mhw@netris.org> skribis:
>
>> Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> 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
next prev parent reply other threads:[~2015-05-09 16:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-08 14:56 [PATCH]: gnu: shogun: Remove non-free source files Ricardo Wurmus
2015-05-08 17:30 ` Ludovic Courtès
2015-05-09 5:15 ` Mark H Weaver
2015-05-09 13:49 ` Ludovic Courtès
2015-05-09 16:41 ` Mark H Weaver [this message]
2015-05-15 15:01 ` Ricardo Wurmus
2015-05-15 16:56 ` Ludovic Courtès
2015-05-21 9:59 ` Ricardo Wurmus
2015-05-21 19:52 ` Ludovic Courtès
2015-05-21 19:55 ` Ludovic Courtès
2015-05-09 21:06 ` Ricardo Wurmus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mw1dputa.fsf@netris.org \
--to=mhw@netris.org \
--cc=guix-devel@gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.