From: Vincent Bernat Date: Sat, 13 Jul 2013 15:40:01 +0000 (+0200) Subject: osx: patch the installation of launchd plist file for Homebrew X-Git-Tag: 0.7.7~49 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=91a63c540e59871001b04a43a784935533fd167a;p=thirdparty%2Flldpd.git osx: patch the installation of launchd plist file for Homebrew --- diff --git a/osx/dont-install-launchd-plist.patch b/osx/dont-install-launchd-plist.patch new file mode 100644 index 00000000..1d604661 --- /dev/null +++ b/osx/dont-install-launchd-plist.patch @@ -0,0 +1,36 @@ +Disable installation of the provided plist file for launchd. + +This file is installed at a fixed location outside of the prefix. This +makes Homebrew fails. In the future, a configure option will be +provided to avoid the installation of such a file. + +This patch is targeted at lldpd-0.7.6 only. + +diff -Naur lldpd-0.7.6.orig/osx/Makefile.am lldpd-0.7.6/osx/Makefile.am +--- lldpd-0.7.6.orig/osx/Makefile.am 2013-06-26 08:47:50.000000000 +0200 ++++ lldpd-0.7.6/osx/Makefile.am 2013-07-13 17:36:09.259797663 +0200 +@@ -58,10 +58,7 @@ + + # Install launchd plist + install-data-local: +- install -m 0755 -d $(DESTDIR)/Library/LaunchDaemons +- install -m 0644 im.bernat.lldpd.plist $(DESTDIR)/Library/LaunchDaemons + uninstall-local: +- rm -rf $(DESTDIR)/Library/LaunchDaemons + clean-local: + rm -rf $(ARCHS) + rm -rf $(PKG_DIR) +diff -Naur lldpd-0.7.6.orig/osx/Makefile.in lldpd-0.7.6/osx/Makefile.in +--- lldpd-0.7.6.orig/osx/Makefile.in 2013-07-12 10:09:06.000000000 +0200 ++++ lldpd-0.7.6/osx/Makefile.in 2013-07-13 17:35:43.195283824 +0200 +@@ -541,10 +541,7 @@ + + # Install launchd plist + @HOST_OS_OSX_TRUE@install-data-local: +-@HOST_OS_OSX_TRUE@ install -m 0755 -d $(DESTDIR)/Library/LaunchDaemons +-@HOST_OS_OSX_TRUE@ install -m 0644 im.bernat.lldpd.plist $(DESTDIR)/Library/LaunchDaemons + @HOST_OS_OSX_TRUE@uninstall-local: +-@HOST_OS_OSX_TRUE@ rm -rf $(DESTDIR)/Library/LaunchDaemons + @HOST_OS_OSX_TRUE@clean-local: + @HOST_OS_OSX_TRUE@ rm -rf $(ARCHS) + @HOST_OS_OSX_TRUE@ rm -rf $(PKG_DIR) diff --git a/osx/lldpd.rb b/osx/lldpd.rb index 334704c0..db120a5a 100644 --- a/osx/lldpd.rb +++ b/osx/lldpd.rb @@ -1,7 +1,7 @@ require 'formula' class Lldpd < Formula - homepage 'http://vincentbernat.github.com/lldpd/' + homepage 'http://vincentbernat.github.io/lldpd/' url 'http://media.luffy.cx/files/lldpd/lldpd-0.7.6.tar.gz' sha1 'be3d3937b22d14259553f637694f744ed3b8ba79' @@ -14,6 +14,10 @@ class Lldpd < Formula depends_on 'net-snmp' if build.include? 'with-snmp' depends_on 'jansson' if build.include? 'with-json' + def patches + # Don't try to install provided launchd plist (outside of prefix) + "https://raw.github.com/vincentbernat/lldpd/master/osx/dont-install-launchd-plist.patch" + def install readline = Formula.factory 'readline' args = [ "--prefix=#{prefix}",