aboutsummaryrefslogtreecommitdiff
path: root/x11-toolkits/qscintilla/Makefile
blob: a1b1e8163b386f048caf50860164c4881f701954 (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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# New ports collection makefile for:	qscintilla
# Date created:				2003-08-02
# Whom:					arved
#
# $FreeBSD$

PORTNAME=	qscintilla
PORTVERSION=	1.7.1
CATEGORIES=	x11-toolkits
MASTER_SITES=	http://www.riverbankcomputing.com/Downloads/QScintilla1/ \
		http://freebsd.ricin.com/ports/distfiles/
DISTNAME=	QScintilla-1.71-gpl-${PORTVERSION}

MAINTAINER=	danny@ricin.com
COMMENT=	QT port of the Scintilla C++ editor class

BUILD_DEPENDS=	qmake:${PORTSDIR}/devel/qmake

USE_X_PREFIX=	yes
USE_QT_VER=	3
MAKE_ENV=	QTDIR="${QT_PREFIX}"
USE_LDCONFIG=	yes

OPTIONS=	DESIGNER_PLUGIN "Install plugin for Qt Designer" on \
		DOCS "Install documentation" on \
		EXAMPLES "Install examples" on \
		LANG_DE "Install German translation" on \
		LANG_FR "Install French translation" on \
		LANG_PTBR "Install Brazilian Portuguese translation" on \
		LANG_RU "Install Russian translation" on

QMAKE=		${LOCALBASE}/bin/qmake
SPEC=		${LOCALBASE}/share/qt/mkspecs/freebsd-g++
PLUGINDIR=	${X11BASE}/lib/plugins/designer

.include <bsd.port.pre.mk>

.if defined(NOPORTDOCS) || defined(WITHOUT_DOCS)
PLIST_SUB+=	DOCS="@comment "
.else
PLIST_SUB+=	DOCS=""
.endif
.if defined(WITHOUT_EXAMPLES)
PLIST_SUB+=	EXAMPLES="@comment "
.else
PLIST_SUB+=	EXAMPLES=""
.endif
.if defined(WITHOUT_DESIGNER_PLUGIN)
PLIST_SUB+=	DESIGNER_PLUGIN="@comment "
.else
PLIST_SUB+=	DESIGNER_PLUGIN=""
.endif
.if defined(WITHOUT_LANG_DE)
PLIST_SUB+=	LANG_DE="@comment "
.else
PLIST_SUB+=	LANG_DE=""
.endif
.if defined(WITHOUT_LANG_FR)
PLIST_SUB+=	LANG_FR="@comment "
.else
PLIST_SUB+=	LANG_FR=""
.endif
.if defined(WITHOUT_LANG_PTBR)
PLIST_SUB+=	LANG_PTBR="@comment "
.else
PLIST_SUB+=	LANG_PTBR=""
.endif
.if defined(WITHOUT_LANG_RU)
PLIST_SUB+=	LANG_RU="@comment "
.else
PLIST_SUB+=	LANG_RU=""
.endif
.if defined(WITHOUT_LANG_DE) && defined(WITHOUT_LANG_FR) && defined(WITHOUT_LANG_PTBR) && defined(WITHOUT_LANG_RU)
PLIST_SUB+=	TRANSLATIONS="@comment "
.else
PLIST_SUB+=	TRANSLATIONS=""
.endif

do-configure:
	( cd ${WRKSRC}/qt && \
		${SETENV} ${MAKE_ENV} ${QMAKE} -spec ${SPEC} qscintilla.pro )

post-configure:
	( cd ${WRKSRC}/qt && \
		${CAT} qscintilla.pro | ${GREP} -v DESTDIR > qscintilla.tmp && \
		${CAT} Makefile | ${GREP} -v DEL_FILE | ${GREP} -v MOVE | \
			${GREP} -v DESTDIR > Makefile.tmp && \
		${MV} qscintilla.tmp qscintilla.pro && \
		${MV} Makefile.tmp Makefile && \
		cd ${WRKSRC}/designer && \
		${CAT} designer.pro | ${GREP} -v lqscintilla > designer.tmp && \
		${ECHO} "INCPATH += ${X11BASE}/include ../qt" >> \
			designer.tmp && \
		${ECHO} "LIBS += -L../qt -L${X11BASE}/lib -lqscintilla" >> \
			designer.tmp && \
		${ECHO} "DESTDIR = ." >> designer.tmp && \
		${MV} designer.tmp designer.pro )

do-build:
	( cd ${WRKSRC}/qt && ${SETENV} ${MAKE_ENV} ${MAKE} )

post-build:
.if !defined(WITHOUT_DESIGNER_PLUGIN)
	( cd ${WRKSRC}/designer && ${SETENV} ${MAKE_ENV} \
		${QMAKE} -spec ${SPEC} designer.pro && ${MAKE} )
.endif

do-install:
	( cd ${WRKSRC} && \
		${INSTALL_DATA} qt/qextscintilla*.h ${PREFIX}/include && \
		${INSTALL_DATA} qt/libqscintilla.so.7.0.1 \
			${PREFIX}/lib/libqscintilla.so.7 && \
		${LN} -sf ${PREFIX}/lib/libqscintilla.so.7 \
			${PREFIX}/lib/libqscintilla.so )
.if !defined(WITHOUT_DESIGNER_PLUGIN)
	( cd ${WRKSRC} && \
		${INSTALL_DATA} designer/libqscintillaplugin.so ${PLUGINDIR} )
.endif
.if !defined(WITHOUT_LANG_DE) || !defined(WITHOUT_LANG_FR) || !defined(WITHOUT_LANG_PTBR) || !defined(WITHOUT_LANG_RU)
	${MKDIR} -m 0755 ${DATADIR}/translations
.endif
.if !defined(WITHOUT_LANG_DE)
	( cd ${WRKSRC} && \
		${INSTALL_DATA} qt/qscintilla_de.qm ${DATADIR}/translations )
.endif
.if !defined(WITHOUT_LANG_FR)
	( cd ${WRKSRC} && \
		${INSTALL_DATA} qt/qscintilla_fr.qm ${DATADIR}/translations )
.endif
.if !defined(WITHOUT_LANG_PTBR)
	( cd ${WRKSRC} && \
		${INSTALL_DATA} qt/qscintilla_pt_br.qm ${DATADIR}/translations )
.endif
.if !defined(WITHOUT_LANG_RU)
	( cd ${WRKSRC} && \
		${INSTALL_DATA} qt/qscintilla_ru.qm ${DATADIR}/translations )
.endif
.if !defined(NOPORTDOCS) && !defined(WITHOUT_DOCS)
	( cd ${WRKSRC} && \
		${MKDIR} -m 0755 ${DOCSDIR}/html ${DOCSDIR}/Scintilla && \
		${INSTALL_DATA} ChangeLog NEWS README ${DOCSDIR} && \
		${INSTALL_DATA} doc/qscintilla.dxy ${DOCSDIR} && \
		${INSTALL_DATA} doc/html/* ${DOCSDIR}/html &&  \
		${INSTALL_DATA} doc/Scintilla/* ${DOCSDIR}/Scintilla )
.endif
.if !defined(WITHOUT_EXAMPLES)
	( cd ${WRKSRC} && \
		${MKDIR} -m 0755 ${EXAMPLESDIR} && \
		${INSTALL_DATA} example/* ${EXAMPLESDIR} )
.endif

.include <bsd.port.post.mk>