From dbaafe531fa22bbd256072c23fecd88b5db8e4b8 Mon Sep 17 00:00:00 2001 From: clamsawd Date: Sat, 17 Oct 2015 16:55:37 +0200 Subject: [PATCH] Build libssh2 with OpenSSL as backend (disabled libgcrypt) --- .../aria2-i386-gnu-linux-cross-build-libs | 38 +++++++++----- .../aria2-x86_64-gnu-linux-build-libs | 38 +++++++++----- .../aria2-i686-w64-mingw-build-libs | 50 ++++++++++--------- .../aria2-x86_64-w64-mingw-build-libs | 47 +++++++++-------- 4 files changed, 102 insertions(+), 71 deletions(-) diff --git a/build-scripts/gnu-linux-config/aria2-i386-gnu-linux-cross-build-libs b/build-scripts/gnu-linux-config/aria2-i386-gnu-linux-cross-build-libs index 476a0ce..f34f322 100755 --- a/build-scripts/gnu-linux-config/aria2-i386-gnu-linux-cross-build-libs +++ b/build-scripts/gnu-linux-config/aria2-i386-gnu-linux-cross-build-libs @@ -7,7 +7,6 @@ # * expat # * sqlite3 # * openSSL -# * libgcrypt # * libssh2 #IMPORTANT: Require install gcc-multilib g++-multilib libc6-dev-i386 @@ -23,7 +22,6 @@ EXPAT=http://sourceforge.net/projects/expat/files/expat/2.1.0/expat-2.1.0.tar.gz SQLITE3=https://www.sqlite.org/2015/sqlite-autoconf-3090100.tar.gz C_ARES=http://c-ares.haxx.se/download/c-ares-1.10.0.tar.gz SSH2=http://www.libssh2.org/download/libssh2-1.6.0.tar.gz -GCRYPT=ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-1.6.3.tar.gz ## CONFIG ## BUILD_DIRECTORY=/tmp/ @@ -77,24 +75,39 @@ export LDFLAGS="-m32" CFLAGS="-m32" CXXFLAGS="-m32" LDFLAGS="-m32" PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig/ LD_LIBRARY_PATH=$PREFIX/lib/ CC="$C_COMPILER -m32" CXX="$CXX_COMPILER -m32" ./configure --prefix=$PREFIX --enable-static --disable-shared make make install -# - # libgcrypt - cd .. - wget -c $GCRYPT - tar zxvf libgcrypt-1.6.3.tar.gz - cd libgcrypt-1.6.3/ - CFLAGS="-m32" CXXFLAGS="-m32" LDFLAGS="-m32" PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig/ LD_LIBRARY_PATH=$PREFIX/lib/ CC="$C_COMPILER -m32" CXX="$CXX_COMPILER -m32" ./configure --host=i386-unknown-linux-gnu --prefix=$PREFIX --enable-static --disable-shared - make - make install # # libssh2 cd .. wget -c $SSH2 tar zxvf libssh2-1.6.0.tar.gz cd libssh2-1.6.0/ - CFLAGS="-m32" CXXFLAGS="-m32" LDFLAGS="-m32" PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig/ LD_LIBRARY_PATH=$PREFIX/lib/ CC="$C_COMPILER -m32" CXX="$CXX_COMPILER -m32" ./configure --with-libgcrypt -without-openssl --prefix=$PREFIX --enable-static --disable-shared + rm -rf $PREFIX/lib/pkgconfig/libssh2.pc + CFLAGS="-m32" CXXFLAGS="-m32" LDFLAGS="-m32" PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig/ LD_LIBRARY_PATH=$PREFIX/lib/ CC="$C_COMPILER -m32" CXX="$CXX_COMPILER -m32" ./configure --without-libgcrypt --with-openssl --without-wincng --prefix=$PREFIX --enable-static --disable-shared make make install + if [ -f $PREFIX/lib/pkgconfig/libssh2.pc ] ; then + echo "$PREFIX/lib/pkgconfig/libssh2.pc" + else + echo "################################" > $PREFIX/lib/pkgconfig/libssh2.pc + echo "# libssh2 installation details #" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "#################################" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "prefix=$PREFIX" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "exec_prefix=$PREFIX" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "libdir=$PREFIX/lib" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "includedir=$PREFIX/include" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "Name: libssh2" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "URL: http://www.libssh2.org/" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "Description: Library for SSH-based communication" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "Version: 1.6.0" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "Requires.private:" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "Libs: -L$PREFIX/lib -lssh2 -m32 -lssl -lcrypto -lz" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "Libs.private: -m32 -lssl -lcrypto -lz" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "Cflags: -I$PREFIX/include" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "$PREFIX/lib/pkgconfig/libssh2.pc created!" + cp -rf include/*.h $PREFIX/include + fi # #cleaning cd .. @@ -104,6 +117,5 @@ export LDFLAGS="-m32" rm -rf expat-* rm -rf openssl-* rm -rf libssh2-* - rm -rf libgcrypt-* # echo "finished!" diff --git a/build-scripts/gnu-linux-config/aria2-x86_64-gnu-linux-build-libs b/build-scripts/gnu-linux-config/aria2-x86_64-gnu-linux-build-libs index dd3d0da..c252c9c 100755 --- a/build-scripts/gnu-linux-config/aria2-x86_64-gnu-linux-build-libs +++ b/build-scripts/gnu-linux-config/aria2-x86_64-gnu-linux-build-libs @@ -7,7 +7,6 @@ # * expat # * sqlite3 # * openSSL -# * libgcrypt # * libssh2 #COMPILER AND PATH @@ -22,7 +21,6 @@ EXPAT=http://sourceforge.net/projects/expat/files/expat/2.1.0/expat-2.1.0.tar.gz SQLITE3=https://www.sqlite.org/2015/sqlite-autoconf-3090100.tar.gz C_ARES=http://c-ares.haxx.se/download/c-ares-1.10.0.tar.gz SSH2=http://www.libssh2.org/download/libssh2-1.6.0.tar.gz -GCRYPT=ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-1.6.3.tar.gz ## CONFIG ## BUILD_DIRECTORY=/tmp/ @@ -73,24 +71,39 @@ cd $BUILD_DIRECTORY PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig/ LD_LIBRARY_PATH=$PREFIX/lib/ CC="$C_COMPILER" CXX="$CXX_COMPILER" ./configure --prefix=$PREFIX --enable-static --disable-shared make make install -# - # libgcrypt - cd .. - wget -c $GCRYPT - tar zxvf libgcrypt-1.6.3.tar.gz - cd libgcrypt-1.6.3/ - PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig/ LD_LIBRARY_PATH=$PREFIX/lib/ CC="$C_COMPILER" CXX="$CXX_COMPILER" ./configure --prefix=$PREFIX --enable-static --disable-shared - make - make install # # libssh2 cd .. wget -c $SSH2 tar zxvf libssh2-1.6.0.tar.gz cd libssh2-1.6.0/ - PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig/ LD_LIBRARY_PATH=$PREFIX/lib/ CC="$C_COMPILER" CXX="$CXX_COMPILER" ./configure --with-libgcrypt -without-openssl --prefix=$PREFIX --enable-static --disable-shared + rm -rf $PREFIX/lib/pkgconfig/libssh2.pc + PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig/ LD_LIBRARY_PATH=$PREFIX/lib/ CC="$C_COMPILER" CXX="$CXX_COMPILER" ./configure --without-libgcrypt --with-openssl --without-wincng --prefix=$PREFIX --enable-static --disable-shared make make install + if [ -f $PREFIX/lib/pkgconfig/libssh2.pc ] ; then + echo "$PREFIX/lib/pkgconfig/libssh2.pc" + else + echo "################################" > $PREFIX/lib/pkgconfig/libssh2.pc + echo "# libssh2 installation details #" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "#################################" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "prefix=$PREFIX" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "exec_prefix=$PREFIX" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "libdir=$PREFIX/lib" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "includedir=$PREFIX/include" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "Name: libssh2" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "URL: http://www.libssh2.org/" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "Description: Library for SSH-based communication" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "Version: 1.6.0" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "Requires.private: zlib" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "Libs: -L$PREFIX/lib -lssh2 -lssl -lcrypto -lz" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "Libs.private: -lssl -lcrypto -lz" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "Cflags: -I$PREFIX/include" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "$PREFIX/lib/pkgconfig/libssh2.pc created!" + cp -rf include/*.h $PREFIX/include + fi # #cleaning cd .. @@ -100,6 +113,5 @@ cd $BUILD_DIRECTORY rm -rf expat-* rm -rf openssl-* rm -rf libssh2-* - rm -rf libgcrypt-* # echo "finished!" diff --git a/build-scripts/mingw-config/aria2-i686-w64-mingw-build-libs b/build-scripts/mingw-config/aria2-i686-w64-mingw-build-libs index 4819c61..20421ab 100755 --- a/build-scripts/mingw-config/aria2-i686-w64-mingw-build-libs +++ b/build-scripts/mingw-config/aria2-i686-w64-mingw-build-libs @@ -12,11 +12,9 @@ ## DEPENDENCES ## ZLIB=http://sourceforge.net/projects/libpng/files/zlib/1.2.8/zlib-1.2.8.tar.gz OPENSSL=http://www.openssl.org/source/openssl-1.0.2d.tar.gz -#GMPLIB=https://gmplib.org/download/gmp/gmp-6.0.0a.tar.bz2 EXPAT=http://sourceforge.net/projects/expat/files/expat/2.1.0/expat-2.1.0.tar.gz SQLITE3=https://www.sqlite.org/2015/sqlite-autoconf-3090100.tar.gz C_ARES=http://c-ares.haxx.se/download/c-ares-1.10.0.tar.gz -#CPPUNIT=http://dev-www.libreoffice.org/src/cppunit-1.13.2.tar.gz SSH2=http://www.libssh2.org/download/libssh2-1.6.0.tar.gz ## CONFIG ## @@ -43,15 +41,6 @@ cd $BUILD_DIRECTORY CC=$HOST-gcc CXX=$HOST-g++ AR=$HOST-ar RANLIB=$HOST-ranlib ./configure --prefix=$PREFIX --host=$HOST --enable-static --disable-shared make make install -# - # cppunit build - #cd .. - #wget -c $CPPUNIT - #tar zxvf cppunit-1.13.2.tar.gz - #cd cppunit-1.13.2/ - #CC=$HOST-gcc CXX=$HOST-g++ AR=$HOST-ar RANLIB=$HOST-ranlib ./configure --prefix=$PREFIX --host=$HOST --enable-static --disable-shared - #make - #make install # # c-ares build cd .. @@ -61,15 +50,6 @@ cd $BUILD_DIRECTORY CC=$HOST-gcc CXX=$HOST-g++ AR=$HOST-ar RANLIB=$HOST-ranlib ./configure --prefix=$PREFIX --host=$HOST --enable-static --disable-shared make make install -# - # GMPlib build - #cd .. - #wget -c $GMPLIB - #tar jxvf gmp-6.0.0a.tar.bz2 - #cd gmp-6.0.0/ - #CC=$HOST-gcc CXX=$HOST-g++ AR=$HOST-ar RANLIB=$HOST-ranlib ./configure --prefix=$PREFIX --host=$HOST --enable-static --disable-shared - #make - #make install # # Openssl build cd .. @@ -94,9 +74,33 @@ cd $BUILD_DIRECTORY wget -c $SSH2 tar zxvf libssh2-1.6.0.tar.gz cd libssh2-1.6.0/ - CC=$HOST-gcc CXX=$HOST-g++ AR=$HOST-ar RANLIB=$HOST-ranlib ./configure --prefix=$PREFIX --host=$HOST --enable-static --disable-shared + rm -rf $PREFIX/lib/pkgconfig/libssh2.pc + CC=$HOST-gcc CXX=$HOST-g++ AR=$HOST-ar RANLIB=$HOST-ranlib ./configure --without-libgcrypt --with-openssl --without-wincng --prefix=$PREFIX --host=$HOST --enable-static --disable-shared make make install + if [ -f $PREFIX/lib/pkgconfig/libssh2.pc ] ; then + echo "$PREFIX/lib/pkgconfig/libssh2.pc" + else + echo "################################" > $PREFIX/lib/pkgconfig/libssh2.pc + echo "# libssh2 installation details #" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "#################################" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "prefix=$PREFIX" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "exec_prefix=$PREFIX" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "libdir=$PREFIX/lib" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "includedir=$PREFIX/include" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "Name: libssh2" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "URL: http://www.libssh2.org/" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "Description: Library for SSH-based communication" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "Version: 1.6.0" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "Requires.private: zlib" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "Libs: -L$PREFIX/lib -lssh2 -lssl -lcrypto -lz -lws2_32" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "Libs.private: -lssl -lcrypto -lz -lws2_32" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "Cflags: -I$PREFIX/include" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "$PREFIX/lib/pkgconfig/libssh2.pc created!" + cp -rf include/*.h $PREFIX/include + fi # #cleaning cd .. @@ -104,9 +108,9 @@ cd $BUILD_DIRECTORY rm -rf sqlite-autoconf* rm -rf zlib-* rm -rf expat-* - rm -rf gmp-* + rm -rf openssl-* rm -rf libssh2-* - rm -rf cppunit-* + # echo "finished!" diff --git a/build-scripts/mingw-config/aria2-x86_64-w64-mingw-build-libs b/build-scripts/mingw-config/aria2-x86_64-w64-mingw-build-libs index e917b47..2dfd65d 100755 --- a/build-scripts/mingw-config/aria2-x86_64-w64-mingw-build-libs +++ b/build-scripts/mingw-config/aria2-x86_64-w64-mingw-build-libs @@ -12,11 +12,9 @@ ## DEPENDENCES ## ZLIB=http://sourceforge.net/projects/libpng/files/zlib/1.2.8/zlib-1.2.8.tar.gz OPENSSL=http://www.openssl.org/source/openssl-1.0.2d.tar.gz -#GMPLIB=https://gmplib.org/download/gmp/gmp-6.0.0a.tar.bz2 EXPAT=http://sourceforge.net/projects/expat/files/expat/2.1.0/expat-2.1.0.tar.gz SQLITE3=https://www.sqlite.org/2015/sqlite-autoconf-3090100.tar.gz C_ARES=http://c-ares.haxx.se/download/c-ares-1.10.0.tar.gz -#CPPUNIT=http://dev-www.libreoffice.org/src/cppunit-1.13.2.tar.gz SSH2=http://www.libssh2.org/download/libssh2-1.6.0.tar.gz ## CONFIG ## @@ -43,15 +41,6 @@ cd $BUILD_DIRECTORY CC=$HOST-gcc CXX=$HOST-g++ AR=$HOST-ar RANLIB=$HOST-ranlib ./configure --prefix=$PREFIX --host=$HOST --enable-static --disable-shared make make install -# - # cppunit build - #cd .. - #wget -c $CPPUNIT - #tar zxvf cppunit-1.13.2.tar.gz - #cd cppunit-1.13.2/ - #CC=$HOST-gcc CXX=$HOST-g++ AR=$HOST-ar RANLIB=$HOST-ranlib ./configure --prefix=$PREFIX --host=$HOST --enable-static --disable-shared - #make - #make install # # c-ares build cd .. @@ -61,15 +50,6 @@ cd $BUILD_DIRECTORY CC=$HOST-gcc CXX=$HOST-g++ AR=$HOST-ar RANLIB=$HOST-ranlib ./configure --prefix=$PREFIX --host=$HOST --enable-static --disable-shared make make install -# - # GMPlib build - #cd .. - #wget -c $GMPLIB - #tar jxvf gmp-6.0.0a.tar.bz2 - #cd gmp-6.0.0/ - #CC=$HOST-gcc CXX=$HOST-g++ AR=$HOST-ar RANLIB=$HOST-ranlib ./configure --prefix=$PREFIX --host=$HOST --enable-static --disable-shared - #make - #make install # # Openssl build cd .. @@ -94,9 +74,33 @@ cd $BUILD_DIRECTORY wget -c $SSH2 tar zxvf libssh2-1.6.0.tar.gz cd libssh2-1.6.0/ + rm -rf $PREFIX/lib/pkgconfig/libssh2.pc CC=$HOST-gcc CXX=$HOST-g++ AR=$HOST-ar RANLIB=$HOST-ranlib ./configure --prefix=$PREFIX --host=$HOST --enable-static --disable-shared make make install + if [ -f $PREFIX/lib/pkgconfig/libssh2.pc ] ; then + echo "$PREFIX/lib/pkgconfig/libssh2.pc" + else + echo "################################" > $PREFIX/lib/pkgconfig/libssh2.pc + echo "# libssh2 installation details #" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "#################################" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "prefix=$PREFIX" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "exec_prefix=$PREFIX" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "libdir=$PREFIX/lib" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "includedir=$PREFIX/include" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "Name: libssh2" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "URL: http://www.libssh2.org/" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "Description: Library for SSH-based communication" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "Version: 1.6.0" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "Requires.private: zlib" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "Libs: -L$PREFIX/lib -lssh2 -lssl -lcrypto -lz -lws2_32" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "Libs.private: -lssl -lcrypto -lz -lws2_32" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "Cflags: -I$PREFIX/include" >> $PREFIX/lib/pkgconfig/libssh2.pc + echo "$PREFIX/lib/pkgconfig/libssh2.pc created!" + cp -rf include/*.h $PREFIX/include + fi # #cleaning cd .. @@ -104,8 +108,7 @@ cd $BUILD_DIRECTORY rm -rf sqlite-autoconf* rm -rf zlib-* rm -rf expat-* - rm -rf gmp-* + rm -rf openssl-* rm -rf libssh2-* - rm -rf cppunit-* # echo "finished!"