Skip to content

Commit

Permalink
Merge branch 'aria2:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
wenbingzhang authored Nov 7, 2023
2 parents e6615d7 + 08b48dc commit 5db56b4
Show file tree
Hide file tree
Showing 35 changed files with 1,214 additions and 330 deletions.
25 changes: 17 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@ jobs:
os: [ubuntu-22.04, macos-11]
compiler: [gcc, clang]
crypto: [openssl, gnutls]
bittorrent: [with-bt, without-bt]
exclude:
- os: macos-11
crypto: gnutls
- crypto: openssl
bittorrent: without-bt

runs-on: ${{ matrix.os }}

Expand All @@ -21,8 +24,8 @@ jobs:
if: runner.os == 'Linux'
run: |
sudo apt-get install \
g++-11 \
clang-12 \
g++-12 \
clang-15 \
autoconf \
automake \
autotools-dev \
Expand All @@ -44,8 +47,8 @@ jobs:
- name: Setup clang (Linux)
if: runner.os == 'Linux' && matrix.compiler == 'clang'
run: |
echo 'CC=clang-12' >> $GITHUB_ENV
echo 'CXX=clang++-12' >> $GITHUB_ENV
echo 'CC=clang-15' >> $GITHUB_ENV
echo 'CXX=clang++-15' >> $GITHUB_ENV
- name: Setup clang (MacOS)
if: runner.os == 'macOS' && matrix.compiler == 'clang'
run: |
Expand All @@ -54,8 +57,8 @@ jobs:
- name: Setup gcc (Linux)
if: runner.os == 'Linux' && matrix.compiler == 'gcc'
run: |
echo 'CC=gcc-11' >> $GITHUB_ENV
echo 'CXX=g++-11' >> $GITHUB_ENV
echo 'CC=gcc-12' >> $GITHUB_ENV
echo 'CXX=g++-12' >> $GITHUB_ENV
- name: Setup gcc (MacOS)
if: runner.os == 'macOS' && matrix.compiler == 'gcc'
run: |
Expand All @@ -73,14 +76,20 @@ jobs:
echo 'CPPFLAGS='"$CPPFLAGS" >> $GITHUB_ENV
echo 'LDFLAGS='"$LDFLAGS" >> $GITHUB_ENV
- name: Disable BitTorrent
if: matrix.bittorrent == 'without-bt'
run: |
FEATURE_FLAGS="$FEATURE_FLAGS --disable-bittorrent"
echo 'FEATURE_FLAGS='"$FEATURE_FLAGS" >> $GITHUB_ENV
- name: Configure autotools (Linux, gnutls)
if: runner.os == 'Linux' && matrix.crypto == 'gnutls'
run: |
./configure --with-gnutls --without-openssl
./configure --with-gnutls --without-openssl $FEATURE_FLAGS
- name: Configure autotools (Linux, openssl)
if: runner.os == 'Linux' && matrix.crypto == 'openssl'
run: |
./configure --without-gnutls --with-openssl
./configure --without-gnutls --with-openssl $FEATURE_FLAGS
- name: Configure autotools (macOS)
if: runner.os == 'macOS'
run: |
Expand Down
41 changes: 20 additions & 21 deletions COPYING
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991

Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

Preamble
Preamble

The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Expand All @@ -15,7 +15,7 @@ software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.

When we speak of free software, we are referring to freedom, not
Expand Down Expand Up @@ -55,8 +55,8 @@ patent must be licensed for everyone's free use or not licensed at all.

The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE

GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. This License applies to any program or other work which contains
Expand Down Expand Up @@ -110,7 +110,7 @@ above, provided that you also meet all of these conditions:
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)

These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
Expand Down Expand Up @@ -168,7 +168,7 @@ access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.

4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
Expand Down Expand Up @@ -225,7 +225,7 @@ impose that choice.

This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.

8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
Expand Down Expand Up @@ -255,7 +255,7 @@ make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.

NO WARRANTY
NO WARRANTY

11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
Expand All @@ -277,9 +277,9 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.

END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
END OF TERMS AND CONDITIONS

How to Apply These Terms to Your New Programs

If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
Expand All @@ -303,17 +303,16 @@ the "copyright" line and a pointer to where the full notice is found.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Also add information on how to contact you by electronic and paper mail.

If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:

Gnomovision version 69, Copyright (C) year name of author
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
Expand All @@ -336,5 +335,5 @@ necessary. Here is a sample; alter the names:
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ multi-file mode

Before download starts, a complete directory structure is created if
needed. By default, aria2 opens at most 100 files mentioned in
.torrent file, and directly writes to and reads from these files.
.torrent file, and directly writes to and reads from these files.
The number of files to open simultaneously can be controlled by
``--bt-max-open-files`` option.

Expand Down
10 changes: 5 additions & 5 deletions android-release
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
# files in the program, then also delete it here.

# cd to the directory where this script exists.
cd $(dirname $0)
cd "$(dirname $0)"
. ./script-helper

get_version
Expand All @@ -43,8 +43,8 @@ if [ -z "$VERSION" ]; then
fi

DIST_DIR=aria2-$VERSION-aarch64-linux-android-build1
mkdir $DIST_DIR
mkdir "$DIST_DIR"
cp AUTHORS COPYING ChangeLog LICENSE.OpenSSL NEWS README.html README.android \
android-out/aria2c $DIST_DIR
zip -9 -r $DIST_DIR.zip $DIST_DIR
rm -rf $DIST_DIR
android-out/aria2c "$DIST_DIR"
zip -9 -r "$DIST_DIR.zip" "$DIST_DIR"
rm -rf "$DIST_DIR"
14 changes: 7 additions & 7 deletions build_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,27 @@ BUILDDIR=/tmp/aria2buildtest

if [ ! -d "$BUILDDIR" ]; then
mkdir "$BUILDDIR" \
|| { echo "Failed to create directory $BUILDDIR" && exit -1; }
|| { echo "Failed to create directory $BUILDDIR" && exit 1; }
fi

echo -n "Starting build test "
echo `date`
echo "$(date)"

# build CONFIGURE_OPTS BIN_SUFFIX DESC
build()
{
echo -n "new build() started at "
echo `date`
echo "$(date)"
echo "*** configure opts=$1"
BIN_NAME="aria2c_$2"
if [ -f "$BUILDDIR/$BIN_NAME" ]; then
echo "$BIN_NAME exists, skipping"
return
fi
./configure $1 2>&1 | tee "$BUILDDIR/configure_$2.log"\
./configure $1 2>&1 | tee "$BUILDDIR/configure_$2.log" \
&& cp config.log "$BUILDDIR/config.log_$2" \
&& LANG=C make clean \
&& LANG=C make -j2 check 2>&1 |tee "$BUILDDIR/aria2c_$2.log" \
&& LANG=C make -j2 check 2>&1 | tee "$BUILDDIR/aria2c_$2.log" \
&& cp src/aria2c "$BUILDDIR/aria2c_$2"

if [ -f "test/aria2c.log" ]; then
Expand All @@ -36,8 +36,8 @@ build()

clear()
{
for file in `ls $BUILDDIR`; do
rm -f "$BUILDDIR/$file";
for file in $(ls "$BUILDDIR"); do
rm -f "$BUILDDIR/$file"
done
}

Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ PKG_PROG_PKG_CONFIG([0.20])
save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS=

AX_CXX_COMPILE_STDCXX_11([noext], [mandatory])
AX_CXX_COMPILE_STDCXX([11], [], [mandatory])

CXX1XCXXFLAGS="$CXXFLAGS"
CXXFLAGS="$save_CXXFLAGS"
Expand Down
Loading

0 comments on commit 5db56b4

Please sign in to comment.