16 | | description An XML-based font configuration API for X Windows |
| 19 | set INFRELEASE 2015-01-01 |
| 20 | |
| 21 | if {${subport} eq "${name}-ultimate"} { |
| 22 | name fontconfig-ultimate |
| 23 | version 2015.01.01 |
| 24 | license MIT |
| 25 | homepage http://bohoomil.com |
| 26 | platforms darwin |
| 27 | |
| 28 | description fontconfig-infinality-ultimate & fonts |
| 29 | |
| 30 | long_description Fontconfig is a library for configuring and \ |
| 31 | customising font access. Fontconfig-ultimate is a collection \ |
| 32 | of configuration files that leverage the power of the Infinality \ |
| 33 | patches to FreeType to provide the ultimate experience in \ |
| 34 | customisable font rendering quality. \ |
| 35 | This port provides the configuration files\; it requires fontconfig \ |
| 36 | to be installed with the +infinality variant. |
| 37 | master_sites https://github.com/bohoomil/fontconfig-ultimate/archive |
| 38 | distname ${INFRELEASE} |
| 39 | |
| 40 | checksums ${distname}${extract.suffix} \ |
| 41 | rmd160 907feca10f32cc777193cc686536a244416a763e \ |
| 42 | sha256 7227af7909c0c72b5014d605ff5acd9db063c056889f22b3e7fa1960b5ad55cb |
| 43 | |
| 44 | depends_lib port:freetype-infinality |
| 45 | depends_run port:bash |
| 46 | |
| 47 | use_configure no |
| 48 | # this appears to be required despite an empty build block! |
| 49 | build.cmd echo |
| 50 | configure {} |
| 51 | build {} |
| 52 | worksrcdir ${name}-${distname} |
| 53 | patchfiles patch-presets-nocolours.diff |
| 54 | |
| 55 | post-destroot { |
| 56 | xinstall -m 0755 -d ${destroot}${prefix}/share/fonts/fontconfig-ultimate/${INFRELEASE} |
| 57 | copy ${worksrcpath}/conf.d.infinality ${destroot}${prefix}/share/fonts/fontconfig-ultimate/${INFRELEASE} |
| 58 | reinplace "s|\"/etc|\"${prefix}/etc|g" ${worksrcpath}/fontconfig_patches/fc-presets |
| 59 | reinplace "s|/bin/bash|${prefix}/bin/bash|g" ${worksrcpath}/fontconfig_patches/fc-presets |
| 60 | foreach f {CHANGELOG fc-presets fonts-settings free ms} { |
| 61 | copy ${worksrcpath}/fontconfig_patches/${f} ${destroot}${prefix}/share/fonts/fontconfig-ultimate/${INFRELEASE} |
| 62 | } |
| 63 | copy ${worksrcpath}/fontconfig_patches/combi ${destroot}${prefix}/share/fonts/fontconfig-ultimate/${INFRELEASE}/combi-complete |
| 64 | copy ${worksrcpath}/doc/fontconfig-infinality-ultimate/fontconfig-global/combi-minimal ${destroot}${prefix}/share/fonts/fontconfig-ultimate/${INFRELEASE}/combi |
| 65 | } |
| 66 | notes-append "fontconfig must be now be (re)build and (re)installed with the +infinality variant." |
| 67 | } else { |
41 | | patchfiles patch-docbook-4.2.diff |
| 89 | depends_build port:pkgconfig |
| 90 | |
| 91 | depends_lib port:libiconv \ |
| 92 | port:expat \ |
| 93 | port:freetype |
| 94 | |
| 95 | if {${os.platform} eq "darwin" && ${os.major} < 9} { |
| 96 | set add_fonts /usr/X11R6/lib/X11/fonts |
| 97 | } else { |
| 98 | set add_fonts /usr/X11/lib/X11/fonts |
| 99 | } |
| 100 | lappend add_fonts ${prefix}/share/fonts |
| 101 | set docdir ${prefix}/share/doc/${name} |
| 102 | |
| 103 | patchfiles patch-docbook-4.2.diff |
68 | | post-activate { |
69 | | # fc-cache can fail due to /Network/Library/Fonts being unavailable, so force success. |
70 | | system "${prefix}/bin/fc-cache -sv || true" |
71 | | system "${prefix}/bin/fc-cache -v || true" |
72 | | } |
| 120 | post-destroot { |
| 121 | xinstall -d ${destroot}${docdir} |
| 122 | xinstall -m 0644 -W ${worksrcpath} \ |
| 123 | AUTHORS \ |
| 124 | COPYING \ |
| 125 | ChangeLog \ |
| 126 | NEWS \ |
| 127 | README \ |
| 128 | ${destroot}${docdir} |
| 129 | |
| 130 | if {[variant_isset infinality]} { |
| 131 | catch {eval exec sh ${filespath}/install-conf-files.sh ${prefix} ${workpath} ${destroot} ${INFRELEASE}} result |
| 132 | ui_debug "install-conf-files.sh : $result" |
| 133 | } |
| 134 | } |
96 | | livecheck.type regex |
97 | | livecheck.url [lindex ${master_sites} 0] |
98 | | livecheck.regex ${name}-(\\d+(?:\\.\\d+)*\\.(?:\\d|\[0-8\]\\d))\\.tar |
| 148 | merger_arch_flag no |
| 149 | merger_arch_compiler yes |
| 150 | if {${os.arch} eq "i386"} { |
| 151 | if { ${os.major} >= 10 } { |
| 152 | set merger_configure_args(ppc) --with-arch=ppc |
| 153 | set merger_configure_env(ppc) CC_FOR_BUILD=${configure.cc} |
| 154 | } |
| 155 | set merger_configure_args(ppc64) --with-arch=ppc64 |
| 156 | set merger_configure_env(ppc64) CC_FOR_BUILD=${configure.cc} |
| 157 | } else { |
| 158 | set merger_configure_args(i386) --with-arch=i386 |
| 159 | set merger_configure_args(x86_64) --with-arch=x86_64 |
| 160 | set merger_configure_env(i386) CC_FOR_BUILD=${configure.cc} |
| 161 | set merger_configure_env(x86_64) CC_FOR_BUILD=${configure.cc} |
| 162 | } |
| 163 | |
| 164 | if {[file exists ${prefix}/share/fonts/fontconfig-ultimate/${INFRELEASE}]} { |
| 165 | default_variants +infinality |
| 166 | } |
| 167 | |
| 168 | set TEMPLINFDIR ${prefix}/etc/fonts/conf.avail.infinality |
| 169 | variant infinality description {patched for improved font rendering, bohoomil ultimate style} { |
| 170 | depends_lib-append port:fontconfig-ultimate |
| 171 | |
| 172 | patchfiles-append 00-fonts.conf.in.patch \ |
| 173 | 01-configure.patch \ |
| 174 | 02-configure.ac.patch \ |
| 175 | 03-Makefile.in.patch \ |
| 176 | 04-Makefile.conf.d.patch \ |
| 177 | 05-Makefile.am.in.patch \ |
| 178 | fc-cache.c.patch |
| 179 | pre-configure { |
| 180 | configure.args-append --with-templatedir=${prefix}/etc/fonts/conf.avail --with-templateinfdir=${TEMPLINFDIR} |
| 181 | delete ${worksrcpath}/conf.d.infinality |
| 182 | copy ${prefix}/share/fonts/fontconfig-ultimate/${INFRELEASE}/conf.d.infinality ${worksrcpath} |
| 183 | catch {eval exec sh -c "\"cd ${worksrcpath} ; aclocal\""} result |
| 184 | ui_debug "aclocal: $result" |
| 185 | catch {eval exec sh -c "\"cd ${worksrcpath} ; glibtoolize -f\""} result |
| 186 | ui_debug "glibtoolize: $result" |
| 187 | catch {eval exec sh -c "\"cd ${worksrcpath} ; automake --add-missing -fi\""} result |
| 188 | ui_debug "automake: $result" |
| 189 | } |
| 190 | |
| 191 | notes-append "Be sure to call fc-presets as root to select one of the provided font configuration presets!" |
| 192 | } |
| 193 | |
| 194 | livecheck.type regex |
| 195 | livecheck.url [lindex ${master_sites} 0] |
| 196 | livecheck.regex ${name}-(\\d+(?:\\.\\d+)*\\.(?:\\d|\[0-8\]\\d))\\.tar |
| 197 | } |