diff options
| author | Jack Nagel | 2014-05-11 17:57:28 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-05-11 17:58:19 -0500 |
| commit | 1323750d3a46a9f8d2edd4de9272f182547d4ed3 (patch) | |
| tree | 4d9766d94f4e83e60374b778a63ba05838199ae8 /Library/Formula | |
| parent | 1798bd591c7c7462c025646bd2c7da406ff998f5 (diff) | |
| download | homebrew-1323750d3a46a9f8d2edd4de9272f182547d4ed3.tar.bz2 | |
tuntap: look for Kernel.framework headers in the SDK
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/tuntap.rb | 45 |
1 files changed, 38 insertions, 7 deletions
diff --git a/Library/Formula/tuntap.rb b/Library/Formula/tuntap.rb index 36afce259..ef2d330b1 100644 --- a/Library/Formula/tuntap.rb +++ b/Library/Formula/tuntap.rb @@ -1,16 +1,17 @@ -require 'formula' +require "formula" class Tuntap < Formula - homepage 'http://tuntaposx.sourceforge.net/' - url 'git://git.code.sf.net/p/tuntaposx/code', :tag => 'release_20111101' + homepage "http://tuntaposx.sourceforge.net/" + url "git://git.code.sf.net/p/tuntaposx/code", :tag => "release_20111101" + head "git://git.code.sf.net/p/tuntaposx/code", :branch => "master" - head 'git://git.code.sf.net/p/tuntaposx/code', :branch => 'master' + # Get Kernel.framework headers from the SDK + patch :DATA def install ENV.j1 # to avoid race conditions (can't open: ../tuntap.o) - cd 'tuntap' do - # Makefile doesn't take these from the environment - # "CCP" is in fact the var used for C++, not CXX + + cd "tuntap" do system "make", "CC=#{ENV.cc}", "CCP=#{ENV.cxx}" kext_prefix.install "tun.kext", "tap.kext" prefix.install "startup_item/tap", "startup_item/tun" @@ -45,3 +46,33 @@ class Tuntap < Formula EOS end end + +__END__ +diff --git a/tuntap/src/tap/Makefile b/tuntap/src/tap/Makefile +index d4d1158..1dfe294 100644 +--- a/tuntap/src/tap/Makefile ++++ b/tuntap/src/tap/Makefile +@@ -19,7 +19,8 @@ BUNDLE_SIGNATURE = ???? + BUNDLE_PACKAGETYPE = KEXT + BUNDLE_VERSION = $(TAP_KEXT_VERSION) + +-INCLUDE = -I.. -I/System/Library/Frameworks/Kernel.framework/Headers ++SDKROOT = $(shell xcodebuild -version -sdk macosx Path 2>/dev/null) ++INCLUDE = -I.. -I$(SDKROOT)/System/Library/Frameworks/Kernel.framework/Headers + CFLAGS = -Wall -mkernel -force_cpusubtype_ALL \ + -fno-builtin -fno-stack-protector -arch i386 -arch x86_64 \ + -DKERNEL -D__APPLE__ -DKERNEL_PRIVATE -DTUNTAP_VERSION=\"$(TUNTAP_VERSION)\" \ +diff --git a/tuntap/src/tun/Makefile b/tuntap/src/tun/Makefile +index 9ca6794..c530f10 100644 +--- a/tuntap/src/tun/Makefile ++++ b/tuntap/src/tun/Makefile +@@ -20,7 +20,8 @@ BUNDLE_SIGNATURE = ???? + BUNDLE_PACKAGETYPE = KEXT + BUNDLE_VERSION = $(TUN_KEXT_VERSION) + +-INCLUDE = -I.. -I/System/Library/Frameworks/Kernel.framework/Headers ++SDKROOT = $(shell xcodebuild -version -sdk macosx Path 2>/dev/null) ++INCLUDE = -I.. -I$(SDKROOT)/System/Library/Frameworks/Kernel.framework/Headers + CFLAGS = -Wall -mkernel -force_cpusubtype_ALL \ + -fno-builtin -fno-stack-protector -arch i386 -arch x86_64 \ + -DKERNEL -D__APPLE__ -DKERNEL_PRIVATE -DTUNTAP_VERSION=\"$(TUNTAP_VERSION)\" \ |
