aboutsummaryrefslogtreecommitdiffstats
path: root/hungarian/hunspell/Makefile
blob: 6714beee4ad13bc79643e99aeb7518522ab3d27b (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
# New ports collection makefile for:    hunspell
# Date created:         24.07.2004
# Whom:                 janos.mohacsi@bsd.hu
#
# $FreeBSD$
#

PORTNAME=   hunspell
PORTVERSION=    1.1.10
CATEGORIES= hungarian textproc
MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE:S@$@:code@:S@%SUBDIR%@${PORTNAME}@} \
        http://magyarispell.sourceforge.net/:data
DISTFILES=  ${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX}:code hu_HU.zip:data

MAINTAINER= janos.mohacsi@bsd.hu
COMMENT=    Improved Hungarian spelling checker

EXTRACT_DEPENDS=    unzip:${PORTSDIR}/archivers/unzip

USE_GMAKE=  yes
USE_LDCONFIG=   yes
GNU_CONFIGURE=  yes
CONFIGURE_ARGS= "--with-ui"

MAN1=       hunspell.1
MAN4=       hunspell.4

PORTDOCS=   README README.myspell

.include <bsd.port.pre.mk>

# Ugly workaround for FreeBSD versions before the import of NetBSD gzip.
do-extract:
    @${RM} -rf ${WRKDIR}; \
    ${MKDIR} ${WRKDIR}; \
    cd ${WRKDIR} && ${TAR} -xzf  ${_DISTDIR}/${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX};\
        ${UNZIP_CMD} -qo ${_DISTDIR}/hu_HU.zip -d ${WRKDIR}

post-patch:
    @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
        ${WRKSRC}/src/tools/hunspell.cxx

do-install:
    ${INSTALL_MAN} ${WRKSRC}/man/hunspell.1 ${PREFIX}/man/man1
    ${INSTALL_MAN} ${WRKSRC}/man/hunspell.4 ${PREFIX}/man/man4
    ${INSTALL_PROGRAM} ${WRKSRC}/src/tools/.libs/hunspell ${PREFIX}/bin
    ${INSTALL_DATA} ${WRKSRC}/src/hunspell/.libs/libhunspell-1.1.a ${PREFIX}/lib
    ${INSTALL_DATA} ${WRKSRC}/src/hunspell/.libs/libhunspell-1.1.lai ${PREFIX}/lib/libhunspell-1.1.la
    ${INSTALL_DATA} ${WRKSRC}/src/hunspell/.libs/libhunspell-1.1.so.0 ${PREFIX}/lib
    ${LN} -s ${LOCALBASE}/lib/libhunspell-1.1.so.0 ${PREFIX}/lib/libhunspell-1.1.so
    ${MKDIR} ${PREFIX}/share/myspell/ && \
    ${INSTALL_DATA} ${WRKDIR}/hu_HU.dic \
    ${PREFIX}/share/myspell/ && \
    ${INSTALL_DATA} ${WRKDIR}/hu_HU.aff \
    ${PREFIX}/share/myspell/
    ${LN} -s ${LOCALBASE}/share/myspell/hu_HU.dic ${PREFIX}/share/myspell/magyar.dic
    ${LN} -s ${LOCALBASE}/share/myspell/hu_HU.dic ${PREFIX}/share/myspell/hungarian.dic
    ${LN} -s ${LOCALBASE}/share/myspell/hu_HU.dic ${PREFIX}/share/myspell/default.dic
    ${LN} -s ${LOCALBASE}/share/myspell/hu_HU.aff ${PREFIX}/share/myspell/magyar.aff
    ${LN} -s ${LOCALBASE}/share/myspell/hu_HU.aff ${PREFIX}/share/myspell/hungarian.aff
    ${LN} -s ${LOCALBASE}/share/myspell/hu_HU.aff ${PREFIX}/share/myspell/default.aff
    #${LOCALBASE}/bin/msgfmt -o ${WRKSRC}/hunspell.mo ${WRKSRC}/hunspell.po
    #${MKDIR} ${PREFIX}/share/locale/hu/LC_MESSAGES/ && \
    #${INSTALL_DATA} ${WRKSRC}/hunspell.mo ${PREFIX}/share/locale/hu/LC_MESSAGES/

.ifndef(NOPORTDOCS)
post-install:
    ${MKDIR} ${DOCSDIR}
.for doc in ${PORTDOCS}
    ${INSTALL_DATA} ${WRKSRC}/${doc} ${DOCSDIR}
.endfor
.endif

.include <bsd.port.post.mk>