Makefile 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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.2.2
  6. PKG_RELEASE:= 1
  7. PKG_MD5SUM:= 3c63a6d97333f4da35976b6a0755eb67
  8. PKG_DESCR:= Python scripting language (Version 3)
  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
  14. DISTFILES= Python-${PKG_VERSION}.tgz
  15. WRKDIST= ${WRKDIR}/Python-${PKG_VERSION}
  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. # disable honour cflags stuff
  19. XAKE_FLAGS+= GCC_HONOUR_COPTS=s
  20. MAKE_ENV+= OPT="$(TARGET_CFLAGS)" \
  21. HOSTPYTHON=./hostpython \
  22. HOSTPGEN=./Parser/hostpgen
  23. CONFIGURE_ARGS:= --with-threads \
  24. --with-system-ffi \
  25. --without-cxx-main
  26. CONFIGURE_ENV+= ac_cv_have_long_long_format=yes
  27. post-extract:
  28. (cd ${WRKBUILD}; rm -rf config.{cache,status} ; \
  29. OPT="$(CFLAGS_FOR_BUILD)" \
  30. ./configure --without-cxx-main --without-threads \
  31. --prefix=$(STAGING_HOST_DIR) \
  32. );
  33. $(MAKE) -C ${WRKBUILD} python Parser/pgen
  34. $(MAKE) -C ${WRKBUILD} install
  35. ${CP} ${WRKBUILD}/Parser/pgen ${STAGING_HOST_DIR}/bin/pgen
  36. ${CP} ${WRKBUILD}/python ${STAGING_HOST_DIR}/bin/hostpython
  37. ${CP} ${WRKBUILD}/Parser/pgen ${WRKBUILD}/Parser/hostpgen
  38. ${CP} ${WRKBUILD}/python ${WRKBUILD}/hostpython
  39. $(MAKE) -C ${WRKBUILD} distclean
  40. pre-configure:
  41. $(SED) "s#@@CPU_ARCH@@#$(CPU_ARCH)#" ${WRKBUILD}/configure
  42. post-install:
  43. ${INSTALL_DIR} ${IDIR_PYTHON}/usr/bin ${IDIR_PYTHON}/usr/lib
  44. ${INSTALL_DIR} ${IDIR_PYTHON}/usr/lib/python3.2
  45. ${INSTALL_DIR} ${IDIR_PYTHON}/usr/include/python3.2m
  46. ${INSTALL_BIN} ${WRKINST}/usr/bin/python3 ${IDIR_PYTHON}/usr/bin
  47. ${CP} ${WRKINST}/usr/lib/libpython*.so* ${IDIR_PYTHON}/usr/lib
  48. cd ${IDIR_PYTHON}/usr/bin && ln -s python3 python
  49. ${CP} ${WRKINST}/usr/lib/python3.2/* ${IDIR_PYTHON}/usr/lib/python3.2
  50. ${CP} ${WRKINST}/usr/include/python3.2m/* ${IDIR_PYTHON}/usr/include/python3.2m
  51. include ${TOPDIR}/mk/pkg-bottom.mk