35 | | configure.args --disable-silent-rules |
| 34 | configure.args --disable-silent-rules --disable-dependency-tracking |
| 35 | |
| 36 | # install libjpeg into its own prefix, to allow it to co-exist with libjpeg-turbo or mozjpeg |
| 37 | # which provide an earlier ABI version (jpeg8): |
| 38 | set jpeg_dir libexec/jpeg |
| 39 | configure.pre_args-delete --prefix=${prefix} |
| 40 | configure.pre_args-append --prefix=${prefix}/${jpeg_dir} |
| 41 | |
| 42 | # libjpeg as provided port:jpeg is slated for replacement by either libjpeg-turbo or mozjpeg; |
| 43 | # to prepare for that change, port:jpeg installs into its own prefix, ${prefix}/libexec/jpeg . |
| 44 | # During a grace period, provide a means to make the change in install location fully transparent |
| 45 | # so that no ports need to be rebuilt because of it |
| 46 | variant transitional description {make the change in install location fully transparent} { |
| 47 | # using this variant reintroduces the conflict with the libjpeg alternatives |
| 48 | conflicts libjpeg-turbo mozjpeg |
| 49 | } |
| 50 | # this variant is the default for the time being |
| 51 | default_variants +transitional |
| 52 | |
| 53 | if {![variant_exists transitional]} { |
| 54 | # after the grace period, the transitional variant will disappear and port:jpeg |
| 55 | # *could* be marked as having been replaced by libjpeg-turbo ... if there's a |
| 56 | # guarantee that it will never be required anymore. |
| 57 | # replaced_by libjpeg-turbo |
| 58 | # PortGroup obsolete 1.0 |
| 59 | } |
| 69 | |
| 70 | if {[variant_exists transitional]} { |
| 71 | if {[variant_isset transitional]} { |
| 72 | # symlink the port's payload to the usual locations in ${prefix} |
| 73 | foreach f [glob ${destroot}/${prefix}/${jpeg_dir}/bin/*] { |
| 74 | set fn [lindex [split ${f} /] end] |
| 75 | ln -s ../${jpeg_dir}/bin/${fn} ${destroot}${prefix}/bin |
| 76 | } |
| 77 | foreach f [glob ${destroot}/${prefix}/${jpeg_dir}/include/*] { |
| 78 | set fn [lindex [split ${f} /] end] |
| 79 | ln -s ../${jpeg_dir}/include/${fn} ${destroot}${prefix}/include |
| 80 | } |
| 81 | foreach f [glob ${destroot}/${prefix}/${jpeg_dir}/lib/*] { |
| 82 | set fn [lindex [split ${f} /] end] |
| 83 | ln -s ../${jpeg_dir}/lib/${fn} ${destroot}${prefix}/lib |
| 84 | } |
| 85 | foreach f [glob ${destroot}/${prefix}/${jpeg_dir}/share/man/man1/*] { |
| 86 | set fn [lindex [split ${f} /] end] |
| 87 | ln -s ../${jpeg_dir}/share/man/man1/${fn} ${destroot}${prefix}/share/man/man1 |
| 88 | } |
| 89 | } else { |
| 90 | # even during the grace period, a user could decide to install, say, libjpeg-turbo |
| 91 | # in addition to port:jpeg . The minimal requirement for not having to rebuild all |
| 92 | # ports in that case is to provide libjpeg.9.dylib where it is expected. |
| 93 | ln -s ../${jpeg_dir}/lib/libjpeg.9.dylib ${destroot}${prefix}/lib |
| 94 | } |
| 95 | } |