actions.py 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. #
  4. # Licensed under the GNU General Public License, version 3.
  5. # See the file http://www.gnu.org/licenses/gpl.txt
  6. from pisi.actionsapi import get
  7. from pisi.actionsapi import autotools
  8. from pisi.actionsapi import pisitools
  9. from pisi.actionsapi import shelltools
  10. from pisi.actionsapi import perlmodules
  11. from pisi.actionsapi import python3modules, cmaketools
  12. def setup():
  13. options_cfg = ''.join([
  14. '-DGDAL_USE_PNG=ON ',
  15. '-DGDAL_USE_CURL=ON ',
  16. '-DGDAL_USE_GEOS=ON ',
  17. '-DGDAL_USE_HDF5=ON ',
  18. '-DGDAL_USE_EXPAT=ON ',
  19. '-DGDAL_USE_MYSQL=ON ',
  20. '-DGDAL_USE_NETCDF=ON ',
  21. '-DGDAL_USE_GEOTIFF=ON ',
  22. '-DGDAL_USE_TIFF=ON ',
  23. '-DGDAL_USE_NETCDF=ON ',
  24. '-DGDAL_USE_SQLITE3=ON ',
  25. '-DGDAL_USE_OPENJPEG=ON ',
  26. '-DBUILD_PYTHON_BINDINGS=ON ',
  27. '-DGDAL_USE_SPATIALITE=ON'])
  28. # '--with-perl ',
  29. # '--enable-shared ',
  30. pisitools.cflags.add("-fno-strict-aliasing")
  31. cmaketools.configure("%s" % options_cfg)
  32. # fix unused direct dependency analysis
  33. # pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
  34. def build():
  35. cmaketools.make()
  36. # FIXME build man pages
  37. #autotools.make("man")
  38. # build python bindings
  39. # shelltools.cd("swig/python")
  40. # python3modules.compile()
  41. def install():
  42. cmaketools.rawInstall("DESTDIR=%s" % get.installDIR())
  43. # install python bindings
  44. # shelltools.cd("swig/python")
  45. # python3modules.install()
  46. # shelltools.cd("../..")
  47. # perlmodules.removePodfiles()
  48. # fix rpath
  49. # shelltools.system("chrpath -d %s/usr/lib/perl5/x86_64-linux-thread-multi/auto/Geo/GDAL/Const/Const.so" % get.installDIR())
  50. # shelltools.system("chrpath -d %s/usr/lib/perl5/x86_64-linux-thread-multi/auto/Geo/GDAL/GDAL.so" % get.installDIR())
  51. # shelltools.system("chrpath -d %s/usr/lib/perl5/x86_64-linux-thread-multi/auto/Geo/GNM/GNM.so" % get.installDIR())
  52. # shelltools.system("chrpath -d %s/usr/lib/perl5/x86_64-linux-thread-multi/auto/Geo/OSR/OSR.so" % get.installDIR())
  53. # shelltools.system("chrpath -d %s/usr/lib/perl5/x86_64-linux-thread-multi/auto/Geo/OGR/OGR.so" % get.installDIR())
  54. pisitools.dodoc("LICENSE*")