diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2008-04-10 19:36:03 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2008-04-10 19:36:03 +0300 |
commit | 48ff62a5291458ed1181cd6c31dcadb193ad2f8e (patch) | |
tree | 9c0f4fd0d944245648cbe7c03db0c7a2f622c23a /installplatform | |
parent | af4eea99e311171e3dd771c9b2ff59faa964d208 (diff) | |
download | librpm-tizen-48ff62a5291458ed1181cd6c31dcadb193ad2f8e.tar.gz librpm-tizen-48ff62a5291458ed1181cd6c31dcadb193ad2f8e.tar.bz2 librpm-tizen-48ff62a5291458ed1181cd6c31dcadb193ad2f8e.zip |
First crack at adding ISA provides to packages (rhbz#235755)
- Horrible kludgery to get the isa names and bits into platform specific
macros from installplatform script. That beast needs to die. I mean really
- In build, add provides: name(isa) = evr automatically when it makes
sense (similarly to name = evr provides). ISA consists of ISA name and
bitness (or wordsize). This can be used to correctly
express multilib dependencies without resorting to (expensive!) file
dependency kludges, eg for dlopen()'ed libraries where automatic
dep extraction doesn't force dependency on 32bit vs 64bit version, you
can now use:
Requires: foo-plugin%{?_isa}
This expands to foo-plugin(x86-32) for i?86 packages, foo-plugin(x86-64)
to x86_64 etc, and permits spec to be shared with older distros which
don't have ISA provides.
- The same could be expressed with "canon arch" just as well, but
using the ISA to differentiate from %_arch and the like:
eg i386 could be used instead of x86-32 but it's overloaded with meanings
(the actual i386 processor vs i386 compatible cpu family etc)
Diffstat (limited to 'installplatform')
-rwxr-xr-x | installplatform | 43 |
1 files changed, 42 insertions, 1 deletions
diff --git a/installplatform b/installplatform index de458a71f..193625a9d 100755 --- a/installplatform +++ b/installplatform @@ -75,6 +75,45 @@ for SUBST in $SUBSTS ; do x86_64-linux|amd64-linux|ia32e-linux) LIB=lib64; MULTILIBNO=2 ;; esac + # XXX FIXME: incomplete and quite likely wrong too in places, + # consult various arch folks for correct names etc. + ISANAME= + ISABITS= + case "${ARCH}" in + sparc|sparcv8|sparcv9*) + ISANAME=sparc + ISABITS=32 + ;; + sparc64|sparc64v) + ISANAME=sparc + ISABITS=64 + ;; + s390) + ISANAME=s390 + ISABITS=32 + ;; + s390x) + ISANAME=s390 + ISABITS=64 + ;; + ppc) + ISANAME=ppc + ISABITS=32 + ;; + ppc64) + ISANAME=ppc + ISABITS=64 + ;; + i?86|pentium?|athlon|geode) + ISANAME=x86 + ISABITS=32 + ;; + x86_64|amd64|ia32e) + ISANAME=x86 + ISABITS=64 + ;; + esac + if [ -n "$MULTILIBNO" ]; then MULTILIBSED='-e /^@MULTILIB/d -e s,@MULTILIBNO@,'$MULTILIBNO, else @@ -114,6 +153,8 @@ for SUBST in $SUBSTS ; do -e "s,@ARCH_INSTALL_POST@,$ARCH_INSTALL_POST," \ -e "s,@DEFAULTDOCDIR@,$DEFAULTDOCDIR," \ -e '/\${\w*:-/!s,\${,%{_,' \ + -e "s,@ISANAME@,$ISANAME," \ + -e "s,@ISABITS@,$ISABITS," \ $MULTILIBSED \ $VENDORSED \ | grep -v '^@' \ @@ -124,7 +165,7 @@ done { cd ${DESTDIR}/${platformdir} [ -L noarch-${OS} ] && rm -f noarch-${OS} 2>/dev/null mkdir -p noarch-${OS} - sed -e "/^%_arch/s,${arch},noarch," ${arch}-${OS}/macros | grep -v '^%optflags' > noarch-${OS}/macros + sed -e "/^%_arch/s,${arch},noarch," ${arch}-${OS}/macros | grep -v '^%optflags' | grep -v "^%__isa" > noarch-${OS}/macros # [ -d ${VENDOR} ] || mkdir ${VENDOR} # for i in brp-* find-lang.sh find-provides find-requires perl.prov perl.req # do |