Line 0
Link Here
|
|
|
1 |
# $FreeBSD# |
2 |
# |
3 |
# Provide support for corosync ports |
4 |
# |
5 |
# Feature: corosync |
6 |
# Usage: USES=coroync |
7 |
# |
8 |
# MAINTAINER: dpejesh@yahoo.com |
9 |
|
10 |
.if !defined(_INCLUDE_USES_COROSYNC_MK) |
11 |
_INCLUDE_USES_COROSYNC_MK= yes |
12 |
|
13 |
# When adding a version, please keep the comment in |
14 |
# Mk/bsd.default-versions.mk in sync. |
15 |
_VALID_COROSYNC_VER= 2 3 |
16 |
|
17 |
.if ! ${_VALID_COROSYNC_VER:M${COROSYNC_DEFAULT}} |
18 |
IGNORE= Invalid corosync default version ${COROSYNC_DEFAULT}; valid versions are ${_VALID_COROSYNC_VER} |
19 |
.endif |
20 |
|
21 |
.if exists(${LOCALBASE}/sbin/corosync) |
22 |
_COROSYNC_INSTALLED_VER!= ${LOCALBASE}/sbin/corosync -v 2>/dev/null |
23 |
_COROSYNC_INSTALLED_VER:= ${_COROSYNC_INSTALLED_VER:M'*':C/'//g} |
24 |
_COROSYNC_INSTALLED_VER_MAJOR= ${_COROSYNC_INSTALLED_VER:C/([0-9]*).[0-9]*.*/\1/g} |
25 |
_COROSYNC_INSTALLED_VER_MINOR= ${_COROSYNC_INSTALLED_VER:C/[0-9]*.([0-9]*).*/\1/g} |
26 |
|
27 |
# Currently corosync 3 is tagged 2.99.x so this is a temporary |
28 |
# work around until the final version is released. |
29 |
. if ${_COROSYNC_INSTALLED_VER_MAJOR} == 2 && ${_COROSYNC_INSTALLED_VER_MINOR} == 99 |
30 |
_COROSYNC_INSTALLED_VER_MAJOR= 3 |
31 |
_COROSYNC_INSTALLED_VER_MINOR= 0 |
32 |
. endif |
33 |
|
34 |
. if ${COROSYNC_DEFAULT} != ${_COROSYNC_INSTALLED_VER_MAJOR} |
35 |
IGNORE= DEFAULT_VERSIONS=corosync=${COROSYNC_DEFAULT} but ${_COROSYNC_INSTALLED_VER} is installed |
36 |
. endif |
37 |
.endif |
38 |
|
39 |
BUILD_DEPENDS+= corosync:net/corosync${COROSYNC_DEFAULT} |
40 |
RUN_DEPENDS+= corosync:net/corosync${COROSYNC_DEFAULT} |
41 |
|
42 |
.endif |