1
0

Makefile 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. include ${TOPDIR}/rules.mk
  4. PKG_NAME:= python3
  5. PKG_VERSION:= 3.4.0
  6. PKG_RELEASE:= 1
  7. PKG_MD5SUM:= 77c22725e14af3d71022cbfdebff4903
  8. PKG_DESCR:= Python scripting language (Version 3)
  9. PKG_SECTION:= lang
  10. PKG_DEPENDS:= libpthread libgcc libffi
  11. PKG_BUILDDEP:= python3-host libffi
  12. HOST_BUILDDEP:= libffi-host
  13. PKG_URL:= http://www.python.org/
  14. PKG_SITES:= http://legacy.python.org/ftp/python/${PKG_VERSION}/
  15. PKG_HOST_DEPENDS:= !netbsd !openbsd !cygwin
  16. PKG_FLAVOURS_PYTHON3:= MOD_ZLIB MOD_BZ2 MOD_EXPAT MOD_SQLITE MOD_GDBM
  17. PKG_FLAVOURS_PYTHON3+= MOD_NCURSES MOD_SSL MOD_READLINE
  18. PKGFD_MOD_ZLIB:= ZLIB support
  19. PKGFB_MOD_ZLIB:= zlib
  20. PKGFS_MOD_ZLIB:= zlib
  21. PKGFD_MOD_BZ2:= BZIP2 support
  22. PKGFB_MOD_BZ2:= bzip2
  23. PKGFS_MOD_BZ2:= libbz2
  24. PKGFD_MOD_EXPAT:= XML support
  25. PKGFB_MOD_EXPAT:= expat
  26. PKGFS_MOD_EXPAT:= libexpat
  27. PKGFD_MOD_SQLITE:= SQLITE support
  28. PKGFB_MOD_SQLITE:= sqlite
  29. PKGFS_MOD_SQLITE:= libsqlite
  30. PKGFD_MOD_GDBM:= GDBM support
  31. PKGFB_MOD_GDBM:= gdbm
  32. PKGFS_MOD_GDBM:= libgdbm
  33. PKGFD_MOD_NCURSES:= NCURSES support
  34. PKGFB_MOD_NCURSES:= ncurses
  35. PKGFS_MOD_NCURSES:= libncurses
  36. PKGFD_MOD_READLINE:= READLINE support
  37. PKGFB_MOD_READLINE:= readline
  38. PKGFS_MOD_READLINE:= libreadline
  39. PKGFD_MOD_SSL:= OpenSSL support
  40. PKGFB_MOD_SSL:= openssl
  41. PKGFS_MOD_SSL:= libopenssl
  42. DISTFILES= Python-${PKG_VERSION}.tar.xz
  43. WRKDIST= ${WRKDIR}/Python-${PKG_VERSION}
  44. include ${TOPDIR}/mk/host.mk
  45. include ${TOPDIR}/mk/package.mk
  46. define PKG_mod_template
  47. INSTALL_MODS_$${ADK_PACKAGE_${1}}+= ${2}-install
  48. ${2}-install:
  49. ${INSTALL_DIR} $$(IDIR_$(1))/usr/lib/python3.4/lib-dynload
  50. for m in ${2}; do \
  51. ${INSTALL_DATA} $(WRKINST)/usr/lib/python3.4/lib-dynload/$$$${m}*.so $$(IDIR_$(1))/usr/lib/python3.4/lib-dynload ;\
  52. done
  53. endef
  54. $(eval $(call HOST_template,PYTHON3,python3,${PKG_VERSION}-${PKG_RELEASE}))
  55. $(eval $(call PKG_template,PYTHON3,python3,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  56. $(eval $(call PKG_template,PYTHON3_MOD_ZLIB,python3-mod-zlib,$(PKG_VERSION)-${PKG_RELEASE},${PKGFS_MOD_ZLIB},${PKGFD_MOD_ZLIB},${PKG_SECTION}))
  57. $(eval $(call PKG_template,PYTHON3_MOD_BZ2,python3-mod-bz2,$(PKG_VERSION)-${PKG_RELEASE},${PKGFS_MOD_BZ2},${PKGFD_MOD_BZ2},${PKG_SECTION}))
  58. $(eval $(call PKG_template,PYTHON3_MOD_EXPAT,python3-mod-expat,$(PKG_VERSION)-${PKG_RELEASE},${PKGFS_MOD_EXPAT},${PKGFD_MOD_EXPAT},${PKG_SECTION}))
  59. $(eval $(call PKG_template,PYTHON3_MOD_SQLITE,python3-mod-sqlite,$(PKG_VERSION)-${PKG_RELEASE},${PKGFS_MOD_SQLITE},${PKGFD_MOD_SQLITE},${PKG_SECTION}))
  60. $(eval $(call PKG_template,PYTHON3_MOD_GDBM,python3-mod-gdbm,$(PKG_VERSION)-${PKG_RELEASE},${PKGFS_MOD_GDBM},${PKGFD_MOD_GDBM},${PKG_SECTION}))
  61. $(eval $(call PKG_template,PYTHON3_MOD_NCURSES,python3-mod-ncurses,$(PKG_VERSION)-${PKG_RELEASE},${PKGFS_MOD_NCURSES},${PKGFD_MOD_NCURSES},${PKG_SECTION}))
  62. $(eval $(call PKG_template,PYTHON3_MOD_SSL,python3-mod-ssl,$(PKG_VERSION)-${PKG_RELEASE},${PKGFS_MOD_SSL},${PKGFD_MOD_SSL},${PKG_SECTION}))
  63. $(eval $(call PKG_template,PYTHON3_MOD_READLINE,python3-mod-readline,$(PKG_VERSION)-${PKG_RELEASE},${PKGFS_MOD_READLINE},${PKGFD_MOD_READLINE},${PKG_SECTION}))
  64. $(eval $(call PKG_mod_template,PYTHON3_MOD_ZLIB,zlib))
  65. $(eval $(call PKG_mod_template,PYTHON3_MOD_BZ2,_bz2))
  66. $(eval $(call PKG_mod_template,PYTHON3_MOD_EXPAT,pyexpat))
  67. $(eval $(call PKG_mod_template,PYTHON3_MOD_SQLITE,_sqlite))
  68. $(eval $(call PKG_mod_template,PYTHON3_MOD_GDBM,_gdbm))
  69. $(eval $(call PKG_mod_template,PYTHON3_MOD_NCURSES,_curses))
  70. $(eval $(call PKG_mod_template,PYTHON3_MOD_SSL,_ssl))
  71. $(eval $(call PKG_mod_template,PYTHON3_MOD_READLINE,readline))
  72. MAKE_ENV+= HOSTPGEN=$(STAGING_HOST_DIR)/usr/bin/pgen3
  73. FAKE_FLAGS+= ENSUREPIP=no
  74. CONFIGURE_ARGS:= --with-threads \
  75. --with-system-ffi \
  76. --with-system-expat \
  77. --disable-ipv6 \
  78. --without-cxx-main
  79. CONFIGURE_ENV+= ac_cv_have_long_long_format=yes \
  80. ac_cv_file__dev_ptmx=yes \
  81. ac_cv_file__dev_ptc=no
  82. HOST_STYLE:= auto
  83. HOST_CONFIGURE_ARGS+= --without-cxx-main \
  84. --with-threads
  85. #hostpost-install:
  86. # $(INSTALL_BIN) ${WRKBUILD}/Parser/pgen \
  87. # $(STAGING_HOST_DIR)/usr/bin/pgen3
  88. python3-install: ${INSTALL_MODS_y} ${INSTALL_MODS_m}
  89. ${INSTALL_DIR} ${IDIR_PYTHON3}/usr/bin ${IDIR_PYTHON3}/usr/lib
  90. ${INSTALL_DIR} ${IDIR_PYTHON3}/usr/lib/python3.4
  91. ${INSTALL_DIR} ${IDIR_PYTHON3}/usr/include/python3.4m
  92. ${INSTALL_BIN} ${WRKINST}/usr/bin/python3 ${IDIR_PYTHON3}/usr/bin
  93. ${CP} ${WRKINST}/usr/lib/libpython*.so* ${IDIR_PYTHON3}/usr/lib
  94. ${CP} ${WRKINST}/usr/lib/python3.4/* ${IDIR_PYTHON3}/usr/lib/python3.4
  95. ${CP} ${WRKINST}/usr/include/python3.4m/pyconfig.h \
  96. ${IDIR_PYTHON3}/usr/include/python3.4m
  97. @-for i in zlib _bz2 _curses _ssl _gdbm _sqlite pyexpat readline; do \
  98. rm ${IDIR_PYTHON3}/usr/lib/python3.4/lib-dynload/$${i}*so; \
  99. done
  100. include ${TOPDIR}/mk/host-bottom.mk
  101. include ${TOPDIR}/mk/pkg-bottom.mk