t1.sample 8.1 KB

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