aboutsummaryrefslogtreecommitdiffstats
path: root/textproc/tkxmlive/Makefile
blob: 103bdecc2003e23f00b32cb4ce2ad2489e51a458 (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
# New ports collection makefile for:    tkxmlive
# Date created:             4 December 2003
# Whom:                 nivit@users.sourceforge.net
#
# $FreeBSD$

PORTNAME=       tkxmlive
PORTVERSION=        0.1.5
PORTREVISION=       2
CATEGORIES=     textproc
MASTER_SITES=       SF
DISTNAME=       tkxmlive-0.1.5-1

MAINTAINER=     nivit@FreeBSD.org
COMMENT=        Tcl/Tk XML Intelligence Visual Editor

RUN_DEPENDS+=       ${LOCALBASE}/lib/bwidget/pkgIndex.tcl:${PORTSDIR}/x11-toolkits/bwidget

NO_BUILD=       yes

USE_TK_RUN=     84+

WRKSRC=         ${WRKDIR}/${PORTNAME}

.include <bsd.port.pre.mk>

REPLACE_FILES=      ${WRKSRC}/interface.tcl \
            ${WRKSRC}/tkxmlive

post-patch: .SILENT
    for FILE in ${REPLACE_FILES}; do \
        ${SED} -i .bak\
        -e "/%%DATADIR%%/s//${DATADIR:S/\//\\\//g}/g" \
        -e "/%%PREFIX%%/s//${PREFIX:S/\//\\\//g}/g" \
        -e "/%%WISH%%/s//${WISH:S/\//\\\//g}/g" \
        $${FILE}; \
    done;

LN_OPTS?=       -sf

FIND_ARGS1=     -type d \! -empty
FIND_ARGS2=     -type f -and -perm -a+x -and \! \
            -name "*.orig" \! -name "*.bak"
FIND_ARGS3=     -type f -and \! -perm -a+x -and \! \
            -name "*.orig" \! -name "*~" \! \
            -regex ".*[[:upper:]]+"

do-install: .SILENT
# Script and data
    cd ${WRKSRC}; \
    DIRS=$$(${FIND} . ${FIND_ARGS1}); \
    for DIR in $${DIRS}; do \
        ${MKDIR} ${DATADIR}/$${DIR}; \
    done; \
    FILES=$$(${FIND} . ${FIND_ARGS2}); \
    for FILE in $${FILES}; do \
        ${INSTALL_SCRIPT} $${FILE} ${DATADIR}/$${FILE}; \
    done; \
    FILES=$$(${FIND} -E . ${FIND_ARGS3}); \
    for FILE in $${FILES}; do \
        ${INSTALL_DATA} $${FILE} ${DATADIR}/$${FILE}; \
    done;

# Links to executables
    cd ${WRKSRC}; \
    FILES=${PORTNAME}; \
    for f in $${FILES}; do \
        ${LN} ${LN_OPTS} ${DATADIR}/$${f} ${PREFIX}/bin/$${f}; \
    done;

.include <bsd.port.post.mk>