Archived
3
0

Recipes updated.

This commit is contained in:
Luka Vandervelden 2019-08-01 17:46:37 +02:00
parent 50690834e8
commit 30dd08f2a0

View File

@ -32,6 +32,80 @@ recipes << Recipe.new(context, "hello", "2.10").tap do |recipe|
#end #end
end end
recipes << Recipe.new(context, "automake", "1.16").tap do |recipe|
recipe.sources << "https://ftp.gnu.org/gnu/automake/automake-#{recipe.version}.tar.gz"
end
recipes << Recipe.new(context, "autoconf", "2.69").tap do |recipe|
recipe.sources << "https://ftp.gnu.org/gnu/autoconf/autoconf-#{recipe.version}.tar.gz"
recipe.dependencies << "m4" << "perl"
end
recipes << Recipe.new(context, "libtool", "2.4.6").tap do |recipe|
recipe.sources << "http://ftpmirror.gnu.org/libtool/libtool-#{recipe.version}.tar.gz"
end
recipes << Recipe.new(context, "m4", "1.4.18").tap do |recipe|
recipe.sources << "https://ftp.gnu.org/gnu/m4/m4-#{recipe.version}.tar.gz"
recipe.dependencies << "perl"
end
recipes << Recipe.new(context, "bzip2", "1.0.6").tap do |recipe|
recipe.sources << "https://downloads.sourceforge.net/project/bzip2/bzip2-#{recipe.version}.tar.gz"
recipe.instructions.configure << "sed -i.orig -e '/^CFLAGS=/s/.*/CFLAGS = -O2 -fPIC/' #{recipe.dirname}/Makefile"
recipe.options["make install"] = "PREFIX='#{recipe.fake_root_directory}/usr'"
end
recipes << Recipe.new(context, "perl", "5.30.0").tap do |recipe|
recipe.sources << "https://www.cpan.org/src/5.0/perl-#{recipe.version}.tar.gz"
recipe.dependencies << "zlib" << "bzip2"
recipe.instructions.build << %(
set -e -x;
cd #{recipe.dirname};
BUILD_ZLIB=0;
BUILD_BZIP2=0;
BZIP2_LIB=/usr/lib;
BZIP2_INCLUDE=/usr/inculde;
export BUILD_ZLIB BUILD_BZIP2 BZIP2_LIB BZIP2_INCLUDE;
./Configure -des \
-Dcccdlflags='-fPIC' \
-Dcccdlflags='-fPIC' \
-Dccdlflags='-rdynamic' \
-Dprefix=/usr \
-Uprivlib=$_privlib \
-Darchlib=$_archlib \
-Dvendorprefix=/usr \
-Dvendorlib=/usr/share/perl5/vendor_perl \
-Dvendorarch=/usr/lib/perl5/vendor_perl \
-Dsiteprefix=/usr/local \
-Dsitelib=/usr/local/share/perl5/site_perl \
-Dsitearch=/usr/local/lib/perl5/site_perl \
-Dlocincpth=' ' \
-Dcc=gcc \
-Uoptimize="$CFLAGS" \
-Duselargefiles \
-Dusethreads \
-Duseshrplib \
-Dd_semctl_semun \
-Dman1dir=/usr/share/man/man1 \
-Dman3dir=/usr/share/man/man3 \
-Dinstallman1dir=/usr/share/man/man1 \
-Dinstallman3dir=/usr/share/man/man3 \
-Dman1ext='1' \
-Dman3ext='3pm' \
-Dcf_by='Alpine' \
-Ud_csh \
-Dusenm \
|| return 1
make libperl.so && make || return 1
)
end
recipes << Recipe.new(context, "apk-tools", "2.10.4").tap do |recipe| recipes << Recipe.new(context, "apk-tools", "2.10.4").tap do |recipe|
recipe.sources << "https://dev.alpinelinux.org/archive/apk-tools/apk-tools-#{recipe.version}.tar.xz" recipe.sources << "https://dev.alpinelinux.org/archive/apk-tools/apk-tools-#{recipe.version}.tar.xz"
@ -49,13 +123,43 @@ recipes << Recipe.new(context, "apk-tools", "2.10.4").tap do |recipe|
recipe.instructions.install << "mkdir -p '#{recipe.fake_root_directory}#{dir}'" recipe.instructions.install << "mkdir -p '#{recipe.fake_root_directory}#{dir}'"
end end
#recipe.build_dependencies << "zlib-dev" << "openssl-dev" #recipe.build_dependencies << "zlib-dev" << "openssl-dev" << "linux-dev"
end end
recipes << Recipe.new(context, "abuild", "3.4.0").tap do |recipe| recipes << Recipe.new(context, "abuild", "3.4.0").tap do |recipe|
recipe.sources << "https://dev.alpinelinux.org/archive/abuild/abuild-#{recipe.version}.tar.xz" recipe.sources << "https://dev.alpinelinux.org/archive/abuild/abuild-#{recipe.version}.tar.xz"
end end
recipes << Recipe.new(context, "pkg-config", "0.29.2").tap do |recipe|
recipe.sources << "http://pkgconfig.freedesktop.org/releases/pkg-config-#{recipe.version}.tar.gz"
# FIXME: Well want to remove this at some point.
recipe.options["configure"] = "--with-internal-glib"
end
recipes << Recipe.new(context, "tar", "1.32").tap do |recipe|
recipe.sources << "http://ftp.gnu.org/gnu/tar/tar-#{recipe.version}.tar.gz"
recipe.options["configure"] = "FORCE_UNSAFE_CONFIGURE=1"
end
recipes << Recipe.new(context, "libarchive", "3.3.3").tap do |recipe|
recipe.sources << "https://www.libarchive.org/downloads/libarchive-#{recipe.version}.tar.gz"
# Conflicts with “tar” (gnu tar)
#recipe.instructions.install << "cd #{recipe.dirname} && make DESTDIR='#{recipe.fake_root_directory}' install"
#recipe.instructions.install << "cd '#{recipe.fake_root_directory}' && ln -s /usr/bin/bsdtar usr/bin/tar"
end
# FIXME: Build and install the actual kernel.
recipes << Recipe.new(context, "linux", "5.2.4").tap do |recipe|
recipe.sources << "https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-#{recipe.version}.tar.xz"
recipe.instructions.build << "true"
recipe.instructions.install << "mkdir -p '#{recipe.fake_root_directory}/usr'"
recipe.instructions.install << "cd '#{recipe.dirname}' && make headers_install ARCH=x86_64 INSTALL_HDR_PATH='#{recipe.fake_root_directory}/usr'"
end
recipes << Recipe.new(context, "make", "4.2").tap do |recipe| recipes << Recipe.new(context, "make", "4.2").tap do |recipe|
recipe.sources << "https://ftp.gnu.org/gnu/make/make-#{recipe.version}.tar.gz" recipe.sources << "https://ftp.gnu.org/gnu/make/make-#{recipe.version}.tar.gz"
end end
@ -70,6 +174,7 @@ recipes << Recipe.new(context, "sysvinit", "2.95").tap do |recipe|
recipe.sources << "https://git.savannah.nongnu.org/cgit/sysvinit.git/snapshot/sysvinit-#{recipe.version}.tar.gz" recipe.sources << "https://git.savannah.nongnu.org/cgit/sysvinit.git/snapshot/sysvinit-#{recipe.version}.tar.gz"
recipe.url = "https://savannah.nongnu.org/projects/sysvinit" recipe.url = "https://savannah.nongnu.org/projects/sysvinit"
recipe.description = "System V-like init system." recipe.description = "System V-like init system."
recipe.dependencies << "util-linux"
recipe.instructions.install << "cd sysvinit-#{recipe.version} && make ROOT='#{recipe.fake_root_directory}' install" recipe.instructions.install << "cd sysvinit-#{recipe.version} && make ROOT='#{recipe.fake_root_directory}' install"
end end
@ -85,6 +190,46 @@ end
recipes << Recipe.new(context, "libffi", "3.2.1").tap do |recipe| recipes << Recipe.new(context, "libffi", "3.2.1").tap do |recipe|
recipe.sources << "ftp://sourceware.org/pub/libffi/libffi-#{recipe.version}.tar.gz" recipe.sources << "ftp://sourceware.org/pub/libffi/libffi-#{recipe.version}.tar.gz"
recipe.instructions.install << %{
set -e;
cd #{recipe.dirname};
make DESTDIR="#{recipe.fake_root_directory}" install;
cd "#{recipe.fake_root_directory}";
mv usr/lib/libffi-#{recipe.version}/include usr;
nuke usr/lib/libffi-#{recipe.version}
}
end
recipes << Recipe.new(context, "python", "3.7.4").tap do |recipe|
recipe.sources << "https://www.python.org/ftp/python/#{recipe.version}/Python-#{recipe.version}.tgz"
recipe.dirname = "Python-#{recipe.version}"
end
recipes << Recipe.new(context, "crystal", "0.29.9").tap do |recipe|
# FIXME: Arrows, ASAP.
#recipe.sources << "https://github.com/crystal-lang/crystal/archive/#{recipe.version}.tar.gz"
recipe.dirname = "crystal-8b3dba72bd681118b2b761c68d7d2fdcbbbfceb2"
recipe.sources << "https://github.com/crystal-lang/crystal/archive/8b3dba72bd681118b2b761c68d7d2fdcbbbfceb2.zip"
recipe.dependencies << "libyaml" << "libevent" << "pcre" << "openssl"
recipe.options["make"] = "release=1 LLVM_CONFIG=/usr/bad/llvm-6/bin/llvm-config"
recipe.instructions.install << %{
set -e
cd #{recipe.dirname};
PKG="#{recipe.fake_root_directory}";
mkdir -p "$PKG/usr/bin";
mkdir -p "$PKG/usr/lib/crystal/core";
mkdir -p "$PKG/usr/share/man/man1";
install -D -m 755 .build/crystal "$PKG"/usr/bin/crystal;
install -D -m 644 man/crystal.1 "$PKG"/usr/share/man/man1/crystal.1;
cp -r src/* "$PKG/usr/lib/crystal/core";
cd "$PKG/usr/lib/crystal/core";
nuke ext/sigfault.* llvm/ext/llvm_ext.o
}
end end
[{"6", "6.0.1"}, {"7", "7.1.0"},{"8", "8.0.0"}].each do |branch, version| [{"6", "6.0.1"}, {"7", "7.1.0"},{"8", "8.0.0"}].each do |branch, version|
@ -132,6 +277,10 @@ EOF
end end
end end
recipes << Recipe.new(context, "cmake", "3.15.1").tap do |recipe|
recipe.sources << "https://github.com/Kitware/CMake/releases/download/v3.15.1/cmake-#{recipe.version}.tar.gz"
end
recipes << Recipe.new(context, "gmp", "6.1.2").tap do |recipe| recipes << Recipe.new(context, "gmp", "6.1.2").tap do |recipe|
recipe.sources << "https://gmplib.org/download/gmp/gmp-#{recipe.version}.tar.xz" recipe.sources << "https://gmplib.org/download/gmp/gmp-#{recipe.version}.tar.xz"
end end
@ -151,9 +300,14 @@ recipes << Recipe.new(context, "gcc", "9.1.0").tap do |recipe|
recipe.dirname = "build" recipe.dirname = "build"
recipe.instructions.configure << %( recipe.instructions.configure << %(
set -e;
mkdir build; mkdir build;
cd build && ../gcc-#{recipe.version}/configure \ cd build;
sed -e '/m64=/s/lib64/lib/' \
-i.orig ../gcc-#{recipe.version}/gcc/config/i386/t-linux64;
../gcc-#{recipe.version}/configure \
--prefix=/usr \ --prefix=/usr \
--libdir=/usr/lib \
--disable-multilib \ --disable-multilib \
--disable-libssp \ --disable-libssp \
--disable-libmpx \ --disable-libmpx \
@ -173,6 +327,7 @@ recipes << Recipe.new(context, "zsh", "5.7.1").tap do |recipe|
recipe.url = "https://zsh.org" recipe.url = "https://zsh.org"
recipe.description = "Zsh is a shell designed for interactive use, although it is also a powerful scripting language." recipe.description = "Zsh is a shell designed for interactive use, although it is also a powerful scripting language."
recipe.dependencies << "ncurses" recipe.dependencies << "ncurses"
recipe.options["configure"] = "--with-tcsetpgrp"
# Build-deps. # Build-deps.
#recipe.build_dependencies << "ncurses-dev" #recipe.build_dependencies << "ncurses-dev"
@ -219,6 +374,8 @@ recipes << Recipe.new(context, "libyaml", "0.2.2").tap do |recipe|
recipe.sources << "https://github.com/yaml/libyaml/archive/#{recipe.version}.tar.gz" recipe.sources << "https://github.com/yaml/libyaml/archive/#{recipe.version}.tar.gz"
recipe.instructions.configure << "cd libyaml-#{recipe.version} && ./bootstrap && ./configure --prefix=/usr" recipe.instructions.configure << "cd libyaml-#{recipe.version} && ./bootstrap && ./configure --prefix=/usr"
# recipe.build_dependencies << "autoconf" << "libtool"
end end
# FIXME: This one will fail on non-x86_64 platforms. Also on non-linux # FIXME: This one will fail on non-x86_64 platforms. Also on non-linux
@ -255,7 +412,12 @@ end
recipes << Recipe.new(context, "binutils", "2.32").tap do |recipe| recipes << Recipe.new(context, "binutils", "2.32").tap do |recipe|
recipe.sources << "https://ftp.gnu.org/gnu/binutils/binutils-#{recipe.version}.tar.xz" recipe.sources << "https://ftp.gnu.org/gnu/binutils/binutils-#{recipe.version}.tar.xz"
recipe.instructions.install << "cd #{recipe.dirname} && make 'DESTDIR=#{recipe.fake_root_directory}' install && rm '#{recipe.fake_root_directory}/usr/bin/strings'" recipe.options["configure"] = %( \
--disable-multilib \
--with-pic --disable-nls
)
recipe.options["make"] = "tooldir=/usr"
recipe.instructions.install << "cd #{recipe.dirname} && make 'DESTDIR=#{recipe.fake_root_directory}' tooldir=/usr install && rm '#{recipe.fake_root_directory}/usr/bin/strings'"
end end
recipes << Recipe.new(context, "readline", "8.0").tap do |recipe| recipes << Recipe.new(context, "readline", "8.0").tap do |recipe|
@ -287,30 +449,30 @@ selected_recipes = ARGV.map do |name|
end end
if selected_recipes.any? &.is_a?(String) if selected_recipes.any? &.is_a?(String)
puts "At least one of the requested recipes is not known." puts "At least one of the requested recipes is not known."
selected_recipes.select! &.is_a?(String) selected_recipes.select! &.is_a?(String)
pp! selected_recipes pp! selected_recipes
end
# Getting rid of Strings.
selected_recipes = selected_recipes.compact_map do |recipe|
if recipe.is_a? String
nil
else
recipe
end end
end
selected_recipes.each do |recipe| # Getting rid of Strings.
pp recipe selected_recipes = selected_recipes.compact_map do |recipe|
if recipe.is_a? String
nil
else
recipe
end
end
raise "oh no, download failed" unless recipe.download selected_recipes.each do |recipe|
raise "oh no, extraction failed" unless recipe.extract pp recipe
raise "oh no, build failed" unless recipe.build raise "oh no, download failed" unless recipe.download
raise "oh no, packaging failed" unless recipe.package raise "oh no, extraction failed" unless recipe.extract
recipe.clean raise "oh no, build failed" unless recipe.build
end raise "oh no, packaging failed" unless recipe.package
recipe.clean
end