aboutsummaryrefslogtreecommitdiffstats
path: root/devel/linux-runrev/Makefile
blob: ff9bb732fddc7c73fb3255c0b0b84ef5dcb77af5 (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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# New ports collection makefile for:    linux-runrev
# Date created:             13 November 2002
# Whom:                 Marc Fonvieille <blackend@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=   runrev
PORTVERSION=    1.1.1
CATEGORIES= devel linux
MASTER_SITES=   ftp://ftp.runrev.com/pub/revolution/ \
        http://www.runrev.com/revolution/engines11/unix/
PKGNAMEPREFIX=  linux-
DISTNAME=   linux
EXTRACT_SUFX=   .tgz
DIST_SUBDIR=    ${PORTNAME}

MAINTAINER= blackend@FreeBSD.org
COMMENT=    Revolution is a rapid application development environment

RUN_DEPENDS=    xanim:${PORTSDIR}/multimedia/xanim

NO_CDROM=   "Sale for profit is not permitted"

ONLY_FOR_ARCHS= i386
USE_LINUX=  yes
NO_BUILD=   yes

WRKSRC=     ${WRKDIR}/Revolution-${PORTVERSION}
DATADIR=    ${PREFIX}/share/Revolution-${PORTVERSION}

BRANDELF?=  /usr/bin/brandelf
# do not strip linux binaries
STRIP=
# try using the Linux strip command 
STRIP_CMD=  ${LINUXBASE}/usr/bin/strip

BIN_FILES=  revolution
LIB_DIRS=   Databases components components/assistants \
        components/help components/help/Appendixes \
        components/help/tutorials \
        components/help/tutorials/exercises \
        components/help/tutorials/modules components/save \
        components/save/userobjects components/tools plugins

# revolution requires these to be in the same directory
LIB_FILES=  LicenseAgreement ReadMeFirst license.rev

# trick to work with space in directory names
# we replace space with _
LIB_DIRS_HACK=  External_SDK External_SDK/external_Data \
        External_SDK/external_Data/Basic_Toolbox_FAT \
        External_SDK/external_Data/MCexternal68K \
        External_SDK/external_Data/MCexternalCarbon \
        External_SDK/external_Data/MCexternalPPC Made_With_Logos \
        Made_With_Logos/Graphics components/global_environment \
        components/help/tutorials/exercises/Employee_Data \
        components/help/tutorials/exercises/Employee_Data/images \
        components/properties_palettes

post-patch:
    @${SED} -e "s|%%PREFIX%%|${DATADIR}|" ${FILESDIR}/wrapper.sh > \
        ${WRKDIR}/wrapper.sh

.include <bsd.port.pre.mk>

do-install:
    @${MKDIR} ${DATADIR}
#   @${TAR} -C ${WRKSRC} -cf - . | ${TAR} -C ${DATADIR} --unlink -xf -
# create dirs and install files with proper permissions
.for dir in ${LIB_DIRS}
    @${MKDIR} ${DATADIR}/${dir}
    @for file in ${WRKSRC}/${dir}/* ; \
    do \
        if [ -f "$${file}" ]; \
        then \
            ${INSTALL_DATA} "$${file}" \
                ${DATADIR}/${dir} ; \
        fi ; \
    done
.endfor
# additional dirs but with space in their names
.for dir in ${LIB_DIRS_HACK}
    @dir_processed=`${ECHO_CMD} ${dir} | ${TR} "_" " "` ; \
        ${MKDIR} ${DATADIR}/"$${dir_processed}" ; \
        for file in ${WRKSRC}/"$${dir_processed}"/* ; \
        do \
            if [ -f "$${file}" ]; \
            then \
                ${INSTALL_DATA} "$${file}" \
                    ${DATADIR}/"$${dir_processed}" ; \
            fi ; \
        done
.endfor
# extra lib files
.for file in ${LIB_FILES}
    @${INSTALL_DATA} ${WRKSRC}/${file} ${DATADIR}/${file}
.endfor
# binaries
.for file in ${BIN_FILES}
. if exists(${STRIP_CMD})
    @${STRIP_CMD} ${WRKSRC}/${file}
. endif
    @${BRANDELF} -t Linux ${WRKSRC}/${file}
    @${INSTALL_PROGRAM} ${WRKSRC}/${file} ${DATADIR}/${file}
.endfor
# install wrapper
    @${INSTALL_SCRIPT} ${WRKDIR}/wrapper.sh ${PREFIX}/bin/revolution

.include <bsd.port.post.mk>