aboutsummaryrefslogtreecommitdiffstats
path: root/net-p2p/transmission/files
diff options
context:
space:
mode:
authormezz <mezz@FreeBSD.org>2005-10-21 03:11:03 +0800
committermezz <mezz@FreeBSD.org>2005-10-21 03:11:03 +0800
commit495c762234dbda239656d642c7af2e53a58ae588 (patch)
tree0c6ed551f298c1c713d4658bf0830d2b447524fe /net-p2p/transmission/files
parenta1fa88c9076a2665ef1a101cc09e221e50fd181e (diff)
downloadfreebsd-ports-gnome-495c762234dbda239656d642c7af2e53a58ae588.tar.gz
freebsd-ports-gnome-495c762234dbda239656d642c7af2e53a58ae588.tar.zst
freebsd-ports-gnome-495c762234dbda239656d642c7af2e53a58ae588.zip
Update to 0.3, add WITHOUT_OPENSSL knob. I have created a patch for configure
to add a few new flags. If it causes any trouble, I will remove it. * --help * --disable-openssl (autocheck: enable by default) * --openssl-include=PATH * --openssl-lib=PATH * Add CC and CFLAGS in configure for anyone can edit it. I have submitted this patch to the author. http://people.freebsd.org/~mezz/diff/configure.diff I believe that it can be done in Jamfile instead configure, I will have to learn more abot Jamfile later for what features and what it can do. If anyone know any better way or so, let me know.
Diffstat (limited to 'net-p2p/transmission/files')
-rw-r--r--net-p2p/transmission/files/patch-configure218
1 files changed, 218 insertions, 0 deletions
diff --git a/net-p2p/transmission/files/patch-configure b/net-p2p/transmission/files/patch-configure
new file mode 100644
index 000000000000..6fb1eb882c0d
--- /dev/null
+++ b/net-p2p/transmission/files/patch-configure
@@ -0,0 +1,218 @@
+--- ../../Transmission/configure Wed Oct 12 09:31:32 2005
++++ configure Wed Oct 19 16:18:33 2005
+@@ -1,4 +1,11 @@
+ #! /bin/sh
++#
++#-*- mode: Fundamental; tab-width: 4; -*-
++# ex:ts=4
++#
++
++CC="cc"
++CFLAGS="-g -Wall -W"
+
+ # For > 2 GB files
+ DEFINES="_FILE_OFFSET_BITS=64 _LARGEFILE_SOURCE"
+@@ -6,80 +13,134 @@
+ # For asprintf
+ DEFINES="$DEFINES _GNU_SOURCE"
+
+-# System-specific flags
++## System-specific flags
+ SYSTEM=`uname -s`
+ case $SYSTEM in
+- BeOS)
+- DEFINES="$DEFINES SYS_BEOS"
++ BeOS)
++ DEFINES="$DEFINES SYS_BEOS"
+
+- RELEASE=`uname -r`
+- case $RELEASE in
+- 6.0|5.0.4) # Zeta or R5 / BONE beta 7
+- SYSTEM="$SYSTEM / BONE"
+- LINKLIBS="$LINKLIBS -lbind -lsocket"
+- ;;
+- 5.0*) # R5 / net_server
+- SYSTEM="$SYSTEM / net_server"
+- DEFINES="$DEFINES BEOS_NETSERVER"
+- LINKLIBS="$LINKLIBS -lnet"
+- ;;
+- *)
+- echo "Unsupported BeOS version"
+- exit 1 ;;
+- esac
+- ;;
+-
+- Darwin)
+- DEFINES="$DEFINES SYS_DARWIN"
+- LINKLIBS="$LINKLIBS -lpthread"
+- ;;
+-
+- FreeBSD)
+- DEFINES="$DEFINES SYS_FREEBSD"
+- LINKLIBS="$LINKLIBS -pthread"
+- ;;
+-
+- NetBSD)
+- DEFINES="$DEFINES SYS_NETBSD"
+- LINKLIBS="$LINKLIBS -lpthread"
+- ;;
+-
+- Linux)
+- DEFINES="$DEFINES SYS_LINUX"
+- LINKLIBS="$LINKLIBS -lpthread"
+- ;;
+-
+- *)
+- echo "Unsupported operating system"
+- exit 1 ;;
++ RELEASE=`uname -r`
++ case $RELEASE in
++ 6.0|5.0.4) # Zeta or R5 / BONE beta 7
++ SYSTEM="$SYSTEM / BONE"
++ LINKLIBS="$LINKLIBS -lbind -lsocket"
++ ;;
++ 5.0*) # R5 / net_server
++ SYSTEM="$SYSTEM / net_server"
++ DEFINES="$DEFINES BEOS_NETSERVER"
++ LINKLIBS="$LINKLIBS -lnet"
++ ;;
++ *)
++ echo "Unsupported BeOS version"
++ exit 1 ;;
++ esac
++ ;;
++
++ Darwin)
++ DEFINES="$DEFINES SYS_DARWIN"
++ LINKLIBS="$LINKLIBS -lpthread"
++ ;;
++
++ FreeBSD)
++ DEFINES="$DEFINES SYS_FREEBSD"
++ LINKLIBS="$LINKLIBS -pthread"
++ ;;
++
++ NetBSD)
++ DEFINES="$DEFINES SYS_NETBSD"
++ LINKLIBS="$LINKLIBS -lpthread"
++ ;;
++
++ Linux)
++ DEFINES="$DEFINES SYS_LINUX"
++ LINKLIBS="$LINKLIBS -lpthread"
++ ;;
++
++ *)
++ echo "Unsupported operating system"
++ exit 1
++ ;;
+ esac
+ echo "System: $SYSTEM"
++##
++
++## Functions
++usage () {
++ cat <<-EOF
++ OpenSSL options:
++ --disable-openssl Disable OpenSSL, use built-in SHA1 implementation
++ --openssl-include=PATH Location of OpenSSL headers
++ --openssl-lib=PATH Location of OpenSSL library
+
+-# Check for OpenSSL
+-cat > testconf.c << EOF
+-#include <stdio.h>
+-#include <openssl/sha.h>
+-int main()
+-{
+- SHA1( 0, 0, 0 );
++ EOF
+ }
+-EOF
+-if cc -o testconf testconf.c -lcrypto > /dev/null 2>&1
+-then
+- echo "OpenSSL: yes"
+- DEFINES="$DEFINES HAVE_OPENSSL"
+- LINKLIBS="$LINKLIBS -lcrypto"
++
++openssl_test () {
++ cat > testssl.c <<-EOF
++ #include <stdio.h>
++ #include <openssl/sha.h>
++ int main()
++ {
++ SHA1( 0, 0, 0 );
++ }
++ EOF
++
++ if $CC -I$OPENSSL_INC -o testssl testssl.c -L$OPENSSL_LIB -lcrypto > /dev/null 2>&1; then
++ echo "OpenSSL: yes"
++ CFLAGS="$CFLAGS -I$OPENSSL_INC"
++ DEFINES="$DEFINES HAVE_OPENSSL"
++ LINKLIBS="$LINKLIBS -L$OPENSSL_LIB -lcrypto"
++ else
++ echo "OpenSSL: no, using built-in SHA1 implementation"
++ fi
++
++ rm -f testssl.c testssl
++}
++##
++
++## Options
++openssl_disable=0
++OPENSSL_INC="/usr/include"
++OPENSSL_LIB="/usr/lib"
++while [ $# -ne 0 ]; do
++ param=`expr "opt$1" : 'opt[^=]*=\(.*\)'`
++
++ case "x$1" in
++ x--disable-openssl)
++ openssl_disable="1";
++ shift;;
++ x--openssl-include=*)
++ OPENSSL_INC="$param";
++ shift;;
++ x--openssl-lib=*)
++ OPENSSL_LIB="$param";
++ shift;;
++ x--help)
++ usage
++ exit 0
++ shift;;
++ esac
++done
++##
++
++## OpenSSL: autocheck or disable
++if [ ${openssl_disable} = 1 ]; then
++ echo "OpenSSL: no, using built-in SHA1 implementation"
+ else
+- echo "OpenSSL: no, using built-in SHA1 implementation"
++ openssl_test
+ fi
+-rm -f testconf.c testconf
++##
+
+-# Generate config.jam
++## Generate config.jam
+ rm -f config.jam
+ cat << EOF > config.jam
++CC = $CC ;
++CCFLAGS = $CFLAGS ;
+ DEFINES = $DEFINES ;
++LINK = $CC ;
+ LINKLIBS = $LINKLIBS ;
+ EOF
++##
+
+ echo
+ echo "To build Transmission, run 'jam'."
+--- ../../Transmission/Jamrules Tue Oct 18 18:50:07 2005
++++ Jamrules Wed Oct 19 16:22:09 2005
+@@ -12,7 +12,6 @@
+ DEFINES += VERSION_MAJOR=$(VERSION_MAJOR)
+ VERSION_MINOR=$(VERSION_MINOR)
+ VERSION_STRING=\\\"$(VERSION_STRING)\\\" ;
+-CCFLAGS = -g -Wall -W ;
+ OPTIM = -O3 ;
+ RM = rm -Rf ;
+