Commit 56c10a3c authored by Rafael Monnerat's avatar Rafael Monnerat

slapos/obs: Set PERL5LIB and additional perl configurations

  This change is to follow up recent refactorization and perl and CPAN Setup.
parent 7aaaf233
......@@ -54,6 +54,9 @@ install-inc =
# - extra arguments passed to perl Makefile.PL
extra-configure-args =
# - extra environ varialbles for configure and make
extra-env =
# Outputs:
# - site_perl, to use in inc in dependent packages
site_perl=${:location}/lib/site_perl/${perl:version}:${:location}:${:inc}
......@@ -64,12 +67,14 @@ perl-PATH = ${:location}/bin/
# dependencies
perl-bin = ${:perl-PATH}/perl
perl-PERL5LIB =
# Implementation
recipe = slapos.recipe.cmmi
url = https://www.cpan.org/modules/by-module/${:module}-${:version}.tar.gz
configure-command =
PERL5LIB="${:inc}:${:install-inc}" \
${:extra-env}
PERL5LIB="${:inc}:${:install-inc}:${:perl-PERL5LIB}" \
${perl:location}/bin/perl \
Makefile.PL \
PREFIX=${:location} \
......@@ -80,7 +85,7 @@ make-options =
INSTALLSITESCRIPT=${:location}/perl-bin/
make-binary=
PERL5LIB="${:inc}:${:install-inc}" make
${:extra-env} PERL5LIB="${:inc}:${:install-inc}:${:perl-PERL5LIB}" make
# this post-make-hook is same for all users of the macro.
post-make-hook = ${:_profile_base_location_}/../../component/perl/perl-CPAN-package-create-wrapper.py#d012f7ba3300b14b2c6b173351d410be:post_make_hook
......
......@@ -41,6 +41,26 @@ configure-options +=
make-options +=
DESTDIR=${buildout:destdir}
environment +=
PERL5LIB=${perl:location}/lib/5.26.1/
[intltool]
environment +=
PERL5LIB=${perl:location}/lib/5.26.1/
[autoconf]
environment +=
PERL5LIB=${perl:location}/lib/5.26.1/
[automake]
environment +=
PERL5LIB=${perl:location}/lib/5.26.1/
[firewalld]
environment +=
PERL5LIB=${perl:location}/lib/5.26.1/
[dbus]
configure-options +=
--prefix=${buildout:rootdir}/parts/${:_buildout_section_name_}
......@@ -99,6 +119,7 @@ environment +=
LDFLAGS=-L${glib:location}/lib -Wl,-rpath=${glib:location}/lib -L${libffi:location}/lib -Wl,-rpath=${libffi:location}/lib -lffi -L${python2.7:location}/lib
ACLOCAL_PATH=${pkgconfig:location}/share/aclocal:${gettext:location}/share/aclocal:${libtool:location}/share/aclocal:${glib:location}/share/aclocal:${intltool:location}/share/aclocal
M4=${m4:location}/bin/m4
PERL5LIB=${perl:location}/lib/5.26.1/
post-install =
sed -i 's#!${python2.7:location}/bin/python2.7#!/opt/slapos/parts/python2.7/bin/python2.7#' ${python2.7:location}/bin/python-config
......@@ -129,6 +150,17 @@ configure-options =
environment +=
BISON_PKGDATADIR=${bison:location}/share/bison/
[perl-CPAN-package]
perl-PERL5LIB=${perl:location}/lib/5.26.1/
pre-configure =
sed -i "s#'/opt/slapos/parts/perl#'${perl:location}#" ${perl:location}/lib/5.26.1/x86_64-linux-thread-multi/Config.pm
sed -i "s#'/opt/slapos/parts/site_perl#'${buildout:destdir}/parts/site_perl#" ${perl:location}/lib/5.26.1/x86_64-linux-thread-multi/Config.pm
post-install =
sed -i "s#'${perl:location}#'/opt/slapos/parts/perl#" ${perl:location}/lib/5.26.1/x86_64-linux-thread-multi/Config.pm
sed -i "s#'${buildout:destdir}/parts/site_perl#'/opt/slapos/parts/site_perl#" ${perl:location}/lib/5.26.1/x86_64-linux-thread-multi/Config.pm
[perl]
location = ${buildout:destdir}/parts/perl
configure-command =
......
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