diff options
author | Ion-Mihai Tetcu <itetcu@FreeBSD.org> | 2009-06-09 12:30:55 +0000 |
---|---|---|
committer | Ion-Mihai Tetcu <itetcu@FreeBSD.org> | 2009-06-09 12:30:55 +0000 |
commit | ac2bec9f3711a2ecbf24e174bd2f59040ea27fba (patch) | |
tree | a15c9ebc2ca4d878d998312a7da50e196baf4820 /finance | |
parent | 834a3e925f925baeed75c05071a20e6ac789aada (diff) | |
download | ports-ac2bec9f3711a2ecbf24e174bd2f59040ea27fba.tar.gz ports-ac2bec9f3711a2ecbf24e174bd2f59040ea27fba.zip |
Notes
Diffstat (limited to 'finance')
-rw-r--r-- | finance/qtstalker/Makefile | 63 |
1 files changed, 47 insertions, 16 deletions
diff --git a/finance/qtstalker/Makefile b/finance/qtstalker/Makefile index 0794ca8c8fb4..6d1af6540d2d 100644 --- a/finance/qtstalker/Makefile +++ b/finance/qtstalker/Makefile @@ -52,35 +52,63 @@ PORTEXAMPLES+= \ * .endif +PORTDATA+= \ + * + PLIST_SUB+= \ VERSION_PLUGIN="${VERSION_PLUGIN}" post-patch: -# tell qtstalker where to install plugins +# NB: LOCALBASE and PREFIX should NOT be used instead of "/usr/local" in the +# following post-patch substitutions since the point is to fix some hardcoded +# path info in the distfile content. +# +# where to find header files and libs + @${REINPLACE_CMD} -E \ + -e 's|/usr/local/include|${LOCALBASE}/include|' \ + ${WRKSRC}/src/src.pro \ + ${WRKSRC}/lib/lib.pro \ + ${WRKSRC}/plugin.config + @${REINPLACE_CMD} -E \ + -e 's|/usr/X11R6/include|${LOCALBASE}/include|' \ + ${WRKSRC}/src/src.pro + @${REINPLACE_CMD} -E \ + -e 's|/usr/local/lib|${LOCALBASE}/lib|' \ + ${WRKSRC}/src/src.pro \ + ${WRKSRC}/lib/lib.pro \ + ${WRKSRC}/plugin.config +# where to find data files (at run-time) + @${REINPLACE_CMD} -E \ + -e 's|/usr/local/share/qtstalker|${DATADIR}|' \ + ${WRKSRC}/src/Qtstalker.cpp \ + ${WRKSRC}/lib/Config.cpp \ + ${WRKSRC}/docs/docs.pro +# where to install plugins @${FIND} ${WRKSRC} -type f -name "*pro" | \ ${XARGS} -x -n 5 \ ${REINPLACE_CMD} -E \ - -e 's|${LOCALBASE}/lib/qtstalker/|${PREFIX}/lib/${PORTNAME}/|' -# where to find plugins + -e 's|/usr/local/lib/qtstalker/|${PREFIX}/lib/${PORTNAME}/|' +# where to find plugins (at run-time) @${REINPLACE_CMD} -E \ - -e 's|${LOCALBASE}/lib/qtstalker/|${PREFIX}/lib/${PORTNAME}/|' \ + -e 's|/usr/local/lib/qtstalker/|${PREFIX}/lib/${PORTNAME}/|' \ ${WRKSRC}/lib/Config.cpp \ -# where to both find and install docs + ${WRKSRC}/lib/RcFile.cpp +# where to both find (at run-time) and install docs @${REINPLACE_CMD} -E \ - -e 's|${LOCALBASE}/share/doc/qtstalker/html|${DOCSDIR}/html|' \ + -e 's|/usr/local/share/doc/qtstalker/html|${DOCSDIR}/html|' \ ${WRKSRC}/lib/Config.cpp \ + ${WRKSRC}/lib/RcFile.cpp \ ${WRKSRC}/docs/docs.pro -# where to find examples - @${REINPLACE_CMD} -e \ - 's|${LOCALBASE}/share/qtstalker/indicator|${EXAMPLESDIR}/indicator|' \ - ${WRKSRC}/docs/docs.pro + @${SED} -E \ + -e 's|/usr/local/share/doc/qtstalker/html|${DOCSDIR}/html|' \ + ${FILESDIR}/qtstalkerrc > ${WRKDIR}/qtstalkerrc # where to install program @${REINPLACE_CMD} -E \ - -e 's|${LOCALBASE}/bin|${PREFIX}/bin|' \ + -e 's|/usr/local/bin|${PREFIX}/bin|' \ ${WRKSRC}/src/src.pro # where to install libs @${REINPLACE_CMD} -E \ - -e 's|${LOCALBASE}/lib|${PREFIX}/lib|' \ + -e 's|/usr/local/lib|${PREFIX}/lib|' \ ${WRKSRC}/lib/lib.pro # correctly use database/db43 @${REINPLACE_CMD} -E \ @@ -90,6 +118,7 @@ post-patch: -e 's|-ldb$$|-ldb-4.3|' \ ${WRKSRC}/lib/lib.pro +# Use of LOCALBASE is OK from this point on do-configure: @cd ${WRKSRC} && \ ${SETENV} ${CONFIGURE_ENV} \ @@ -115,14 +144,11 @@ pre-install: -e 's|^.+cd[[:space:]]+docs[[:space:]]+.+$$|#|' \ ${WRKSRC}/Makefile .endif -.if !defined(NOPORTEXAMPLES) - @${REINPLACE_CMD} -e '37,46d' ${WRKSRC}/docs/docs.pro -.endif post-install: # install minimal rcfile with helpfiles path needed by help window @${MKDIR} ${PREFIX}/share/qt/etc - @${INSTALL_DATA} ${FILESDIR}/qtstalkerrc ${PREFIX}/share/qt/etc + @${INSTALL_DATA} ${WRKDIR}/qtstalkerrc ${PREFIX}/share/qt/etc .ifndef(NOPORTDOCS) @${MKDIR} ${DOCSDIR} # additional docs @@ -130,5 +156,10 @@ post-install: @${INSTALL_DATA} ${WRKSRC}/docs/${doc} ${DOCSDIR} .endfor .endif +# examples +.ifndef(NOPORTEXAMPLES) + @${MKDIR} ${EXAMPLESDIR}/CUS_examples + @(cd ${WRKSRC}/misc/CUS_examples/ && ${COPYTREE_SHARE} \* ${EXAMPLESDIR}/CUS_examples) +.endif .include <bsd.port.mk> |