Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pcb2gcode 2.2.2 #68428

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 4 additions & 56 deletions Formula/pcb2gcode.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
class Pcb2gcode < Formula
desc "Command-line tool for isolation, routing and drilling of PCBs"
homepage "https://github.com/pcb2gcode/pcb2gcode"
url "https://github.com/pcb2gcode/pcb2gcode/archive/v2.1.0.tar.gz"
sha256 "ee546f0e002e83434862c7a5a2171a2276038d239909a09adb36e148e7d7319a"
url "https://github.com/pcb2gcode/pcb2gcode/archive/v2.2.2.tar.gz"
sha256 "6f29b535119d1968849fdc90e2ffedb614a047a5bdd57deeab3a98ab2f605999"
license "GPL-3.0-or-later"
revision 1
head "https://github.com/pcb2gcode/pcb2gcode.git"

bottle do
Expand All @@ -20,6 +19,7 @@ class Pcb2gcode < Formula
depends_on "atkmm" => :build
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "boost" => :build
depends_on "[email protected]" => :build
depends_on "glibmm" => :build
depends_on "gtkmm" => :build
Expand All @@ -30,64 +30,12 @@ class Pcb2gcode < Formula
depends_on "pkg-config" => :build
depends_on "gerbv"

# Upstream maintainer claims that the geometry library from boost >= 1.67
# is severely broken. Remove the vendoring once fixed.
# See https://github.com/Homebrew/homebrew-core/pull/30914#issuecomment-411662760
# and https://svn.boost.org/trac10/ticket/13645
resource "boost" do
url "https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.tar.bz2"
sha256 "5721818253e6a0989583192f96782c4a98eb6204965316df9f5ad75819225ca9"

# Fix build on Xcode 11.4
patch do
url "https://github.com/boostorg/build/commit/b3a59d265929a213f02a451bb63cea75d668a4d9.patch?full_index=1"
sha256 "04a4df38ed9c5a4346fbb50ae4ccc948a1440328beac03cb3586c8e2e241be08"
directory "tools/build"
end
end

def install
resource("boost").stage do
# Force boost to compile with the desired compiler
open("user-config.jam", "a") do |file|
file.write "using darwin : : #{ENV.cxx} ;\n"
end

bootstrap_args = %W[
--prefix=#{buildpath}/boost
--libdir=#{buildpath}/boost/lib
--with-libraries=program_options
--without-icu
]

args = %W[
--prefix=#{buildpath}/boost
--libdir=#{buildpath}/boost/lib
-d2
-j#{ENV.make_jobs}
--ignore-site-config
--layout=tagged
--user-config=user-config.jam
install
threading=multi
link=static
optimization=space
variant=release
cxxflags=-std=c++11
]

args << "cxxflags=-stdlib=libc++" << "linkflags=-stdlib=libc++" if ENV.compiler == :clang

system "./bootstrap.sh", *bootstrap_args
system "./b2", "headers"
system "./b2", *args
end

system "autoreconf", "-fvi"
system "./configure", "--disable-dependency-tracking",
"--disable-silent-rules",
"--prefix=#{prefix}",
"--with-boost=#{buildpath}/boost",
"--with-boost=#{Formula["boost"].opt_prefix}",
"--enable-static-boost"
system "make", "install"
end
Expand Down