@@ -13,12 +13,8 @@ import { pkg_exists, step_title, get_source_root } from "./common.ab"
13
13
///
14
14
/// ### Arguments:
15
15
/// - `lib_name`: The library to check for with `pkg-config`
16
- /// - `var_name`: The variable to export library locations
17
- /// - `lib_prefix`: Where in the source tree the resulting libraries are found
18
16
/// - `inc_prefix`: Where in the source tree the build headers are found
19
- pub fun build_autoconf_dep(lib_name: Text, var_name: Text,
20
- lib_prefix: Text = "",
21
- inc_prefix: Text = ""): Null?
17
+ pub fun build_autoconf_dep(lib_name: Text, inc_prefix: Text = ""): Null?
22
18
{
23
19
let source_root = get_source_root()
24
20
let cache_root = get_cache_root()
@@ -32,14 +28,10 @@ pub fun build_autoconf_dep(lib_name: Text, var_name: Text,
32
28
33
29
pull_source_file(lib_name, my_source)?
34
30
35
- $(unset C_INCLUDE_PATH CPLUS_INCLUDE_PATH && cd {my_source} && ./configure && make)$?
36
-
37
- $cp {my_source}/{lib_prefix}/.libs/* {cache_root}/nix-lib/$?
38
- trust $rm {cache_root}/nix-lib/*.o$
39
-
40
- trust env_var_set("{var_name}_LIBS", "{cache_root}/nix-lib")
41
- trust env_var_set("{var_name}_CFLAGS", "-I{my_source}/{inc_prefix}/include")
42
- trust $export {var_name}_LIBS {var_name}_CFLAGS$
31
+ $( unset C_INCLUDE_PATH CPLUS_INCLUDE_PATH \
32
+ && cd {my_source} \
33
+ && ./configure --prefix={cache_root}/nix-deps \
34
+ && make && make install )$?
43
35
44
36
trust $export C_INCLUDE_PATH={my_source}/{inc_prefix}:\$C_INCLUDE_PATH$
45
37
trust $export CPLUS_INCLUDE_PATH={my_source}/{inc_prefix}:\$CPLUS_INCLUDE_PATH$
@@ -48,18 +40,16 @@ pub fun build_autoconf_dep(lib_name: Text, var_name: Text,
48
40
main(cmdl)
49
41
{
50
42
if len(cmdl) < 5 {
51
- echo "Usage: ./autoconf.sh <package> <var_name> <lib_prefix> < inc_prefix>"
43
+ echo "Usage: ./autoconf.sh <package> <inc_prefix>"
52
44
echo ""
53
45
echo "See builders/autoconf.ab and builders.ab for more info"
54
46
exit 1
55
47
}
56
48
57
49
let lib_name = cmdl[1]
58
- let var_name = cmdl[2]
59
- let lib_prefix = cmdl[3]
60
- let inc_prefix = cmdl[4]
50
+ let inc_prefix = cmdl[2]
61
51
62
52
trust env_var_set("_NIXIE_TESTING_SKIP_TARBALL", "1")
63
53
trust env_var_set("step_total", "1")
64
- build_autoconf_dep(lib_name, var_name, lib_prefix, inc_prefix)?
54
+ build_autoconf_dep(lib_name, inc_prefix)?
65
55
}
0 commit comments