Makefile 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. # $OpenBSD: Makefile,v 1.68 2017/05/15 19:56:03 rsadowski Exp $
  2. COMMENT-main= graph drawing software
  3. DISTNAME= graphviz-2.36.0
  4. REVISION= 8
  5. PKGNAME-main= ${DISTNAME}
  6. CATEGORIES= math devel graphics
  7. # there is only one multi-package due to legacy, but maybe more
  8. # will appear in the form of language bindings.
  9. MULTI_PACKAGES= -main
  10. # to let update-patches work in a simpler way
  11. PATCHORIG= .orig2
  12. MASTER_SITES= ${HOMEPAGE}pub/graphviz/ARCHIVE/
  13. SHARED_LIBS += gvplugin_core 1.0 # 6.0
  14. SHARED_LIBS += gvplugin_gd 1.0 # 6.0
  15. SHARED_LIBS += gvplugin_pango 1.0 # 6.0
  16. SHARED_LIBS += gvplugin_dot_layout 1.0 # 6.0
  17. SHARED_LIBS += gvplugin_neato_layout 1.0 # 6.0
  18. SHARED_LIBS += gvplugin_xlib 1.0 # 6.0
  19. SHARED_LIBS += gvplugin_gtk 1.0 # 6.0
  20. SHARED_LIBS += gvplugin_rsvg 0.0 # 6.0
  21. SHARED_LIBS += gvplugin_gdk 0.0 # 6.0
  22. SHARED_LIBS += gvplugin_poppler 0.0 # 6.0
  23. SHARED_LIBS += cdt 1.0 # 5.0
  24. SHARED_LIBS += pathplan 2.0 # 4.0
  25. SHARED_LIBS += gvc 1.0 # 6.0
  26. SHARED_LIBS += cgraph 0.0 # 6.0
  27. SHARED_LIBS += gvpr 0.0 # 2.0
  28. SHARED_LIBS += xdot 0.0 # 4.0
  29. SHARED_LIBS += gdtclft 3.0 # unknown
  30. SHARED_LIBS += tcldot 3.0 # unknown
  31. SHARED_LIBS += tcldot_builtin 3.0 # unknown
  32. SHARED_LIBS += tclplan 3.0 # unknown
  33. SHARED_LIBS += tkspline 3.0 # unknown
  34. HOMEPAGE= http://www.graphviz.org/
  35. MAINTAINER = Edd Barrett <edd@openbsd.org>
  36. # Eclipse Public License v1.0
  37. PERMIT_PACKAGE_CDROM= Yes
  38. WANTLIB += ICE SM X11 Xau Xaw Xcomposite Xcursor Xdamage Xdmcp
  39. WANTLIB += Xext Xfixes Xft Xi Xinerama Xmu Xpm Xrandr Xrender
  40. WANTLIB += Xss Xt atk-1.0 c cairo croco-0.6 expat ffi fontconfig
  41. WANTLIB += freetype gd gdk-x11-2.0 gdk_pixbuf-2.0 gio-2.0 glib-2.0
  42. WANTLIB += gmodule-2.0 gmp gobject-2.0 graphite2 gthread-2.0 gtk-x11-2.0
  43. WANTLIB += guile harfbuzz jpeg lcms2 ltdl lzma m openjp2 pango-1.0
  44. WANTLIB += pangocairo-1.0 pangoft2-1.0 pcre perl pixman-1 png
  45. WANTLIB += poppler poppler-glib pthread pthread-stubs rsvg-2 ${LIBCXX}
  46. WANTLIB += tiff tk85 util webp xcb xcb-render xcb-shm xml2 z
  47. MODULES= devel/gettext \
  48. x11/tk \
  49. perl
  50. LIB_DEPENDS = graphics/jpeg \
  51. graphics/png \
  52. devel/libtool,-ltdl \
  53. graphics/gd>=2.0.34 \
  54. x11/gtk+2 \
  55. www/libcroco \
  56. x11/gnome/librsvg \
  57. graphics/graphite2 \
  58. devel/harfbuzz \
  59. print/poppler \
  60. lang/guile \
  61. ${MODTK_LIB_DEPENDS}
  62. BUILD_DEPENDS= devel/swig
  63. TEST_DEPENDS = ${FULLPKGNAME}:math/graphviz
  64. USE_GMAKE = Yes
  65. USE_GROFF = Yes
  66. CONFIGURE_STYLE=gnu
  67. # Note: --with-tclsh is misspelled "--with-tcl" in configure's help output
  68. CONFIGURE_ARGS= --enable-tcl=yes \
  69. --enable-perl \
  70. --enable-guile \
  71. --with-tclsh=${MODTCL_BIN} \
  72. --with-wish=${MODTK_BIN} \
  73. --disable-lua \
  74. --disable-io \
  75. --disable-java \
  76. --disable-ocaml \
  77. --disable-php \
  78. --disable-python \
  79. --disable-ruby \
  80. --disable-rpath \
  81. --disable-sharp \
  82. --disable-r \
  83. --disable-gts \
  84. --without-ghostscript \
  85. --without-devil \
  86. --without-lasi \
  87. --without-qt \
  88. --without-glut \
  89. --with-gd
  90. CONFIGURE_ENV= CPPFLAGS="-I${X11BASE}/include -I${LOCALBASE}/include" \
  91. LDFLAGS="-L${X11BASE}/lib -L${LOCALBASE}/lib" \
  92. TCLCONFIG=${MODTCL_CONFIG} \
  93. TKCONFIG=${MODTK_CONFIG}
  94. DOCBASE= ${PREFIX}/share/doc/graphviz
  95. EXBASE= ${PREFIX}/share/examples/graphviz
  96. MAKE_FLAGS= TCL_STUB_LIB_SPEC='-L${LOCALBASE}/lib -ltclstub85_pic' \
  97. TK_STUB_LIB_SPEC='-L${LOCALBASE}/lib -ltkstub85_pic'
  98. CFLAGS += -DLT_DEBUG_LOADERS
  99. FAKE_FLAGS= htmldir="${DOCBASE}/html" \
  100. pdfdir="${DOCBASE}/pdf" \
  101. txtdir="${DOCBASE}" \
  102. demodir="${EXBASE}/demo" \
  103. directeddir="${EXBASE}/graphs/directed" \
  104. leftydir="${EXBASE}/lefty" \
  105. pathplanexampledir="${EXBASE}/demo/pathplan_data" \
  106. undirecteddir="${EXBASE}/graphs/undirected" \
  107. pkgtcldir="${MODTCL_TCLDIR}/graphviz"
  108. post-build:
  109. .for CMD in dotty lneato
  110. echo "#! /bin/ksh" >${WRKBUILD}/cmd/${CMD}/${CMD}
  111. echo ': $${LEFTYPATH:=$(LOCALBASE)/share/examples/graphviz/lefty}' >>${WRKBUILD}/cmd/${CMD}/${CMD}
  112. echo 'export LEFTYPATH' >>${WRKBUILD}/cmd/${CMD}/${CMD}
  113. cat ${WRKBUILD}/cmd/${CMD}/${CMD}.ksh >>${WRKBUILD}/cmd/${CMD}/${CMD}
  114. .endfor
  115. post-install:
  116. # install pre-generated config6 to avoid @exec/@unexec-delete
  117. ${SUBST_CMD} -m 0644 -c ${FILESDIR}/config6 ${PREFIX}/lib/graphviz/config6
  118. chown -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/lib/graphviz/config6
  119. # Once upon a time, graphviz used to install the symlink:
  120. # ${PREFIX}/lib/tcl${MODTCL_VERSION}/graphviz -> ${PREFIX}/lib/tcl/graphviz
  121. # Now it installs a copy of the dir, however, 'pkg_add -u' can't update a
  122. # symlink to a dir, so we manually hack back the old symlink.
  123. rm -Rf ${PREFIX}/lib/tcl${MODTCL_VERSION}/graphviz
  124. ln -s ${TRUEPREFIX}/lib/tcl/graphviz \
  125. ${PREFIX}/lib/tcl${MODTCL_VERSION}/graphviz
  126. # Local tests for OpenBSD
  127. # Can't run built in tests, as requires ksh93 (some specific arguments
  128. # to the typeset builtin). Currently, there is no port.
  129. TEST_TMP=${WRKDIR}/test_tmp
  130. do-test:
  131. mkdir -p ${TEST_TMP}
  132. cd ${FILESDIR}/tests && for i in *-test.* run_tests.sh; do \
  133. ${SUBST_CMD} -m 0644 -c $${i} ${TEST_TMP}/$${i}; \
  134. done
  135. cd ${TEST_TMP} && /bin/sh ./run_tests.sh
  136. # NOTE: When updating this port:
  137. # * Check we have commented .la and .a corresponding to unversioned .so files
  138. # in the packing list.
  139. # * Run 'dot -c' manually and subsitute all hardcoded library versions to
  140. # ${LIB_libname_VERSION}. Put the file in files/config6
  141. .include <bsd.port.mk>