If you find a way to control each pins of serial port or parallel port independently with Linux libraries, it will be easy to port.
For serial port you just have to substitute the calls to EscapeCommFunction, GetCommModemStatus (initialisation with CreateFile/CloseHandle)
For Parallel port: WriteIoPortByte, ReadIoPortByte (initialization with InitOpenLibSys, DeinitOpenLibSys)
Of course the handles for the those methods must be adapted to the interface.
Philippe