Magellan Linux

Diff of /trunk/include/meson.sminc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 29793 by niro, Thu Oct 12 11:38:00 2017 UTC revision 31579 by niro, Mon Dec 3 09:18:38 2018 UTC
# Line 36  meson_with() Line 36  meson_with()
36  meson_without()  meson_without()
37  {  {
38   local feature="$1"   local feature="$1"
39   echo "-Dwith-{feature}=false"   echo "-Dwith-${feature}=false"
40    }
41    
42    meson_bool_true()
43    {
44     local feature="$1"
45     meson_opt "${feature}" "true"
46    }
47    
48    meson_bool_false()
49    {
50     local feature="$1"
51     meson_opt "${feature}" "false"
52  }  }
53    
54  # generic meson opts  # generic meson opts
# Line 61  meson_configure() Line 73  meson_configure()
73   default_opts+=" --prefix=/usr"   default_opts+=" --prefix=/usr"
74   default_opts+=" --sysconfdir=/etc"   default_opts+=" --sysconfdir=/etc"
75   default_opts+=" --localstatedir=/var/lib"   default_opts+=" --localstatedir=/var/lib"
  default_opts+=" --libdir=/usr/$(mlibdir)"  
  default_opts+=" --libexecdir=/usr/$(mlibdir)/${PNAME}"  
76    
77   if [[ ${MULTILIB_BUILD} = true ]]   if [[ ${MULTILIB_BUILD} = true ]]
78   then   then
79   ABI_DO_NOT_ENTER_SRCDIR=false all-abis meson setup ${default_opts} ${configure_opts} ${SRCDIR}-$(mabi)/${SRCSUBDIR} || die   # must be escaped so the mlibdir variable gets evaluated later
80     default_opts+=' --libdir=/usr/$(mlibdir)'
81     default_opts+=' --libexecdir=/usr/$(mlibdir)/${PNAME}'
82     all-abis meson setup ${default_opts} ${configure_opts} ${SRCDIR}-$(mabi)/${SRCSUBDIR} ${BUILDDIR}/build-$(mabi) || die
83   else   else
84   meson setup ${default_opts} ${configure_opts} ${SRCDIR}/${SRCSUBDIR} || die   # the mlibdir variable gets right now evaluated
85     default_opts+=" --libdir=/usr/$(mlibdir)"
86     default_opts+=" --libexecdir=/usr/$(mlibdir)/${PNAME}"
87     meson setup ${default_opts} ${configure_opts} ${SRCDIR}/${SRCSUBDIR} ${BUILDDIR}/build || die
88   fi   fi
89  }  }
90    
91  mninja()  mninja()
92  {  {
93     local abi
94     local abis_to_run="${MULTILIB_ABIS}"
95    
96     # respect MULTILIB_ONLY_ABI variable
97     [[ ! -z ${MULTILIB_ONLY_ABI} ]] && abis_to_run="${MULTILIB_ONLY_ABI}"
98    
99   if [[ ${MULTILIB_BUILD} = true ]]   if [[ ${MULTILIB_BUILD} = true ]]
100   then   then
101   all-abis ninja -C ${SRCDIR}-$(mabi)/${SRCSUBDIR} -v ${MAKEOPTS} "$@"   for abi in ${abis_to_run}
102     do
103     echo -e "${COLBLUE}*** ${COLGREEN}running ninja for ABI -${abi}${COLDEFAULT}"
104     abi-${abi} ninja -C ${SRCDIR}-$(mabi)/${SRCSUBDIR} -C ${BUILDDIR}/build-$(mabi) -v ${MAKEOPTS} "$@"
105     done
106   else   else
107   ninja -C ${SRCDIR}/${SRCSUBDIR} -v ${MAKEOPTS} "$@"   ninja -C ${SRCDIR}/${SRCSUBDIR} -C ${BUILDDIR}/build -v ${MAKEOPTS} "$@"
108   fi   fi
109  }  }
110    
111  meson_setup_builddir()  meson_setup_builddir()
112  {  {
113     local abi
114     local abis_to_run="${MULTILIB_ABIS}"
115    
116     # respect MULTILIB_ONLY_ABI variable
117     [[ ! -z ${MULTILIB_ONLY_ABI} ]] && abis_to_run="${MULTILIB_ONLY_ABI}"
118    
119   if [[ ${MULTILIB_BUILD} = true ]]   if [[ ${MULTILIB_BUILD} = true ]]
120   then   then
121   all-abis install -d ${BUILDDIR}/build-$(mabi) || die   for abi in ${abis_to_run}
122     do
123     echo -e "${COLBLUE}*** ${COLGREEN}running ninja for ABI -${abi}${COLDEFAULT}"
124     abi-${abi} install -d ${BUILDDIR}/build-$(mabi) || die
125     done
126   else   else
127   install -d ${BUILDDIR}/build || die   install -d ${BUILDDIR}/build || die
128   fi   fi

Legend:
Removed from v.29793  
changed lines
  Added in v.31579