summaryrefslogtreecommitdiff
path: root/x11/qt4-libs/Makefile
blob: 4b430dea36456cc078651946d41ebc124b00c366 (plain)
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
153
154
155
156
157
158
159
160
161
162
163
164
# $NetBSD: Makefile,v 1.117 2017/05/05 17:38:00 joerg Exp $

PKGNAME=	qt4-libs-${QTVERSION}
PKGREVISION=	6
COMMENT=	C++ X GUI toolkit

.include "../../x11/qt4-libs/Makefile.common"

# XXX this is to test what really gets installed when 'do-install' is disabled
INSTALL_DIRS+=		src

BUILD_TARGET=		sub-src

PTHREAD_OPTS+=		require
UNLIMIT_RESOURCES=	datasize
BUILDLINK_PASSTHRU_DIRS+=${QTPREFIX}

PLIST_SRC=		${WRKDIR}/PLIST ${PKGDIR}/PLIST

# built as plugins
CONFIGURE_ARGS+=	-no-dbus
CONFIGURE_ARGS+=	-no-libmng
CONFIGURE_ARGS+=	-no-libtiff
CONFIGURE_ARGS+=	-no-sql-sqlite

# kdelibs4 requires openssl support!
CONFIGURE_ARGS+=	-openssl-linked

CONFIGURE_ARGS+=	-iconv

.if !empty(PKGSRC_COMPILER:Mclang)
CXXFLAGS+=	-Wno-c++11-narrowing
.  if empty(MACHINE_PLATFORM:MDarwin-*-*)
CXXFLAGS+=	-D_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC=1
.  endif
.endif

INSTALLATION_DIRS=	lib/pkgconfig
INSTALLATION_DIRS+=	${QTPREFIX}/bin
INSTALLATION_DIRS+=	${QTPREFIX}/imports/Qt/labs/folderlistmodel
INSTALLATION_DIRS+=	${QTPREFIX}/imports/Qt/labs/gestures
INSTALLATION_DIRS+=	${QTPREFIX}/imports/Qt/labs/particles
INSTALLATION_DIRS+=	${QTPREFIX}/imports/Qt/labs/shaders
INSTALLATION_DIRS+=	${QTPREFIX}/imports/QtWebKit
INSTALLATION_DIRS+=	${QTPREFIX}/include
INSTALLATION_DIRS+=	${QTPREFIX}/lib
INSTALLATION_DIRS+=	${QTPREFIX}/plugins/accessible
INSTALLATION_DIRS+=	${QTPREFIX}/plugins/bearer
INSTALLATION_DIRS+=	${QTPREFIX}/plugins/codecs
INSTALLATION_DIRS+=	${QTPREFIX}/plugins/graphicssystems
INSTALLATION_DIRS+=	${QTPREFIX}/plugins/iconengines
INSTALLATION_DIRS+=	${QTPREFIX}/plugins/imageformats
.if ${OPSYS} == "Darwin"
INSTALLATION_DIRS+=	${QTPREFIX}/qt_menu.nib
.else
INSTALLATION_DIRS+=	${QTPREFIX}/plugins/inputmethods
.endif

INSTALL_ENV+=		INSTALL_ROOT=${DESTDIR}

SUBST_CLASSES+=			no-libtool
SUBST_MESSAGE.no-libtool=	Removing unwanted libtool link command.
SUBST_STAGE.no-libtool=		post-configure
SUBST_FILES.no-libtool=		translations/Makefile
SUBST_SED.no-libtool=		-e '/@: IGNORE THIS LINE/s,=.*$$,= @:,'

do-install:
.for f in moc rcc uic
	${INSTALL_PROGRAM} ${WRKSRC}/bin/${f} ${DESTDIR}${QTPREFIX}/bin/
.endfor
	${LIBTOOL} --mode=install ${INSTALL_PROGRAM} ${WRKSRC}/bin/uic3 \
		${DESTDIR}${QTPREFIX}/bin/
	${LIBTOOL} --mode=install ${INSTALL_LIB} \
		${WRKSRC}/imports/Qt/labs/folderlistmodel/libqmlfolderlistmodelplugin.la \
		${DESTDIR}${QTPREFIX}/imports/Qt/labs/folderlistmodel/
	${LIBTOOL} --mode=install ${INSTALL_LIB} \
		${WRKSRC}/imports/Qt/labs/gestures/libqmlgesturesplugin.la \
		${DESTDIR}${QTPREFIX}/imports/Qt/labs/gestures/
	${LIBTOOL} --mode=install ${INSTALL_LIB} \
		${WRKSRC}/imports/Qt/labs/particles/libqmlparticlesplugin.la \
		${DESTDIR}${QTPREFIX}/imports/Qt/labs/particles/
	${LIBTOOL} --mode=install ${INSTALL_LIB} \
		${WRKSRC}/imports/Qt/labs/shaders/libqmlshadersplugin.la \
		${DESTDIR}${QTPREFIX}/imports/Qt/labs/shaders/
	${LIBTOOL} --mode=install ${INSTALL_LIB} \
		${WRKSRC}/imports/QtWebKit/libqmlwebkitplugin.la \
		${DESTDIR}${QTPREFIX}/imports/QtWebKit/
.for f in corelib declarative gui multimedia network opengl qt3support script scripttools sql svg testlib xml xmlpatterns 3rdparty/webkit/Source/WebKit/qt
	cd ${WRKSRC}/src/${f} && env ${MAKE_ENV} ${INSTALL_ENV} \
		${MAKE_PROGRAM} install_flat_headers install_targ_headers install_class_headers
.endfor
	cd ${DESTDIR}${PREFIX} && find qt4/include -type f -print > ${WRKDIR}/PLIST
.for f in Qt3Support QtCore QtDeclarative QtGui QtMultimedia QtNetwork QtOpenGL QtScript QtScriptTools QtSql QtSvg QtTest QtWebKit QtXml QtXmlPatterns jscore webcore
	${LIBTOOL} --mode=install ${INSTALL_LIB} ${WRKSRC}/lib/lib${f}.la \
		${DESTDIR}${QTPREFIX}/lib/
	sed	-e "s:${WRKSRC}:${QTPREFIX}:g" \
		-e "s:${QTPREFIX}/lib/lib\\([A-Za-z3]*\\)\\.la:-l\\1:g" \
		${WRKSRC}/lib/pkgconfig/${f}.pc | ${AWK} '!x[$$0]++' > ${WRKDIR}/${f}.pc
	${INSTALL_DATA} ${WRKDIR}/${f}.pc ${DESTDIR}${PREFIX}/lib/pkgconfig/
.endfor
	${INSTALL_DATA} ${WRKSRC}/tools/porting/src/q3porting.xml ${DESTDIR}${QTPREFIX}
.for f in qtaccessiblecompatwidgets qtaccessiblewidgets
	${LIBTOOL} --mode=install ${INSTALL_LIB} \
		${WRKSRC}/plugins/accessible/lib${f}.la \
		${DESTDIR}${QTPREFIX}/plugins/accessible/
.endfor
#.for f in qcorewlanbearer qgenericbearer
.if ${OPSYS} == "Darwin"
	${LIBTOOL} --mode=install ${INSTALL_LIB} \
		${WRKSRC}/plugins/bearer/libqcorewlanbearer.la \
		${DESTDIR}${QTPREFIX}/plugins/bearer/
.endif
	${LIBTOOL} --mode=install ${INSTALL_LIB} \
		${WRKSRC}/plugins/bearer/libqgenericbearer.la \
		${DESTDIR}${QTPREFIX}/plugins/bearer/
#.endfor
.for f in qcncodecs qjpcodecs qkrcodecs qtwcodecs
	${LIBTOOL} --mode=install ${INSTALL_LIB} \
		${WRKSRC}/plugins/codecs/lib${f}.la \
		${DESTDIR}${QTPREFIX}/plugins/codecs/
.endfor
.for f in qglgraphicssystem qtracegraphicssystem
	${LIBTOOL} --mode=install ${INSTALL_LIB} \
		${WRKSRC}/plugins/graphicssystems/lib${f}.la \
		${DESTDIR}${QTPREFIX}/plugins/graphicssystems/
.endfor
.for f in qsvgicon
	${LIBTOOL} --mode=install ${INSTALL_LIB} \
		${WRKSRC}/plugins/iconengines/lib${f}.la \
		${DESTDIR}/${QTPREFIX}/plugins/iconengines/
.endfor
.for f in qgif qico qjpeg qsvg qtga
	${LIBTOOL} --mode=install ${INSTALL_LIB} \
		${WRKSRC}/plugins/imageformats/lib${f}.la \
		${DESTDIR}${QTPREFIX}/plugins/imageformats/
.endfor
.if ${OPSYS} == "Darwin"
	${INSTALL_DATA} ${WRKSRC}/src/gui/mac/qt_menu.nib/*.nib \
		${DESTDIR}${QTPREFIX}/qt_menu.nib/
.else
	${LIBTOOL} --mode=install ${INSTALL_LIB} \
		${WRKSRC}/plugins/inputmethods/libqimsw-multi.la \
		${DESTDIR}/${QTPREFIX}/plugins/inputmethods/
.endif

.if ${OPSYS} != "Darwin"
.include "../../graphics/glu/buildlink3.mk"
.include "../../x11/libSM/buildlink3.mk"
.include "../../x11/libXcursor/buildlink3.mk"
.include "../../x11/libXft/buildlink3.mk"
.include "../../x11/libXmu/buildlink3.mk"
.include "../../x11/libXrandr/buildlink3.mk"
.endif

.include "../../converters/libiconv/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../fonts/fontconfig/buildlink3.mk"
.include "../../graphics/freetype2/buildlink3.mk"
.include "../../mk/jpeg.buildlink3.mk"
.include "../../graphics/png/buildlink3.mk"
.include "../../security/openssl/buildlink3.mk"

.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"