mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-21 00:25:50 +00:00
Use print/indexinfo to generate index of info pages
It is much more lightweight than ginstall-info (12kB vs 400kB) and ginstall-info had a regression causing some index leftover on uninstall Submitted by: bapt Exp-run: self With hat: portmgr
This commit is contained in:
parent
330c772106
commit
2ec52ec10f
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=359680
@ -5,13 +5,7 @@
|
||||
actions: [file]
|
||||
post-install: |
|
||||
file=%D/%@
|
||||
ginstall-info --quiet %D/%@ %D/info/dir
|
||||
indexinfo ${file%/*}
|
||||
post-deinstall: |
|
||||
file=%D/%@
|
||||
ginstall-info --quiet --delete %D/%@ %D/info/dir
|
||||
if [ $(ginfo -d ${file%/*} --output - 2>/dev/null | grep -c '^*') -eq 1 ]; then
|
||||
rm -f ${file%/*}/dir
|
||||
fi
|
||||
if [ ${file%/*} != "%D/info" ]; then
|
||||
rmdir ${file%/*} 2> /dev/null || true
|
||||
fi
|
||||
indexinfo ${file%/*}
|
||||
|
@ -2914,8 +2914,7 @@ INFO_PATH?= info
|
||||
.endif
|
||||
|
||||
.if defined(INFO)
|
||||
BUILD_DEPENDS+= ginstall-info:${PORTSDIR}/print/texinfo-lite
|
||||
RUN_DEPENDS+= ginstall-info:${PORTSDIR}/print/texinfo-lite
|
||||
RUN_DEPENDS+= indexinfo:${PORTSDIR}/print/indexinfo
|
||||
|
||||
. for D in ${INFO:H}
|
||||
RD:= ${D}
|
||||
@ -5656,16 +5655,12 @@ add-plist-info:
|
||||
# Process GNU INFO files at package install/deinstall time
|
||||
.for i in ${INFO}
|
||||
.if defined(NO_STAGE)
|
||||
ginstall-info --quiet ${PREFIX}/${INFO_PATH}/$i.info ${PREFIX}/${INFO_PATH}/dir
|
||||
indexinfo ${PREFIX}/${INFO_PATH}
|
||||
.endif
|
||||
.if !defined(WITH_PKGNG)
|
||||
@${ECHO_CMD} "@unexec ginstall-info --quiet --delete %D/${INFO_PATH}/$i.info %D/${INFO_PATH}/dir" \
|
||||
>> ${TMPPLIST}
|
||||
@${ECHO_CMD} "@unexec [ \`ginfo -d %D/${INFO_PATH} --output - 2>/dev/null | grep -c '^*'\` -eq 1 ] && rm -f %D/${INFO_PATH}/dir || :"\
|
||||
>> ${TMPPLIST}
|
||||
@${ECHO_CMD} "@unexec indexinfo %D/${INFO_PATH}" >> ${TMPPLIST}
|
||||
@${LS} ${STAGEDIR}${PREFIX}/${INFO_PATH}/$i.info* | ${SED} -e s:${STAGEDIR}${PREFIX}/::g >> ${TMPPLIST}
|
||||
@${ECHO_CMD} "@exec ginstall-info --quiet %D/${INFO_PATH}/$i.info %D/${INFO_PATH}/dir" \
|
||||
>> ${TMPPLIST}
|
||||
@${ECHO_CMD} "@exec indexinfo %D/${INFO_PATH}" >> ${TMPPLIST}
|
||||
.else
|
||||
@${LS} ${STAGEDIR}${PREFIX}/${INFO_PATH}/$i.info* | ${SED} -e s:${STAGEDIR}${PREFIX}/:@info\ :g >> ${TMPPLIST}
|
||||
.endif
|
||||
@ -5678,7 +5673,7 @@ add-plist-info:
|
||||
.endif
|
||||
.endif
|
||||
.if (${PREFIX} != "/usr")
|
||||
@${ECHO_CMD} "@unexec if [ -f %D/${INFO_PATH}/dir ]; then if sed -e '1,/Menu:/d' %D/${INFO_PATH}/dir | grep -q '^[*] '; then true; else rm %D/${INFO_PATH}/dir; fi; fi" >> ${TMPPLIST}
|
||||
@${ECHO_CMD} "@unexec indexinfo %D/${INFO_PATH}" >> ${TMPPLIST}
|
||||
.if (${PREFIX} != ${LOCALBASE} && ${PREFIX} != ${LINUXBASE})
|
||||
@${ECHO_CMD} "@dirrmtry ${INFO_PATH}" >> ${TMPPLIST}
|
||||
.endif
|
||||
|
Loading…
Reference in New Issue
Block a user