Complex sentence: To avoid crossing nations internally the line deviates to pass around the far east of Russia and various island groups in the Pacific, with the location of the various deviations (east or west) generally accommodating political and/or economic affiliations of the affected areas.
Split into simpler sentences: To avoid crossing nations internally the line deviates around the far east of Russia and then around various island groups in the Pacific. These various deviations (east or west) generally accommodate the political and/or economic affiliations of the affected areas.