diff options
author | jlam <jlam@pkgsrc.org> | 2004-01-03 23:06:43 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2004-01-03 23:06:43 +0000 |
commit | 339cd13cb2e6dedfb07f792d4748aad67fe2788b (patch) | |
tree | 7815453a8a5d5cc91288c15c8c52893726b1e2bc /lang/perl5 | |
parent | 24f7929dc215b42dce86fc5cd36d848a3e54389c (diff) | |
download | pkgsrc-339cd13cb2e6dedfb07f792d4748aad67fe2788b.tar.gz |
Initial sprinkling of work-in-progress buildlink3.mk files for using the
buildlink3 framework.
Diffstat (limited to 'lang/perl5')
-rw-r--r-- | lang/perl5/buildlink3.mk | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/lang/perl5/buildlink3.mk b/lang/perl5/buildlink3.mk new file mode 100644 index 00000000000..571476e6bc7 --- /dev/null +++ b/lang/perl5/buildlink3.mk @@ -0,0 +1,84 @@ +# $NetBSD: buildlink3.mk,v 1.1 2004/01/03 23:06:44 jlam Exp $ + +BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ +PERL5_BUILDLINK3_MK:= ${PERL5_BUILDLINK3_MK}+ + +.if !empty(PERL5_BUILDLINK3_MK:M\+) +. include "../../mk/bsd.prefs.mk" + +USE_PERL5?= run +PERL5_REQD?= 5.0 + +BUILDLINK_DEPENDS.perl?= perl>=${PERL5_REQD} +BUILDLINK_PKGSRCDIR.perl?= ../../lang/perl5 + +. if !empty(USE_PERL5:M[bB][uU][iI][lL][dD]) +BUILDLINK_DEPMETHOD.perl?= build +. endif +.endif # PERL5_BUILDLINK3_MK + +.if !empty(BUILDLINK_DEPTH:M\+) +BUILDLINK_DEPENDS+= perl +.endif + +.if !empty(PERL5_BUILDLINK3_MK:M\+) +BUILDLINK_PACKAGES+= perl + +_PERL5_SITEVARS= \ + INSTALLSITEBIN INSTALLSITELIB INSTALLSITEARCH \ + INSTALLSITEMAN1DIR INSTALLSITEMAN3DIR \ + SITELIBEXP SITEARCHEXP + +_PERL5_SITEVAR.INSTALLSITEBIN= installsitebin +_PERL5_SITEVAR.INSTALLSITELIB= installsitelib +_PERL5_SITEVAR.INSTALLSITEARCH= installsitearch +_PERL5_SITEVAR.INSTALLSITEMAN1DIR= installsiteman1dir +_PERL5_SITEVAR.INSTALLSITEMAN3DIR= installsiteman3dir +_PERL5_SITEVAR.SITELIBEXP= sitelibexp +_PERL5_SITEVAR.SITEARCHEXP= sitearchexp + +.if !defined(_PERL5_SITEPREFIX) +. if exists(${PERL5}) +_PERL5_PREFIX!= \ + eval `${PERL5} -V:prefix 2>/dev/null`; ${ECHO} $$prefix +_PERL5_SITEPREFIX!= \ + eval `${PERL5} -V:siteprefix 2>/dev/null`; ${ECHO} $$siteprefix +MAKEFLAGS+= _PERL5_PREFIX="${_PERL5_PREFIX}" +MAKEFLAGS+= _PERL5_SITEPREFIX="${_PERL5_SITEPREFIX}" + +. for _var_ in ${_PERL5_SITEVARS} +PERL5_SUB_${_var_}!= \ + eval `${PERL5} -V:${_PERL5_SITEVAR.${_var_}} 2>/dev/null`; \ + ${ECHO} $${${_PERL5_SITEVAR.${_var_}}} | \ + ${SED} -e "s,^${_PERL5_SITEPREFIX}/,," +MAKEFLAGS+= PERL5_SUB_${_var_}="${PERL5_SUB_${_var_}}" +. endfor +PERL5_SUB_INSTALLSCRIPT!= \ + eval `${PERL5} -V:installscript 2>/dev/null`; \ + ${ECHO} $$installscript | \ + ${SED} -e "s,^${_PERL5_PREFIX}/,," +MAKEFLAGS+= PERL5_SUB_INSTALLSCRIPT="${PERL5_SUB_INSTALLSCRIPT}" +. endif +.endif + +. if ${PKG_INSTALLATION_TYPE} == "overwrite" +# +# Perl keeps headers and odd libraries in an odd path not caught by the +# default BUILDLINK_FILES_CMD, so name them to be symlinked into +# ${BUILDLINK_DIR}. +# +. if !defined(_PERL5_INSTALLARCHLIB) +_PERL5_INSTALLARCHLIB!= \ + eval `${PERL5} -V:installarchlib 2>/dev/null`; \ + ${ECHO} $$installarchlib +MAKEFLAGS+= _PERL5_INSTALLARCHLIB="${_PERL5_INSTALLARCHLIB}" +. endif +_PERL5_SUB_INSTALLARCHLIB= \ + ${_PERL5_INSTALLARCHLIB:S,^${BUILDLINK_PREFIX.perl}/,,} +BUILDLINK_FILES.perl= \ + ${_PERL5_SUB_INSTALLARCHLIB}/CORE/* \ + ${_PERL5_SUB_INSTALLARCHLIB}/auto/DynaLoader/DynaLoader.a +. endif +.endif # PERL5_BUILDLINK3_MK + +BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:C/\+$//} |