t4.sample 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  1. # no RCS Id here, please
  2. ONLY_FOR_ARCHS-mono= ${MONO_ARCHS}
  3. COMMENT-main= framework for Multicast DNS Service Discovery
  4. COMMENT-gtk= gtk+2 avahi-ui libraries
  5. COMMENT-gtk3= gtk+3 avahi-ui libraries
  6. COMMENT-gui= GUI client utilities for avahi
  7. COMMENT-mono= mono (.NET) bindings for avahi
  8. COMMENT-qt3= qt3 bindings for avahi
  9. COMMENT-qt4= qt4 bindings for avahi
  10. COMMENT-ui= common avahi-ui header for gtk+2 and gtk+3
  11. V= 0.6.31
  12. DISTNAME= avahi-${V}
  13. CATEGORIES= net devel portcheck
  14. PKGNAME-main= avahi-${V}
  15. PKGNAME-gtk= avahi-gtk-${V}
  16. PKGNAME-gtk3= avahi-gtk3-${V}
  17. PKGNAME-gui= avahi-gui-${V}
  18. PKGNAME-mono= mono-avahi-${V}
  19. PKGNAME-qt3= avahi-qt3-${V}
  20. PKGNAME-qt4= avahi-qt4-${V}
  21. PKGNAME-ui= avahi-ui-${V}
  22. MAINTAINER= Antoine Jacoutot <ajacoutot@openbsd.org>
  23. SHARED_LIBS += avahi-common 0.0 # .8.0
  24. SHARED_LIBS += avahi-core 0.0 # .5.5
  25. SHARED_LIBS += avahi-client 5.0 # .5.4
  26. SHARED_LIBS += avahi-glib 0.3 # .1.1
  27. SHARED_LIBS += avahi-gobject 0.0 # .0.1
  28. SHARED_LIBS += howl 9.9 \
  29. dns_sd 0.0 # .1.0
  30. HOMEPAGE= http://www.avahi.org/
  31. # LGPLv2.1
  32. PERMIT_PACKAGE_CDROM= Yes
  33. MASTER_SITES= ${HOMEPAGE}/download/
  34. PSEUDO_FLAVORS= no_gui no_mono no_qt3 no_qt4 bootstrap
  35. FLAVOR?= no_gui no_mono no_qt3 no_qt4 bootstrap
  36. MULTI_PACKAGES= -main -mono -qt3 -qt4 -gui -gtk -gtk3 -ui
  37. MODULES= devel/gettext \
  38. textproc/intltool
  39. BUILD_DEPENDS= converters/xmltoman \
  40. devel/gobject-introspection \
  41. WANTLIB-main= c expat glib-2.0 gobject-2.0 pcre pthread \
  42. gdbm daemon dbus-1 ffi \
  43. ${MODGETTEXT_WANTLIB}
  44. LIB_DEPENDS-main= ${MODGETTEXT_LIB_DEPENDS} \
  45. devel/glib2 \
  46. databases/gdbm \
  47. devel/libdaemon>=0.14 \
  48. x11/dbus
  49. .include <bsd.port.arch.mk>
  50. .if !${BUILD_PACKAGES:M-gui}
  51. # all these vanish together
  52. BUILD_PACKAGES := ${BUILD_PACKAGES:N-mono:N-gtk:N-gtk3:N-ui}
  53. .endif
  54. .if ${BUILD_PACKAGES:M-mono}
  55. MODULES+= lang/mono
  56. BUILD_DEPENDS+= ${MODMONO_BUILD_DEPENDS} \
  57. x11/mono-gtk2
  58. RUN_DEPENDS-mono= ${MODMONO_RUN_DEPENDS} \
  59. ${BUILD_PKGPATH},-gtk \
  60. x11/mono-gtk2
  61. LIB_DEPENDS-mono= # empty
  62. WANTLIB-mono= # empty
  63. .else
  64. CONFIGURE_ARGS+= --disable-mono \
  65. --disable-monodoc
  66. .endif
  67. .if ${BUILD_PACKAGES:M-gui}
  68. ### common
  69. MODULES+= lang/python
  70. BUILD_DEPENDS+= lang/python/${MODPY_VERSION},-gdbm \
  71. x11/py-gtk2 \
  72. x11/dbus-python
  73. ### -gtk
  74. SHARED_LIBS += avahi-ui 0.0 # .1.0
  75. LIB_DEPENDS-gtk= ${MODGETTEXT_LIB_DEPENDS} \
  76. x11/gtk+2 \
  77. ${BUILD_PKGPATH}
  78. RUN_DEPENDS-gtk= ${MODGETTEXT_RUN_DEPENDS} \
  79. ${BUILD_PKGPATH},-ui
  80. WANTLIB-gtk= X11 Xcomposite Xcursor Xdamage Xext Xfixes \
  81. Xi Xinerama Xrandr Xrender atk-1.0 cairo dbus-1 \
  82. expat fontconfig freetype gdbm gdk-x11-2.0 gthread-2.0 \
  83. gdk_pixbuf-2.0 gio-2.0 glib-2.0 gmodule-2.0 \
  84. gobject-2.0 gtk-x11-2.0 m pango-1.0 pangocairo-1.0 \
  85. pangoft2-1.0 pcre pixman-1 png pthread pthread-stubs xcb z \
  86. xcb-render avahi-client avahi-common xcb-shm \
  87. avahi-glib ffi harfbuzz graphite2 \
  88. ${MODGETTEXT_WANTLIB}
  89. ### -gtk3
  90. SHARED_LIBS += avahi-ui-gtk3 0.0 # 1.4
  91. LIB_DEPENDS-gtk3= ${MODGETTEXT_LIB_DEPENDS} \
  92. x11/gtk+3 \
  93. ${BUILD_PKGPATH}
  94. RUN_DEPENDS-gtk3= ${MODGETTEXT_RUN_DEPENDS} \
  95. ${BUILD_PKGPATH},-ui
  96. WANTLIB-gtk3 += X11 Xcomposite Xcursor Xdamage Xext Xfixes
  97. WANTLIB-gtk3 += Xi Xinerama Xrandr Xrender atk-1.0 avahi-client
  98. WANTLIB-gtk3 += avahi-common avahi-glib cairo cairo-gobject
  99. WANTLIB-gtk3 += dbus-1 expat fontconfig freetype gdbm gdk-3 gdk_pixbuf-2.0
  100. WANTLIB-gtk3 += gio-2.0 glib-2.0 gmodule-2.0 gobject-2.0 gthread-2.0
  101. WANTLIB-gtk3 += gtk-3 m pango-1.0 pangocairo-1.0 pangoft2-1.0
  102. WANTLIB-gtk3 += pcre pixman-1 png pthread pthread-stubs xcb xcb-render
  103. WANTLIB-gtk3 += xcb-shm z ffi ${MODGETTEXT_WANTLIB}
  104. WANTLIB-gtk3 += ICE SM atk-bridge-2.0 atspi harfbuzz
  105. WANTLIB-gtk3 += graphite2
  106. ### -gui
  107. LIB_DEPENDS-gui= ${MODGETTEXT_LIB_DEPENDS} \
  108. ${BUILD_PKGPATH},-gtk3
  109. RUN_DEPENDS-gui= ${MODGETTEXT_RUN_DEPENDS} \
  110. ${MODPY_RUN_DEPENDS} \
  111. lang/python/${MODPY_VERSION},-gdbm \
  112. x11/py-gtk2 \
  113. x11/dbus-python \
  114. devel/py-twisted/web \
  115. devel/desktop-file-utils
  116. WANTLIB-gui += X11 Xcomposite Xcursor Xdamage Xext Xfixes
  117. WANTLIB-gui += Xi Xinerama Xrandr Xrender atk-1.0 avahi-client
  118. WANTLIB-gui += avahi-common avahi-core avahi-glib avahi-ui-gtk3 c
  119. WANTLIB-gui += cairo cairo-gobject dbus-1 expat fontconfig freetype
  120. WANTLIB-gui += gdbm gdk-3 gdk_pixbuf-2.0 gio-2.0 glib-2.0 gmodule-2.0
  121. WANTLIB-gui += gobject-2.0 gthread-2.0 gtk-3 m pango-1.0
  122. WANTLIB-gui += pangocairo-1.0 pangoft2-1.0 pcre pixman-1 png pthread
  123. WANTLIB-gui += pthread-stubs xcb xcb-render xcb-shm z ffi
  124. WANTLIB-gui += ICE SM atk-bridge-2.0 atspi harfbuzz
  125. WANTLIB-gui += graphite2
  126. WANTLIB-gui += ${MODGETTEXT_WANTLIB}
  127. ### -ui
  128. LIB_DEPENDS-ui= # empty
  129. RUN_DEPENDS-ui= ${BUILD_PKGPATH}
  130. WANTLIB-ui= # empty
  131. .else
  132. CONFIGURE_ARGS+= --disable-gtk \
  133. --disable-gtk3 \
  134. --disable-python \
  135. --disable-pygtk \
  136. --disable-python-dbus
  137. .endif
  138. .if ${BUILD_PACKAGES:M-qt3}
  139. SHARED_LIBS += avahi-qt3 0.0 # .1.2
  140. MODULES+= x11/qt3
  141. LIB_DEPENDS-qt3= ${MODGETTEXT_LIB_DEPENDS} \
  142. ${MODQT3_LIB_DEPENDS} \
  143. ${BUILD_PKGPATH}
  144. WANTLIB-qt3= GL ICE SM X11 Xcursor Xext Xfixes Xft Xi \
  145. Xinerama Xmu Xrandr Xrender Xt expat fontconfig \
  146. freetype jpeg lcms m mng png pthread xcb z \
  147. avahi-common stdc++ ${MODQT3_WANTLIB} ${MODGETTEXT_WANTLIB} \
  148. Xdamage Xxf86vm drm pthread-stubs
  149. .else
  150. CONFIGURE_ARGS+= --disable-qt3
  151. .endif
  152. .if ${BUILD_PACKAGES:M-qt4}
  153. SHARED_LIBS += avahi-qt4 0.0 # .1.2
  154. MODULES+= x11/qt4
  155. LIB_DEPENDS-qt4= ${MODGETTEXT_LIB_DEPENDS} \
  156. x11/qt4 \
  157. ${BUILD_PKGPATH}
  158. WANTLIB-qt4= QtCore avahi-common m stdc++ ${MODGETTEXT_WANTLIB} \
  159. pthread
  160. .else
  161. CONFIGURE_ARGS+= --disable-qt4
  162. .endif
  163. USE_GMAKE= Yes
  164. MODPY_RUNDEP= No
  165. MODMONO_DEPS= No
  166. CFLAGS+= -D_BSD_SOURCE
  167. CONFIGURE_STYLE=gnu
  168. CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include -I${X11BASE}/include" \
  169. LDFLAGS="-L${LOCALBASE}/lib -L${X11BASE}/lib" \
  170. PTHREAD_CFLAGS="-pthread" \
  171. PTHREAD_LIBS="-pthread" \
  172. PYTHON="${MODPY_BIN}"
  173. CONFIGURE_ARGS+=--with-dbus-sys="${SYSCONFDIR}/dbus-1/" \
  174. --with-avahi-user=_avahi \
  175. --with-avahi-group=_avahi \
  176. --with-avahi-priv-access-group=wheel \
  177. --with-xml=expat \
  178. --with-distro=none \
  179. --enable-compat-howl \
  180. --enable-compat-libdns_sd \
  181. --enable-core-docs \
  182. --enable-tests \
  183. --enable-introspection \
  184. --disable-autoipd \
  185. --disable-doxygen-doc \
  186. --disable-doxygen-dot \
  187. --disable-doxygen-xml \
  188. --disable-doxygen-html
  189. # don't link with libssp from the gcc4 port
  190. # __guard and __stack_smash_handler are part of libc
  191. CONFIGURE_ARGS+=--disable-stack-protector
  192. FAKE_FLAGS= SYSCONFDIR=${SYSCONFDIR}
  193. PC_FILES= avahi-ui.pc avahi-client.pc avahi-compat-howl.pc \
  194. avahi-compat-libdns_sd.pc avahi-core.pc avahi-glib.pc \
  195. avahi-gobject.pc avahi-qt3.pc avahi-qt4.pc
  196. pre-configure:
  197. find ${WRKSRC} -name Makefile.in -exec \
  198. perl -pi -e 's,LIBINTL,INTLLIBS,g;' \
  199. -e 's,LIBICONV,LTLIBICONV,g' {} \;
  200. find ${WRKSRC}/man -name '*.[1-9]*' | xargs \
  201. perl -pi -e 's,/etc/avahi,${SYSCONFDIR}/avahi,g'
  202. perl -pi -e 's,dbus_connection_disconnect,dbus_connection_close,g' \
  203. ${WRKSRC}/avahi-client/client.c \
  204. ${WRKSRC}/avahi-daemon/dbus-protocol.c
  205. perl -pi -e 's,-ldl,,g' ${WRKSRC}/configure \
  206. ${WRKSRC}/avahi-client/Makefile.in \
  207. ${WRKSRC}/avahi-daemon/Makefile.in
  208. for i in ${PC_FILES}; do \
  209. perl -pi -e 's,Libs:,Libs: -pthread,;' \
  210. -e 's,Cflags:,Cflags: -pthread,' ${WRKSRC}/$${i}.in; done
  211. post-install:
  212. ${INSTALL_DATA_DIR} ${PREFIX}/share/examples
  213. mv ${WRKINST}${SYSCONFDIR}/dbus-1 ${PREFIX}/share/examples/
  214. mv ${WRKINST}${SYSCONFDIR}/avahi ${PREFIX}/share/examples/
  215. # Install the dbus system-service, some applications needs it to
  216. # know that avahi-daemon is running.
  217. ${INSTALL_DATA_DIR} ${PREFIX}/share/dbus-1/system-services
  218. ${INSTALL_DATA} ${WRKBUILD}/avahi-daemon/org.freedesktop.Avahi.service \
  219. ${PREFIX}/share/dbus-1/system-services
  220. # XXX DLLMAP_FILES won't work here since the files are generated during the build process
  221. find ${PREFIX} -name avahi-sharp.dll.config -or -name avahi-ui-sharp.dll.config | \
  222. xargs perl -pi -e 's,\.so(\.[0-9])+,\.so,g'
  223. .include <bsd.port.mk>