mirror of
https://github.com/ivabus/pantry
synced 2024-11-30 04:05:06 +03:00
changes needed to successfully build gcc (#83)
* clang doesn't have `-nodefaultrpaths` * try `MachO::FatFile` if `MachO:MachOFile` fails * add explicit comments * use `MachO.open()` * fix fetch.ts for no src pkgs Co-authored-by: Max Howell <mxcl@me.com>
This commit is contained in:
parent
c78878a22f
commit
fc31bb8939
4 changed files with 11 additions and 5 deletions
|
@ -11,8 +11,9 @@ $tea_prefix = ENV['TEA_PREFIX'] || `tea --prefix`.chomp
|
|||
exe = File.basename($0)
|
||||
|
||||
# remove duplicates since this in fact embeds the rpath multiple times
|
||||
# and omit -nodefaultrpaths since it is not a valid flag for clang
|
||||
args = ARGV.map do |arg|
|
||||
arg unless arg == "-Wl,-rpath,#$tea_prefix"
|
||||
arg unless arg == "-Wl,-rpath,#$tea_prefix" or arg == "-nodefaultrpaths"
|
||||
end.compact
|
||||
|
||||
# find next example of ourselves
|
||||
|
|
|
@ -3,7 +3,7 @@ distributable: ~
|
|||
# FIXME we want the c version eg. c99
|
||||
# or should that be some kind of option? so you specify you want a cc that support c99
|
||||
versions:
|
||||
- 0.1.1
|
||||
- 0.1.2
|
||||
|
||||
dependencies:
|
||||
linux:
|
||||
|
|
|
@ -41,7 +41,7 @@ end
|
|||
|
||||
class Fixer
|
||||
def initialize(file)
|
||||
@file = MachO::MachOFile.new(file)
|
||||
@file = MachO.open(file)
|
||||
@changed = false
|
||||
end
|
||||
|
||||
|
|
|
@ -53,7 +53,12 @@ export async function fetch_src(pkg: Package): Promise<[Path, Path] | undefined>
|
|||
if (import.meta.main) {
|
||||
for await (let pkg of ARGV.pkgs()) {
|
||||
pkg = await pantry.resolve(pkg)
|
||||
const rv = await fetch_src(pkg) ?? panic()
|
||||
await print(rv.join("\n") + "\n")
|
||||
const rv = await fetch_src(pkg)
|
||||
if (rv) {
|
||||
// a package doesn’t require a source tarball
|
||||
//FIXME is this dumb tho? In theory a package could just be a build script that generates itself
|
||||
// in practice this is rare and pkgs could just specify some dummy tarball
|
||||
await print(rv.join("\n") + "\n")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue