From 48ff62a5291458ed1181cd6c31dcadb193ad2f8e Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Thu, 10 Apr 2008 19:36:03 +0300 Subject: 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) --- macros.in | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'macros.in') diff --git a/macros.in b/macros.in index e4cd2dfb5..93c60fe69 100644 --- a/macros.in +++ b/macros.in @@ -810,6 +810,10 @@ print (t)\ # Define a generic value for optflags. Normally overridden by per-target macros. %optflags -O2 +# +# ISA dependency marker, none for noarch and name-bitness for others +%_isa %{?__isa:(%{__isa})}%{!?__isa:%{nil}} + # # Define per-arch and per-os defaults. Normally overridden by per-target macros. %__arch_install_post %{nil} -- cgit v1.2.3