Preheat the oven to 220°C. Place the lamb in a large roasting pan and brush it all over with a little of the oil. Season well with pepper. If you are using the garlic, make 1-cm-deep slits with a small, sharp knife in the leg of lamb, and press a piece of garlic into each slit with your fingers. Roast the lamb in the preheated oven for 15 minutes, then reduce the oven temperature to 180°C.
Meanwhile, place the potatoes and pumpkin or kumara on a board and brush with the remaining oil. Season with salt and pepper. Arrange the potatoes around the lamb and roast the lamb and potatoes for 30 minutes. Add the pumpkin or kumara to the roasting pan and roast for a further 40 minutes (for medium-cooked lamb). Transfer the lamb to a carving plate, cover loosely with foil and set aside to rest. Transfer the vegetables to a large well-greased roasting pan. Increase the oven temperature to 230°C and return them to the oven for 10 minutes to crisp up.
Meanwhile, make the gravy. Skim off all but about 2 tablespoons of the fat from the juices remaining in the roasting pan. Place the pan on the stove over medium heat. Add the flour and cook, stirring with a wooden spoon and scraping the base of the pan to loosen any crisp bits, for 1–2 minutes, or until the flour just starts to brown. Gradually stir in the stock until well combined. Increase the heat to high and bring to the boil. Reduce the heat to medium-high and boil, uncovered, for 5 minutes, or until the gravy thickens.
Carve the lamb and serve with the pumpkin or kumara, potatoes, carrots, beans and gravy.