It's a bad definition
The definition you quoted, "[duration is] a measurement of how long, in years, it takes for the price of a bond to be repaid by its internal cash flows" is not a sensible definition of Macaulay duration.
The only place I could find an explanation behind that language is this previous version of the bond duration Wikipedia article that called that definition an inaccurate and confused notion.
Duration is sometimes explained inaccurately as being a measurement of
how long, in years, it takes for the price of a bond to be repaid by
its internal cash flows. This quantity is the duration of a
perpetual bond (assuming a flat yield curve at the coupon), and is
simply $\frac {1}{r}$. For instance, if
a bond pays 5% per annum and was issued at par, it will take 20 years
of these payments to repay its price. Note the absurdity of
interpreting duration this way: given a bond paying 5% per annum with
a term of 5 years, the duration is approximately 4.37, whereas the
price of the bond will not be repaid in full until maturity (at 5
years).
Recreating the math on this?
Let's say you have a consol with a perpetual coupon $C$.
If interest rates are a constant $r > 0$ then the present value is given by:
\begin{align*}
V &= \lim_{T \rightarrow \infty} \sum_{t=1}^T \frac{C}{(1 + r)^t} \\
&= \frac{C\left(\frac{1}{1+r} \right)}{1 - \frac{1}{1 + r}}\\
&= \frac{C}{r}
\end{align*}
The Macaulay duration is given by:
\begin{align*} D_M &= \lim_{T \rightarrow \infty} \frac{1}{C/r} \sum_{t=1}^T t \frac{C}{(1+r)^t} \\
&= r \lim_{T \rightarrow \infty} \sum_{t=1}^T t \left( \frac{1}{1+r}\right)^t
\end{align*}
The interior part is an arithmetico-geometric series. The infinite sum can be written as $\frac{ \left( \frac{1}{1+r} \right)}{\left(1 - \frac{1}{1+r}\right)^2}$ which simplifies to $\frac{r+1}{r^2}$ hence:
$$D_m = 1 + \frac{1}{r}$$
You'll get $\frac{1}{r}$ as the Macaulay duration and $\frac{C}{r} + C$ as the price if you included the undiscounted cashflow $C$ instead of starting with $\frac{C}{1+r}$.