Makefile 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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:= 1
  7. PKG_MD5SUM:= 35f56b092ecf39a6bd59d64f142aae0f
  8. PKG_DESCR:= Python scripting language (Version 2)
  9. PKG_SECTION:= lang
  10. PKG_DEPENDS:= libpthread
  11. PKG_URL:= http://www.python.org/
  12. PKG_SITES:= http://www.python.org/ftp/python/${PKG_VERSION}/
  13. PKG_HOST_DEPENDS:= !netbsd !openbsd !cygwin !darwin
  14. DISTFILES= Python-${PKG_VERSION}.tgz
  15. WRKDIST= ${WRKDIR}/Python-${PKG_VERSION}
  16. include ${TOPDIR}/mk/package.mk
  17. $(eval $(call PKG_template,PYTHON2,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  18. MAKE_ENV+= OPT="$(TARGET_CFLAGS)" \
  19. HOSTPYTHON=./hostpython \
  20. HOSTPGEN=./Parser/hostpgen
  21. CONFIGURE_ENV+= OPT="$(TARGET_CFLAGS)" \
  22. ac_cv_have_long_long_format=yes
  23. CONFIGURE_ARGS:= --with-threads \
  24. --with-system-ffi \
  25. --without-cxx-main
  26. pre-configure:
  27. (cd ${WRKBUILD}; rm -rf config.{cache,status} ; \
  28. OPT="$(HOSTCFLAGS)" \
  29. ./configure --without-cxx-main --without-threads \
  30. --prefix=$(STAGING_TOOLS) \
  31. );
  32. $(MAKE) -C ${WRKBUILD} python Parser/pgen
  33. ${CP} ${WRKBUILD}/Parser/pgen ${STAGING_TOOLS}/bin/pgen
  34. ${CP} ${WRKBUILD}/python ${STAGING_TOOLS}/bin/hostpython
  35. ${CP} ${WRKBUILD}/Parser/pgen ${WRKBUILD}/Parser/hostpgen
  36. ${CP} ${WRKBUILD}/python ${WRKBUILD}/hostpython
  37. $(MAKE) -C ${WRKBUILD} distclean
  38. post-install:
  39. ${INSTALL_DIR} ${IDIR_PYTHON2}/usr/bin ${IDIR_PYTHON2}/usr/lib
  40. ${INSTALL_DIR} ${IDIR_PYTHON2}/usr/lib/python2.7
  41. ${INSTALL_DIR} ${IDIR_PYTHON2}/usr/include/python2.7
  42. ${INSTALL_BIN} ${WRKINST}/usr/bin/python ${IDIR_PYTHON2}/usr/bin
  43. ${CP} ${WRKINST}/usr/lib/libpython*.so* ${IDIR_PYTHON2}/usr/lib
  44. ${CP} ${WRKINST}/usr/lib/python2.7/* ${IDIR_PYTHON2}/usr/lib/python2.7
  45. ${CP} ${WRKINST}/usr/include/python2.7/* ${IDIR_PYTHON2}/usr/include/python2.7
  46. -find ${IDIR_PYTHON2} -name \*.pyo -exec rm {} \;
  47. include ${TOPDIR}/mk/pkg-bottom.mk