aboutsummaryrefslogtreecommitdiffstats
path: root/misc/auto-multiple-choice/Makefile
blob: 5ba15ba89e64b99beb2e15b5688b54d88c87339d (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
# $FreeBSD$

PORTNAME=   auto-multiple-choice
PORTVERSION=    1.3.0
PORTREVISION=   1
CATEGORIES= misc
MASTER_SITES=   http://download.gna.org/auto-qcm/
DISTNAME=   auto-multiple-choice_${PORTVERSION}_precomp

MAINTAINER= hiroto.kagotani@gmail.com
COMMENT=    Multiple-choice questionnaire management with automated marking

LICENSE=    GPLv2

LIB_DEPENDS=    libcairo.so:graphics/cairo \
        libnetpbm.so:graphics/netpbm \
        libopencv_highgui.so:graphics/opencv \
        libpangocairo-1.0.so:x11-toolkits/pango \
        libpoppler-glib.so:graphics/poppler-glib
RUN_DEPENDS=    p5-DBD-SQLite>=0:databases/p5-DBD-SQLite \
        p5-DBI>=0:databases/p5-DBI \
        p5-Email-MIME>=0:mail/p5-Email-MIME \
        p5-Email-Sender>=0:mail/p5-Email-Sender \
        p5-Glib-Object-Introspection>=0:devel/p5-Glib-Object-Introspection \
        p5-Gtk2-Notify>=0:devel/p5-Gtk2-Notify \
        p5-Locale-gettext>=0:devel/p5-Locale-gettext \
        p5-Module-Pluggable>=0:devel/p5-Module-Pluggable \
        p5-Net-CUPS>=0:print/p5-Net-CUPS \
        p5-OpenOffice-OODoc>=0:textproc/p5-OpenOffice-OODoc \
        p5-Text-CSV>=0:textproc/p5-Text-CSV \
        p5-XML-Simple>=0:textproc/p5-XML-Simple \
        p5-XML-Writer>=0:textproc/p5-XML-Writer \
        pdftoppm:graphics/poppler-utils

WRKSRC=     ${WRKDIR}/auto-multiple-choice-${PORTVERSION}
PORTDOCS=   html auto-multiple-choice.*
MANLANG=    "" fr ja

SHARED_MIMEINFO_DIR=    ${PREFIX}/share/mime/packages
LANG_GTKSOURCEVIEW_DIR= ${PREFIX}/share/gtksourceview-2.0/language-specs

USE_TEX=    latex texhash
USES+=      gettext gmake iconv:build perl5 pkgconfig shared-mime-info

OPTIONS_DEFINE= DOCS

post-patch:
    @${REINPLACE_CMD} -e "\
        s|%%DATADIR%%|${DATADIR}|g; \
        s|%%DOCSDIR%%|${DOCSDIR}|g; \
        s|%%LANG_GTKSOURCEVIEW_DIR%%|${LANG_GTKSOURCEVIEW_DIR}|g; \
        s|%%LOCALBASE%%|${LOCALBASE}|g; \
        s|%%MANPREFIX%%|${MANPREFIX}|g; \
        s|%%PREFIX%%|${PREFIX}|g; \
        s|%%SHARED_MIMEINFO_DIR%%|${SHARED_MIMEINFO_DIR}|g; \
        s|%%SITE_PERL_REL%%|${SITE_PERL_REL}|g; \
        s|%%TEXMFLOCALDIR%%|${TEXMFLOCALDIR}|g; \
        " ${WRKSRC}/Makefile.conf
    @${REINPLACE_CMD} -e "s|^#! /usr/bin/perl|#!${LOCALBASE}/bin/perl|" \
        ${WRKSRC}/*.pl ${WRKSRC}/*.pl.in
    @${REINPLACE_CMD} -e "s|^#! @/PERLPATH/@|#!${LOCALBASE}/bin/perl|" \
        ${WRKSRC}/auto-multiple-choice.in
    @${RM} ${WRKSRC}/vars-subs.pl

pre-install:
    ${MKDIR} ${STAGEDIR}/${SHARED_MIMEINFO_DIR} \
        ${STAGEDIR}/${LANG_GTKSOURCEVIEW_DIR}

.include <bsd.port.mk>