Makefile 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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:= python
  5. PKG_VERSION:= 3.1.1
  6. PKG_RELEASE:= 1
  7. PKG_MD5SUM:= f1317dbb2398374d6691edd5bff1b91d
  8. PKG_DESCR:= Python scripting language
  9. PKG_SECTION:= lang
  10. PKG_URL:= http://www.python.org
  11. PKG_SITES:= http://www.python.org/ftp/python/3.1.1/
  12. DISTFILES= Python-${PKG_VERSION}.tgz
  13. WRKDIST= ${WRKDIR}/Python-${PKG_VERSION}
  14. DISMOD:= readline _curses _curses_panel _tkinter nis
  15. include ${TOPDIR}/mk/package.mk
  16. $(eval $(call PKG_template,PYTHON,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  17. MAKE_ENV+= OPT="$(TARGET_CFLAGS)" \
  18. HOSTPYTHON=./hostpython \
  19. HOSTPGEN=./Parser/hostpgen \
  20. PYTHON_DISABLE_MODULES="$(DISMOD)"
  21. CONFIGURE_STYLE:= gnu
  22. CONFIGURE_ENV+= OPT="$(TARGET_CFLAGS)"
  23. CONFIGURE_ARGS:= --with-threads \
  24. --with-system-ffi \
  25. --without-cxx-main
  26. BUILD_STYLE:= auto
  27. INSTALL_STYLE:= auto
  28. pre-configure:
  29. (cd ${WRKBUILD}; rm -rf config.{cache,status} ; \
  30. OPT="$(HOSTCFLAGS)" \
  31. ./configure --without-cxx-main --without-threads \
  32. --prefix=$(STAGING_TOOLS) \
  33. );
  34. $(MAKE) -C ${WRKBUILD} python Parser/pgen
  35. ${CP} ${WRKBUILD}/Parser/pgen ${STAGING_TOOLS}/bin/pgen
  36. ${CP} ${WRKBUILD}/python ${STAGING_TOOLS}/bin/hostpython
  37. ${CP} ${WRKBUILD}/Parser/pgen ${WRKBUILD}/Parser/hostpgen
  38. ${CP} ${WRKBUILD}/python ${WRKBUILD}/hostpython
  39. $(MAKE) -C ${WRKBUILD} distclean
  40. post-install:
  41. ${INSTALL_DIR} ${IDIR_PYTHON}/usr/bin ${IDIR_PYTHON}/usr/lib
  42. ${INSTALL_DIR} ${IDIR_PYTHON}/usr/lib/python3.1
  43. ${INSTALL_BIN} ${WRKINST}/usr/bin/python3 ${IDIR_PYTHON}/usr/bin
  44. ${CP} ${WRKINST}/usr/lib/libpython*.so* ${IDIR_PYTHON}/usr/lib
  45. cd ${IDIR_PYTHON}/usr/bin && ln -s python3 python
  46. ${CP} ${WRKINST}/usr/lib/python3.1/* ${IDIR_PYTHON}/usr/lib/python3.1
  47. include ${TOPDIR}/mk/pkg-bottom.mk