Let's start replicating the Fama-French portfolio construction:*
Portfolios are created at the end of June each year $t$, based on size and book-to-market ratio (BE/ME).
The size breakpoint for year $t$ is the median NYSE market equity at the end of June of year $t$.
BE/ME for June of year $t$ is the book equity for the last fiscal year end in $t-1$ divided by ME for December of $t-1$.
Calculate the value-weighted return for the portfolios for July $t$ to June $t+1$.
As stated on Kenneth French website:
The portfolios for July of year $t$ to June of $t+1$ include all NYSE, AMEX, and NASDAQ stocks for which we have market equity data for December of $t-1$ and June of $t$, and (positive) book equity data for $t-1$.
So there are three cases:
If there is no data for market value in December $t-1$, June $t-1$ or book-value for $t-1$, this stock can not be considered in the portfolio sort. As there is no data for including this stock in the breakpoint calculation, it is also excluded in calculating the portfolio return (as it is not clear in which portfolio it should be added).
If there is valid data for a stock in the quoted points of time, it is considered in the breakpoint calculation and in the portfolio return calculation. If a stock is delisted, it's return is calculated until delisting (and therefore until data is available).**
If a stock is newly listed e.g. in April of year $t$, it is first added in the breakpoint (and portfolio return) calculation the next year (since there is no data for $t-1$).
* These steps are simplified for clarification. Read their paper common risk factors in the returns on stocks and bonds for all the details, e.g. excluding stocks with neg. book-to-market ratio etc.
** Be aware of the delisting-return in the CRSP universe, which is described in detail in Bali/Engle/Murray (2016), Empirical asset pricing: the cross section of stock returns, John Wiley & Sons., chapter 7.