Ticket #43738: gnuplot-5.0.diff
File gnuplot-5.0.diff, 6.3 KB (added by mojca (Mojca Miklavec), 10 years ago) |
---|
-
Portfile
8 8 PortGroup wxWidgets 1.0 9 9 10 10 name gnuplot 11 version 4.6.6 11 version 5.0.0 12 subport gnuplot-4.6 { 13 version 4.6.6 14 } 15 12 16 categories math science 13 17 # the license has some inconvenient requirements that we're not meeting 14 18 # to be allowed to distribute binaries … … 31 35 master_sites sourceforge:project/gnuplot/gnuplot/${version} 32 36 dist_subdir ${name}/${version} 33 37 34 distfiles-append ${name}.pdf 35 extract.only ${distname}.tar.gz 36 checksums ${distname}.tar.gz \ 38 if {${subport} eq ${name}} { 39 conflicts gnuplot-4.6 40 41 checksums rmd160 e91ae15d1b50110d323450be451db5d180917f4d \ 42 sha256 417d4bc5bc914a60409bb75cf18dd14f48b07f53c6ad3c4a4d3cd9a8d7370faf 43 44 depends_lib-append \ 45 port:libcaca 46 configure.args-append \ 47 --with-caca=${prefix} \ 48 --with-cwdrc \ 49 --without-qt \ 50 51 variant qt conflicts qt5 description "Enable qt terminal with Qt 4" { 52 depends_lib-append port:qt4-mac 53 configure.args-replace --without-qt --with-qt=qt4 54 } 55 56 variant qt5 conflicts qt description "Enable qt terminal with Qt 5" { 57 depends_lib-append port:qt5-mac 58 # TODO: this is a workaround for a bug, either in gnuplot or in qt5 packaging on Mac 59 configure.ldflags-append "-F${frameworks_dir}" 60 configure.cxxflags-append "-F${frameworks_dir}" \ 61 "-I${frameworks_dir}/QtCore.framework/Versions/5/Headers" \ 62 "-I${frameworks_dir}/QtGui.framework/Versions/5/Headers" \ 63 "-I${frameworks_dir}/QtNetwork.framework/Versions/5/Headers" \ 64 "-I${frameworks_dir}/QtSvg.framework/Versions/5/Headers" \ 65 "-I${frameworks_dir}/QtWidgets.framework/Versions/5/Headers" 66 67 configure.args-replace --without-qt --with-qt=qt5 68 } 69 70 } elseif {${subport} eq "gnuplot-4.6"} { 71 conflicts ${name} 72 73 distfiles-append \ 74 ${name}.pdf 75 extract.only ${distname}.tar.gz 76 77 checksums ${distname}.tar.gz \ 37 78 rmd160 eb1185c94d93d19b272311c71d93ba3402eea030 \ 38 79 sha256 1f19596fd09045f22225afbfec11fa91b9ad1d95b9f48406362f517d4f130274 \ 39 80 ${name}.pdf \ … … 40 81 rmd160 659b2bba04077c3b048b6e501dde870e9f62d413 \ 41 82 sha256 b26ebf783ef9422856b9be5e8904e7901708baee5c7e86a6bf2dab71de8f9100 42 83 84 patchfiles patch-configure-aquaterm.diff 85 86 configure.args-append \ 87 --without-lisp-files 88 89 variant emacs description "An emacs mode for working with gnuplot" { 90 depends_build-append port:${emacs_binary_provider} 91 configure.env-append EMACS=${emacs_binary} 92 configure.args-delete --without-lisp-files 93 configure.args-append --with-lisp-files --with-lispdir=${emacs_lispdir} 94 } 95 96 variant qt description "Enable qt terminal" { 97 depends_lib-append port:qt4-mac 98 configure.args-append --enable-qt 99 } 100 } 101 43 102 depends_build path:bin/pkg-config:pkgconfig 44 103 45 depends_lib 104 depends_lib-append port:expat \ 46 105 port:fontconfig \ 47 106 port:gd2 \ 48 107 port:jpeg \ … … 53 112 port:readline \ 54 113 port:zlib 55 114 56 patchfiles patch-configure-aquaterm.diff57 58 115 minimum_xcodeversions \ 59 116 {9 3.1} 60 117 61 configure.args --with-readline=${prefix} \ 118 configure.args-append \ 119 --with-readline=${prefix} \ 62 120 --with-gd=${prefix} \ 63 121 --without-aquaterm \ 64 122 --without-x \ … … 76 134 variant aquaterm description "Enable AquaTerm terminal" { 77 135 depends_lib-append port:aquaterm 78 136 configure.args-delete --without-aquaterm 79 configure.args-append --with-aquaterm=${frameworks_dir} 137 # TODO: fix the patch for 4.6 to make the arguments compatible with each other 138 if {${subport} eq ${name}} { 139 configure.cflags-append "-F${frameworks_dir}" 140 configure.ldflags-append "-F${frameworks_dir}" 141 configure.args-append --with-aquaterm 142 } else { 143 configure.args-append --with-aquaterm=${frameworks_dir} 144 } 80 145 } 81 146 82 147 variant x11 { … … 85 150 depends_lib-append port:xpm 86 151 } 87 152 88 variant emacs description "An emacs mode for working with gnuplot" {89 depends_build-append port:${emacs_binary_provider}90 configure.env-append EMACS=${emacs_binary}91 configure.args-delete --without-lisp-files92 configure.args-append --with-lisp-files --with-lispdir=${emacs_lispdir}93 }94 95 153 variant luaterm description "Enable lua-based terminals" { 96 154 depends_lib-append port:lua 97 155 configure.args-delete --without-lua … … 111 169 wxWidgets.use wxWidgets-3.0 112 170 depends_lib-append port:${wxWidgets.port} 113 171 configure.args-delete --disable-wxwidgets 114 configure.args-append --with-wx-config=${wxWidgets.wxdir} 172 if {${subport} eq ${name}} { 173 configure.args-append --with-wx=${wxWidgets.wxdir} 174 } else { 175 configure.args-append --with-wx-config=${wxWidgets.wxdir} 176 } 115 177 } 116 178 117 variant qt description "Enable qt terminal" {118 depends_lib-append port:qt4-mac119 configure.args-append --enable-qt120 }121 179 122 180 # Ideally one would enable just PMB by default, but '--with-bitmap-terminals' 123 181 # enables lots of other obsolete terminals which clutter the output of 'set term'. … … 160 218 161 219 set destdocdir ${destroot}${prefix}/share/doc/${name} 162 220 xinstall -d -m 0755 ${destdocdir} 163 xinstall -m 0644 ${distpath}/${name}.pdf ${destdocdir} 221 if {${subport} eq ${name}} { 222 xinstall -m 0644 ${worksrcpath}/docs/${name}.pdf ${destdocdir} 223 } else { 224 xinstall -m 0644 ${distpath}/${name}.pdf ${destdocdir} 225 } 164 226 165 227 # copy demo files 166 228 file copy ${worksrcpath}/demo ${destdocdir}