Pin-mapping (non)conventions for custom Arduino boards?

I think it's common for libraries to have even less pin mapping flexibility than the SD library...
For example, I believe that the Ethernet Shield library didn't work at all on Arduino Mega.

"Arduino Pin Number" vs. port/bit seem to be in no particular order.

Basically correct, I think. MEGA grouped PWM and "communications" pins together on the board, rather than trying to maintain a "pins from a particular port are grouped together."

I believe that more recent versions of the software are attempting to formalize pin mapping functions to a larger extent, so that it won't be necessary for libraries to include their own pin-mapping tables in order to implement "fast" versions of bit IO. That would mean you'd only need to provide new "core" functions rather than have each library modified. IFF the libraries are updated...

But in general, the libraries are going to divide into those that fully support the pin abstractions, and those that don't and would need to be customized for any departure from their original target board pinouts.