On Sun, Aug 03, 2014 at 06:50:19PM +1000, Allan McRae wrote:
On 03/08/14 01:54, Dave Reisner wrote:
This introduces support for architecutre-specific conflicts, depends, optdepends, makedepends, replaces, and conflicts by appending "_$CARCH" to the array name. For example, in the global section:
arch=('i686' 'x86_64') depends=('foo') depends_x86_64=('bar')
This will generate depends of 'foo' and 'bar' on x86_64, but only 'foo' on i686. Moreover, this is supported in the package functions with the same heuristics as the generic names, e.g.
... arch=('i686' 'x86_64') depends=('foo') ...
package_somepkg() { depends_x86_64=('bar')
... }
Again, will cause x86_64 to have depends of 'foo' and 'bar', but only 'foo' for i686. --- v2: 1) extended this to a bunch more attributes -- some of them I can't necessarily reason an immediate use case for, but conceptually could have their uses as arch-specific attributes. 2) Added documentation 3) Added check_sanity support post mega-refactoring.
doc/PKGBUILD.5.txt | 21 +++++++++++++++++++++ scripts/makepkg.sh.in | 46 +++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 64 insertions(+), 3 deletions(-)
diff --git a/doc/PKGBUILD.5.txt b/doc/PKGBUILD.5.txt index 17e8af2..5cebbbd 100644 --- a/doc/PKGBUILD.5.txt +++ b/doc/PKGBUILD.5.txt @@ -183,17 +183,26 @@ If the dependency name appears to be a library (ends with .so), makepkg will try to find a binary that depends on the library in the built package and append the version needed by the binary. Appending the version yourself disables automatic detection. ++ +Architecture-specific depends can be added by appending an underscore and the +architecture name e.g., 'depends_x86_64=()'.
Do we want to repeat this sentence many times or add a single section detailing architecture specific additions.
I think it's more clear to document it directly alongside the relevant variables instead of breaking out a new section.
Also, despite "added" there, I do not find it clear that these are overrides. Perhaps "Additional architecture-specific..." would help. If this was in its own section, it could be expanded for clarity.
It's not clear that they're overrides because they *aren't* overrides. If you specify: arch=('i686' 'x86_64') depends=('libfoo') depends_x86_64=('lib32-libbar') Then, you create an i686 package with depends of 'libfoo' only, and an x86_64 package with depends of 'libfoo' *and* 'lib32-libbar'.