How to compile aria2 to support magnet links on OpenWrt / LEDE?

When I try to download a magnet link with aria2 on openwrt it always shows this error:

Exception caught
Exception: [download_helper.cc:420] errorCode=1 Unrecognized URI or unsupported protocol: magnet:?xt=urn:btih:HP5AA4UINEMU5N4D34TC434VEGTMDYZW&tr=http://nyaa.tracker.wf:7777/announce&tr=udp://tracker.coppersurfer.tk:6969/announce&tr=udp://tracker.internetwarriors.net:1337/announce&tr=udp://tracker.leechers-paradise.org:6969/announce&tr=http://tracker.internetwarriors.net:1337/announce&tr=udp://tracker.opentrackr.org:1337/announce&tr=http://tracker.opentrackr.org:1337/announce&tr=udp://tracker.zer0day.to:1337/announce&tr=http://explodie.org:6969/announce&tr=http://p4p.arenabg.com:1337/announce&tr=udp://p4p.arenabg.com:1337/announce&tr=http://mgtracker.org:6969/announce&tr=udp://mgtracker.org:6969/announce

The funny thing is that I can download magnet links just fine on my linux PC, I found out that the aria2 on openwrt doesn't support magnet links

root@openwrt:/tmp# aria2c --version
aria2 version 1.32.0
Copyright (C) 2006, 2016 Tatsuhiro Tsujikawa

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

** Configuration **
Enabled Features: GZip, Message Digest
Hash Algorithms: sha-1, sha-224, sha-256, sha-384, sha-512, md5, adler32
Libraries: zlib/1.2.8
Compiler: gcc 4.8.3
  built by   x86_64-pc-linux-gnu
  targeting arm-openwrt-linux-gnu
  on         Aug  1 2017 21:17:59
System: Linux 3.4.113-sun8i #28 SMP PREEMPT Thu Feb 2 02:01:28 CET 2017 armv7l

Report bugs to https://github.com/aria2/aria2/issues
Visit https://aria2.github.io/

Meanwhile it shows like this on my linux PC:

[me@x tmp]$ aria2c --version                 
aria2 version 1.32.0    
Copyright (C) 2006, 2016 Tatsuhiro Tsujikawa    

This program is free software; you can redistribute it and/or modify                             
it under the terms of the GNU General Public License as published by                             
the Free Software Foundation; either version 2 of the License, or                                
(at your option) any later version.             

This program is distributed in the hope that it will be useful,                                  
but WITHOUT ANY WARRANTY; without even the implied warranty of                                   
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                    
GNU General Public License for more details.    

** Configuration **     
Enabled Features: Async DNS, BitTorrent, Firefox3 Cookie, GZip, HTTPS, Message Digest, Metalink, XML-RPC, SFTP
Hash Algorithms: sha-1, sha-224, sha-256, sha-384, sha-512, md5, adler32                         
Libraries: zlib/1.2.11 libxml2/2.9.4 sqlite3/3.18.0 GnuTLS/3.5.12 nettle GMP/6.1.2 c-ares/1.12.0 libssh2/1.8.0
Compiler: gcc 6.3.1 20170306                    
  built by   x86_64-pc-linux-gnu                
  on         May 18 2017 12:46:49               
System: Linux 4.12.3-1-MANJARO #1 SMP PREEMPT Fri Jul 21 09:37:31 UTC 2017 x86_64                

Report bugs to https://github.com/aria2/aria2/issues                                             
Visit https://aria2.github.io/

Take a look at Enabled Features: the PC one has a lot of features including meta links meanwhile the openwrt one only supports a few. The Makefile of aria2 on openwrt can be found here https://github.com/openwrt/packages/tree/master/net/aria2

I'm not familiar with writing Makefiles, how do I compile aria2 on openwrt that supports magnet links ?

SOLVED: https://github.com/aria2/aria2/issues/976