use bsd.port.arch.mk

This commit is contained in:
espie 2011-10-17 10:03:51 +00:00
parent 8e994931c9
commit f49ad17ddb
2 changed files with 55 additions and 69 deletions

View File

@ -1,6 +1,6 @@
# $OpenBSD: Makefile,v 1.71 2011/10/17 06:41:43 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.72 2011/10/17 10:03:51 espie Exp $
ONLY_FOR_ARCHS-mono= i386 amd64
ONLY_FOR_ARCHS-mono= ${MONO_ARCHS}
COMMENT-main= framework for Multicast DNS Service Discovery
COMMENT-gtk= gtk+2 avahi-ui libraries
@ -56,7 +56,7 @@ MASTER_SITES= ${HOMEPAGE}/download/
PSEUDO_FLAVORS= no_gui no_mono no_qt3 no_qt4
FLAVOR?= no_gui no_mono no_qt3 no_qt4
MULTI_PACKAGES= -main
MULTI_PACKAGES= -main -mono -qt3 -qt4 -gui -gtk -gtk3 -ui
MODULES= devel/gettext \
textproc/intltool
@ -76,22 +76,19 @@ LIB_DEPENDS-main= ${MODGETTEXT_LIB_DEPENDS} \
devel/libdaemon>=0.14 \
x11/dbus
BUILD_MONO = No
.if !${FLAVOR:L:Mno_mono}
MULTI_PACKAGES+= -mono
. for _a in ${MACHINE_ARCH} ${ARCH}
. if ${ONLY_FOR_ARCHS-mono:M${_a}}
BUILD_MONO = Yes
. endif
. endfor
.include <bsd.port.arch.mk>
.if !${BUILD_PACKAGES:M-gui}
# all these vanish together
BUILD_PACKAGES := ${BUILD_PACKAGES:N-mono:N-gtk:N-gtk3:N-ui}
.endif
.if ${BUILD_MONO:L} == "yes"
.if ${BUILD_PACKAGES:M-mono}
MODULES+= lang/mono
BUILD_DEPENDS+= ${MODMONO_BUILD_DEPENDS} \
x11/mono-gtk2
RUN_DEPENDS-mono= ${MODMONO_RUN_DEPENDS} \
net/avahi,-gtk,no_qt3,no_qt4 \
${BUILD_PKGPATH},-gtk \
x11/mono-gtk2
LIB_DEPENDS-mono= # empty
WANTLIB-mono= # empty
@ -100,7 +97,7 @@ CONFIGURE_ARGS+= --disable-mono \
--disable-monodoc
.endif
.if !${FLAVOR:L:Mno_gui} || ${BUILD_MONO:L} == "yes"
.if ${BUILD_PACKAGES:M-gui}
### common
MODULES+= lang/python
BUILD_DEPENDS+= lang/python/${MODPY_VERSION},-gdbm \
@ -109,12 +106,11 @@ BUILD_DEPENDS+= lang/python/${MODPY_VERSION},-gdbm \
### -gtk
SHARED_LIBS += avahi-ui 0.0 # .1.0
MULTI_PACKAGES+= -gtk
LIB_DEPENDS-gtk= ${MODGETTEXT_LIB_DEPENDS} \
x11/gtk+2 \
net/avahi
${BUILD_PKGPATH}
RUN_DEPENDS-gtk= ${MODGETTEXT_RUN_DEPENDS} \
net/avahi,-ui,no_mono,no_qt3,no_qt4
${BUILD_PKGPATH},-ui
WANTLIB-gtk= X11 Xau Xcomposite Xcursor Xdamage Xdmcp Xext Xfixes \
Xi Xinerama Xrandr Xrender atk-1.0 cairo dbus-1 \
expat fontconfig freetype gdbm gdk-x11-2.0 gthread-2.0 \
@ -126,12 +122,11 @@ WANTLIB-gtk= X11 Xau Xcomposite Xcursor Xdamage Xdmcp Xext Xfixes \
### -gtk3
SHARED_LIBS += avahi-ui-gtk3 0.0 # 1.4
MULTI_PACKAGES+= -gtk3
LIB_DEPENDS-gtk3= ${MODGETTEXT_LIB_DEPENDS} \
x11/gtk+3 \
net/avahi
${BUILD_PKGPATH}
RUN_DEPENDS-gtk3= ${MODGETTEXT_RUN_DEPENDS} \
net/avahi,-ui,no_mono,no_qt3,no_qt4
${BUILD_PKGPATH},-ui
WANTLIB-gtk3 += GL X11 Xau Xcomposite Xcursor Xdamage Xdmcp Xext Xfixes
WANTLIB-gtk3 += Xi Xinerama Xrandr Xrender Xxf86vm atk-1.0 avahi-client
WANTLIB-gtk3 += avahi-common avahi-glib cairo cairo-gobject
@ -142,9 +137,8 @@ WANTLIB-gtk3 += pcre pixman-1 png pthread pthread-stubs xcb xcb-render
WANTLIB-gtk3 += xcb-shm z ffi ${MODGETTEXT_WANTLIB}
### -gui
MULTI_PACKAGES+= -gui
LIB_DEPENDS-gui= ${MODGETTEXT_LIB_DEPENDS} \
net/avahi,-gtk3,no_mono,no_qt3,no_qt4
${BUILD_PKGPATH},-gtk3
RUN_DEPENDS-gui= ${MODGETTEXT_RUN_DEPENDS} \
${MODPY_RUN_DEPENDS} \
lang/python/${MODPY_VERSION},-gdbm \
@ -163,9 +157,8 @@ WANTLIB-gui += pthread-stubs xcb xcb-render xcb-shm z ffi
WANTLIB-gui += ${MODGETTEXT_WANTLIB}
### -ui
MULTI_PACKAGES+= -ui
LIB_DEPENDS-ui= # empty
RUN_DEPENDS-ui= net/avahi
RUN_DEPENDS-ui= ${BUILD_PKGPATH}
WANTLIB-ui= # empty
.else
CONFIGURE_ARGS+= --disable-gtk \
@ -173,15 +166,15 @@ CONFIGURE_ARGS+= --disable-gtk \
--disable-python \
--disable-pygtk \
--disable-python-dbus
.endif
.if !${FLAVOR:L:Mno_qt3}
.if ${BUILD_PACKAGES:M-qt3}
SHARED_LIBS += avahi-qt3 0.0 # .1.2
MULTI_PACKAGES+= -qt3
MODULES+= x11/qt3
LIB_DEPENDS-qt3= ${MODGETTEXT_LIB_DEPENDS} \
${MODQT3_LIB_DEPENDS} \
net/avahi
${BUILD_PKGPATH}
WANTLIB-qt3= GL ICE SM X11 Xau Xcursor Xdmcp Xext Xfixes Xft Xi \
Xinerama Xmu Xrandr Xrender Xt expat fontconfig \
freetype jpeg lcms m mng png pthread-stubs xcb z \
@ -191,13 +184,12 @@ WANTLIB-qt3= GL ICE SM X11 Xau Xcursor Xdmcp Xext Xfixes Xft Xi \
CONFIGURE_ARGS+= --disable-qt3
.endif
.if !${FLAVOR:L:Mno_qt4}
.if ${BUILD_PACKAGES:M-qt4}
SHARED_LIBS += avahi-qt4 0.0 # .1.2
MULTI_PACKAGES+= -qt4
MODULES+= x11/qt4
LIB_DEPENDS-qt4= ${MODGETTEXT_LIB_DEPENDS} \
x11/qt4 \
net/avahi
${BUILD_PKGPATH}
WANTLIB-qt4= QtCore avahi-common m stdc++ ${MODGETTEXT_WANTLIB} \
glib-2.0 gthread-2.0 pcre z
.else

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.125 2011/09/24 13:47:42 sthen Exp $
# $OpenBSD: Makefile,v 1.126 2011/10/17 10:03:51 espie Exp $
SHARED_ONLY= Yes
COMMENT-main= open source multi-protocol PBX and telephony toolkit
@ -31,7 +31,10 @@ WANTLIB-main += m ogg pthread spandsp sqlite3 ssl stdc++ termcap
WANTLIB-main += tiff vorbis vorbisenc xml2 z ${MODLIBICONV_WANTLIB}
MODULES= devel/gettext converters/libiconv
MULTI_PACKAGES+= -main
MULTI_PACKAGES= -main -calendar -ldap -odbc -pgsql -snmp -speex
PSEUDO_FLAVORS= no_calendar no_ldap no_odbc no_pgsql no_snmp no_speex
SUBST_VARS+= ${SOUNDS:S/^/SOUNDS_/}
LIB_DEPENDS-main= audio/gsm \
@ -123,7 +126,7 @@ FLAVORS= imap
## flavours:
.if ${FLAVOR:L:Mh323}
.if ${FLAVOR:Mh323}
LIB_DEPENDS-main+= net/h323plus
WANTLIB-main+= SDL avutil expat h323.>=3 lber ldap ldap_r pt.>=3 sasl2
.else
@ -131,7 +134,7 @@ CONFIGURE_ARGS+= --with-pwlib=no \
--with-h323=no
.endif
.if ${FLAVOR:L:Mimap}
.if ${FLAVOR:Mimap}
CONFIGURE_ARGS+= --with-imap=yes
MAKE_FLAGS+= MENUSELECT_OPTS_app_voicemail=IMAP_STORAGE
CPPFLAGS+= -I${LOCALBASE}/include/c-client
@ -142,86 +145,77 @@ CONFIGURE_ARGS+= --with-imap=no
.endif
## multipackages:
.include <bsd.port.arch.mk>
# calendar
PSEUDO_FLAVORS+= no_calendar
.if ${FLAVOR:L:Mno_calendar}
CONFIGURE_ARGS+= --with-ical=no
.else
MULTI_PACKAGES+= -calendar
COMMENT-calendar= calendar support for Asterisk
WANTLIB-calendar= ${MODGETTEXT_WANTLIB} asn1 crypto expat gssapi \
ical iksemel krb5 m neon ssl xml2 z
LIB_DEPENDS-calendar= net/neon \
textproc/libical \
${MODGETTEXT_LIB_DEPENDS}
.if !${BUILD_PACKAGES:M-calendar}
CONFIGURE_ARGS+= --with-ical=no
.endif
# ldap
PSEUDO_FLAVORS+= no_ldap
.if ${FLAVOR:L:Mno_ldap}
CONFIGURE_ARGS+= --with-ldap=no
.else
MULTI_PACKAGES+= -ldap
COMMENT-ldap= LDAP support for Asterisk
LIB_DEPENDS-ldap= databases/openldap,-main
WANTLIB-ldap= ldap
.if !${BUILD_PACKAGES:M-ldap}
CONFIGURE_ARGS+= --with-ldap=no
.endif
# mysql need to handle building addons/ first XXX
# up above .include <bsd.port.arch.mk>
#PSEUDO_FLAVORS+= no_mysql
#.if ${FLAVOR:L:Mno_mysql}
#CONFIGURE_ARGS+= --with-mysqlclient=no
#.else
#MULTI_PACKAGES+= -mysql
#
#COMMENT-mysql= MySQL support for Asterisk
#WANTLIB-mysql= mysqlclient
#LIB_DEPENDS-mysql= databases/mysql
#
#.if !${BUILD_PACKAGES:M-mysql}
#CONFIGURE_ARGS+= --with-mysqlclient=no
#.endif
# odbc
PSEUDO_FLAVORS+= no_odbc
.if ${FLAVOR:L:Mno_odbc}
CONFIGURE_ARGS+= --with-iodbc=no \
--with-ltdl=no
.else
MULTI_PACKAGES+= -odbc
COMMENT-odbc= ODBC support for Asterisk
LIB_DEPENDS-odbc= databases/iodbc
WANTLIB-odbc= iodbc
.if !${BUILD_PACKAGES:M-odbc}
CONFIGURE_ARGS+= --with-iodbc=no \
--with-ltdl=no
.endif
# postgresql
PSEUDO_FLAVORS+= no_pgsql
.if ${FLAVOR:L:Mno_pgsql}
CONFIGURE_ARGS+= --with-postgres=no
.else
MULTI_PACKAGES+= -pgsql
COMMENT-pgsql= PostgreSQL support for Asterisk
WANTLIB-pgsql= pq z
LIB_DEPENDS-pgsql= databases/postgresql
.if !${BUILD_PACKAGES:M-pgsql}
CONFIGURE_ARGS+= --with-postgres=no
.endif
# snmp
PSEUDO_FLAVORS+= no_snmp
.if ${FLAVOR:L:Mno_snmp}
CONFIGURE_ARGS+= --with-snmp=no
.else
MULTI_PACKAGES+= -snmp
COMMENT-snmp= Net-SNMP support for Asterisk
WANTLIB-snmp= c m netsnmp netsnmpagent netsnmphelpers netsnmpmibs perl util
LIB_DEPENDS-snmp= net/net-snmp
.if !${BUILD_PACKAGES:M-snmp}
CONFIGURE_ARGS+= --with-snmp=no
.endif
# speex
PSEUDO_FLAVORS+= no_speex
.if ${FLAVOR:L:Mno_speex}
CONFIGURE_ARGS+= --with-speex=no
.else
MULTI_PACKAGES+= -speex
COMMENT-speex= Speex codec for Asterisk
WANTLIB-speex= m speex speexdsp
LIB_DEPENDS-speex= audio/speex>=1.2rc1
.if !${BUILD_PACKAGES:M-speex}
CONFIGURE_ARGS+= --with-speex=no
.endif
NO_REGRESS= Yes
@ -234,7 +228,7 @@ EXAMPLEFILES= cdr.conf extensions.ael extensions.conf logger.conf \
# subpackages aren't flavoured, so overwrite the default name/path
FULLPKGNAME$i ?= asterisk$i-${VER}
FULLPKGPATH$i ?= ${PKGPATH},$i
RUN_DEPENDS$i += asterisk-${VER}:${PKGPATH}
RUN_DEPENDS$i += asterisk-${VER}:${BUILD_PKGPATH}
.endfor
post-patch: