Makefile 5.0 KB

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