As Lance and Dave indicated...it COULD be done.
You'd have to check the current requirements...when I did mine, the private add-on required enough dual to solo, 10 solo flights, an endorsement and checkride. The Commercial add-on required 20 solo flights. No written required, since I was power-rated at the appropriate levels when I did them.
What you CAN'T do if you do it in a weekend is any soaring flight of any significance...you're basically going to have to do the basic maneuvers, solos amounting to not much more than traffic patterns, the recommendation ride and checkride. You'd have the rating, but you wouldn't really be worth anything as a glider pilot.
...and it wouldn't be NEARLY as much fun!
OTOH, something like a subsequent ground-launch endorsement can be done fairly quickly...a weekend is generally more than adequate if it's coordinated properly.
Fly safe!
David