Re: Package Definition Place

2014-01-04 Thread John Darrington
This is where you have to start doing some detective work and probably some 
patching!

Based on what you pasted, it looks as if CONFIG_SHELL isn't getting passed to 
the mkmakemod.sh file.
Probably the zsh devs have done something wierd.

What I do at this stage is to build with the -K flag, then you can manually 
enter the build directory which
guix places in /tmp/nix-build-* and start putting in diagnostics and running 
the build manually to find out
what is going on.

Sometimes it can be painful.

J'


On Sat, Jan 04, 2014 at 04:21:35PM -0500, Kete wrote:
 On Saturday, January 04, 2014 08:15:40 AM John Darrington wrote:
 > The example in bash.scm is over complicated.  Look at some of the 
examples
 > in xorg.scm to see how to set configure-flags.
 
 That got me a little further.
Src/../Src/mkmakemod.sh: line 467: /bin/sh: No such file or directory
Makefile:299: recipe for target 'Makemod' failed
 These are the lines around 464-470:
if $second_stage ; then
trap "rm -f $the_subdir/${the_makefile}; exit 1" 1 2 15
 
${CONFIG_SHELL-/bin/sh} ./config.status \

--file=$the_subdir/${the_makefile}:$the_subdir/${the_makefile}.in ||
exit 1
fi
 I tried with the --without-tcsetpgrp flag, but I got the same error.

-- 
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://sks-keyservers.net or any PGP keyserver for public key.



signature.asc
Description: Digital signature


Re: Package Definition Place

2014-01-04 Thread Kete
On Saturday, January 04, 2014 12:47:06 PM Ludovic Courtès wrote:
> I’d recommend looking at how that tcsetpgrp check is implemented, to see
> what makes it think it doesn’t work.  In particular what does
> ‘config.log’ report about this test?

I didn't find any mention.
 
> The ‘license’ field should reflect the license of what gets installed.
> So if build-time scripts are GPL, that doesn’t matter here.  But please
> do skim over the license headers to make sure they’re all under that
> X11-style license.

Here is what I found with grep:
Completion/Unix/Command/_darcs is licensed under the GNU GPL. "zsh
will be linked against libgdbm.  This means the binary is covered by
the GNU General Public License.  This does not affect the source
code." config.guess and config.sub are also GPLed.
The rest default to that X11-style license.

> My guess is that Zsh doesn’t use Readline nor Texinfo, but please check
> its documentation to see what’s needed.

You guessed correctly. It only needed ncurses.

> Please wrap lines below 80 characters, and don’t use tabs (see “Coding
> Style” in the ‘HACKING’ file.)

I think the description is all on one line, so I don't know what happened.



Re: Package Definition Place

2014-01-04 Thread Kete
On Saturday, January 04, 2014 08:15:40 AM John Darrington wrote:
> The example in bash.scm is over complicated.  Look at some of the examples
> in xorg.scm to see how to set configure-flags.

That got me a little further.
Src/../Src/mkmakemod.sh: line 467: /bin/sh: No such file or directory
Makefile:299: recipe for target 'Makemod' failed
These are the lines around 464-470:
if $second_stage ; then
trap "rm -f $the_subdir/${the_makefile}; exit 1" 1 2 15

${CONFIG_SHELL-/bin/sh} ./config.status \

--file=$the_subdir/${the_makefile}:$the_subdir/${the_makefile}.in ||
exit 1
fi
I tried with the --without-tcsetpgrp flag, but I got the same error.



Re: Package Definition Place

2014-01-04 Thread Ludovic Courtès
Kete  skribis:

> Thanks, that did help, but I got the following error:
>   checking if tcsetpgrp() actually works... notty
>   configure: error: no controlling tty
>   Try running configure with --with-tcsetpgrp or --without-tcsetpgrp

Ah, that’s an issue with the ‘configure’ script of Zsh now.

I’d recommend looking at how that tcsetpgrp check is implemented, to see
what makes it think it doesn’t work.  In particular what does
‘config.log’ report about this test?

This may be due to the chroot build environment, which could be lacking
something Zsh expects (see

for details.)

> I tried the first flag, but it "failed to match any pattern in form". I was 
> copying the bash.scm, but I'm not sure if Zsh needs the readline and texinfo 
> stuff. Maybe I should just attach my package definition as Nikita requested. 
> It's attached.

Note that bash.scm is relatively complex, because Bash has a limited
‘configure’ interface; hopefully you can do something simpler here.

> By the way, the license also says some of the scripts are licensed with the 
> GPL.

The ‘license’ field should reflect the license of what gets installed.
So if build-time scripts are GPL, that doesn’t matter here.  But please
do skim over the license headers to make sure they’re all under that
X11-style license.

> (define-public zsh
>   (let* ((configure-flags
> ``("--with-tcsetpgrp"

‘let*’ introduces a ‘configure-flags’ local variable, but it’s not used
after that.  So you can remove that ‘let*’ form altogether, and instead...

>   (package
>(name "zsh")
>(version "5.0.2")
>(source (origin
>   (method url-fetch)
>   (uri (string-append "ftp://ftp.zsh.org/zsh/zsh.tar.bz2";))
>   (sha256
>(base32 "1s2fvv0zfpi0qg9fzhiv8ac19pwbbjd0sbsbzmll3nqa8k4yfvz9"
>(build-system gnu-build-system)

... you can add an ‘arguments’ field (info "(guix) Defining Packages"):

  (arguments '(#:configure-flags '("--with-tcsetpgrp")))

In the build log, search for ‘configure flags’, and you’ll notice that
--with-tcsetpgrp is now passed (and I guess this should solve the
problem above?)

>(inputs `(("readline" ,readline)
>("ncurses" ,ncurses)
>("texinfo" ,texinfo)))

My guess is that Zsh doesn’t use Readline nor Texinfo, but please check
its documentation to see what’s needed.

>(synopsis "Z Shell")
>(description "Zsh is a UNIX command interpreter (shell) usable as an 
> interactive login shell and as a shell script command processor. Of the 
> standard shells, zsh most closely resembles ksh but includes many 
> enhancements. Zsh has command line editing, builtin spelling correction, 
> programmable command completion, shell functions (with autoloading), a 
> history mechanism, and a host of other features.")

Please wrap lines below 80 characters, and don’t use tabs (see “Coding
Style” in the ‘HACKING’ file.)

Hope this helps!

Ludo’.