Makefile 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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.6.4
  6. PKG_RELEASE:= 1
  7. PKG_MD5SUM:= 17dcac33e4f3adb69a57c2607b6de246
  8. PKG_DESCR:= Python scripting language (Version 2)
  9. PKG_SECTION:= lang
  10. PKG_URL:= http://www.python.org
  11. PKG_SITES:= http://www.python.org/ftp/python/${PKG_VERSION}/
  12. PKG_HOST_DEPENDS:= !netbsd
  13. DISTFILES= Python-${PKG_VERSION}.tgz
  14. WRKDIST= ${WRKDIR}/Python-${PKG_VERSION}
  15. DISMOD:= readline _curses _curses_panel _tkinter nis
  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. PYTHON_DISABLE_MODULES="$(DISMOD)"
  22. CONFIGURE_ENV+= OPT="$(TARGET_CFLAGS)"
  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.6
  41. ${INSTALL_BIN} ${WRKINST}/usr/bin/python ${IDIR_PYTHON2}/usr/bin
  42. ${CP} ${WRKINST}/usr/lib/libpython*.so* ${IDIR_PYTHON2}/usr/lib
  43. ${CP} ${WRKINST}/usr/lib/python2.6/* ${IDIR_PYTHON2}/usr/lib/python2.6
  44. -find ${IDIR_PYTHON2} -name \*.pyo -exec rm {} \;
  45. include ${TOPDIR}/mk/pkg-bottom.mk