Skip to content
This repository was archived by the owner on Jun 19, 2024. It is now read-only.

Commit ea1a9e6

Browse files
committed
ENV.rb: Always return integers from make_jobs
When referencing `Hardware.processor_count`, `ENV.make_jobs` will return an integer. If referencing the environment variable `HOMEBREW_MAKE_JOBS`, it returned a string. Now, the function always returns an integer. Fixes Homebrew#12033.
1 parent 9611baa commit ea1a9e6

File tree

3 files changed

+17
-11
lines changed

3 files changed

+17
-11
lines changed

Library/Formula/pyside.rb

+8-5
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ def site_package_dir
1010

1111
class Pyside < Formula
1212
homepage 'http://www.pyside.org'
13-
url 'http://www.pyside.org/files/pyside-qt4.7+1.1.0.tar.bz2'
14-
md5 '233f0c6d2b3daf58cf88877d7f74557b'
13+
url 'http://www.pyside.org/files/pyside-latest.tar.bz2'
14+
md5 '0176d3746074afe47373d7302e1b4501'
1515

1616
depends_on 'cmake' => :build
1717
depends_on 'shiboken'
@@ -23,9 +23,12 @@ def install
2323
qt = Formula.factory 'qt'
2424
ENV.append_to_cflags "-F#{qt.prefix}/Frameworks"
2525

26-
# Also need `ALTERNATIVE_QT_INCLUDE_DIR` to prevent "missing file" errors.
27-
system "cmake #{std_cmake_parameters} -DALTERNATIVE_QT_INCLUDE_DIR=#{qt.prefix}/Frameworks -DSITE_PACKAGE=#{site_package_dir} -DBUILD_TESTS=NO ."
28-
system 'make install'
26+
mkdir 'build'
27+
chdir 'build' do
28+
# Also need `ALTERNATIVE_QT_INCLUDE_DIR` to prevent "missing file" errors.
29+
system "cmake .. #{std_cmake_parameters} -DALTERNATIVE_QT_INCLUDE_DIR=#{qt.prefix}/Frameworks -DSITE_PACKAGE=#{site_package_dir} -DBUILD_TESTS=NO"
30+
system 'make install'
31+
end
2932
end
3033

3134
def caveats

Library/Formula/shiboken.rb

+8-5
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,19 @@
22

33
class Shiboken < Formula
44
homepage 'http://www.pyside.org/docs/shiboken'
5-
url 'http://pyside.org/files/shiboken-1.1.0.tar.bz2'
6-
md5 '9c9d696c8c426fb5abf28a6bd3759558'
5+
url 'http://www.pyside.org/files/shiboken-latest.tar.bz2'
6+
md5 'fa451b6c4f3e06cce283a84550a96fd2'
77

88
depends_on 'cmake' => :build
9-
depends_on 'generatorrunner'
9+
depends_on 'qt'
1010

1111
def install
1212
# Building the tests also runs them. Not building and running tests cuts
1313
# install time in half.
14-
system "cmake #{std_cmake_parameters} -DBUILD_TESTS=OFF ."
15-
system "make install"
14+
mkdir 'build'
15+
chdir 'build' do
16+
system "cmake .. #{std_cmake_parameters} -DBUILD_TESTS=OFF"
17+
system "make install"
18+
end
1619
end
1720
end

Library/Homebrew/extend/ENV.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ def compiler
432432
def make_jobs
433433
# '-j' requires a positive integral argument
434434
if self['HOMEBREW_MAKE_JOBS'].to_i > 0
435-
self['HOMEBREW_MAKE_JOBS']
435+
self['HOMEBREW_MAKE_JOBS'].to_i
436436
else
437437
Hardware.processor_count
438438
end

0 commit comments

Comments
 (0)