Makefile 1.9 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:= python
  5. PKG_VERSION:= 3.1.1
  6. PKG_RELEASE:= 1
  7. PKG_MD5SUM:= f1317dbb2398374d6691edd5bff1b91d
  8. PKG_DESCR:= Python scripting language (Version 3)
  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. 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. CONFIGURE_ENV+= OPT="$(TARGET_CFLAGS)"
  21. CONFIGURE_ARGS:= --with-threads \
  22. --with-system-ffi \
  23. --without-cxx-main
  24. post-extract:
  25. (cd ${WRKBUILD}; rm -rf config.{cache,status} ; \
  26. OPT="$(CFLAGS_FOR_BUILD)" \
  27. ./configure --without-cxx-main --without-threads \
  28. --prefix=$(STAGING_HOST_DIR) \
  29. );
  30. $(MAKE) -C ${WRKBUILD} python Parser/pgen
  31. $(MAKE) -C ${WRKBUILD} install
  32. ${CP} ${WRKBUILD}/Parser/pgen ${STAGING_HOST_DIR}/bin/pgen
  33. ${CP} ${WRKBUILD}/python ${STAGING_HOST_DIR}/bin/hostpython
  34. ${CP} ${WRKBUILD}/Parser/pgen ${WRKBUILD}/Parser/hostpgen
  35. ${CP} ${WRKBUILD}/python ${WRKBUILD}/hostpython
  36. $(MAKE) -C ${WRKBUILD} distclean
  37. pre-configure:
  38. $(SED) "s#@@CPU_ARCH@@#$(CPU_ARCH)#" ${WRKBUILD}/configure
  39. post-install:
  40. ${INSTALL_DIR} ${IDIR_PYTHON}/usr/bin ${IDIR_PYTHON}/usr/lib
  41. ${INSTALL_DIR} ${IDIR_PYTHON}/usr/lib/python3.1
  42. ${INSTALL_BIN} ${WRKINST}/usr/bin/python3 ${IDIR_PYTHON}/usr/bin
  43. ${CP} ${WRKINST}/usr/lib/libpython*.so* ${IDIR_PYTHON}/usr/lib
  44. cd ${IDIR_PYTHON}/usr/bin && ln -s python3 python
  45. ${CP} ${WRKINST}/usr/lib/python3.1/* ${IDIR_PYTHON}/usr/lib/python3.1
  46. include ${TOPDIR}/mk/pkg-bottom.mk