And this I need to share because sometimes reality is way funnier than fiction: Robert Smalls was a Republican who founded the Republican Party of South-freaking-Carolina. I wonder how proud he would be of that now.
Back then, Republicans were a different breed than today, so it's not exactly a "funny" thing. Lincoln-era Republicans were rather liberal, especially as it relates to social justice. "Dixiecrats" and most other Southern Democrat groups between then and the 1950s were largely hardcore conservative (though the parties weren't always fully united, as some northern democrats were quite unlike their Southern slave-favoring and segregationist democrats throughout the years. Economic policies have always shifted, but the defining social characteristics of the two parties have completely flipped compared to what they had been historically. You'll also note that the "states rights" movement did not belong to the Republicans of Lincoln's era, so even that became a significant change in policy over time.
We have the Goldwater era to thank for this major shift in social policy support. Both parties ended up reshaping themselves, largely due to the Civil Rights Act.