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:= 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. PKG_HOST_DEPENDS:= !netbsd !openbsd !cygwin
  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,PYTHON,${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_PYTHON}/usr/bin ${IDIR_PYTHON}/usr/lib
  40. ${INSTALL_DIR} ${IDIR_PYTHON}/usr/lib/python3.1
  41. ${INSTALL_BIN} ${WRKINST}/usr/bin/python3 ${IDIR_PYTHON}/usr/bin
  42. ${CP} ${WRKINST}/usr/lib/libpython*.so* ${IDIR_PYTHON}/usr/lib
  43. cd ${IDIR_PYTHON}/usr/bin && ln -s python3 python
  44. ${CP} ${WRKINST}/usr/lib/python3.1/* ${IDIR_PYTHON}/usr/lib/python3.1
  45. include ${TOPDIR}/mk/pkg-bottom.mk