aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2014-08-25 15:36:42 +0100
committerMike McQuaid2014-08-25 15:36:42 +0100
commit26ee9237a08dc8ad2960a7b1e9a29bbba1c91752 (patch)
tree45b228d39f5e09fc23c49b9da102a4def5b30d43 /Library
parentd09660b073e1c618d18110c759ee3b3e27bafa53 (diff)
downloadhomebrew-26ee9237a08dc8ad2960a7b1e9a29bbba1c91752.tar.bz2
gnupg2: replace patch with inreplace.
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/gnupg2.rb52
1 files changed, 13 insertions, 39 deletions
diff --git a/Library/Formula/gnupg2.rb b/Library/Formula/gnupg2.rb
index 28daae7fb..024bce569 100644
--- a/Library/Formula/gnupg2.rb
+++ b/Library/Formula/gnupg2.rb
@@ -26,11 +26,20 @@ class Gnupg2 < Formula
depends_on "libusb-compat" => :recommended
depends_on "readline" => :optional
- # Adjust package name to fit our scheme of packaging both gnupg 1.x and
- # 2.x, and gpg-agent separately, and adjust tests to fit this scheme
- patch :DATA
-
def install
+ # Adjust package name to fit our scheme of packaging both gnupg 1.x and
+ # 2.x, and gpg-agent separately, and adjust tests to fit this scheme
+ inreplace "configure" do |s|
+ s.gsub! "PACKAGE_NAME='gnupg'", "PACKAGE_NAME='gnupg2'"
+ s.gsub! "PACKAGE_TARNAME='gnupg'", "PACKAGE_TARNAME='gnupg2'"
+ end
+ inreplace "tests/openpgp/Makefile.in" do |s|
+ s.gsub! "required_pgms = ../../g10/gpg2 ../../agent/gpg-agent",
+ "required_pgms = ../../g10/gpg2"
+ s.gsub! "../../agent/gpg-agent --quiet --daemon sh",
+ "gpg-agent --quiet --daemon sh"
+ end
+
inreplace "g10/keygen.c", "max=4096", "max=8192" if build.include? "8192"
(var/"run").mkpath
@@ -65,38 +74,3 @@ class Gnupg2 < Formula
rm man1/"gpg-zip.1"
end
end
-
-__END__
-diff --git a/configure b/configure
-index c022805..97b19dc 100755
---- a/configure
-+++ b/configure
-@@ -578,8 +578,8 @@ MFLAGS=
- MAKEFLAGS=
-
- # Identity of this package.
--PACKAGE_NAME='gnupg'
--PACKAGE_TARNAME='gnupg'
-+PACKAGE_NAME='gnupg2'
-+PACKAGE_TARNAME='gnupg2'
- PACKAGE_VERSION='2.0.26'
- PACKAGE_STRING='gnupg 2.0.26'
- PACKAGE_BUGREPORT='http://bugs.gnupg.org'
-diff --git a/tests/openpgp/Makefile.in b/tests/openpgp/Makefile.in
-index c9ceb2d..f58c96e 100644
---- a/tests/openpgp/Makefile.in
-+++ b/tests/openpgp/Makefile.in
-@@ -312,11 +312,10 @@ GPG_IMPORT = ../../g10/gpg2 --homedir . \
-
-
- # Programs required before we can run these tests.
--required_pgms = ../../g10/gpg2 ../../agent/gpg-agent \
-- ../../tools/gpg-connect-agent
-+required_pgms = ../../g10/gpg2 ../../tools/gpg-connect-agent
-
- TESTS_ENVIRONMENT = GNUPGHOME=$(abs_builddir) GPG_AGENT_INFO= LC_ALL=C \
-- ../../agent/gpg-agent --quiet --daemon sh
-+ gpg-agent --quiet --daemon sh
-
- TESTS = version.test mds.test \
- decrypt.test decrypt-dsa.test \