aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/darknock/Makefile
blob: 4729e24f815c44f89af012b2fc07598619c10b6a (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
# Created by: Yinghong.Liu <relaxbsd@gmail.com>
# $FreeBSD$

PORTNAME=   darknock
PORTVERSION=    0.3.0
PORTREVISION=   5
CATEGORIES= graphics
MASTER_SITES=   SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}

MAINTAINER= ports@FreeBSD.org
COMMENT=    Program that can detect edges in images

LICENSE=    GPLv2 # (or later)

WRKSRC=     ${WRKDIR}/${PORTNAME}

USE_QT4=    gui linguist_build moc_build qmake_build rcc_build uic_build

PORTDOCS=   changelog
PLIST_FILES=    bin/darknock share/pixmaps/darknock.png

DESKTOP_ENTRIES=    "${PORTNAME}" \
            "${COMMENT}" \
            "${PREFIX}/share/pixmaps/${PORTNAME}.png" \
            "${PORTNAME}" \
            "Graphics;Qt;" \
            "false"

LRELEASE=   ${QT_PREFIX}/bin/lrelease-qt4

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MNLS}
.for lang in fr it pl ro sv tr
PLIST_FILES+=   %%DATADIR%%/locale/darknock_${lang}.qm
.endfor
PLIST_DIRS+=    %%DATADIR%%/locale %%DATADIR%%
.endif

post-patch:
    @${REINPLACE_CMD} -e 's|/usr/share/darknock|${DATADIR}|g' \
        ${WRKSRC}/src/main.cpp

pre-build:
    @${LRELEASE} ${BUILD_WRKSRC}/${PORTNAME}.pro
    @(cd ${BUILD_WRKSRC} && ${SETENV} ${MAKE_ENV} ${QMAKE} ${QMAKEFLAGS})

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
    ${INSTALL_DATA} ${WRKSRC}/images/${PORTNAME}.png ${PREFIX}/share/pixmaps
.if ${PORT_OPTIONS:MNLS}
    @${MKDIR} ${DATADIR}/locale
    ${INSTALL_DATA} ${WRKSRC}/locale/*.qm ${DATADIR}/locale
.endif
.if !defined(NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}
.for doc in ${PORTDOCS}
    ${INSTALL_DATA} ${WRKSRC}/${doc} ${DOCSDIR}
.endfor
.endif

.include <bsd.port.mk>