blob: 2499b914c9bd21cb07548a301e54f921d1946f9f (
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
|
# New ports collection makefile for: qtstalker
# Date created: Thu Jan 19 03:18:59 UTC 2005
# Whom: Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME= qtstalker
PORTVERSION= 0.28
CATEGORIES= finance kde
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
MAINTAINER= lioux@FreeBSD.org
COMMENT= Commodity and stock market charting and technical analysis
BUILD_DEPENDS= qmake:${PORTSDIR}/devel/qmake
LIB_DEPENDS= db2:${PORTSDIR}/databases/db2
USE_QT_VER=3
INSTALLS_SHLIB= yes
MAKE_ENV= QTDIR="${QT_PREFIX}"
WRKSRC= ${WRKDIR}/${PORTNAME}
QMAKE?= ${LOCALBASE}/bin/qmake
# XXX - this test is too simple but it is a good start
.if defined(CXX) && ${CXX:M*icc}
QMAKESPEC?= freebsd-icc
.else
QMAKESPEC?= freebsd-g++
.endif
VERSION_PLUGIN= 0.27
# docs
DOC_FILES= \
BUGS \
CHANGELOG \
TODO
.ifndef(NOPORTDOCS)
PORTDOCS+= \
*
.endif
PLIST_SUB+= \
VERSION_PLUGIN="${VERSION_PLUGIN}"
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 500000
BROKEN= "Does not compile on FreeBSD 4.x"
.endif
post-patch:
# tell qtstalker where to install plugins
@${FIND} ${WRKSRC} -type f -name "*pro" | \
${XARGS} -x -n 5 \
${REINPLACE_CMD} -E \
-e 's|/usr/lib/qtstalker/|${PREFIX}/lib/${PORTNAME}/|'
# where to find plugins
@${REINPLACE_CMD} -E \
-e 's|/usr/lib/qtstalker/|${PREFIX}/lib/${PORTNAME}/|' \
${WRKSRC}/lib/Config.cpp \
# where to both find and install docs
@${REINPLACE_CMD} -E \
-e 's|/usr/share/doc/qtstalker/html|${DOCSDIR}|' \
${WRKSRC}/lib/Config.cpp \
${WRKSRC}/docs/docs.pro
# where to install program
@${REINPLACE_CMD} -E \
-e 's|/usr/bin|${PREFIX}/bin|' \
${WRKSRC}/src/src.pro
# where to install libs
@${REINPLACE_CMD} -E \
-e 's|/usr/lib|${PREFIX}/lib|' \
${WRKSRC}/lib/lib.pro
# correctly use database/db2
@${REINPLACE_CMD} -E \
-e 's|<db.h>|<db2/db.h>|' \
${WRKSRC}/lib/DbPlugin.h
@${REINPLACE_CMD} -E \
-e 's|-ldb$$|-ldb2|' \
${WRKSRC}/lib/lib.pro
do-configure:
@cd ${WRKSRC} && \
${SETENV} ${CONFIGURE_ENV} \
${QMAKE} -spec ${QMAKESPEC} \
"INCLUDEPATH += ${QT_PREFIX}/include ${LOCALBASE}/include ${X11BASE}/include" \
"LIBS += -L${LOCALBASE}/lib -L${X11BASE}/lib" \
"QMAKE_CFLAGS_SHLIB += -fPIC" \
"QMAKE_CXXFLAGS_SHLIB += -fPIC" \
"DEFINES += QT_NO_COMPAT PIC" -o ${MAKEFILE} qtstalker.pro
pre-install:
# install with proper permissions
@${FIND} ${WRKSRC}/docs ${WRKSRC}/lib ${WRKSRC}/plugins -type f -name "${MAKEFILE}" | \
${XARGS} -x -n 5 \
${REINPLACE_CMD} -E \
-e 's|\(INSTALL_FILE\)|(BSD_INSTALL_DATA)|'
@${REINPLACE_CMD} -E \
-e 's|\(INSTALL_FILE\)|(BSD_INSTALL_PROGRAM)|' \
${WRKSRC}/src/${MAKEFILE}
post-install:
.ifndef(NOPORTDOCS)
# additional docs
.for doc in ${DOC_FILES}
@${INSTALL_DATA} ${WRKSRC}/docs/${doc} ${DOCSDIR}
.endfor
.endif
.include <bsd.port.post.mk>
|