Makefile 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. # $OpenBSD: Makefile,v 1.122 2017/05/13 17:40:26 espie Exp $
  2. COMMENT-main= PDF rendering library
  3. COMMENT-qt4= qt4 interface to PDF rendering library
  4. COMMENT-qt5= Qt5 interface to PDF rendering library
  5. COMMENT-utils= PDF conversion tools and utilities
  6. V= 0.52.0
  7. DISTNAME= poppler-$V
  8. CATEGORIES= print
  9. PKGNAME-main= poppler-$V
  10. PKGNAME-utils= poppler-utils-$V
  11. PKGNAME-qt4= poppler-qt4-$V
  12. PKGNAME-qt5= poppler-qt5-$V
  13. EXTRACT_SUFX= .tar.xz
  14. SHARED_LIBS += poppler 43.1 # 66.0
  15. SHARED_LIBS += poppler-glib 16.0 # 16.0
  16. SHARED_LIBS += poppler-qt4 20.1 # 15.0
  17. SHARED_LIBS += poppler-qt5 3.1 # 10.0
  18. SHARED_LIBS += poppler-cpp 8.0 # 3.0
  19. HOMEPAGE= http://poppler.freedesktop.org/
  20. MAINTAINER= Matthias Kilian <kili@openbsd.org>
  21. # GPLv2
  22. PERMIT_PACKAGE_CDROM= Yes
  23. MASTER_SITES= ${HOMEPAGE}
  24. PSEUDO_FLAVORS=no_qt4 no_qt5 bootstrap
  25. # XXX not strictly a bootstrap loop, but on the critical path for libreoffice
  26. FLAVOR?=no_qt4 no_qt5 bootstrap
  27. NOT_FOR_ARCHS-qt4 = arm
  28. NOT_FOR_ARCHS-qt5 = arm
  29. MULTI_PACKAGES=-main -qt4 -qt5 -utils
  30. .include <bsd.port.arch.mk>
  31. cWANTLIB= expat freetype fontconfig jpeg m pthread tiff z
  32. .if ${BUILD_PACKAGES:M-qt4}
  33. MODULES+= x11/qt4
  34. .else
  35. CONFIGURE_ARGS+= --disable-poppler-qt4
  36. .endif
  37. .if ${BUILD_PACKAGES:M-qt5}
  38. MODULES+= x11/qt5
  39. .else
  40. CONFIGURE_ARGS+= --disable-poppler-qt5
  41. .endif
  42. BUILD_DEPENDS+= devel/gobject-introspection
  43. RUN_DEPENDS-main= \
  44. print/poppler-data>=0.4.7
  45. LIB_DEPENDS-main= \
  46. converters/libiconv \
  47. devel/gettext \
  48. devel/glib2 \
  49. graphics/cairo \
  50. graphics/lcms2 \
  51. graphics/openjp2 \
  52. graphics/png \
  53. graphics/tiff
  54. LIB_DEPENDS-qt4=${MODQT4_LIB_DEPENDS} \
  55. print/poppler
  56. LIB_DEPENDS-qt5=${MODQT5_LIB_DEPENDS} \
  57. print/poppler
  58. LIB_DEPENDS-utils= print/poppler
  59. WANTLIB-main= ${cWANTLIB} Xext ffi gio-2.0 glib-2.0 gmodule-2.0 \
  60. gobject-2.0 pixman-1 openjp2 X11 Xrender cairo pcre \
  61. png pthread-stubs xcb xcb-render lcms2 xcb-shm \
  62. iconv intl ${LIBCXX}
  63. WANTLIB-qt4= ${cWANTLIB} ${MODQT4_WANTLIB} ICE QtCore QtGui QtXml \
  64. SM X11 Xext Xi Xinerama Xrender ffi glib-2.0 \
  65. gobject-2.0 gthread-2.0 iconv intl lcms2 openjp2 \
  66. png poppler pcre pthread-stubs ${LIBCXX} xcb
  67. WANTLIB-qt5= ${cWANTLIB} $(LIBECXX) \
  68. GL Qt5Core Qt5Gui Qt5Widgets Qt5Xml X11 X11-xcb \
  69. Xdamage Xext Xfixes Xxf86vm drm execinfo ffi glapi \
  70. glib-2.0 gobject-2.0 graphite2 gthread-2.0 harfbuzz \
  71. iconv icudata icui18n icuuc intl lcms2 openjp2 pcre \
  72. pcre16 png poppler pthread-stubs xcb xcb-dri2 xcb-glx
  73. WANTLIB-utils= X11 Xext Xrender c cairo fontconfig lcms2 m pixman-1 \
  74. png pthread-stubs ${LIBCXX} xcb xcb-render xcb-shm openjp2 \
  75. poppler z ${cWANTLIB}
  76. CONFIGURE_STYLE=autoconf
  77. AUTOCONF_VERSION=2.69
  78. CONFIGURE_ARGS+=--enable-xpdf-headers \
  79. --enable-poppler-cpp \
  80. --enable-utils \
  81. --enable-zlib \
  82. --disable-gtk-test \
  83. --disable-libnss
  84. CONFIGURE_ENV+= CPPFLAGS="-I${X11BASE}/include -I${LOCALBASE}/include" \
  85. LDFLAGS="-L${LOCALBASE}/lib" \
  86. LIBJPEG_CFLAGS="-I${LOCALBASE}/include" \
  87. ac_cv_prog_MOCQT4=${MODQT4_MOC}
  88. USE_GMAKE= Yes
  89. MAIN_CC= /usr/bin/cc
  90. MAIN_CXX= /usr/bin/c++
  91. .if "${USE_CCACHE:L}" == "yes"
  92. MAIN_CC:= ccache ${MAIN_CC}
  93. MAIN_CXX:= ccache ${MAIN_CXX}
  94. .endif
  95. post-configure:
  96. find ${WRKBUILD} -name Makefile \! -path '*/qt5/*' -print0 | xargs -0 \
  97. perl -pi -e 's,^CC = \S+,override CC = ${MAIN_CC},;' \
  98. -e 's,^CPP = \S+,override CPP = ${MAIN_CC},;' \
  99. -e 's,^CXX = \S+,override CXX = ${MAIN_CXX},;' \
  100. -e 's,^CXXCPP = \S+,override CXXCPP = ${MAIN_CXX},;'
  101. .include <bsd.port.mk>