Changeset View
Changeset View
Standalone View
Standalone View
cad/zcad/Makefile
| # Created by: Alexey Dokuchaev <danfe@FreeBSD.org> | # Created by: Alexey Dokuchaev <danfe@FreeBSD.org> | ||||
| # $FreeBSD$ | # $FreeBSD$ | ||||
| PORTNAME= zcad | PORTNAME= zcad | ||||
| PORTVERSION= 0.9.8 | PORTVERSION= 0.9.8 | ||||
| PORTREVISION= 1 | PORTREVISION= 1 | ||||
| CATEGORIES= cad | CATEGORIES= cad | ||||
| PKGNAMESUFFIX= -${FLAVOR} | |||||
| MASTER_SITES= LOCAL/danfe | MASTER_SITES= LOCAL/danfe | ||||
| DISTNAME= ${PORTNAME}-trunk-r2259 | DISTNAME= ${PORTNAME}-trunk-r2259 | ||||
| MAINTAINER= danfe@FreeBSD.org | MAINTAINER= danfe@FreeBSD.org | ||||
| COMMENT= Simple CAD program | COMMENT= Simple CAD program | ||||
| BUILD_DEPENDS= lazbuild:editors/lazarus | USES= fpc lazarus:flavors tar:xz | ||||
| USES= tar:xz | |||||
| USE_FPC= cairo chm fcl-base fcl-image fcl-json fcl-stl fcl-xml opengl \ | USE_FPC= cairo chm fcl-base fcl-image fcl-json fcl-stl fcl-xml opengl \ | ||||
| pasjpeg rtl-extra rtl-objpas x11 | pasjpeg rtl-extra rtl-objpas x11 | ||||
| LAZARUS_VER= 1.8.0 | |||||
| LAZBUILD_CMD= ${LOCALBASE}/bin/lazbuild -d --pcp=${WRKSRC}/tmppcp \ | |||||
| --lazarusdir=${LAZARUS_DIR} | |||||
| LAZARUS_DIR= ${LOCALBASE}/share/lazarus-${LAZARUS_VER} | |||||
| LCL_UNITS_DIR= ${LAZARUS_DIR}/lcl/units/${BUILDNAME} | |||||
| EXTRACT_CMD= LC_ALL=en_US.UTF-8 ${TAR} # for non-ASCII filenames | EXTRACT_CMD= LC_ALL=en_US.UTF-8 ${TAR} # for non-ASCII filenames | ||||
| MAKE_ENV= LAZBUILD_CMD="${LAZBUILD_CMD}" | MAKE_ENV= LAZBUILD_CMD="${LAZBUILD_CMD}" \ | ||||
| LAZBUILD_ARGS="${LAZBUILD_ARGS}" \ | |||||
| LCL_PLATFORM="${LCL_PLATFORM}" \ | |||||
| LAZARUS_DIR="${LAZARUS_DIR}" \ | |||||
| INSTANTFPCCACHE="${WRKSRC}/.cache" | |||||
| NO_LAZBUILD= yes | |||||
| WRKSRC= ${WRKDIR}/trunk | WRKSRC= ${WRKDIR}/trunk | ||||
| BUILD_WRKSRC= ${WRKSRC}/cad_source | BUILD_WRKSRC= ${WRKSRC}/cad_source | ||||
| INSTALL_WRKSRC= ${WRKSRC}/cad | INSTALL_WRKSRC= ${WRKSRC}/cad | ||||
| LAZBUILD_ARGS= -d --pcp=${WRKSRC}/tmppcp | |||||
| LAZARUS_NO_FLAVORS=qt5 | |||||
| gtk2_CONFLICTS_INSTALL= ${PORTNAME}-qt* | |||||
| qt4_CONFLICTS_INSTALL= ${PORTNAME}-gtk2-* ${PORTNAME}-qt5-* | |||||
| MAKE_JOBS_UNSAFE= yes | MAKE_JOBS_UNSAFE= yes | ||||
| PORTDOCS= UserGuide.odt UserGuide.pdf | PORTDOCS= UserGuide.odt UserGuide.pdf | ||||
| OPTIONS_DEFINE= DOCS | OPTIONS_DEFINE= DOCS | ||||
| OPTIONS_SINGLE= GUI | |||||
| OPTIONS_SINGLE_GUI= GTK2 QT4 | |||||
| OPTIONS_DEFAULT= GTK2 | |||||
| GTK2_BUILD_DEPENDS= ${LCL_UNITS_DIR}/gtk2/interfaces.ppu:editors/lazarus-lcl-gtk2 | .if ${FLAVOR:Ugtk2} | ||||
| GTK2_USE= GNOME=gtk20 FPC=gtk2 | MAKE_ENV+= GUI=gtk2 | ||||
| GTK2_MAKE_ENV= GUI=gtk2 | .endif | ||||
| GTK2_VARS= LAZBUILD_CMD+=--ws=gtk2 | |||||
| QT4_BUILD_DEPENDS= ${LCL_UNITS_DIR}/qt/interfaces.ppu:editors/lazarus-lcl-qt | .if ${FLAVOR:Uqt4} | ||||
| QT4_LIB_DEPENDS= libQt4Pas.so:x11-toolkits/qt4pas | MAKE_ENV+= GUI=qt | ||||
| QT4_MAKE_ENV= GUI=qt | .endif | ||||
| QT4_VARS= LAZBUILD_CMD+=--ws=qt | |||||
| post-patch: | post-patch: | ||||
| @${EGREP} -lR 'IFN?DEF LINUX' ${BUILD_WRKSRC} | ${XARGS} \ | @${EGREP} -lR 'IFN?DEF LINUX' ${BUILD_WRKSRC} | ${XARGS} \ | ||||
| ${REINPLACE_CMD} -E '/IFN?DEF LINUX/s,LINUX,UNIX,g' | ${REINPLACE_CMD} -E '/IFN?DEF LINUX/s,LINUX,UNIX,g' | ||||
| @${REINPLACE_CMD} -e '/}Linux{/d' \ | @${REINPLACE_CMD} -e '/}Linux{/d' \ | ||||
| ${BUILD_WRKSRC}/other/AGraphLaz/Vectors/VStream.pas \ | ${BUILD_WRKSRC}/other/AGraphLaz/Vectors/VStream.pas \ | ||||
| ${BUILD_WRKSRC}/other/AGraphLaz/Vectors/VFStream.pas \ | ${BUILD_WRKSRC}/other/AGraphLaz/Vectors/VFStream.pas \ | ||||
| ${BUILD_WRKSRC}/other/AGraphLaz/Vectors/VFileSys.pas \ | ${BUILD_WRKSRC}/other/AGraphLaz/Vectors/VFileSys.pas \ | ||||
| Show All 9 Lines | # filesystem outside working directory) | ||||
| ${CP} ${LAZARUS_DIR}/components/opengl/glgtkglxcontext.pas \ | ${CP} ${LAZARUS_DIR}/components/opengl/glgtkglxcontext.pas \ | ||||
| ${LAZARUS_DIR}/components/opengl/glqtcontext.pas \ | ${LAZARUS_DIR}/components/opengl/glqtcontext.pas \ | ||||
| ${LAZARUS_DIR}/components/opengl/openglcontext.res \ | ${LAZARUS_DIR}/components/opengl/openglcontext.res \ | ||||
| ${BUILD_WRKSRC} | ${BUILD_WRKSRC} | ||||
| # Build components that do not come with precompiled *.ppu files (also | # Build components that do not come with precompiled *.ppu files (also | ||||
| # copy them locally first for the same reason as above) | # copy them locally first for the same reason as above) | ||||
| ${CP} -a ${LAZARUS_DIR}/components/fpvectorial \ | ${CP} -a ${LAZARUS_DIR}/components/fpvectorial \ | ||||
| ${LAZARUS_DIR}/components/anchordocking ${WRKSRC} | ${LAZARUS_DIR}/components/anchordocking ${WRKSRC} | ||||
| ${LAZBUILD_CMD} ${WRKSRC}/fpvectorial/fpvectorialpkg.lpk | ${SETENV} ${MAKE_ENV} ${LAZBUILD_CMD} ${LAZBUILD_ARGS} --ws=${LCL_PLATFORM} \ | ||||
| ${LAZBUILD_CMD} ${WRKSRC}/anchordocking/anchordocking.lpk | --lazarusdir=${LAZARUS_DIR} \ | ||||
| ${WRKSRC}/fpvectorial/fpvectorialpkg.lpk | |||||
| ${SETENV} ${MAKE_ENV} ${LAZBUILD_CMD} ${LAZBUILD_ARGS} --ws=${LCL_PLATFORM} \ | |||||
| --lazarusdir=${LAZARUS_DIR} \ | |||||
| ${WRKSRC}/anchordocking/anchordocking.lpk | |||||
| do-install: | do-install: | ||||
| # Not ready for hier(7)-conforming installation yet | # Not ready for hier(7)-conforming installation yet | ||||
| @${MKDIR} ${STAGEDIR}${PREFIX}/${PORTNAME} | @${MKDIR} ${STAGEDIR}${PREFIX}/${PORTNAME} | ||||
| ${INSTALL_PROGRAM} ${INSTALL_WRKSRC}/${PORTNAME} \ | ${INSTALL_PROGRAM} ${INSTALL_WRKSRC}/${PORTNAME} \ | ||||
| ${STAGEDIR}${PREFIX}/${PORTNAME} | ${STAGEDIR}${PREFIX}/${PORTNAME} | ||||
| cd ${INSTALL_WRKSRC} && ${COPYTREE_SHARE} "blocks components \ | cd ${INSTALL_WRKSRC} && ${COPYTREE_SHARE} "blocks components \ | ||||
| fonts images languages menu programdb rtl sample \ | fonts images languages menu programdb rtl sample \ | ||||
| template" ${STAGEDIR}${PREFIX}/${PORTNAME} | template" ${STAGEDIR}${PREFIX}/${PORTNAME} | ||||
| do-install-DOCS-on: | do-install-DOCS-on: | ||||
| @${MKDIR} ${STAGEDIR}${DOCSDIR} | @${MKDIR} ${STAGEDIR}${DOCSDIR} | ||||
| ${INSTALL_DATA} ${BUILD_WRKSRC}/userguide/UserGuide.odt \ | ${INSTALL_DATA} ${BUILD_WRKSRC}/userguide/UserGuide.odt \ | ||||
| ${INSTALL_WRKSRC}/UserGuide.pdf ${STAGEDIR}${DOCSDIR} | ${INSTALL_WRKSRC}/UserGuide.pdf ${STAGEDIR}${DOCSDIR} | ||||
| .include <bsd.port.mk> | .include <bsd.port.mk> | ||||