If you're starting from scratch you would need some way to determine the apparent position of the Sun and the Moon. Probably some kind of long tube that you can rotate precisely. Ancient people would use buildings for that purpose. Then you need to make observations probably over several, possibly many, years to determine the Earth's perihelion and apohelion (at least their timing), the length of the year, and the precession. For the Moon you determine its orbital period and plane, and if you want to know whether the eclipse will be partial or total from a given location you also need the perigee and apogee (again, at least their timing).
Once you have all the data you find all the times when the Moon crosses the ecliptic plane (about once every 14 days), which are the only times when eclipses can happen. You discard the times when the Moon will not be aligned with the Earth and the Sun. You will be left with a handful of times per year when an eclipse is possible. If the eclipse is solar you compute the orientation of the Earth to see where it will be visible from. It's all trigonometry and linear algebra.