Ticket #26247: libusb-legacy_Portfile.diff

File libusb-legacy_Portfile.diff, 2.9 KB (added by michaelld (Michael Dickens), 14 years ago)

Diff to libusb-legacy Portfile to rename library and related files to be 'libusb-legacy'

  • Portfile

     
    55
    66name                libusb-legacy
    77version             0.1.12
    8 revision            1
     8revision            2
    99categories          devel
    1010#license             LGPLv2.1
    1111maintainers         snc openmaintainer
     
    2222                    sha1    599a5168590f66bc6f1f9a299579fd8500614807 \
    2323                    rmd160  63848df717e00fff67ab30ba86a85466370d4e8e
    2424
    25 patchfiles          patch-Makefile.in.diff patch-darwin.c.diff patch-configure
     25patchfiles          patch-Makefile.in.diff patch-darwin.c.diff
    2626
     27post-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
    2767configure.args      --disable-build-docs \
    2868                    --libdir=${prefix}/lib/libusb-legacy \
    2969                    --includedir=${prefix}/include/libusb-legacy
     
    3373    }
    3474}
    3575
    36 post-destroot {
    37     file rename ${destroot}${prefix}/bin/libusb-config ${destroot}${prefix}/bin/libusb-legacy-config
    38     file rename ${destroot}${prefix}/lib/pkgconfig/libusb.pc ${destroot}${prefix}/lib/pkgconfig/libusb-legacy.pc
    39 }
    40 
    4176livecheck.type      regex
    4277livecheck.url       http://sourceforge.net/projects/libusb/files/libusb-0.1%20(LEGACY)/
    4378livecheck.regex     "libusb-(\\d+\\.\\d+\\.\\d+.?)${extract.suffix}"