Ticket #37440: Portfile1.patch
File Portfile1.patch, 10.7 KB (added by tenomoto (Takeshi Enomoto), 12 years ago) |
---|
-
Portfile
2 2 # $Id$ 3 3 4 4 PortSystem 1.0 5 PortGroup cmake 1.0 5 6 6 7 name gnudatalanguage 7 version 0.9.2 8 revision 3 8 version 0.9.3 9 9 epoch 1 10 10 categories math science 11 11 maintainers takeshi igf.fuw.edu.pl:slayoo … … 24 24 set gshhssrc gshhs_${srcversion}_src.zip 25 25 set gshhsdata gshhs_${dataversion}.zip 26 26 distfiles ${gdlsrc}:gdl 27 worksrcdir gdl-${version} 28 patchfiles patch-configure.in.diff 27 worksrcdir gdl-${version} 29 28 30 29 checksums ${gdlsrc} \ 31 md5 7178304e6737a8dca910d2c1061ff63c\32 sha1 0d6fe86e2971637310c6298379616b02f773e956\33 rmd160 6913b358de01550256ad38c920cc461e8ef9451230 md5 f71f869e6c9aa99bbfdb22ecd5c88914 \ 31 sha1 a4558643645cc414041d588e375669810780a69a \ 32 rmd160 a6eed21d1a328156b794ba7a6a90e1942fa38fd7 34 33 35 34 depends_lib port:zlib \ 36 35 port:gsl \ … … 51 50 port:pslib 52 51 53 52 post-patch { 54 # add the CMSVLIB installation path55 reinplace "s|dicom\"|dicom:${prefix}/share/cmsvlib\"|" ${worksrcpath}/src/gdl.cpp56 53 # Avoid using heimdal's broken fnmatch.h 57 54 reinplace "s|<\\(fnmatch\.h\\)>|\"/usr/include/\\1\"|" ${worksrcpath}/src/file.cpp 58 reinplace "s|/usr/X11R6/lib64|${prefix}/lib|" ${worksrcpath}/src/Makefile.am59 reinplace "s| -L/usr/X11R6/lib||" ${worksrcpath}/src/Makefile.am60 55 reinplace "s|\.\./gshhs|gshhs|" ${worksrcpath}/src/gshhs.cpp 61 56 } 62 57 63 use_autoconf yes 64 if {${configure.compiler}=="clang"} { 65 configure.compiler llvm-gcc-4.2 66 } 67 if {${os.major}>=9 && ${configure.compiler}=="gcc-4.0"} { 68 configure.compiler gcc-4.2 69 } 70 configure.env-append LIBS=\"-lpng -lopenjpeg\" 71 configure.args --with-plplotdir=${prefix} \ 72 --with-ncursesdir=${prefix} \ 73 --with-readlinedir=${prefix} \ 74 --with-gsldir=${prefix} \ 75 --with-netcdf=${prefix} \ 76 --with-hdf=${prefix} \ 77 --with-hdf5=${prefix} \ 78 --with-grib=${prefix} \ 79 --with-Magick=${prefix} \ 80 --without-wxWidgets \ 81 --disable-dependency-tracking \ 82 --x-includes=${prefix}/include \ 83 --x-libraries=${prefix}/lib \ 84 --with-udunits=${prefix} \ 85 --with-fftw=${prefix} \ 86 --with-libproj4=${prefix} \ 87 --with-pslib=${prefix} \ 88 --with-python=no \ 89 --with-openmp=no 90 configure.cppflags-delete -I${prefix}/include 91 configure.cppflags-append -I${prefix}/include/udunits2 -I${prefix}/include 58 # Compiliation of gdl.cpp stalls with clang 59 compiler.blacklist clang 60 #if {${os.major}>9} { 61 # compiler.blacklist-append gcc-4.0 62 #} 92 63 64 configure.args-append -DFFTW=ON \ 65 -DFFTWDIR=${prefix} \ 66 -DGRIB=ON \ 67 -DGRIBDIR=${prefix} \ 68 -DGSHHS=OFF \ 69 -DGSLDIR=${prefix} \ 70 -DHDF5=ON \ 71 -DHDF5DIR=${prefix} \ 72 -DHDF=ON \ 73 -DHDFDIR=${prefix} \ 74 -DJASPERDIR=${prefix} \ 75 -DJPEGDIR=${prefix} \ 76 -DLIBPROJ4=ON \ 77 -DLIBPROJ4DIR=${prefix} \ 78 -DMAGICK=OFF \ 79 -DMAGICK=ON \ 80 -DMAGICKDIR=${prefix} \ 81 -DMPICH=OFF \ 82 -DNCURSESDIR=${prefix} \ 83 -DNETCDF=ON \ 84 -DNETCDFDIR=${prefix} \ 85 -DOPENMP=OFF \ 86 -DPLPLOTDIR=${prefix} \ 87 -DPSLIB=ON \ 88 -DPSLIBDIR=${prefix} \ 89 -DPYTHON=OFF \ 90 -DPYTHON_MODULE=OFF \ 91 -DREADLINE=ON \ 92 -DREADLINEDIR=${prefix} \ 93 -DUDUNITS=ON \ 94 -DUDUNITSDIR=${prefix} \ 95 -DUDUNITS_INCLUDE_DIR=${prefix}/include/udunits2 \ 96 -DWXWIDGETS=OFF \ 97 -DX11DIR=${prefix} \ 98 -DZLIBDIR=${prefix} \ 99 -DCMAKE_OSX_DEPLOYMENT_TARGET="" 100 93 101 test.run yes 94 102 test.target check 95 103 96 destroot.target install-strip97 98 104 use_parallel_build yes 99 105 100 106 post-destroot { 101 xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}102 xinstall -m 644 -W ${worksrcpath} AUTHORS COPYING Doxyfile ChangeLog HACKING NEWS MAP_INSTALL PYTHON.txt README TODO ${destroot}${prefix}/share/doc/${name}103 xinstall -m 755 -d ${destroot}${prefix}/share/${name}104 xinstall -m 755 -d ${destroot}${prefix}/share/${name}/py105 eval xinstall -m 644 [glob ${worksrcpath}/src/py/*.py] ${destroot}${prefix}/share/${name}/py106 107 xinstall -m 755 -d ${destroot}${prefix}/share/${name}/testsuite 107 108 eval xinstall -m 644 [glob ${worksrcpath}/testsuite/*.pro] \ 108 109 ${destroot}${prefix}/share/${name}/testsuite … … 110 111 111 112 variant mpich description {build with support for MPICH (experimental)} { 112 113 depends_lib-append port:mpich 113 configure.args-append --with-mpich=${prefix} 114 configure.args-delete -DMPICH=OFF 115 configure.args-append -DMPICH=ON \ 116 -DMPICHDIR=${prefix}/lib/mpich 114 117 } 115 118 116 119 variant wxWidgets description {build with support for widgets (experimental, not functional yet)} { 117 120 supported_archs ppc i386 118 121 depends_lib-append port:wxWidgets 119 configure.args-delete --without-wxWidgets 120 configure.args-append --with-wxWidgets=${prefix} 122 configure.args-delete -DWXWIDGETS=OFF \ 123 configure.args-append -DWXWIDGETS=ON \ 124 -DWXWIDGETSDIR=${prefix} 121 125 # http://wiki.finkproject.org/index.php/Fink:Packaging:Preparing_for_10.5#OpenGL_Bug 122 126 #configure.env-append LDFLAGS=\"-Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib\" 123 127 } 124 128 125 variant python description {build with support for calling Python (2.6) from GDL (using numpy)} { 126 depends_lib-append port:python26 \ 127 port:py26-numpy 128 configure.args-append --with-python=${prefix}/Library/Frameworks/Python.framework/Versions/2.6 \ 129 --enable-python_version=2.6 129 if {[variant_isset python25] || [variant_isset python26] || [variant_isset python27]} { 130 configure.args-delete -DPYTHON=OFF 131 configure.args-append -DPYTHON=ON 130 132 } 131 133 132 variant openmp description {enabling of the support for multi-threaded matrix operations using OpenMP} { 133 configure.args-delete --with-openmp=no 134 configure.args-append --with-openmp=yes 134 variant python requires python26 description {Legacy compatibility variant} {} 135 136 variant python25 conflicts python26 python27 description {build with support for calling Python (2.5) from GDL (using numpy)} { 137 depends_lib-append port:py25-numpy 138 configure.args-append -DPYTHONDIR=${frameworks_dir}/Python.framework/Versions/2.5 \ 139 -DPYTHONVERSION=2.5 140 } 141 142 variant python26 conflicts python25 python27 description {build with support for calling Python (2.6) from GDL (using numpy)} { 143 depends_lib-append port:py26-numpy 144 configure.args-append -DPYTHONDIR=${frameworks_dir}/Python.framework/Versions/2.6 \ 145 -DPYTHONVERSION=2.6 146 } 147 148 variant python27 conflicts python25 python26 description {build with support for calling Python (2.7) from GDL (using numpy)} { 149 depends_lib-append port:py27-numpy 150 configure.args-append -DPYTHONDIR=${frameworks_dir}/Python.framework/Versions/2.7 \ 151 -DPYTHONVERSION=2.7 152 } 153 154 if {[variant_isset gcc44] || [variant_isset gcc45] || [variant_isset gcc46] || [variant_isset gcc47]} { 155 configure.args-delete -DOPENMP=OFF 156 configure.args-append -DOPENMP=ON 157 } 158 159 variant openmp requires gcc44 description {Legacy compatibility variant} {} 160 161 variant gcc44 conflicts gcc45 gcc46 gcc47 description {enabling of the support for OpenMP with gcc44} { 135 162 configure.compiler macports-gcc-4.4 136 depends_build-append port:gcc44 163 depends_lib-append port:gcc44 164 # Detecting CXX compiler ABI info fails without this 165 configure.args-append -D 137 166 } 138 167 168 variant gcc45 conflicts gcc44 gcc46 gcc47 description {enabling of the support for OpenMP with gcc45} { 169 configure.compiler macports-gcc-4.5 170 depends_lib-append port:gcc45 171 # Detecting CXX compiler ABI info fails without this 172 configure.args-append -D 173 } 174 175 variant gcc46 conflicts gcc44 gcc45 gcc47 description {enabling of the support for OpenMP with gcc46} { 176 configure.compiler macports-gcc-4.6 177 depends_lib-append port:gcc46 178 # Detecting CXX compiler ABI info fails without this 179 configure.args-append -D 180 } 181 182 variant gcc47 conflicts gcc44 gcc45 gcc46 description {enabling of the support for OpenMP with gcc47} { 183 configure.compiler macports-gcc-4.7 184 depends_lib-append port:gcc47 185 } 186 139 187 variant gshhs description {build with support for GSHHS} { 140 188 distfiles-append ${gshhssrc}:gshhs \ 141 189 ${gshhsdata}:gshhs … … 154 202 unzip ${distpath}/${gshhssrc} gshhs/gshhs.h; \ 155 203 unzip ${distpath}/${gshhsdata}" 156 204 } 157 configure.args-append --with-gshhs=${workpath}/gshhs 158 configure.cppflags-append -I${workpath}/gshhs 205 configure.args-delete -DGSHHS=OFF 206 configure.args-append -DGSHHS=ON \ 207 -DGSHHSDIR=${workpath}/gshhs 159 208 post-destroot { 160 209 xinstall -d ${destroot}${prefix}/share/gnudatalanguage/gshhs 161 210 foreach f [glob ${workpath}/gshhs/*.b] {