Overriding certain header in Arduino STM32

I have my custom board where SPI pins need to be remapped to another location. The file framework-arduinoststm32/STM32F1/variants/generic_stm32f103c/board/board.h defines board pins at their default locations. How can I avoid editing this file and override its definitions instead?

http://docs.platformio.org/en/latest/projectconf/advanced_scripting.html#override-package-files