aboutsummaryrefslogtreecommitdiffstats
path: root/deskutils/calibre/Makefile
blob: 5d5b7b8f1467dc8e0ff5e5949e6de386cdcd7c92 (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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# Created by: stas
# $FreeBSD$

PORTNAME=   calibre
PORTVERSION=    0.9.30
CATEGORIES= deskutils python
MASTER_SITES=   SF/${PORTNAME}/${PORTVERSION}/

MAINTAINER= rnejdl@ringofsaturn.com
COMMENT=    Ebook management application

LIB_DEPENDS=    MagickWand:${PORTSDIR}/graphics/ImageMagick \
        fontconfig:${PORTSDIR}/x11-fonts/fontconfig \
        poppler-qt4:${PORTSDIR}/graphics/poppler-qt4 \
        wmflite:${PORTSDIR}/graphics/libwmf \
        chm:${PORTSDIR}/misc/chmlib \
        icudata:${PORTSDIR}/devel/icu \
        podofo:${PORTSDIR}/graphics/podofo
BUILD_DEPENDS=  ${PYTHON_PKGNAMEPREFIX}sip>=0:${PORTSDIR}/devel/py-sip \
        ${PYTHON_PKGNAMEPREFIX}sqlite3>=0:${PORTSDIR}/databases/py-sqlite3 \
        ${PYTHON_PKGNAMEPREFIX}qt4-core>=0:${PORTSDIR}/devel/py-qt4-core \
        ${PYTHON_PKGNAMEPREFIX}qt4-gui>=0:${PORTSDIR}/x11-toolkits/py-qt4-gui \
        ${PYTHON_PKGNAMEPREFIX}qt4-network>=0:${PORTSDIR}/net/py-qt4-network \
        ${PYTHON_PKGNAMEPREFIX}qt4-webkit>=0:${PORTSDIR}/www/py-qt4-webkit \
        ${PYTHON_PKGNAMEPREFIX}cssutils>=0.9.9:${PORTSDIR}/www/py-cssutils \
        ${PYTHON_PKGNAMEPREFIX}dateutil>=0:${PORTSDIR}/devel/py-dateutil \
        ${PYTHON_PKGNAMEPREFIX}imaging>=0:${PORTSDIR}/graphics/py-imaging \
        ${PYTHON_PKGNAMEPREFIX}lxml>=0:${PORTSDIR}/devel/py-lxml
RUN_DEPENDS=    xdg-open:${PORTSDIR}/devel/xdg-utils \
        ${PYTHON_PKGNAMEPREFIX}dnspython>=0:${PORTSDIR}/dns/py-dnspython \
        ${PYTHON_PKGNAMEPREFIX}dateutil>=0:${PORTSDIR}/devel/py-dateutil \
        ${PYTHON_SITELIBDIR}/BeautifulSoup.py:${PORTSDIR}/www/py-beautifulsoup32 \
        ${PYTHON_PKGNAMEPREFIX}imaging>=0:${PORTSDIR}/graphics/py-imaging \
        ${PYTHON_PKGNAMEPREFIX}lxml>=0:${PORTSDIR}/devel/py-lxml \
        ${PYTHON_PKGNAMEPREFIX}mechanize>=0:${PORTSDIR}/www/py-mechanize \
        ${PYTHON_PKGNAMEPREFIX}sqlite3>=0:${PORTSDIR}/databases/py-sqlite3 \
        ${PYTHON_PKGNAMEPREFIX}qt4-core>=0:${PORTSDIR}/devel/py-qt4-core \
        ${PYTHON_PKGNAMEPREFIX}qt4-gui>=0:${PORTSDIR}/x11-toolkits/py-qt4-gui \
        ${PYTHON_PKGNAMEPREFIX}qt4-network>=0:${PORTSDIR}/net/py-qt4-network \
        ${PYTHON_PKGNAMEPREFIX}qt4-svg>=0:${PORTSDIR}/graphics/py-qt4-svg \
        ${PYTHON_PKGNAMEPREFIX}qt4-webkit>=0:${PORTSDIR}/www/py-qt4-webkit \
        ${PYTHON_PKGNAMEPREFIX}qt4-xml>=0:${PORTSDIR}/textproc/py-qt4-xml \
        ${PYTHON_PKGNAMEPREFIX}dbus>=0:${PORTSDIR}/devel/py-dbus \
        ${PYTHON_PKGNAMEPREFIX}netifaces>=0:${PORTSDIR}/net/py-netifaces \
        ${PYTHON_PKGNAMEPREFIX}cssselect>=0:${PORTSDIR}/www/py-cssselect \
        pdftohtml:${PORTSDIR}/graphics/poppler-utils \
        lshal:${PORTSDIR}/sysutils/hal

USES=       shared-mime-info
USE_XZ=     yes
USE_PYTHON= 2.7
USE_QT4=    qmake_build moc_build
INSTALLS_ICONS= yes
WRKSRC=     ${WRKDIR}/${PORTNAME}
CFLAGS+=    -I${LOCALBASE}/include
LDFLAGS+=   -L${LOCALBASE}/lib
MAKE_ENV+=  FC_INC_DIR="${LOCALBASE}/include/fontconfig" \
        FC_LIB_DIR="${LOCALBASE}/lib" \
        OVERRIDE_CFLAGS="${CFLAGS}" \
        OVERRIDE_LDFLAGS="${LDFLAGS}" \
        PODOFO_LIB_DIR="${LOCALBASE}/lib" \
        PODOFO_INC_DIR="${LOCALBASE}/include/podofo" \
        WITH_USB=yes

do-build:
    @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} \
        ${PYSETUP} build)

do-install:
.for dir in desktop-directories applications  gnome/apps mime/packages icons/hicolor/128x128/apps zsh/site-functions
    ${MKDIR} ${PREFIX}/share/${dir}
.endfor
    @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} \
        ${PYSETUP} ${INSTALL} --prefix ${PREFIX})

post-install:
    @${CAT} ${PKGMESSAGE}

.include <bsd.port.mk>