diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2018-10-24 06:50:20 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2018-10-24 07:16:04 +0530 |
commit | cb104a00debce605f4e362edf58c728577ca921e (patch) | |
tree | 0e754dd87711fe8fd6d19fd8627205643c48606f | |
parent | cfaf102f6d7a28caddacbf8b98b71b1080754794 (diff) |
Implement source url templating for recipes
GNOME, GNU, Savannah, Xiph, and SourceForge source URLs now use
templates. More templates can be added in the future. Currently, they
can be one of the following forms:
scheme://
This will download a file called %(name)s-%(version)s.tar.xz from the
canonical place on the specified server. `scheme` can be: gnome, sf,
gnu, savannah.
scheme://.tar.gz
For using the template but with the specified file extension instead
of .tar.xz
scheme://some/path/to/name-version.tar.xz
For using the template only for the mirror domain and common sources
path.
https://bugzilla.gnome.org/show_bug.cgi?id=797330
50 files changed, 83 insertions, 84 deletions
diff --git a/cerbero/build/source.py b/cerbero/build/source.py index 1bdac6b1..ac404844 100644 --- a/cerbero/build/source.py +++ b/cerbero/build/source.py @@ -30,6 +30,14 @@ import cerbero.utils.messages as m # Must end in a / for urlparse.urljoin to work correctly TARBALL_MIRROR = 'https://gstreamer.freedesktop.org/src/mirror/' +URL_TEMPLATES = { + 'gnome': ('https://download.gnome.org/sources/', '%(name)s/%(maj_ver)s/%(name)s-%(version)s', '.tar.xz'), + 'gnu': ('https://ftpmirror.gnu.org/', '%(name)s/%(name)s-%(version)s', '.tar.xz'), + 'savannah': ('https://download.savannah.gnu.org/releases/', '%(name)s/%(name)s-%(version)s', '.tar.xz'), + 'sf': ('https://download.sourceforge.net/', '%(name)s/%(name)s-%(version)s', '.tar.xz'), + 'xiph': ('https://downloads.xiph.org/releases/', '%(name)s/%(name)s-%(version)s', '.tar.xz'), +} + class Source (object): ''' Base class for sources handlers @@ -60,6 +68,22 @@ class Source (object): ''' raise NotImplemented("'extract' must be implemented by subclasses") + def expand_url_template(self, s): + ''' + Expand a standard URL template (GNOME, SourceForge, GNU, etc) + and get a URL that just needs the name and version substituted. + ''' + schemes = tuple(s + '://' for s in URL_TEMPLATES.keys()) + if s.startswith(schemes): + scheme, url = s.split('://', 1) + parts = URL_TEMPLATES[scheme] + if url == '': + return ''.join(parts) + if url.startswith('.'): + return parts[0] + parts[1] + url + return parts[0] + url + return s + def replace_name_and_version(self, string): ''' Replaces name and version in strings @@ -178,6 +202,7 @@ class Tarball(BaseTarball, Source): if not self.url: raise InvalidRecipeError( _("'url' attribute is missing in the recipe")) + self.url = self.expand_url_template(self.url) self.url = self.replace_name_and_version(self.url) if self.tarball_name is not None: self.tarball_name = \ diff --git a/recipes/build-tools/autoconf.recipe b/recipes/build-tools/autoconf.recipe index 6358a860..957ef2e1 100644 --- a/recipes/build-tools/autoconf.recipe +++ b/recipes/build-tools/autoconf.recipe @@ -6,7 +6,7 @@ class Recipe(recipe.Recipe): version = '2.69' licenses = [License.GPLv2] stype = SourceType.TARBALL - url = 'https://ftp.gnu.org/gnu/autoconf/autoconf-%(version)s.tar.xz' + url = 'gnu://' tarball_checksum = '64ebcec9f8ac5b2487125a86a7760d2591ac9e1d3dbd59489633f9de62a57684' deps = ['m4'] diff --git a/recipes/build-tools/automake.recipe b/recipes/build-tools/automake.recipe index b3b7aa06..dedb1f67 100644 --- a/recipes/build-tools/automake.recipe +++ b/recipes/build-tools/automake.recipe @@ -6,7 +6,7 @@ class Recipe(recipe.Recipe): version = '1.15.1' licenses = [License.GPLv2] stype = SourceType.TARBALL - url = 'https://ftp.gnu.org/gnu/automake/automake-%(version)s.tar.xz' + url = 'gnu://' tarball_checksum = 'af6ba39142220687c500f79b4aa2f181d9b24e4f8d8ec497cea4ba26c64bedaf' deps = ['autoconf', 'gettext-m4'] diff --git a/recipes/build-tools/bison.recipe b/recipes/build-tools/bison.recipe index e4089044..6bc8f259 100644 --- a/recipes/build-tools/bison.recipe +++ b/recipes/build-tools/bison.recipe @@ -6,8 +6,8 @@ class Recipe(recipe.Recipe): version = '3.0.4' licenses = [License.GPLv2] stype = SourceType.TARBALL - url = 'https://ftpmirror.gnu.org/bison/bison-%(version)s.tar.gz' - tarball_checksum = 'b67fd2daae7a64b5ba862c66c07c1addb9e6b1b05c5f2049392cfd8a2172952e' + url = 'gnu://' + tarball_checksum = 'a72428c7917bdf9fa93cb8181c971b6e22834125848cf1d03ce10b1bb0716fe1' patches = ['bison/0001-Fix-build-invalid-instruction-on-macOS-10.3.patch'] diff --git a/recipes/build-tools/gettext-m4.recipe b/recipes/build-tools/gettext-m4.recipe index 810893d5..f4dcadb9 100644 --- a/recipes/build-tools/gettext-m4.recipe +++ b/recipes/build-tools/gettext-m4.recipe @@ -5,9 +5,9 @@ class Recipe(recipe.Recipe): name = 'gettext-m4' version = '0.19.8.1' stype = SourceType.TARBALL - url = 'https://ftp.gnu.org/pub/gnu/gettext/gettext-%(version)s.tar.gz' + url = 'gnu://gettext/gettext-%(version)s.tar.xz' tarball_dirname = 'gettext-%(version)s' - tarball_checksum = 'ff942af0e438ced4a8b0ea4b0b6e0d6d657157c5e2364de57baa279c1c125c43' + tarball_checksum = '105556dbc5c3fbbc2aa0edb46d22d055748b6f5c7cd7a8d99f8e7eb84e938be4' # only libraries are LGPLv2+, tools are GPLv3+ and defined below licenses = [License.LGPLv2Plus] autoreconf = True diff --git a/recipes/build-tools/gettext-tools.recipe b/recipes/build-tools/gettext-tools.recipe index 30d26e84..e201dbbf 100644 --- a/recipes/build-tools/gettext-tools.recipe +++ b/recipes/build-tools/gettext-tools.recipe @@ -10,9 +10,9 @@ class Recipe(recipe.Recipe): licenses = [License.GPLv3] srcdir = 'gettext-tools' stype = SourceType.TARBALL - url = 'https://ftp.gnu.org/pub/gnu/gettext/gettext-%(version)s.tar.gz' + url = 'gnu://gettext/gettext-%(version)s.tar.xz' tarball_dirname = 'gettext-%(version)s' - tarball_checksum = 'ff942af0e438ced4a8b0ea4b0b6e0d6d657157c5e2364de57baa279c1c125c43' + tarball_checksum = '105556dbc5c3fbbc2aa0edb46d22d055748b6f5c7cd7a8d99f8e7eb84e938be4' platform_deps = { Platform.DARWIN: ['sed'], diff --git a/recipes/build-tools/glib-tools.recipe b/recipes/build-tools/glib-tools.recipe index 744d2196..89c6e2db 100644 --- a/recipes/build-tools/glib-tools.recipe +++ b/recipes/build-tools/glib-tools.recipe @@ -4,8 +4,7 @@ class Recipe(recipe.Recipe): name = 'glib-tools' version = '2.56.1' stype = SourceType.TARBALL - maj_ver = '.'.join(version.split('.')[0:2]) - url = 'https://download.gnome.org/sources/glib/{}/glib-%(version)s.tar.xz'.format(maj_ver) + url = 'gnome://glib/%(maj_ver)s/glib-%(version)s.tar.xz' tarball_dirname = 'glib-%(version)s' tarball_checksum = '40ef3f44f2c651c7a31aedee44259809b6f03d3d20be44545cd7d177221c0b8d' licenses = [License.LGPLv2Plus] diff --git a/recipes/build-tools/gnu-sed.recipe b/recipes/build-tools/gnu-sed.recipe index 1a40059d..ff53b5a0 100644 --- a/recipes/build-tools/gnu-sed.recipe +++ b/recipes/build-tools/gnu-sed.recipe @@ -7,7 +7,7 @@ class Recipe(recipe.Recipe): version = '4.2.2' licenses = [License.GPLv2] stype = SourceType.TARBALL - url = 'https://ftp.gnu.org/gnu/sed/sed-%(version)s.tar.gz' + url = 'gnu://sed/sed-%(version)s.tar.gz' tarball_checksum = 'fea0a94d4b605894f3e2d5572e3f96e4413bcad3a085aae7367c2cf07908b2ff' def prepare(self): diff --git a/recipes/build-tools/gobject-introspection-m4.recipe b/recipes/build-tools/gobject-introspection-m4.recipe index 5d44c81c..c0fd7746 100644 --- a/recipes/build-tools/gobject-introspection-m4.recipe +++ b/recipes/build-tools/gobject-introspection-m4.recipe @@ -10,19 +10,13 @@ class Recipe(recipe.Recipe): _name = 'gobject-introspection' version = '1.54.1' stype = SourceType.TARBALL - maj_ver = '.'.join(version.split('.')[0:2]) - url = 'https://download.gnome.org/sources/{0}/{2}/{0}-{1}.tar.xz'.format(_name, version, maj_ver) + url = 'gnome://{0}/%(maj_ver)s/{0}-%(version)s.tar.xz'.format(_name) tarball_checksum = 'b88ded5e5f064ab58a93aadecd6d58db2ec9d970648534c63807d4f9a7bb877e' - srcdir = "{0}-{1}".format(_name, version) + tarball_dirname = '{}-%(version)s'.format(_name) licenses = [License.GPLv2Plus] btype = BuildType.CUSTOM files_devel = ['share/aclocal/introspection.m4'] - def prepare(self): - self.build_dir = os.path.join(os.path.dirname(self.build_dir), - '{0}-{1}'.format(self._name, - self.version)) - def install(self): shutil.copy(os.path.join(self.build_dir, 'm4', 'introspection.m4'), os.path.join(self.config.prefix, 'share', 'aclocal')) diff --git a/recipes/build-tools/gperf.recipe b/recipes/build-tools/gperf.recipe index b287fd62..f483b0b1 100644 --- a/recipes/build-tools/gperf.recipe +++ b/recipes/build-tools/gperf.recipe @@ -6,7 +6,7 @@ class Recipe(recipe.Recipe): version = '3.0.4' licenses = [License.GPLv2] stype = SourceType.TARBALL - url = 'https://ftp.gnu.org/pub/gnu/gperf/gperf-%(version)s.tar.gz' + url = 'gnu://.tar.gz' tarball_checksum = '767112a204407e62dbc3106647cf839ed544f3cf5d0f0523aaa2508623aad63e' patches = ['gperf-0001-Don-t-override-environment-AR.patch'] diff --git a/recipes/build-tools/libtool.recipe b/recipes/build-tools/libtool.recipe index ff6ab101..0036ac6e 100644 --- a/recipes/build-tools/libtool.recipe +++ b/recipes/build-tools/libtool.recipe @@ -7,8 +7,8 @@ class Recipe(recipe.Recipe): version = '2.4.6' licenses = [License.GPLv2] stype = SourceType.TARBALL - url = 'https://ftp.gnu.org/gnu/libtool/libtool-%(version)s.tar.gz' - tarball_checksum = 'e3bd4d5d3d025a36c21dd6af7ea818a2afcd4dfc1ea5a17b39d7854bcd0c06e3' + url = 'gnu://' + tarball_checksum = '7c87a8c2c8c0fc9cd5019e402bed4292462d00a718a7cd5f11218153bf28b26f' deps = ['m4'] patches = ['libtool/0001-Add-support-for-weak_framework-linking-on-Darwin.patch', 'libtool/0002-libtool-Stop-adding-bind_at_load-on-all-Darwin.patch'] diff --git a/recipes/build-tools/m4.recipe b/recipes/build-tools/m4.recipe index ed07504b..124699b6 100644 --- a/recipes/build-tools/m4.recipe +++ b/recipes/build-tools/m4.recipe @@ -6,7 +6,7 @@ class Recipe(recipe.Recipe): version = '1.4.18' licenses = [License.GPLv2] stype = SourceType.TARBALL - url = 'https://ftp.gnu.org/gnu/m4/m4-%(version)s.tar.xz' + url = 'gnu://' tarball_checksum = 'f2c1e86ca0a404ff281631bdc8377638992744b175afb806e25871a24a934e07' files_bins = ['m4'] diff --git a/recipes/build-tools/vala-m4.recipe b/recipes/build-tools/vala-m4.recipe index 5c80bd68..1c70ea13 100644 --- a/recipes/build-tools/vala-m4.recipe +++ b/recipes/build-tools/vala-m4.recipe @@ -8,23 +8,15 @@ class Recipe(recipe.Recipe): Ships the vapigen.m4 macro file from the vala tarball """ name = 'vala-m4' - _name = 'vala' version = '0.35.2' stype = SourceType.TARBALL - maj_ver = '.'.join(version.split('.')[0:2]) - url = 'https://download.gnome.org/sources/{0}/{2}/{0}-{1}.tar.xz' - url = url.format(_name, version, maj_ver) + url = 'gnome://vala/%(maj_ver)s/vala-%(version)s.tar.xz' + tarball_dirname = 'vala-%(version)s' tarball_checksum = 'af5efb30e8a303dd1c211e2a30ba0b41e64d47c9d6c5271f1d8ffb4fb63a017f' - srcdir = "{0}-{1}".format(_name, version) licenses = [License.LGPLv2_1Plus] btype = BuildType.CUSTOM files_devel = ['share/aclocal/vala.m4', 'share/vala/Makefile.vapigen'] - def prepare(self): - self.build_dir = os.path.join(os.path.dirname(self.build_dir), - '{0}-{1}'.format(self._name, - self.version)) - def install(self): shutil.copy(os.path.join(self.build_dir, 'vapigen', 'vapigen.m4'), os.path.join(self.config.prefix, 'share', diff --git a/recipes/build-tools/xz.recipe b/recipes/build-tools/xz.recipe index 652e10c2..7c9dc814 100644 --- a/recipes/build-tools/xz.recipe +++ b/recipes/build-tools/xz.recipe @@ -6,7 +6,7 @@ class Recipe(recipe.Recipe): version = '5.2.3' licenses = [License.GPLv3] stype = SourceType.TARBALL - url = 'https://download.sourceforge.net/lzmautils/xz-%(version)s.tar.bz2' + url = 'sf://lzmautils/xz-%(version)s.tar.bz2' tarball_checksum = 'fd9ca16de1052aac899ad3495ad20dfa906c27b4a5070102a2ec35ca3a4740c1' files_bins = ['xz'] diff --git a/recipes/cdparanoia.recipe b/recipes/cdparanoia.recipe index b8ac9e07..52a31c8c 100644 --- a/recipes/cdparanoia.recipe +++ b/recipes/cdparanoia.recipe @@ -11,7 +11,7 @@ class Recipe(recipe.Recipe): name = 'cdparanoia' version = '10.2' stype = SourceType.TARBALL - url = 'https://downloads.xiph.org/releases/%(name)s/%(name)s-III-%(version)s.src.tgz' + url = 'xiph://%(name)s/%(name)s-III-%(version)s.src.tgz' tarball_dirname = '%(name)s-III-%(version)s' tarball_checksum = '005db45ef4ee017f5c32ec124f913a0546e77014266c6a1c50df902a55fe64df' autoreconf = True diff --git a/recipes/docbook-xsl.recipe b/recipes/docbook-xsl.recipe index 78f85de3..a85be6fd 100644 --- a/recipes/docbook-xsl.recipe +++ b/recipes/docbook-xsl.recipe @@ -6,7 +6,7 @@ class Recipe(recipe.Recipe): licenses = [License.BSD_like] btype = BuildType.CUSTOM stype = SourceType.TARBALL - url = 'https://download.sourceforge.net/docbook/%(name)s-%(version)s.tar.bz2' + url = 'sf://docbook/%(name)s-%(version)s.tar.bz2' tarball_checksum = '725f452e12b296956e8bfb876ccece71eeecdd14b94f667f3ed9091761a4a968' files_catalog = ['etc/catalog.xml'] diff --git a/recipes/flac.recipe b/recipes/flac.recipe index 9fbcdf60..dbfe90f8 100644 --- a/recipes/flac.recipe +++ b/recipes/flac.recipe @@ -8,7 +8,7 @@ class Recipe(recipe.Recipe): # only libraries are Xiph.org (aka BSD-like), tools are GPLv2+ and defined below licenses = [License.BSD_like] stype = SourceType.TARBALL - url = 'https://downloads.xiph.org/releases/flac/flac-%(version)s.tar.xz' + url = 'xiph://' tarball_checksum = '91cfc3ed61dc40f47f050a109b08610667d73477af6ef36dcad31c31a4a8d53f' deps = ['libogg'] configure_options = ' --disable-cpplibs --enable-static' diff --git a/recipes/freetype.recipe b/recipes/freetype.recipe index 0bc5ff67..4a919838 100644 --- a/recipes/freetype.recipe +++ b/recipes/freetype.recipe @@ -5,7 +5,7 @@ class Recipe(recipe.Recipe): name = 'freetype' version = '2.9' stype = SourceType.TARBALL - url = 'https://download.savannah.gnu.org/releases/freetype/freetype-%(version)s.tar.bz2' + url = 'savannah://.tar.bz2' tarball_checksum = 'e6ffba3c8cef93f557d1f767d7bc3dee860ac7a3aaff588a521e081bc36f4c8a' licenses = [License.FreeType] configure_tpl = "%(config-sh)s --prefix=%(prefix)s --libdir=%(libdir)s --with-harfbuzz=no" diff --git a/recipes/gdk-pixbuf.recipe b/recipes/gdk-pixbuf.recipe index 867f2f2b..d71ae3ca 100644 --- a/recipes/gdk-pixbuf.recipe +++ b/recipes/gdk-pixbuf.recipe @@ -8,8 +8,7 @@ class Recipe(recipe.Recipe): licenses = [License.LGPLv2Plus] stype = SourceType.TARBALL btype = BuildType.MESON - maj_ver = '.'.join(version.split('.')[0:2]) - url = 'https://download.gnome.org/sources/{0}/{1}/{0}-{2}.tar.xz'.format(name, maj_ver, version) + url = 'gnome://' tarball_checksum = 'dd50973c7757bcde15de6bcd3a6d462a445efd552604ae6435a0532fbbadae47' meson_options = {'docs' : 'false', 'man' : 'false', diff --git a/recipes/gettext.recipe b/recipes/gettext.recipe index 677aed5d..024f3f3c 100644 --- a/recipes/gettext.recipe +++ b/recipes/gettext.recipe @@ -7,8 +7,8 @@ class Recipe(recipe.Recipe): # only libraries are LGPLv2+, tools are GPLv3+ and defined below licenses = [License.LGPLv2Plus] stype = SourceType.TARBALL - url = 'https://ftp.gnu.org/pub/gnu/%(name)s/%(name)s-%(version)s.tar.gz' - tarball_checksum = 'ff942af0e438ced4a8b0ea4b0b6e0d6d657157c5e2364de57baa279c1c125c43' + url = 'gnu://' + tarball_checksum = '105556dbc5c3fbbc2aa0edb46d22d055748b6f5c7cd7a8d99f8e7eb84e938be4' srcdir = 'gettext-runtime' patches = ['gettext/0001-Fix-linker-error-redefinition-of-vasprintf.patch', 'gettext/0001-Undefine-__USE_MINGW_ANSI_STDIO-as-otherwise-stdio.h.patch', diff --git a/recipes/glib-networking.recipe b/recipes/glib-networking.recipe index b0650f7d..e6e8bccb 100644 --- a/recipes/glib-networking.recipe +++ b/recipes/glib-networking.recipe @@ -8,8 +8,7 @@ class Recipe(recipe.Recipe): licenses = [License.LGPLv2Plus] stype = SourceType.TARBALL btype = BuildType.MESON - maj_ver = '.'.join(version.split('.')[0:2]) - url = 'https://download.gnome.org/sources/{0}/{1}/{0}-{2}.tar.xz'.format(name, maj_ver, version) + url = 'gnome://' tarball_checksum = 'df47b0e0a037d2dcf6b1846cbdf68dd4b3cc055e026bb40c4a55f19f29f635c8' meson_options = {'ca_certificates_path': '', 'libproxy_support': 'false', 'gnome_proxy_support': 'false', 'pkcs11_support': 'false', diff --git a/recipes/glib.recipe b/recipes/glib.recipe index 151a42ec..aa9b6c3e 100644 --- a/recipes/glib.recipe +++ b/recipes/glib.recipe @@ -24,8 +24,7 @@ class Recipe(recipe.Recipe): name = 'glib' version = '2.56.1' stype = SourceType.TARBALL - maj_ver = '.'.join(version.split('.')[0:2]) - url = 'https://download.gnome.org/sources/{0}/{1}/{0}-{2}.tar.xz'.format(name, maj_ver, version) + url = 'gnome://' tarball_checksum = '40ef3f44f2c651c7a31aedee44259809b6f03d3d20be44545cd7d177221c0b8d' licenses = [License.LGPLv2Plus] btype = BuildType.MESON diff --git a/recipes/gmp.recipe b/recipes/gmp.recipe index cb7bb293..c417b73f 100644 --- a/recipes/gmp.recipe +++ b/recipes/gmp.recipe @@ -20,7 +20,7 @@ GMP_H_UNVERSAL='''\ class Recipe(recipe.Recipe): name = 'gmp' version = '6.1.2' - url = 'https://ftp.gnu.org/gnu/gmp/gmp-%(version)s.tar.xz' + url = 'gnu://' tarball_checksum = '87b565e89a9a684fe4ebeeddb8399dce2599f9c9049854ca8c0dfbdea0e21912' stype = SourceType.TARBALL licenses = [License.LGPLv3Plus] diff --git a/recipes/gobject-introspection.recipe b/recipes/gobject-introspection.recipe index f83c9214..11758bfa 100644 --- a/recipes/gobject-introspection.recipe +++ b/recipes/gobject-introspection.recipe @@ -3,12 +3,10 @@ import sys class Recipe(recipe.Recipe): - name = 'gobject-introspection' version = '1.54.1' stype = SourceType.TARBALL - maj_ver = '.'.join(version.split('.')[0:2]) - url = 'https://download.gnome.org/sources/{0}/{1}/{0}-{2}.tar.xz'.format(name, maj_ver, version) + url = 'gnome://' tarball_checksum = 'b88ded5e5f064ab58a93aadecd6d58db2ec9d970648534c63807d4f9a7bb877e' licenses = [License.GPLv2Plus] autoreconf = True diff --git a/recipes/gtk-doc-lite.recipe b/recipes/gtk-doc-lite.recipe index 38ba8ca2..d151aeba 100644 --- a/recipes/gtk-doc-lite.recipe +++ b/recipes/gtk-doc-lite.recipe @@ -5,8 +5,7 @@ class Recipe(recipe.Recipe): version = '1.29' stype = SourceType.TARBALL tarball_dirname = 'gtk-doc-%(version)s' - maj_ver = '.'.join(version.split('.')[0:2]) - url = 'https://download.gnome.org/sources/{0}/{1}/{0}-{2}.tar.xz'.format('gtk-doc', maj_ver, version) + url = 'gnome://gtk-doc/%(maj_ver)s/gtk-doc-%(version)s.tar.xz' tarball_checksum = '14578e002496567276d310a62c9ffd6c56ee8806ce5079ffb0b81c4111f586b1' # TODO: check license - source files are GPLv2+ and COPYING is GPLv3 licenses = [License.GPLv2Plus] diff --git a/recipes/json-glib.recipe b/recipes/json-glib.recipe index d6c6a06a..f7eab370 100644 --- a/recipes/json-glib.recipe +++ b/recipes/json-glib.recipe @@ -6,8 +6,7 @@ class Recipe(recipe.Recipe): licenses = [License.LGPLv2_1Plus] btype = BuildType.MESON stype = SourceType.TARBALL - maj_ver = '.'.join(version.split('.')[0:2]) - url = 'https://download.gnome.org/sources/{0}/{1}/{0}-{2}.tar.xz'.format(name, maj_ver, version) + url = 'gnome://' tarball_checksum = '720c5f4379513dc11fd97dc75336eb0c0d3338c53128044d9fabec4374f4bc47' deps = ['glib'] diff --git a/recipes/lame.recipe b/recipes/lame.recipe index f7dc8c60..7646d3eb 100644 --- a/recipes/lame.recipe +++ b/recipes/lame.recipe @@ -6,7 +6,7 @@ class Recipe(recipe.Recipe): licenses = [License.GPL] stype = SourceType.TARBALL configure_options = ' --enable-static --disable-frontend --disable-decoder' - url = 'https://downloads.sourceforge.net/lame/lame-%(version)s.tar.gz' + url = 'sf://.tar.gz' tarball_checksum = 'ddfe36cab873794038ae2c1210557ad34857a4b6bdc515785d1da9e175b1da1e' autoreconf = True patches = ['lame/0001-Remove-decoder-symbols.patch'] diff --git a/recipes/libcroco.recipe b/recipes/libcroco.recipe index a84e3567..4d2b88c2 100644 --- a/recipes/libcroco.recipe +++ b/recipes/libcroco.recipe @@ -5,8 +5,7 @@ class Recipe(recipe.Recipe): version = '0.6.12' licenses = [License.LGPLv2_1] stype = SourceType.TARBALL - maj_ver = '.'.join(version.split('.')[0:2]) - url = 'https://download.gnome.org/sources/{0}/{1}/{0}-{2}.tar.xz'.format(name, maj_ver, version) + url = 'gnome://' tarball_checksum = 'ddc4b5546c9fb4280a5017e2707fbd4839034ed1aba5b7d4372212f34f84f860' deps = ['libxml2', 'glib', 'gdk-pixbuf'] diff --git a/recipes/libdv.recipe b/recipes/libdv.recipe index 623f79c2..311b3fca 100644 --- a/recipes/libdv.recipe +++ b/recipes/libdv.recipe @@ -5,7 +5,7 @@ class Recipe(recipe.Recipe): name = 'libdv' version = '1.0.0' stype = SourceType.TARBALL - url = 'https://download.sourceforge.net/libdv/libdv-%(version)s.tar.gz' + url = 'sf://.tar.gz' tarball_checksum = 'a305734033a9c25541a59e8dd1c254409953269ea7c710c39e540bd8853389ba' licenses = [License.LGPLv2_1Plus] autoreconf = True diff --git a/recipes/libiconv.recipe b/recipes/libiconv.recipe index 00bd0c25..c36ed46a 100644 --- a/recipes/libiconv.recipe +++ b/recipes/libiconv.recipe @@ -7,7 +7,7 @@ class Recipe(recipe.Recipe): # only libraries are LGPLv2+, tools are GPLv3+ and defined below licenses = [License.LGPLv2Plus] stype = SourceType.TARBALL - url = 'https://ftp.gnu.org/pub/gnu/libiconv/libiconv-%(version)s.tar.gz' + url = 'gnu://.tar.gz' tarball_checksum = 'ccf536620a45458d26ba83887a983b96827001e92a13847b45e4925cc8913178' patches = ['libiconv/0001-Use-correct-autotools-versions.patch', 'libiconv/0002-lib-Only-rename-locale_charset-for-libiconv-not-libc.patch',] diff --git a/recipes/libjpeg-turbo.recipe b/recipes/libjpeg-turbo.recipe index 649abe97..2fbff948 100644 --- a/recipes/libjpeg-turbo.recipe +++ b/recipes/libjpeg-turbo.recipe @@ -6,12 +6,13 @@ class Recipe(recipe.Recipe): version = '1.5.3' licenses = [License.BSD_like] stype = SourceType.TARBALL + url = 'sf://.tar.gz' + tarball_checksum = 'b24890e2bb46e12e72a79f7e965f409f4e16466d00e1dd15d93d73ee6b592523' + configure_tpl = "%(config-sh)s --prefix=%(prefix)s "\ "--libdir=%(libdir)s" configure_options = " --with-jpeg8" autoreconf = True - url = 'https://downloads.sourceforge.net/libjpeg-turbo/libjpeg-turbo-%(version)s.tar.gz' - tarball_checksum = 'b24890e2bb46e12e72a79f7e965f409f4e16466d00e1dd15d93d73ee6b592523' patches = [] files_libs = ['libjpeg','libturbojpeg'] diff --git a/recipes/libkate.recipe b/recipes/libkate.recipe index 80eb02a7..a44d17f3 100644 --- a/recipes/libkate.recipe +++ b/recipes/libkate.recipe @@ -5,7 +5,7 @@ class Recipe(recipe.Recipe): name = 'libkate' version = '0.4.1' stype = SourceType.TARBALL - url = 'https://downloads.xiph.org/releases/kate/libkate-%(version)s.tar.gz' + url = 'xiph://kate/libkate-%(version)s.tar.gz' tarball_checksum = 'c40e81d5866c3d4bf744e76ce0068d8f388f0e25f7e258ce0c8e76d7adc87b68' licenses = [License.BSD_like] deps = ['libogg', 'libpng'] diff --git a/recipes/libmms.recipe b/recipes/libmms.recipe index 3691f17e..e1de352e 100644 --- a/recipes/libmms.recipe +++ b/recipes/libmms.recipe @@ -4,7 +4,7 @@ class Recipe(recipe.Recipe): name = 'libmms' version = '0.6.4' stype = SourceType.TARBALL - url = 'https://download.sourceforge.net/libmms/libmms-%(version)s.tar.gz' + url = 'sf://.tar.gz' tarball_checksum = '3c05e05aebcbfcc044d9e8c2d4646cd8359be39a3f0ba8ce4e72a9094bee704f' licenses = [License.LGPLv2_1Plus] patches = ['libmms/0002-uri-Add-implementation-of-strndup-for-platforms-that.patch', diff --git a/recipes/libogg.recipe b/recipes/libogg.recipe index 7cd65f41..f8dccf5e 100644 --- a/recipes/libogg.recipe +++ b/recipes/libogg.recipe @@ -6,7 +6,7 @@ class Recipe(recipe.Recipe): name = 'libogg' version = '1.3.3' stype = SourceType.TARBALL - url = 'https://downloads.xiph.org/releases/ogg/libogg-%(version)s.tar.xz' + url = 'xiph://ogg/%(name)s-%(version)s.tar.xz' tarball_checksum = '4f3fc6178a533d392064f14776b23c397ed4b9f48f5de297aba73b643f955c08' licenses = [License.BSD_like] autoreconf = True diff --git a/recipes/libpng.recipe b/recipes/libpng.recipe index 8dd0e63b..5b998e76 100644 --- a/recipes/libpng.recipe +++ b/recipes/libpng.recipe @@ -5,7 +5,7 @@ class Recipe(recipe.Recipe): name = 'libpng' version = '1.6.35' stype = SourceType.TARBALL - url = 'https://download.sourceforge.net/libpng/libpng-%(version)s.tar.xz' + url = 'sf://' tarball_checksum = '23912ec8c9584917ed9b09c5023465d71709dce089be503c7867fec68a93bcd7' licenses = [License.LibPNG] deps = ['zlib'] diff --git a/recipes/librsvg.recipe b/recipes/librsvg.recipe index 7e3650be..f5b8e5da 100644 --- a/recipes/librsvg.recipe +++ b/recipes/librsvg.recipe @@ -8,8 +8,7 @@ class Recipe(recipe.Recipe): autoreconf = True autoreconf_sh = 'mkdir -p m4 && autoreconf -fiv' stype = SourceType.TARBALL - maj_ver = '.'.join(version.split('.')[0:2]) - url = 'https://download.gnome.org/sources/{0}/{1}/{0}-{2}.tar.xz'.format(name, maj_ver, version) + url = 'gnome://' tarball_checksum = 'cff4dd3c3b78bfe99d8fcfad3b8ba1eee3289a0823c0e118d78106be6b84c92b' files_libs = ['librsvg-2'] diff --git a/recipes/libshout.recipe b/recipes/libshout.recipe index 76becb3e..f0dbfe85 100644 --- a/recipes/libshout.recipe +++ b/recipes/libshout.recipe @@ -5,7 +5,7 @@ class Recipe(recipe.Recipe): name = 'libshout' version = '2.4.1' stype = SourceType.TARBALL - url = 'https://downloads.xiph.org/releases/libshout/libshout-%(version)s.tar.gz' + url = 'xiph://.tar.gz' tarball_checksum = 'f3acb8dec26f2dbf6df778888e0e429a4ce9378a9d461b02a7ccbf2991bbf24d' licenses = [License.LGPLv2Plus] deps = ['libtheora', 'libogg', 'libvorbis', 'speex'] diff --git a/recipes/libsoup.recipe b/recipes/libsoup.recipe index 963eb3bf..80051af0 100644 --- a/recipes/libsoup.recipe +++ b/recipes/libsoup.recipe @@ -6,8 +6,7 @@ class Recipe(recipe.Recipe): version = '2.60.3' licenses = [License.LGPLv2Plus] stype = SourceType.TARBALL - maj_ver = '.'.join(version.split('.')[0:2]) - url = 'https://download.gnome.org/sources/{0}/{1}/{0}-{2}.tar.xz'.format(name, maj_ver, version) + url = 'gnome://' tarball_checksum = '1b0dc762f23abe4e0d29b77370e539fd35f31d8e8e0318d6ddccff395be68a22' autoreconf = True autoreconf_sh = 'gtkdocize && autoreconf --force --install --verbose' diff --git a/recipes/libtasn1.recipe b/recipes/libtasn1.recipe index c4266848..e1df7ced 100644 --- a/recipes/libtasn1.recipe +++ b/recipes/libtasn1.recipe @@ -6,7 +6,7 @@ class Recipe(recipe.Recipe): name = 'libtasn1' version = '4.13' stype = SourceType.TARBALL - url = 'https://ftp.gnu.org/gnu/libtasn1/libtasn1-%(version)s.tar.gz' + url = 'gnu://.tar.gz' tarball_checksum = '7e528e8c317ddd156230c4e31d082cd13e7ddeb7a54824be82632209550c8cca' licenses = [License.LGPLv2_1Plus] autoreconf = True diff --git a/recipes/libtheora.recipe b/recipes/libtheora.recipe index 76e19305..aa0863fe 100644 --- a/recipes/libtheora.recipe +++ b/recipes/libtheora.recipe @@ -6,7 +6,7 @@ class Recipe(recipe.Recipe): version = '1.1.1' licenses = [License.BSD] stype = SourceType.TARBALL - url = 'https://downloads.xiph.org/releases/theora/libtheora-%(version)s.tar.bz2' + url = 'xiph://theora/%(name)s-%(version)s.tar.bz2' tarball_checksum = 'b6ae1ee2fa3d42ac489287d3ec34c5885730b1296f0801ae577a35193d3affbc' deps = ['libogg', 'libvorbis'] allow_parallel_build = False diff --git a/recipes/libunwind.recipe b/recipes/libunwind.recipe index 21d777d5..8ccbf6e9 100644 --- a/recipes/libunwind.recipe +++ b/recipes/libunwind.recipe @@ -5,7 +5,7 @@ class Recipe(recipe.Recipe): version = '1.1' licenses = [License.MIT] stype = SourceType.TARBALL - url = 'https://download.savannah.gnu.org/releases/libunwind/libunwind-%(version)s.tar.gz' + url = 'savannah://.tar.gz' tarball_checksum = '9dfe0fcae2a866de9d3942c66995e4b460230446887dbdab302d41a8aee8d09a' files_libs = ['libunwind'] diff --git a/recipes/libvisual.recipe b/recipes/libvisual.recipe index cbc57a12..57a9cf39 100644 --- a/recipes/libvisual.recipe +++ b/recipes/libvisual.recipe @@ -5,7 +5,7 @@ class Recipe(recipe.Recipe): name = 'libvisual' version = '0.4.0' stype = SourceType.TARBALL - url = 'https://download.sourceforge.net/libvisual/libvisual-%(version)s.tar.bz2' + url = 'sf://.tar.bz2' tarball_checksum = '78f38d3ce857edde5482aa4415b504bbcd4d4a688fd4de09ec2131ad08174279' licenses = [License.LGPLv2_1Plus] autoreconf = True diff --git a/recipes/libvorbis.recipe b/recipes/libvorbis.recipe index 59687f21..13a3cf3d 100644 --- a/recipes/libvorbis.recipe +++ b/recipes/libvorbis.recipe @@ -6,7 +6,7 @@ class Recipe(recipe.Recipe): name = 'libvorbis' version = '1.3.5' stype = SourceType.TARBALL - url = 'https://downloads.xiph.org/releases/vorbis/libvorbis-%(version)s.tar.xz' + url = 'xiph://vorbis/%(name)s-%(version)s.tar.xz' tarball_checksum = '54f94a9527ff0a88477be0a71c0bab09a4c3febe0ed878b24824906cd4b0e1d1' licenses = [License.BSD_like] deps = ['libogg'] diff --git a/recipes/mpg123.recipe b/recipes/mpg123.recipe index f71b1948..3b8f49ab 100644 --- a/recipes/mpg123.recipe +++ b/recipes/mpg123.recipe @@ -4,7 +4,7 @@ class Recipe(recipe.Recipe): name = 'mpg123' version = '1.25.10' stype = SourceType.TARBALL - url = 'https://downloads.sourceforge.net/mpg123/mpg123-%(version)s.tar.bz2' + url = 'sf://.tar.bz2' tarball_checksum = '6c1337aee2e4bf993299851c70b7db11faec785303cfca3a5c3eb5f329ba7023' licenses = [License.LGPLv2_1] autoreconf = True diff --git a/recipes/nettle/nettle.recipe b/recipes/nettle/nettle.recipe index ded27635..022b5e6f 100644 --- a/recipes/nettle/nettle.recipe +++ b/recipes/nettle/nettle.recipe @@ -12,8 +12,7 @@ class Recipe(recipe.Recipe): name = 'nettle' version = '3.4' stype = SourceType.TARBALL - url = 'https://ftp.gnu.org/gnu/nettle/nettle-%(version)s.tar.gz' - + url = 'gnu://.tar.gz' tarball_checksum = 'ae7a42df026550b85daca8389b6a60ba6313b0567f374392e54918588a411e94' licenses = [License.LGPLv2_1Plus] configure_options = '--enable-shared --enable-public-key' diff --git a/recipes/opencore-amr.recipe b/recipes/opencore-amr.recipe index cc1736e0..adbcdfbe 100644 --- a/recipes/opencore-amr.recipe +++ b/recipes/opencore-amr.recipe @@ -5,7 +5,7 @@ class Recipe(recipe.Recipe): name = 'opencore-amr' version = '0.1.5' stype = SourceType.TARBALL - url = 'https://download.sourceforge.net/opencore-amr/opencore-amr-%(version)s.tar.gz' + url = 'sf://.tar.gz' tarball_checksum = '2c006cb9d5f651bfb5e60156dbff6af3c9d35c7bbcc9015308c0aff1e14cd341' licenses = [License.Apachev2] patches = ['opencore-amr/0001-Fix-include-dir-in-pc-files.patch'] diff --git a/recipes/opus.recipe b/recipes/opus.recipe index b0ec4efb..9b11b4e5 100644 --- a/recipes/opus.recipe +++ b/recipes/opus.recipe @@ -6,7 +6,7 @@ class Recipe(recipe.Recipe): version = '1.3' licenses = [License.BSD_like] stype = SourceType.TARBALL - url = 'https://downloads.xiph.org/releases/{0}/{0}-{1}.tar.gz'.format(name, version) + url = 'xiph://.tar.gz' tarball_checksum = '4f3d69aefdf2dbaf9825408e452a8a414ffc60494c70633560700398820dc550' files_libs = ['libopus'] diff --git a/recipes/pango.recipe b/recipes/pango.recipe index a7f98d6a..226044a7 100644 --- a/recipes/pango.recipe +++ b/recipes/pango.recipe @@ -6,8 +6,7 @@ class Recipe(recipe.Recipe): version = '1.42.4' stype = SourceType.TARBALL btype = BuildType.MESON - maj_ver = '.'.join(version.split('.')[0:2]) - url = 'https://download.gnome.org/sources/{0}/{1}/{0}-{2}.tar.xz'.format(name, maj_ver, version) + url = 'gnome://' tarball_checksum = '1d2b74cd63e8bd41961f2f8d952355aa0f9be6002b52c8aa7699d9f5da597c9d' licenses = [License.LGPLv2Plus] deps = ['cairo', 'fontconfig', 'freetype', 'fribidi', 'gtk-doc-lite', 'harfbuzz'] diff --git a/recipes/speex.recipe b/recipes/speex.recipe index 44d9760d..2785ccdd 100644 --- a/recipes/speex.recipe +++ b/recipes/speex.recipe @@ -5,7 +5,7 @@ class Recipe(recipe.Recipe): name = 'speex' version = '1.2rc2' stype = SourceType.TARBALL - url = 'https://downloads.xiph.org/releases/speex/speex-%(version)s.tar.gz' + url = 'xiph://.tar.gz' tarball_checksum = 'caa27c7247ff15c8521c2ae0ea21987c9e9710a8f2d3448e8b79da9806bce891' licenses = [License.BSD_like] deps = ['libogg'] diff --git a/recipes/vo-aacenc.recipe b/recipes/vo-aacenc.recipe index 19baf451..53721554 100644 --- a/recipes/vo-aacenc.recipe +++ b/recipes/vo-aacenc.recipe @@ -6,7 +6,7 @@ class Recipe(recipe.Recipe): version = '0.1.3' licenses = [License.Apachev2] stype = SourceType.TARBALL - url = 'https://downloads.sourceforge.net/opencore-amr/vo-aacenc-%(version)s.tar.gz' + url = 'sf://opencore-amr/%(name)s-%(version)s.tar.gz' tarball_checksum = 'e51a7477a359f18df7c4f82d195dab4e14e7414cbd48cf79cc195fc446850f36' autoreconf = True |