PHILADELPHIA — There’s a straight line that goes from David Drap to David Brown, but you cannot find it in most other cities.

Mr. Drap, 43, could be seen recently assembling pieces of plywood around a twin mattress under a highway overpass, trying to build a shelter amid detritus left by a half dozen other homeless people. Mr. Brown, 57, lived on the streets for 25 years until he finally found housing through Project HOME, a local nonprofit organization. He now lives in a building with a computer lab, a library and a fitness room.

What the two men have in common is a city that has had conspicuous success in providing housing for the homeless and where some well-heeled donors have stepped up to contribute to a cause that has often been off the radar for many wealthy philanthropists.

On Wednesday, two such philanthropists, John and Leigh Middleton, who sold their family cigar business for $2.9 billion in 2007, were awarded the prestigious Philadelphia Award, whose previous recipients have included the city planner Edmund Bacon and the conductor Leopold Stokowski. The Middletons were recognized for their support for a variety of local causes, including giving $30 million to Project HOME, this city’s leading advocacy organization for the homeless.