openbsd-ports/x11/qt/Makefile

119 lines
3.4 KiB
Makefile
Raw Normal View History

2000-09-02 17:20:58 -04:00
# $OpenBSD: Makefile,v 1.49 2000/09/02 21:20:58 brad Exp $
1999-03-06 21:25:55 -05:00
# $FreeBSD: Makefile,v 1.33 1999/02/27 03:09:57 andreas Exp $
1998-01-24 16:31:53 -05:00
2000-03-07 20:27:42 -05:00
DISTNAME= qt-1.45
1998-01-24 16:31:53 -05:00
CATEGORIES= x11
2000-09-02 17:20:58 -04:00
NEED_VERSION= 1.322
MASTER_SITES= ftp://ftp.troll.no/qt/source/
1998-04-12 23:23:26 -04:00
HOMEPAGE= http://www.trolltech.com/products/qt/
2000-05-23 20:16:03 -04:00
# for the qt image extension
BUILD_DEPENDS= ${PREFIX}/include/jpeglib.h::graphics/jpeg \
${PREFIX}/include/png.h::graphics/png
2000-05-23 20:16:03 -04:00
MAINTAINER= brad@openbsd.org
PERMIT_PACKAGE_CDROM=
PERMIT_PACKAGE_FTP=
PERMIT_DISTFILES_CDROM=
PERMIT_DISTFILES_FTP=
VER_MAJ= 1
VER_MIN= 45
MAKE_FLAGS= VER_MAJ="${VER_MAJ}" VER_MIN="${VER_MIN}"
2000-03-05 13:30:21 -05:00
USE_GMAKE= Yes
MAKE_ENV= QTDIR="${WRKSRC}" SYS_CXX="${CXX}" SYS_CXXFLAGS="${CXXFLAGS}"
MULTI_PACKAGES= -examples -html
SUBPACKAGE?=
1998-01-24 16:31:53 -05:00
QT_INCDIR= ${PREFIX}/include/X11/qt
QT_LIBDIR= ${PREFIX}/lib/qt
QT_MANDIR= ${QT_LIBDIR}/man
QT_EXAMPLES= ${QT_LIBDIR}/examples
QT_TUTORIAL= ${QT_LIBDIR}/tutorial
QT_DOC= ${PREFIX}/share/doc/qt
# for manpages in MESSAGE
SUBST_VARS= QT_LIBDIR QT_DOC
1998-01-24 16:31:53 -05:00
2000-05-23 20:16:03 -04:00
IMAGEIODIR= ${WRKSRC}/extensions/imageio/src
2000-09-02 17:20:58 -04:00
DOCS= ANNOUNCE FAQ LICENSE README README.QT changes-1.40 changes-1.41 \
changes-1.42 changes-1.43 changes-1.44 changes-1.45
post-patch:
@cd ${WRKSRC}/configs; for i in openbsd-*; do \
mv -f $$i $$i.bak && \
sed -e s,/usr/local,${LOCALBASE}, \
-e s,/usr/X11R6,${X11BASE}, <$$i.bak >$$i; \
done
2000-01-12 00:38:55 -05:00
do-configure:
@cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${USE_TARGET}
1998-01-24 16:31:53 -05:00
post-configure:
@cd ${WRKSRC} && cp -R examples examples-src
@cd ${WRKSRC} && cp -R tutorial tutorial-src
post-build:
@cd ${IMAGEIODIR} && \
${SETENV} ${MAKE_ENV} SYS_CXXFLAGS='-I$(LOCALBASE)/include ${CXXFLAGS}' ${MAKE} ${MAKE_FLAGS}
1998-01-24 16:31:53 -05:00
do-install:
${INSTALL_DATA_DIR} ${QT_INCDIR}
${INSTALL_DATA_DIR} ${QT_MANDIR}/man1
${INSTALL_DATA_DIR} ${QT_MANDIR}/man3
${INSTALL_DATA_DIR} ${QT_EXAMPLES}
${INSTALL_DATA_DIR} ${QT_TUTORIAL}
${INSTALL_DATA_DIR} ${QT_DOC}/html
@if [ -f ${WRKBUILD}/lib/libqt.a ]; then \
${INSTALL_DATA} ${WRKBUILD}/lib/libqt.a ${PREFIX}/lib; \
1999-03-23 17:00:04 -05:00
fi
@if [ -f ${WRKBUILD}/lib/libqt.so.${VER_MAJ}.${VER_MIN} ]; then \
${INSTALL_DATA} ${WRKBUILD}/lib/libqt.so.${VER_MAJ}.${VER_MIN} ${PREFIX}/lib; \
1999-03-23 17:00:04 -05:00
fi
@if [ -f ${WRKBUILD}/lib/libqimgio.a ]; then \
${INSTALL_DATA} ${WRKBUILD}/lib/libqimgio.a ${PREFIX}/lib; \
fi
@if [ -f ${WRKBUILD}/lib/libqimgio.so.${VER_MAJ}.${VER_MIN} ]; then \
${INSTALL_DATA} ${WRKBUILD}/lib/libqimgio.so.${VER_MAJ}.${VER_MIN} ${PREFIX}/lib; \
fi
${INSTALL_PROGRAM} ${WRKBUILD}/bin/moc ${PREFIX}/bin
${INSTALL_DATA} ${WRKSRC}/include/* ${QT_INCDIR}
${INSTALL_MAN} ${WRKSRC}/man/man1/* ${QT_MANDIR}/man1
@for i in ${WRKSRC}/man/man3/*; do \
j=$${i%qt}; \
sed -e 's,\.3qt,\.3,g' <$$i >$$j && \
${INSTALL_MAN} $$j ${QT_MANDIR}/man3; \
done
cp -R ${WRKSRC}/examples-src/* ${QT_EXAMPLES}
@cd ${WRKSRC}/examples; for i in *; do \
if [ -x $$i/$$i ]; then \
${INSTALL_PROGRAM} $$i/$$i ${QT_EXAMPLES}/$$i; \
fi; done
cp -R ${WRKSRC}/tutorial-src/* ${QT_TUTORIAL}
@cd ${WRKSRC}/tutorial; for i in *; do \
if [ -x $$i/$$i ]; then \
${INSTALL_PROGRAM} $$i/$$i ${QT_TUTORIAL}/$$i; \
fi; done
2000-09-02 17:20:58 -04:00
cd ${WRKSRC}; ${INSTALL_DATA} ${DOCS} ${QT_DOC}
cp -R ${WRKSRC}/html/* ${QT_DOC}/html
1998-01-24 16:31:53 -05:00
.include <bsd.port.mk>
2000-08-24 23:55:24 -04:00
.if ${SUBPACKAGE} == "-examples"
PKGNAME:=qt-examples-1.45
2000-08-24 23:55:24 -04:00
.elif ${SUBPACKAGE} == "-html"
PKGNAME:=qt-html-1.45
.endif
.if defined(NO_SHARED_LIBS) && ${NO_SHARED_LIBS:U} == YES
USE_TARGET= openbsd-g++-static
.else
USE_TARGET= openbsd-g++-shared
.endif