Makefile 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. # Icon library port
  2. # $OpenBSD: Makefile,v 1.29 2013/11/03 14:42:36 espie Exp $
  3. COMMENT-main = useful and interesting programs for Icon
  4. COMMENT-x11 = useful and interesting graphics program for Icon
  5. VERSION = 9.5.1
  6. DISTNAME = icon-v951src
  7. PKGNAME = icon-lib-${VERSION}
  8. PKGNAME-main = ${PKGNAME}
  9. PKGNAME-x11 = icon-xlib-${VERSION}
  10. DISTFILES = icon-v951src.tgz
  11. CATEGORIES = lang
  12. MAINTAINER = Marc Espie <espie@openbsd.org>
  13. # Public domain
  14. PERMIT_PACKAGE_CDROM = Yes
  15. WRKDIST = ${WRKDIR}/${DISTNAME}/ipl
  16. RUN_DEPENDS-main = lang/icon/interp>=${VERSION}
  17. RUN_DEPENDS-x11 = icon-interp->=${VERSION}-!no_x11:lang/icon/interp
  18. # temporary values for building programs
  19. IPATH = ${WRKSRC}/gprocs:${WRKSRC}/procs:${LOCALBASE}/share/ipl/ucode
  20. LPATH = ${WRKSRC}/gincl:${WRKSRC}/incl
  21. BUILDENV = IPATH="${IPATH}" LPATH="${LPATH}"; export IPATH LPATH;
  22. IPL = ${PREFIX}/share/ipl
  23. MULTI_PACKAGES = -main -x11
  24. PSEUDO_FLAVORS = no_x11
  25. FLAVOR ?=
  26. .include <bsd.port.arch.mk>
  27. .if ${BUILD_PACKAGES:M-x11}
  28. BUILD_DEPENDS = icon-interp->=${VERSION}-!no_x11:lang/icon/interp
  29. .else
  30. BUILD_DEPENDS = lang/icon/interp
  31. .endif
  32. NO_TEST = Yes
  33. do-build:
  34. # first build library
  35. ${BUILDENV} cd ${WRKSRC}/procs && icont -usc *.icn
  36. .if ${BUILD_PACKAGES:M-x11}
  37. ${BUILDENV} cd ${WRKSRC}/gprocs && icont -usc *.icn
  38. .endif
  39. # then build programs using library
  40. ${BUILDENV} cd ${WRKSRC}/progs && for i in *.icn; do icont -us $$i; done
  41. .if ${BUILD_PACKAGES:M-x11}
  42. ${BUILDENV} cd ${WRKSRC}/gprogs && for i in *.icn; do icont -us $$i; done
  43. .endif
  44. # finally build some supplementary packages
  45. .if ${BUILD_PACKAGES:M-x11}
  46. ${BUILDENV} cd ${WRKSRC}/gpacks/vib && ${MAKE}
  47. ${BUILDENV} cd ${WRKSRC}/gpacks/xtiles && icont -s xtiles.icn
  48. .endif
  49. do-install:
  50. ${INSTALL_DATA_DIR} ${IPL}/ucode
  51. ${INSTALL_DATA} ${WRKSRC}/procs/*.u[12] ${IPL}/ucode
  52. ${INSTALL_DATA_DIR} ${IPL}/incl
  53. ${INSTALL_DATA} ${WRKSRC}/incl/* ${IPL}/incl
  54. ${INSTALL_PROGRAM_DIR} ${IPL}/bin
  55. .if ${BUILD_PACKAGES:M-x11}
  56. ${INSTALL_DATA} ${WRKSRC}/gprocs/*.u[12] ${IPL}/ucode
  57. ${INSTALL_DATA_DIR} ${IPL}/gincl
  58. ${INSTALL_DATA} ${WRKSRC}/gincl/* ${IPL}/gincl
  59. ${INSTALL_PROGRAM} ${WRKSRC}/gpacks/vib/vib ${PREFIX}/bin
  60. ${INSTALL_PROGRAM} ${WRKSRC}/gpacks/xtiles/xtiles ${PREFIX}/bin
  61. ${INSTALL_MAN} ${WRKSRC}/gpacks/xtiles/xtiles.6 ${PREFIX}/man/man6
  62. .endif
  63. # we separate icon sample program from the rest of the world, especially
  64. # as we can share them between architectures
  65. find ${WRKSRC}/progs -type f -perm -a+x -exec ${INSTALL_SCRIPT} {} ${IPL}/bin \;
  66. -find ${WRKSRC}/gprogs -type f -perm -a+x -exec ${INSTALL_SCRIPT} {} ${IPL}/bin \;
  67. .include <bsd.port.mk>