f = ϕ - Sin[ϕ] + Sin[ϕ/2]^2

Plot[f, {ϕ, 0, Pi}]

D[f, ϕ] // Simplify

sol = FindRoot[f == Pi, {ϕ, Pi/2}]

c = Sin[ϕ/2] /. sol

f0 = ϕ /. sol

ParametricPlot[{1/(2 c^2) (x - Sin[x]), 
        1/(2 c^2) (1 - Cos[x]) - 1}, {x, f0, 
        2  Pi - f0}]

int = 
      1/Sqrt[1/(2 c^2) (1 - Cos[x])] Sqrt[
          D[1/(2 c^2) (1 - Cos[x]) - 1, x]^2  +  
            D[1/(2 c^2) (x - Sin[x]), 
                x]^2]

NIntegrate[int, {x, f0, 2  Pi - f0}]