@@ -43,17 +43,37 @@ class Libftdi < Formula
43
43
sha256 "db4c3e558e0788db00dcec37929f7da2c4ad684791977445d8516cc3e134a3c4"
44
44
end
45
45
46
+ # Backport commits to increase to cmake 3.5 minimum needed by cmake 4
47
+ patch do
48
+ url "http://developer.intra2net.com/git/?p=libftdi;a=patch;h=3861e7dc9e83f2f6ff4e1579cf3bbf63a6827105"
49
+ sha256 "ffe62563c3696f0e251acf2a23718b11e62d625e2e9826ba17fd1e83861775fb"
50
+ end
51
+ patch do
52
+ url "http://developer.intra2net.com/git/?p=libftdi;a=patch;h=3dc444f99bbc780f06ee6115c086e30f2dda471a"
53
+ sha256 "63b9eb4e4c12ea0ee7d314a1d50d38dc025f9433986cacfbbca443e7c2a004b8"
54
+ end
55
+ patch do
56
+ url "http://developer.intra2net.com/git/?p=libftdi;a=patch;h=61a6bac98bbac623fb33b6153a063b6436f84721"
57
+ sha256 "68dc235a70c8b3ea62fa1d498c8b13f290a32affa947119202f8655037bbfe37"
58
+ end
59
+ patch do
60
+ url "http://developer.intra2net.com/git/?p=libftdi;a=patch;h=de9f01ece34d2fe6e842e0250a38f4b16eda2429"
61
+ sha256 "3fe298c7f61a353160c4e1df74a06a4f7ed26e121b3608237b6fe68186208129"
62
+ end
63
+
46
64
def install
47
- mkdir "libftdi-build" do
48
- system "cmake" , ".." , "-DPYTHON_BINDINGS=OFF" ,
49
- "-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON" ,
50
- "-DFTDIPP=ON" ,
51
- *std_cmake_args
52
- system "make" , "install"
53
- pkgshare . install "../examples"
54
- ( pkgshare /"examples/bin" ) . install Dir [ "examples/*" ] \
55
- - Dir [ "examples/{CMake*,Makefile,*.cmake}" ]
56
- end
65
+ system "cmake" , "-S" , "." , "-B" , "build" ,
66
+ "-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON" ,
67
+ "-DCMAKE_CXX_STANDARD=11" ,
68
+ "-DCMAKE_INSTALL_RPATH=#{ rpath } ;#{ rpath ( source : pkgshare /"examples/bin" ) } " ,
69
+ "-DFTDIPP=ON" ,
70
+ "-DPYTHON_BINDINGS=OFF" ,
71
+ *std_cmake_args
72
+ system "cmake" , "--build" , "build"
73
+ system "cmake" , "--install" , "build"
74
+
75
+ pkgshare . install "examples"
76
+ ( pkgshare /"examples/bin" ) . install buildpath . glob ( "build/examples/*" ) . select { |f | f . file? && f . executable? }
57
77
end
58
78
59
79
test do
0 commit comments