Date: Wednesday, March 2, 2016 @ 19:52:13
  Author: foutrelis
Revision: 164227

Fix build with OpenSSL 1.0.2g

The 'fix-Makefile-ssl-FTBFS.patch' file was taken from Debian.

Added:
  proxytunnel/trunk/fix-Makefile-ssl-FTBFS.patch
  proxytunnel/trunk/migrate-from-SSLv3.patch
Modified:
  proxytunnel/trunk/PKGBUILD

------------------------------+
 PKGBUILD                     |   20 +++++++++++++++-----
 fix-Makefile-ssl-FTBFS.patch |   17 +++++++++++++++++
 migrate-from-SSLv3.patch     |   12 ++++++++++++
 3 files changed, 44 insertions(+), 5 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2016-03-02 18:38:39 UTC (rev 164226)
+++ PKGBUILD    2016-03-02 18:52:13 UTC (rev 164227)
@@ -10,16 +10,26 @@
 url="http://proxytunnel.sourceforge.net";
 license=('GPL')
 depends=('openssl')
-source=(http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tgz)
-md5sums=('d74472b89c3f3b3b0abf6bd809ae34c2')
+source=(http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tgz
+        fix-Makefile-ssl-FTBFS.patch
+        migrate-from-SSLv3.patch)
+md5sums=('d74472b89c3f3b3b0abf6bd809ae34c2'
+         '2c6c2a4c37cd2f28ee09e92d00274334'
+         '502197e4f4b7530e54933733f02c4112')
 
+prepare() {
+  cd $pkgname-$pkgver
+  sed -i 's|PREFIX =/usr/local|PREFIX =/usr|g' Makefile
+  patch -Np1 -i ../fix-Makefile-ssl-FTBFS.patch
+  patch -Np1 -i ../migrate-from-SSLv3.patch
+}
+
 build() {
-  cd $srcdir/$pkgname-$pkgver
-  sed -i 's|PREFIX =/usr/local|PREFIX =/usr|g' Makefile
+  cd $pkgname-$pkgver
   make
 }
 
 package() {
-  cd $srcdir/$pkgname-$pkgver
+  cd $pkgname-$pkgver
   make DESTDIR=$pkgdir install
 }

Added: fix-Makefile-ssl-FTBFS.patch
===================================================================
--- fix-Makefile-ssl-FTBFS.patch                                (rev 0)
+++ fix-Makefile-ssl-FTBFS.patch        2016-03-02 18:52:13 UTC (rev 164227)
@@ -0,0 +1,17 @@
+--- a/Makefile
++++ b/Makefile
+@@ -48,10 +48,11 @@
+ 
+ # END system dependant block
+ 
+-SSL_LIBS := $(shell pkg-config --libs libssl 2>/dev/null)
+-ifeq ($(SSL_LIBS),)
++# We're not using libssl, so comment out the following line
++# SSL_LIBS := $(shell pkg-config --libs libssl 2>/dev/null)
++# ifeq ($(SSL_LIBS),)
+ SSL_LIBS := $(shell pkg-config --libs openssl 2>/dev/null)
+-endif
++# endif
+ ifeq ($(SSL_LIBS),)
+ SSL_LIBS := -lssl -lcrypto
+ endif

Added: migrate-from-SSLv3.patch
===================================================================
--- migrate-from-SSLv3.patch                            (rev 0)
+++ migrate-from-SSLv3.patch    2016-03-02 18:52:13 UTC (rev 164227)
@@ -0,0 +1,12 @@
+diff -upr proxytunnel-1.9.0.orig/ptstream.c proxytunnel-1.9.0/ptstream.c
+--- proxytunnel-1.9.0.orig/ptstream.c  2008-02-27 01:27:27.000000000 +0200
++++ proxytunnel-1.9.0/ptstream.c       2016-03-02 20:43:32.909153946 +0200
+@@ -151,7 +151,7 @@ int stream_enable_ssl(PTSTREAM *pts) {
+       
+       /* Initialise the connection */
+       SSLeay_add_ssl_algorithms();
+-      meth = SSLv3_client_method();
++      meth = SSLv23_client_method();
+       SSL_load_error_strings();
+ 
+       ctx = SSL_CTX_new (meth);

Reply via email to