forked from Lainports/freebsd-ports
- Fix build, install / [list with custom LOCALBASE and PREFIX
- respect NOPORTEXAMPLES Submitted by: maintainer Reported by: QATty
This commit is contained in:
parent
834a3e925f
commit
ac2bec9f37
1 changed files with 47 additions and 16 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue