Makefile 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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 ${ADK_TOPDIR}/rules.mk
  4. PKG_NAME:= perl
  5. PKG_VERSION:= 5.38.2
  6. PKG_RELEASE:= 1
  7. PKG_HASH:= d91115e90b896520e83d4de6b52f8254ef2b70a8d545ffab33200ea9f1cf29e8
  8. PKG_DESCR:= perl interpreter
  9. PKG_SECTION:= dev/lang
  10. PKG_NEEDS:= threads
  11. PKG_URL:= http://www.perl.org/
  12. PKG_SITES:= http://www.cpan.org/src/
  13. PKG_NOPARALLEL:= 1
  14. PC_VERSION:= 1.5.2
  15. PC_SITE:= https://github.com/arsv/perl-cross/releases/download/$(PC_VERSION)
  16. include ${ADK_TOPDIR}/mk/host.mk
  17. include ${ADK_TOPDIR}/mk/package.mk
  18. $(eval $(call HOST_template,PERL,perl,${PKG_VERSION}-${PKG_RELEASE}))
  19. $(eval $(call PKG_template,PERL,perl,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  20. HOST_STYLE:= manual
  21. INSTALL_TARGET:= install.perl
  22. CONFIG_STYLE:= minimal
  23. CONFIGURE_ARGS:= --target=$(GNU_TARGET_NAME) \
  24. --target-tools-prefix=$(TARGET_CROSS) \
  25. --prefix=/usr \
  26. -Dld="$(TARGET_CC)" \
  27. -Dccflags="$(TARGET_CFLAGS)" \
  28. -Dldflags="$(TARGET_LDFLAGS) -lm" \
  29. -Dmydomain="" \
  30. -Dmyuname="$(ADK_VENDOR)" \
  31. -Dosname=linux \
  32. -Dosvers=4.0 \
  33. -Dperladmin=root
  34. ifeq ($(ADK_TARGET_USE_STATIC_LIBS_ONLY),y)
  35. CONFIGURE_ARGS+= --all-static --no-dynaloader
  36. endif
  37. host-configure:
  38. (cd ${WRKBUILD}; ${BASH} ./Configure -des -Duseperlio -Dprefix=${STAGING_HOST_DIR}/usr)
  39. perl-hostinstall:
  40. (cd ${WRKBUILD} && env CC_FOR_BUILD="gcc" ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
  41. ${HOST_MAKE_FLAGS} ${HOST_INSTALL_TARGET})
  42. mv ${STAGING_HOST_DIR}/usr/bin/perl ${STAGING_HOST_DIR}/usr/bin/perl-host
  43. pre-configure:
  44. (if [ ! -f $(DL_DIR)/perl-cross-$(PC_VERSION).tar.gz ]; then \
  45. cd $(DL_DIR); wget $(PC_SITE)/perl-cross-$(PC_VERSION).tar.gz; \
  46. fi)
  47. (cd $(WRKSRC); tar --strip-components=1 -xf $(DL_DIR)/perl-cross-$(PC_VERSION).tar.gz)
  48. $(CP) $(SCRIPT_DIR)/config.* $(WRKSRC)/cnf
  49. perl-install:
  50. ${INSTALL_DIR} ${IDIR_PERL}/usr/bin
  51. ${INSTALL_DIR} ${IDIR_PERL}/usr/lib/perl5/${PKG_VERSION}
  52. ${CP} ${WRKINST}/usr/lib/perl5/${PKG_VERSION}/* \
  53. ${IDIR_PERL}/usr/lib/perl5/${PKG_VERSION}
  54. ${INSTALL_BIN} ${WRKINST}/usr/bin/perl ${IDIR_PERL}/usr/bin/
  55. rm -rf $(IDIR_PERL)/usr/lib/perl5/pod
  56. find $(IDIR_PERL)/usr/lib/perl5/ -name 'extralibs.ld' -print0 | xargs -0 rm -f
  57. find $(IDIR_PERL)/usr/lib/perl5/ -name '*.bs' -print0 | xargs -0 rm -f
  58. find $(IDIR_PERL)/usr/lib/perl5/ -name '.packlist' -print0 | xargs -0 rm -f
  59. include ${ADK_TOPDIR}/mk/host-bottom.mk
  60. include ${ADK_TOPDIR}/mk/pkg-bottom.mk