Makefile 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. # $OpenBSD: Makefile,v 1.247 2017/06/14 05:23:10 landry Exp $
  2. COMMENT-main = Mozilla e-mail, rss and usenet client
  3. COMMENT-lightning = Mozilla Thunderbird calendar extension
  4. # Don't forget to bump mail/thunderbird-i18n after updates.
  5. MOZILLA_VERSION = 52.1.1
  6. MOZILLA_BRANCH = release
  7. MOZILLA_PROJECT = thunderbird
  8. MOZILLA_CODENAME = mail
  9. EXTRACT_SUFX = .tar.xz
  10. MULTI_PACKAGES = -main -lightning
  11. PKGNAME-main = ${PKGNAME}
  12. PKGNAME-lightning = lightning-5.4.1.1
  13. EPOCH-lightning = 0
  14. REVISION-main = 0
  15. HOMEPAGE = http://www.mozilla.org/thunderbird/
  16. SO_VERSION = 32.0
  17. # NOTE: Must bump minor version if any shlib's are removed from the
  18. # components dir to avoid pkg_add -r issues.
  19. MOZILLA_LIBS = ldap60 ldif60 lgpllibs mozgtk mozsqlite3 prldap60 xul
  20. CATEGORIES= mail news
  21. # MPL
  22. PERMIT_PACKAGE_CDROM= Yes
  23. MODULES = www/mozilla devel/gettext lang/python
  24. MODPY_RUNDEP = No
  25. COMPILER = clang
  26. MODCLANG_ARCHS = amd64 i386
  27. MOZILLA_USE_BUNDLED_LIBEVENT = Yes
  28. # firefox >= 46 defaults to gtk+3
  29. MOZILLA_USE_GTK3 = Yes
  30. # use bundled sqlite which has SQLITE_ENABLE_FTS3_TOKENIZER (#1252937)
  31. MOZILLA_USE_BUNDLED_SQLITE = Yes
  32. NO_TEST = Yes
  33. CONFIGURE_STYLE = simple
  34. CONFIGURE_ARGS += --prefix=${PREFIX}
  35. # SQLITE_CFLAGS is set from pkgconfig, but it's not used for all files that need it, e.g.
  36. # mailnews/build/nsMailModule.cpp pulls in mailnews/extensions/fts3/src/nsFts3Tokenizer.h
  37. # and .../fts3/src/fts3_tokenizer.h which fails to find sqlite3.h.
  38. CONFIGURE_ENV = CPPFLAGS="-I${LOCALBASE}/include"
  39. LIB_DEPENDS-lightning = STEM->=${MOZILLA_VERSION:S/b/beta/}:${BUILD_PKGPATH},-main
  40. WANTLIB-lightning = lib/${MOZILLA_PROJECT}-${MOZILLA_VER}/xul \
  41. c m $(LIBECXX) nspr4 plc4 plds4 pthread
  42. WANTLIB += X11-xcb pixman-1 pthread-stubs xcb xcb-shm
  43. # build lightning xpi
  44. CONFIGURE_ARGS += --enable-calendar
  45. # to be able to link when building with clang on i386
  46. .if ${MACHINE_ARCH} == "i386"
  47. CONFIGURE_ARGS += --disable-debug-symbols
  48. .endif
  49. # bug 857628
  50. CONFIGURE_ARGS += --enable-pie
  51. ALL_TARGET = default
  52. GNU_ARCH = ${MACHINE_ARCH:S/amd64/x86_64/}
  53. # guid for gdata-provider comes from em:id in install.rdf
  54. GUIDS = gdata-provider {a62ef8ec-5fdc-40c2-873c-223b8a6925cc} #\
  55. # lightning {e2fda1a4-762b-4020-b5ad-a41df1933103}
  56. EXTDIR = ${PREFIX}/lib/${MOZILLA_PROJECT}-${MOZILLA_VER}/extensions/
  57. CONFIGURE_ENV+=MOZCONFIG=${WRKSRC}/mozilla/.mozconfig
  58. # MOZCONFIG is mandatory now even if empty ?
  59. post-patch:
  60. touch ${WRKSRC}/mozilla/.mozconfig
  61. post-install:
  62. .for xpi guid in ${GUIDS}
  63. cp ${WRKBUILD}/dist/xpi-stage/${xpi}*.xpi ${EXTDIR}/${guid}.xpi
  64. .endfor
  65. mv ${PREFIX}/lib/${MOZILLA_PROJECT}-${MOZILLA_VER}/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103} \
  66. ${EXTDIR}
  67. rmdir ${PREFIX}/lib/${MOZILLA_PROJECT}-${MOZILLA_VER}/distribution/extensions/
  68. # install prefs
  69. ${SUBST_DATA} ${FILESDIR}/all-openbsd.js \
  70. ${PREFIX}/lib/${MOZILLA_PROJECT}-${MOZILLA_VER}/defaults/pref/all-openbsd.js
  71. # install distribution.ini file
  72. ${INSTALL_DATA_DIR} ${PREFIX}/lib/${MOZILLA_PROJECT}-${MOZILLA_VER}/distribution
  73. echo "[Global]\nid=OpenBSD\nversion=${OSREV}\nabout=Packaged by ${MAINTAINER}\n" > \
  74. ${PREFIX}/lib/${MOZILLA_PROJECT}-${MOZILLA_VER}/distribution/distribution.ini
  75. # install desktop file
  76. ${INSTALL_DATA_DIR} ${PREFIX}/share/applications/ ; \
  77. ${SUBST_DATA} ${FILESDIR}/${MOZILLA_PROJECT}.desktop \
  78. ${PREFIX}/share/applications/${MOZILLA_PROJECT}.desktop ; \
  79. # install icon for desktop file
  80. ${INSTALL_DATA_DIR} ${PREFIX}/share/pixmaps/
  81. ${INSTALL_DATA} ${PREFIX}/lib/${MOZILLA_PROJECT}-${MOZILLA_VER}/chrome/icons/default/default256.png \
  82. ${PREFIX}/share/pixmaps/${MOZILLA_PROJECT}.png
  83. # remove useless empty dirs ?
  84. rm -Rf ${PREFIX}/lib/${MOZILLA_PROJECT}-${MOZILLA_VER}/modules/
  85. .include <bsd.port.mk>