mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-08 23:18:10 -05:00
Do not pass CREW_TARGET to regular (non-compiler) builds (#10146)
This commit is contained in:
committed by
GitHub
parent
49aa173749
commit
75fb2832a5
@@ -2,7 +2,7 @@
|
|||||||
# Defines common constants used in different parts of crew
|
# Defines common constants used in different parts of crew
|
||||||
require 'etc'
|
require 'etc'
|
||||||
|
|
||||||
CREW_VERSION = '1.49.7'
|
CREW_VERSION = '1.49.8'
|
||||||
|
|
||||||
# Kernel architecture.
|
# Kernel architecture.
|
||||||
KERN_ARCH = Etc.uname[:machine]
|
KERN_ARCH = Etc.uname[:machine]
|
||||||
@@ -217,9 +217,6 @@ CREW_OPTIONS = <<~OPT.chomp
|
|||||||
--libdir=#{CREW_LIB_PREFIX} \
|
--libdir=#{CREW_LIB_PREFIX} \
|
||||||
--mandir=#{CREW_MAN_PREFIX} \
|
--mandir=#{CREW_MAN_PREFIX} \
|
||||||
--disable-dependency-tracking \
|
--disable-dependency-tracking \
|
||||||
--build=#{CREW_TARGET} \
|
|
||||||
--host=#{CREW_TARGET} \
|
|
||||||
--target=#{CREW_TARGET} \
|
|
||||||
--program-prefix='' \
|
--program-prefix='' \
|
||||||
--program-suffix=''
|
--program-suffix=''
|
||||||
OPT
|
OPT
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ class Apng2gif < Package
|
|||||||
depends_on 'help2man' => :build
|
depends_on 'help2man' => :build
|
||||||
|
|
||||||
def self.patch
|
def self.patch
|
||||||
system "sed -i 's:CC = gcc:CC = #{CREW_TARGET}-gcc:' Makefile"
|
|
||||||
system "sed -i 's:CFLAGS = -Wall -pedantic:CFLAGS = -Wall -pedantic #{CREW_COMMON_FLAGS}:' Makefile"
|
system "sed -i 's:CFLAGS = -Wall -pedantic:CFLAGS = -Wall -pedantic #{CREW_COMMON_FLAGS}:' Makefile"
|
||||||
system "sed -i 's:CFLAGS_OPT = -O2:CFLAGS_OPT =:' Makefile"
|
system "sed -i 's:CFLAGS_OPT = -O2:CFLAGS_OPT =:' Makefile"
|
||||||
# zlib is unused, remove the header and library link
|
# zlib is unused, remove the header and library link
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ class Gif2apng < Package
|
|||||||
depends_on 'help2man' => :build
|
depends_on 'help2man' => :build
|
||||||
|
|
||||||
def self.patch
|
def self.patch
|
||||||
system "sed -i 's:CC = gcc:CC = #{CREW_TARGET}-gcc:' Makefile"
|
|
||||||
system "sed -i 's:CFLAGS = -Wall -pedantic:CFLAGS = -Wall -pedantic #{CREW_COMMON_FLAGS}:' Makefile"
|
system "sed -i 's:CFLAGS = -Wall -pedantic:CFLAGS = -Wall -pedantic #{CREW_COMMON_FLAGS}:' Makefile"
|
||||||
system "sed -i 's:CFLAGS_OPT = -O2:CFLAGS_OPT =:' Makefile"
|
system "sed -i 's:CFLAGS_OPT = -O2:CFLAGS_OPT =:' Makefile"
|
||||||
# use system zopfli
|
# use system zopfli
|
||||||
|
|||||||
@@ -25,8 +25,6 @@ class Librhash < Package
|
|||||||
system "mold -run ./configure \
|
system "mold -run ./configure \
|
||||||
--prefix=#{CREW_PREFIX} \
|
--prefix=#{CREW_PREFIX} \
|
||||||
--libdir=#{CREW_LIB_PREFIX}\
|
--libdir=#{CREW_LIB_PREFIX}\
|
||||||
--cc=#{CREW_TARGET}-gcc \
|
|
||||||
--ar=#{CREW_TARGET}-gcc-ar \
|
|
||||||
--enable-gettext \
|
--enable-gettext \
|
||||||
--enable-openssl \
|
--enable-openssl \
|
||||||
--extra-cflags='#{CREW_COMMON_FLAGS}'"
|
--extra-cflags='#{CREW_COMMON_FLAGS}'"
|
||||||
|
|||||||
@@ -24,9 +24,7 @@ class Samurai < Package
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.build
|
def self.build
|
||||||
system "make CFLAGS='#{CREW_COMMON_FLAGS}' \
|
system "make CFLAGS='#{CREW_COMMON_FLAGS}' LDFLAGS='#{CREW_LDFLAGS}'"
|
||||||
LDFLAGS='#{CREW_LDFLAGS}' \
|
|
||||||
CC='#{CREW_TARGET}-gcc'"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.install
|
def self.install
|
||||||
|
|||||||
@@ -22,9 +22,6 @@ class Scdoc < Package
|
|||||||
depends_on 'glibc' # R
|
depends_on 'glibc' # R
|
||||||
|
|
||||||
def self.patch
|
def self.patch
|
||||||
# Use correct gcc compiler
|
|
||||||
system "sed -i '2 s:^:CC = #{CREW_TARGET}-gcc\\n:' Makefile"
|
|
||||||
|
|
||||||
# Build a dynamically linked binary
|
# Build a dynamically linked binary
|
||||||
system "sed -i 's:LDFLAGS+=-static:LDFLAGS+=:' Makefile" # Compile dynamically
|
system "sed -i 's:LDFLAGS+=-static:LDFLAGS+=:' Makefile" # Compile dynamically
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user