Skip to content

Commit

Permalink
app-editors/emacs: Remove pre-2011 workaround for Info dir
Browse files Browse the repository at this point in the history
Signed-off-by: Ulrich Müller <[email protected]>
  • Loading branch information
ulm committed Mar 5, 2023
1 parent 7b53957 commit 1c10723
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 96 deletions.
14 changes: 3 additions & 11 deletions app-editors/emacs/emacs-18.59-r15.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,7 @@ src_install() {
dosym -r /usr/share/info/emacs-${SLOT} ${basedir}/info
docompress -x /usr/share/info

# move Info dir to avoid collisions with the dir file generated by portage
mv "${D}"/usr/share/info/emacs-${SLOT}/dir{,.orig} || die
# dissuade Portage from removing our dir file #257260
touch "${D}"/usr/share/info/emacs-${SLOT}/.keepinfodir

dodir /var/lib/emacs
Expand All @@ -146,16 +145,9 @@ src_install() {
}

pkg_preinst() {
# move Info dir file to correct name
# verify that the PM hasn't removed our Info directory index #257260
local infodir="${ED}/usr/share/info/emacs-${SLOT}"
if [[ -f ${infodir}/dir.orig ]]; then
mv "${infodir}"/dir{.orig,} || die
elif [[ -d ${infodir} ]]; then
# this can happen when preinst is run twice, e.g. when
# installing a binpkg that was created with quickpkg #899648
ewarn "Unexpected \"dir\" file in ${infodir} - preinst run twice?"
[[ ${MERGE_TYPE} == binary && -f ${infodir}/dir ]] || die
fi
[[ -f ${infodir}/dir || ! -d ${infodir} ]] || die
}

pkg_postinst() {
Expand Down
17 changes: 4 additions & 13 deletions app-editors/emacs/emacs-25.3-r16.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -240,11 +240,9 @@ src_install() {
mv "${ED}"/usr/share/man/man1/{emacs-,}${EMACS_SUFFIX}.1 \
|| die "moving emacs man page failed"

# move info dir to avoid collisions with the dir file generated by portage
mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{,.orig} \
|| die "moving info dir failed"
# dissuade Portage from removing our dir file #257260
touch "${ED}"/usr/share/info/${EMACS_SUFFIX}/.keepinfodir
docompress -x /usr/share/info/${EMACS_SUFFIX}/dir.orig
docompress -x /usr/share/info/${EMACS_SUFFIX}/dir

# movemail must be setgid mail
fowners root:mail /usr/libexec/emacs/${FULL_VERSION}/${CHOST}/movemail
Expand Down Expand Up @@ -330,16 +328,9 @@ src_install() {
}

pkg_preinst() {
# move Info dir file to correct name
# verify that the PM hasn't removed our Info directory index #257260
local infodir="${ED}/usr/share/info/${EMACS_SUFFIX}"
if [[ -f ${infodir}/dir.orig ]]; then
mv "${infodir}"/dir{.orig,} || die
elif [[ -d ${infodir} ]]; then
# this can happen when preinst is run twice, e.g. when
# installing a binpkg that was created with quickpkg #899648
ewarn "Unexpected \"dir\" file in ${infodir} - preinst run twice?"
[[ ${MERGE_TYPE} == binary && -f ${infodir}/dir ]] || die
fi
[[ -f ${infodir}/dir || ! -d ${infodir} ]] || die
}

pkg_postinst() {
Expand Down
16 changes: 4 additions & 12 deletions app-editors/emacs/emacs-26.3-r13.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,9 @@ src_install() {
mv "${ED}"/usr/share/man/man1/{emacs-,}${EMACS_SUFFIX}.1 || die
mv "${ED}"/usr/share/metainfo/{emacs-,}${EMACS_SUFFIX}.appdata.xml || die

# move info dir to avoid collisions with the dir file generated by portage
mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{,.orig} || die
# dissuade Portage from removing our dir file #257260
touch "${ED}"/usr/share/info/${EMACS_SUFFIX}/.keepinfodir
docompress -x /usr/share/info/${EMACS_SUFFIX}/dir.orig
docompress -x /usr/share/info/${EMACS_SUFFIX}/dir

# movemail must be setgid mail
if ! use mailutils; then
Expand Down Expand Up @@ -350,16 +349,9 @@ src_install() {
}

pkg_preinst() {
# move Info dir file to correct name
# verify that the PM hasn't removed our Info directory index #257260
local infodir="${ED}/usr/share/info/${EMACS_SUFFIX}"
if [[ -f ${infodir}/dir.orig ]]; then
mv "${infodir}"/dir{.orig,} || die
elif [[ -d ${infodir} ]]; then
# this can happen when preinst is run twice, e.g. when
# installing a binpkg that was created with quickpkg #899648
ewarn "Unexpected \"dir\" file in ${infodir} - preinst run twice?"
[[ ${MERGE_TYPE} == binary && -f ${infodir}/dir ]] || die
fi
[[ -f ${infodir}/dir || ! -d ${infodir} ]] || die
}

pkg_postinst() {
Expand Down
16 changes: 4 additions & 12 deletions app-editors/emacs/emacs-27.2-r11.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -307,10 +307,9 @@ src_install() {
mv "${ED}"/usr/share/man/man1/{emacs-,}${EMACS_SUFFIX}.1 || die
mv "${ED}"/usr/share/metainfo/{emacs-,}${EMACS_SUFFIX}.appdata.xml || die

# move info dir to avoid collisions with the dir file generated by portage
mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{,.orig} || die
# dissuade Portage from removing our dir file #257260
touch "${ED}"/usr/share/info/${EMACS_SUFFIX}/.keepinfodir
docompress -x /usr/share/info/${EMACS_SUFFIX}/dir.orig
docompress -x /usr/share/info/${EMACS_SUFFIX}/dir

# movemail must be setgid mail
if ! use mailutils; then
Expand Down Expand Up @@ -413,16 +412,9 @@ src_install() {
}

pkg_preinst() {
# move Info dir file to correct name
# verify that the PM hasn't removed our Info directory index #257260
local infodir="${ED}/usr/share/info/${EMACS_SUFFIX}"
if [[ -f ${infodir}/dir.orig ]]; then
mv "${infodir}"/dir{.orig,} || die
elif [[ -d ${infodir} ]]; then
# this can happen when preinst is run twice, e.g. when
# installing a binpkg that was created with quickpkg #899648
ewarn "Unexpected \"dir\" file in ${infodir} - preinst run twice?"
[[ ${MERGE_TYPE} == binary && -f ${infodir}/dir ]] || die
fi
[[ -f ${infodir}/dir || ! -d ${infodir} ]] || die
}

pkg_postinst() {
Expand Down
16 changes: 4 additions & 12 deletions app-editors/emacs/emacs-28.2-r6.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -386,10 +386,9 @@ src_install() {
mv "${ED}"/usr/share/man/man1/{emacs-,}${EMACS_SUFFIX}.1 || die
mv "${ED}"/usr/share/metainfo/{emacs-,}${EMACS_SUFFIX}.metainfo.xml || die

# move info dir to avoid collisions with the dir file generated by portage
mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{,.orig} || die
# dissuade Portage from removing our dir file #257260
touch "${ED}"/usr/share/info/${EMACS_SUFFIX}/.keepinfodir
docompress -x /usr/share/info/${EMACS_SUFFIX}/dir.orig
docompress -x /usr/share/info/${EMACS_SUFFIX}/dir

# movemail must be setgid mail
if ! use mailutils; then
Expand Down Expand Up @@ -492,16 +491,9 @@ src_install() {
}

pkg_preinst() {
# move Info dir file to correct name
# verify that the PM hasn't removed our Info directory index #257260
local infodir="${ED}/usr/share/info/${EMACS_SUFFIX}"
if [[ -f ${infodir}/dir.orig ]]; then
mv "${infodir}"/dir{.orig,} || die
elif [[ -d ${infodir} ]]; then
# this can happen when preinst is run twice, e.g. when
# installing a binpkg that was created with quickpkg #899648
ewarn "Unexpected \"dir\" file in ${infodir} - preinst run twice?"
[[ ${MERGE_TYPE} == binary && -f ${infodir}/dir ]] || die
fi
[[ -f ${infodir}/dir || ! -d ${infodir} ]] || die
}

pkg_postinst() {
Expand Down
16 changes: 4 additions & 12 deletions app-editors/emacs/emacs-28.3_rc1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -403,10 +403,9 @@ src_install() {
mv "${ED}"/usr/share/man/man1/{emacs-,}${EMACS_SUFFIX}.1 || die
mv "${ED}"/usr/share/metainfo/{emacs-,}${EMACS_SUFFIX}.metainfo.xml || die

# move info dir to avoid collisions with the dir file generated by portage
mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{,.orig} || die
# dissuade Portage from removing our dir file #257260
touch "${ED}"/usr/share/info/${EMACS_SUFFIX}/.keepinfodir
docompress -x /usr/share/info/${EMACS_SUFFIX}/dir.orig
docompress -x /usr/share/info/${EMACS_SUFFIX}/dir

# movemail must be setgid mail
if ! use mailutils; then
Expand Down Expand Up @@ -509,16 +508,9 @@ src_install() {
}

pkg_preinst() {
# move Info dir file to correct name
# verify that the PM hasn't removed our Info directory index #257260
local infodir="${ED}/usr/share/info/${EMACS_SUFFIX}"
if [[ -f ${infodir}/dir.orig ]]; then
mv "${infodir}"/dir{.orig,} || die
elif [[ -d ${infodir} ]]; then
# this can happen when preinst is run twice, e.g. when
# installing a binpkg that was created with quickpkg #899648
ewarn "Unexpected \"dir\" file in ${infodir} - preinst run twice?"
[[ ${MERGE_TYPE} == binary && -f ${infodir}/dir ]] || die
fi
[[ -f ${infodir}/dir || ! -d ${infodir} ]] || die
}

pkg_postinst() {
Expand Down
16 changes: 4 additions & 12 deletions app-editors/emacs/emacs-29.0.9999-r1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -433,10 +433,9 @@ src_install() {
mv "${ED}"/usr/share/man/man1/{emacs-,}${EMACS_SUFFIX}.1 || die
mv "${ED}"/usr/share/metainfo/{emacs-,}${EMACS_SUFFIX}.metainfo.xml || die

# move info dir to avoid collisions with the dir file generated by portage
mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{,.orig} || die
# dissuade Portage from removing our dir file #257260
touch "${ED}"/usr/share/info/${EMACS_SUFFIX}/.keepinfodir
docompress -x /usr/share/info/${EMACS_SUFFIX}/dir.orig
docompress -x /usr/share/info/${EMACS_SUFFIX}/dir

# movemail must be setgid mail
if ! use mailutils; then
Expand Down Expand Up @@ -539,16 +538,9 @@ src_install() {
}

pkg_preinst() {
# move Info dir file to correct name
# verify that the PM hasn't removed our Info directory index #257260
local infodir="${ED}/usr/share/info/${EMACS_SUFFIX}"
if [[ -f ${infodir}/dir.orig ]]; then
mv "${infodir}"/dir{.orig,} || die
elif [[ -d ${infodir} ]]; then
# this can happen when preinst is run twice, e.g. when
# installing a binpkg that was created with quickpkg #899648
ewarn "Unexpected \"dir\" file in ${infodir} - preinst run twice?"
[[ ${MERGE_TYPE} == binary && -f ${infodir}/dir ]] || die
fi
[[ -f ${infodir}/dir || ! -d ${infodir} ]] || die
}

pkg_postinst() {
Expand Down
16 changes: 4 additions & 12 deletions app-editors/emacs/emacs-30.0.9999.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -433,10 +433,9 @@ src_install() {
mv "${ED}"/usr/share/man/man1/{emacs-,}${EMACS_SUFFIX}.1 || die
mv "${ED}"/usr/share/metainfo/{emacs-,}${EMACS_SUFFIX}.metainfo.xml || die

# move info dir to avoid collisions with the dir file generated by portage
mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{,.orig} || die
# dissuade Portage from removing our dir file #257260
touch "${ED}"/usr/share/info/${EMACS_SUFFIX}/.keepinfodir
docompress -x /usr/share/info/${EMACS_SUFFIX}/dir.orig
docompress -x /usr/share/info/${EMACS_SUFFIX}/dir

# movemail must be setgid mail
if ! use mailutils; then
Expand Down Expand Up @@ -539,16 +538,9 @@ src_install() {
}

pkg_preinst() {
# move Info dir file to correct name
# verify that the PM hasn't removed our Info directory index #257260
local infodir="${ED}/usr/share/info/${EMACS_SUFFIX}"
if [[ -f ${infodir}/dir.orig ]]; then
mv "${infodir}"/dir{.orig,} || die
elif [[ -d ${infodir} ]]; then
# this can happen when preinst is run twice, e.g. when
# installing a binpkg that was created with quickpkg #899648
ewarn "Unexpected \"dir\" file in ${infodir} - preinst run twice?"
[[ ${MERGE_TYPE} == binary && -f ${infodir}/dir ]] || die
fi
[[ -f ${infodir}/dir || ! -d ${infodir} ]] || die
}

pkg_postinst() {
Expand Down

0 comments on commit 1c10723

Please sign in to comment.