| 27 | post-patch { |
| 28 | # tweak pkg-config install directory & file name |
| 29 | reinplace "/pkgconfigdir/s@\\$\{libdir\}@\\$\{prefix\}/lib@g" \ |
| 30 | ${worksrcpath}/configure |
| 31 | reinplace "/Name/s@libusb@libusb-legacy@g" \ |
| 32 | ${worksrcpath}/libusb.pc.in |
| 33 | reinplace "s@-lusb@-lusb-legacy@g" \ |
| 34 | ${worksrcpath}/libusb.pc.in |
| 35 | file rename ${worksrcpath}/libusb.pc.in \ |
| 36 | ${worksrcpath}/libusb-legacy.pc.in |
| 37 | reinplace "s@libusb\.pc@libusb-legacy\.pc@g" \ |
| 38 | ${worksrcpath}/Makefile.in |
| 39 | reinplace "s@libusb\.pc@libusb-legacy\.pc@g" \ |
| 40 | ${worksrcpath}/configure |
| 41 | |
| 42 | # tweak library build and install name |
| 43 | reinplace "s@\\(libusb\[^ \]*\\)_la@\\1-legacy_la@g" \ |
| 44 | ${worksrcpath}/Makefile.in |
| 45 | reinplace "s@\\(libusb\[^ \]*\\)\.la@\\1-legacy\.la@g" \ |
| 46 | ${worksrcpath}/Makefile.in |
| 47 | reinplace "s@-lusb@-lusb-legacy@g" \ |
| 48 | ${worksrcpath}/Makefile.in |
| 49 | reinplace "s@\\(libusb\[^ \]*\\)_la@\\1-legacy_la@g" \ |
| 50 | ${worksrcpath}/tests/Makefile.in |
| 51 | reinplace "s@\\(libusb\[^ \]*\\)\.la@\\1-legacy\.la@g" \ |
| 52 | ${worksrcpath}/tests/Makefile.in |
| 53 | |
| 54 | # tweak libusb-config binary name |
| 55 | reinplace "s@-lusb@-lusb-legacy@g" \ |
| 56 | ${worksrcpath}/libusb-config.in |
| 57 | reinplace "s@libusb-config@libusb-legacy-config@g" \ |
| 58 | ${worksrcpath}/libusb-config.in |
| 59 | file rename ${worksrcpath}/libusb-config.in \ |
| 60 | ${worksrcpath}/libusb-legacy-config.in |
| 61 | reinplace "s@libusb-config@libusb-legacy-config@g" \ |
| 62 | ${worksrcpath}/Makefile.in |
| 63 | reinplace "s@libusb-config@libusb-legacy-config@g" \ |
| 64 | ${worksrcpath}/configure |
| 65 | } |
| 66 | |