aboutsummaryrefslogtreecommitdiffstats
path: root/devel/libopensync/Makefile
blob: 6b0ab14c916acf1bec1f4aff6eb48c9ae8eb037f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Created by: Michael Johnson <ahze@FreeBSD.org>
# $FreeBSD$

PORTNAME=   libopensync
PORTVERSION=    0.39
PORTREVISION=   1
CATEGORIES= devel
MASTER_SITES=   http://www.opensync.org/download/releases/${PORTVERSION}/

MAINTAINER= danilogondolfo@gmail.com
COMMENT=    A PIM data synchronization framework

BUILD_DEPENDS=  swig1.3:${PORTSDIR}/devel/swig13
LIB_DEPENDS=    exslt:${PORTSDIR}/textproc/libxslt

CONFLICTS=  libopensync-0.22*

USE_SQLITE= 3
USE_BZIP2=  yes
USES=       cmake pkgconfig
CMAKE_ARGS+=    -Wno-dev
USE_GNOME=  glib20 libxml2
USE_PYTHON= yes
USE_LDCONFIG=   yes
CMAKE_ARGS+=    -DPYTHON_INCLUDE_PATH:PATH=${PYTHON_INCLUDEDIR}

OPTIONS_DEFINE= DOCS

NO_STAGE=   yes
.include <bsd.port.pre.mk>

.if ${PORT_OPTIONS:MDOCS}
PLIST_FILES+=   %%DOCSDIR%%/OpenSync-WhitePaper.pdf
PLIST_DIRS+=    %%DOCSDIR%%
.endif

SWIG_VER=   $$(cd ${PORTSDIR}/devel/swig13 && ${MAKE} -V PORTVERSION)
SWIG_DATADIR=   $$(cd ${PORTSDIR}/devel/swig13 && ${MAKE} -V DATADIR)

post-patch:
    @${REINPLACE_CMD} -e "s|\$${LIBDATA_INSTALL_DIR}/pkgconfig|${PREFIX}/libdata/pkgconfig|" \
        -e "s|FIND_PACKAGE( SWIG|FIND_PACKAGE( SWIG REQUIRED|" \
        -e "/FIND_PACKAGE( Check )/d" ${WRKSRC}/CMakeLists.txt
    @${REINPLACE_CMD} -e "s|/usr/local/share/swig1.3|${SWIG_DATADIR}/${SWIG_VER}|g" \
        ${WRKSRC}/cmake/modules/FindSWIG.cmake
    @${REINPLACE_CMD} -e 's|glib/.*\.h>|glib.h>|g' \
        ${WRKSRC}/opensync/common/opensync_list.c

post-install:
.if ${PORT_OPTIONS:MDOCS}
    ${MKDIR} ${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/docs/OpenSync-WhitePaper.pdf ${DOCSDIR}
.endif
    @${CAT} ${PKGMESSAGE}

.include <bsd.port.post.mk>