attempt to make libzip work on the testing machines
This commit is contained in:
parent
b6f2902905
commit
86d64b2f5e
2 changed files with 15 additions and 10 deletions
15
koch.nim
15
koch.nim
|
|
@ -64,13 +64,16 @@ proc tryExec(cmd: string): bool =
|
||||||
echo(cmd)
|
echo(cmd)
|
||||||
result = execShellCmd(cmd) == 0
|
result = execShellCmd(cmd) == 0
|
||||||
|
|
||||||
|
const
|
||||||
|
compileNimInst = "-d:useLibzipSrc tools/niminst/niminst"
|
||||||
|
|
||||||
proc csource(args: string) =
|
proc csource(args: string) =
|
||||||
exec("nimrod cc $1 -r tools/niminst/niminst --var:version=$2 csource compiler/nimrod.ini $1" %
|
exec("nimrod cc $1 -r $3 --var:version=$2 csource compiler/nimrod.ini $1" %
|
||||||
[args, NimrodVersion])
|
[args, NimrodVersion, compileNimInst])
|
||||||
|
|
||||||
proc zip(args: string) =
|
proc zip(args: string) =
|
||||||
exec("nimrod cc -r tools/niminst/niminst --var:version=$# zip compiler/nimrod.ini" %
|
exec("nimrod cc -r $2 --var:version=$1 zip compiler/nimrod.ini" %
|
||||||
NimrodVersion)
|
[NimrodVersion, compileNimInst])
|
||||||
|
|
||||||
proc buildTool(toolname, args: string) =
|
proc buildTool(toolname, args: string) =
|
||||||
exec("nimrod cc $# $#" % [args, toolname])
|
exec("nimrod cc $# $#" % [args, toolname])
|
||||||
|
|
@ -85,8 +88,8 @@ proc inno(args: string) =
|
||||||
NimrodVersion)
|
NimrodVersion)
|
||||||
|
|
||||||
proc install(args: string) =
|
proc install(args: string) =
|
||||||
exec("nimrod cc -r tools/niminst/niminst --var:version=$# scripts compiler/nimrod.ini" %
|
exec("nimrod cc -r $# --var:version=$# scripts compiler/nimrod.ini" %
|
||||||
NimrodVersion)
|
[compileNimInst, NimrodVersion])
|
||||||
exec("sh ./install.sh $#" % args)
|
exec("sh ./install.sh $#" % args)
|
||||||
|
|
||||||
proc web(args: string) =
|
proc web(args: string) =
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,9 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
## Interface to the `libzip <http://www.nih.at/libzip/index.html>`_ library by
|
## Interface to the `libzip <http://www.nih.at/libzip/index.html>`_ library by
|
||||||
## Dieter Baron and Thomas Klausner.
|
## Dieter Baron and Thomas Klausner. This version links
|
||||||
|
## against ``libzip2.so.2`` unless you define the symbol ``useLibzipSrc``; then
|
||||||
|
## it is compiled against some old ``libizp_all.c`` file.
|
||||||
|
|
||||||
#
|
#
|
||||||
# zip.h -- exported declarations.
|
# zip.h -- exported declarations.
|
||||||
|
|
@ -45,12 +47,12 @@
|
||||||
|
|
||||||
import times
|
import times
|
||||||
|
|
||||||
when defined(unix):
|
when defined(unix) and not defined(useLibzipSrc):
|
||||||
{.passl: "-lz".}
|
{.passl: "-lz".}
|
||||||
when defined(macosx):
|
when defined(macosx):
|
||||||
{.pragma: mydll, dynlib: "libzip2.dylib".}
|
{.pragma: mydll, dynlib: "libzip2.dylib".}
|
||||||
else:
|
else:
|
||||||
{.pragma: mydll, dynlib: "libzip2.so(|.0|.1)".}
|
{.pragma: mydll, dynlib: "libzip2.so(|.2|.1|.0)".}
|
||||||
else:
|
else:
|
||||||
{.compile: "libzip_all.c".}
|
{.compile: "libzip_all.c".}
|
||||||
{.pragma: mydll.}
|
{.pragma: mydll.}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue