The R'G'B' components can be transformed into linear light components by undoing the gamma compression; these linear primary components can then be used to calculate luminance.
The R'G'B' components can be transformed into linear light components (by applying the inverse/opposite transfer function, undoing the gamma compression). These linear light components can then be used to calculate luminance.