Anyway, I can't list "each" patch in the for loop (above), so that weird array subscript will have to stay, because there are a lot of patches and I'm sure that the first nor latest three packages are actually patches.
PS.- By the way, it's just having every file inside the source tarball the 'sane thing'? I'd expect to find on the wiki, unless I'm the only one crazy that tries to do something like that.
]]>I managed with a bit of bash-fu apply some of the patches using the source array:
(...)
for file in "${source[@]:1:${#source[@]} -4}; do
msg "$(patch -uNp1 -i ../${file})"
done
(...)
The problem is that I can't find any sensible way to access to them. If they were included on the package, something like:
(...)
${source[@]:(-3)}
(...)
... would suffice, but since the source it's an url when I try to copy them (through the `install` command) it fails saying that 'cannot stat', which is obvious, since the file `http://pastebin....` doesn't exist. I tried using the `filename::uri`, but it doesn't work either, keeping the same problem "cannot stat `filename::http//.....` ...".
Anyway, I know makepkg can get the "file names" somehow. At least that's what I believe since it actually list the filenames
when checks if the files are found or the validity checks passed:
(...)
-> Found patch1.patch
-> Found patch2.patch
-> Found another_patch.patch
-> Found some_downloaded_file
-> Found another_downloaded_file
-> Found last_downloaded_file
I can think on a couple of solutions, but they seem a bit overly complicated. Any ideas?
]]>