summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2017-04-01 08:14:12 +0200
committerMichał Górny <mgorny@gentoo.org>2017-04-01 08:15:04 +0200
commita6139b237992c6963d48b60e31f0f4520cd33636 (patch)
tree4a9d736748f4e5ec42f1684abe87c2150edf5a9d
parentapp-portage/cpuid2cpuflags: Drop v2 back to ~arch due to lack of docs (diff)
downloadgentoo-a6139b237992c6963d48b60e31f0f4520cd33636.tar.gz
gentoo-a6139b237992c6963d48b60e31f0f4520cd33636.tar.bz2
gentoo-a6139b237992c6963d48b60e31f0f4520cd33636.zip
app-portage/cpuid2cpuflags: Add postinst about the new output
-rw-r--r--app-portage/cpuid2cpuflags/cpuid2cpuflags-3.ebuild15
-rw-r--r--app-portage/cpuid2cpuflags/cpuid2cpuflags-4.ebuild15
2 files changed, 30 insertions, 0 deletions
diff --git a/app-portage/cpuid2cpuflags/cpuid2cpuflags-3.ebuild b/app-portage/cpuid2cpuflags/cpuid2cpuflags-3.ebuild
index 9d5be8483d54..7aec3c15788b 100644
--- a/app-portage/cpuid2cpuflags/cpuid2cpuflags-3.ebuild
+++ b/app-portage/cpuid2cpuflags/cpuid2cpuflags-3.ebuild
@@ -11,3 +11,18 @@ LICENSE="BSD-2"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~x86 ~amd64-fbsd ~x86-fbsd ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
IUSE=""
+
+pkg_postinst() {
+ local v
+ for v in ${REPLACING_VERSIONS}; do
+ if [[ ${v%-r*} -lt 2 ]]; then
+ elog 'Please note that the output has changed in v2. The new format is suitable'
+ elog 'both for Portage and Paludis. To use it, e.g.:'
+ elog
+ elog ' $ echo "*/* $(cpuid2cpuflags)" > /etc/portage/package.use/00cpuflags'
+ elog
+ elog '(you may need to convert package.use into a directory if you want to use'
+ elog ' separate file as presented here)'
+ fi
+ done
+}
diff --git a/app-portage/cpuid2cpuflags/cpuid2cpuflags-4.ebuild b/app-portage/cpuid2cpuflags/cpuid2cpuflags-4.ebuild
index 9d5be8483d54..7aec3c15788b 100644
--- a/app-portage/cpuid2cpuflags/cpuid2cpuflags-4.ebuild
+++ b/app-portage/cpuid2cpuflags/cpuid2cpuflags-4.ebuild
@@ -11,3 +11,18 @@ LICENSE="BSD-2"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~x86 ~amd64-fbsd ~x86-fbsd ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
IUSE=""
+
+pkg_postinst() {
+ local v
+ for v in ${REPLACING_VERSIONS}; do
+ if [[ ${v%-r*} -lt 2 ]]; then
+ elog 'Please note that the output has changed in v2. The new format is suitable'
+ elog 'both for Portage and Paludis. To use it, e.g.:'
+ elog
+ elog ' $ echo "*/* $(cpuid2cpuflags)" > /etc/portage/package.use/00cpuflags'
+ elog
+ elog '(you may need to convert package.use into a directory if you want to use'
+ elog ' separate file as presented here)'
+ fi
+ done
+}