Makefile 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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:= python2
  5. PKG_VERSION:= 2.7
  6. PKG_RELEASE:= 4
  7. PKG_MD5SUM:= 35f56b092ecf39a6bd59d64f142aae0f
  8. PKG_DESCR:= Python scripting language (Version 2)
  9. PKG_SECTION:= lang
  10. PKG_DEPENDS:= libpthread zlib
  11. PKG_BUILDDEP:= zlib
  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. DISTFILES= Python-${PKG_VERSION}.tgz
  16. WRKDIST= ${WRKDIR}/Python-${PKG_VERSION}
  17. include ${TOPDIR}/mk/package.mk
  18. $(eval $(call PKG_template,PYTHON2,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  19. MAKE_ENV+= OPT="$(TARGET_CFLAGS)" \
  20. RANLIB="${TARGET_CROSS}ranlib" \
  21. HOSTPYTHON=./hostpython \
  22. HOSTPGEN=./Parser/hostpgen
  23. CONFIGURE_ENV+= OPT="$(TARGET_CFLAGS)" \
  24. ac_cv_have_long_long_format=yes
  25. CONFIGURE_ARGS:= --with-threads \
  26. --disable-toolbox-glue \
  27. --with-system-ffi \
  28. --without-cxx-main
  29. post-extract:
  30. (cd ${WRKBUILD}; rm -rf config.{cache,status} ; \
  31. OPT="$(HOSTCFLAGS)" \
  32. ./configure --without-cxx-main --without-threads \
  33. --prefix=$(STAGING_TOOLS) \
  34. );
  35. $(MAKE) -C ${WRKBUILD} python Parser/pgen
  36. $(MAKE) -C ${WRKBUILD} install
  37. ${CP} ${WRKBUILD}/Parser/pgen ${STAGING_TOOLS}/bin/pgen
  38. ${CP} ${WRKBUILD}/python ${STAGING_TOOLS}/bin/hostpython
  39. ${CP} ${WRKBUILD}/Parser/pgen ${WRKBUILD}/Parser/hostpgen
  40. ${CP} ${WRKBUILD}/python ${WRKBUILD}/hostpython
  41. $(MAKE) -C ${WRKBUILD} distclean
  42. pre-configure:
  43. $(SED) "s#@@CPU_ARCH@@#$(CPU_ARCH)#" ${WRKBUILD}/configure
  44. post-install:
  45. ${INSTALL_DIR} ${IDIR_PYTHON2}/usr/bin ${IDIR_PYTHON2}/usr/lib
  46. ${INSTALL_DIR} ${IDIR_PYTHON2}/usr/lib/python2.7
  47. ${INSTALL_DIR} ${IDIR_PYTHON2}/usr/include/python2.7
  48. ${INSTALL_BIN} ${WRKINST}/usr/bin/python ${IDIR_PYTHON2}/usr/bin
  49. ${CP} ${WRKINST}/usr/lib/libpython*.so* ${IDIR_PYTHON2}/usr/lib
  50. ${CP} ${WRKINST}/usr/lib/python2.7/* ${IDIR_PYTHON2}/usr/lib/python2.7
  51. ${CP} ${WRKINST}/usr/include/python2.7/* ${IDIR_PYTHON2}/usr/include/python2.7
  52. -find ${IDIR_PYTHON2} -name \*.pyo -exec rm {} \;
  53. include ${TOPDIR}/mk/pkg-bottom.mk