Commit ef2a421e authored by Kiyoshi Aman's avatar Kiyoshi Aman

apkbuild-cpan: export CFLAGS so modules using C/XS build properly.

parent d4054415
...@@ -168,13 +168,14 @@ sub update_functions { ...@@ -168,13 +168,14 @@ sub update_functions {
$prepare_func = <<'EOF'; $prepare_func = <<'EOF';
prepare() { prepare() {
cd "$_builddir" cd "$_builddir"
export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
perl Build.PL installdirs=vendor || return 1 perl Build.PL installdirs=vendor || return 1
} }
EOF EOF
$build_func = <<'EOF'; $build_func = <<'EOF';
build() { build() {
cd "$_builddir" cd "$_builddir"
export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'` export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
./Build && ./Build test ./Build && ./Build test
} }
EOF EOF
...@@ -189,12 +190,14 @@ EOF ...@@ -189,12 +190,14 @@ EOF
$prepare_func = <<'EOF'; $prepare_func = <<'EOF';
prepare() { prepare() {
cd "$_builddir" cd "$_builddir"
export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
} }
EOF EOF
$build_func = <<'EOF'; $build_func = <<'EOF';
build() { build() {
cd "$_builddir" cd "$_builddir"
export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
make && make test make && make test
} }
EOF EOF
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment