Skip to content

Commit

Permalink
Merge pull request #36 from Dennisbonke/master
Browse files Browse the repository at this point in the history
Add various ports
  • Loading branch information
avdgrinten authored Jun 6, 2020
2 parents c9b3624 + ffc1f79 commit 20a7109
Show file tree
Hide file tree
Showing 12 changed files with 348 additions and 156 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Now proceed to the Building paragraph.

1. Certain programs are required to build managarm;
here we list the corresponding Debian packages:
`build-essential`, `pkg-config`, `autopoint`, `bison`, `curl`, `flex`, `gettext`, `git`, `gperf`, `help2man`, `m4`, `mercurial`, `ninja-build`, `python3-mako`, `python3-protobuf`, `python3-yaml`, `texinfo`, `unzip`, `wget`, `xsltproc`, `xz-utils`, `libexpat1-dev`, `rsync`, `python3-pip`, `python3-libxml2`, `netpbm`, `itstool`, `zlib1g-dev`, `libgmp-dev`, `libmpfr-dev`, `libmpc-dev`.
`build-essential`, `pkg-config`, `autopoint`, `bison`, `curl`, `flex`, `gettext`, `git`, `gperf`, `help2man`, `m4`, `mercurial`, `ninja-build`, `python3-mako`, `python3-protobuf`, `python3-yaml`, `texinfo`, `unzip`, `wget`, `xsltproc`, `xz-utils`, `libexpat1-dev`, `rsync`, `python3-pip`, `python3-libxml2`, `netpbm`, `itstool`, `zlib1g-dev`, `libgmp-dev`, `libmpfr-dev`, `libmpc-dev`, `subversion`.
1. `meson` is required. There is a Debian package, but as of Debian Stretch, a newer version is required.
Install it from pip: `pip3 install meson`.
1. The [xbstrap](https://github.com/managarm/xbstrap) tool is required to build managarm. Install it from pip: `pip3 install xbstrap`.
Expand Down
35 changes: 35 additions & 0 deletions bootstrap.d/app-shells.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
packages:
- name: bash
source:
subdir: 'ports'
git: 'https://git.savannah.gnu.org/r/bash.git'
tag: 'bash-4.4'
tools_required:
- host-autoconf-v2.69
- host-automake-v1.15
regenerate:
# While we do not need to regenerate the configure script, we need to touch it
# after patching config.sub so that make does not try to regenerate it.
- args: ['autoconf']
tools_required:
- system-gcc
pkgs_required:
- readline
configure:
- args:
- '@THIS_SOURCE_DIR@/configure'
- '--host=x86_64-managarm'
- '--prefix=/usr'
- '--without-bash-malloc'
- '--disable-nls'
- '--with-installed-readline'
build:
- args: ['make', '-j@PARALLELISM@']
- args: ['make', 'DESTDIR=@THIS_COLLECT_DIR@', 'install']
quiet: true
- args: ['mkdir', '-p', '@THIS_COLLECT_DIR@/root/']
- args: ['mkdir', '-p', '@THIS_COLLECT_DIR@/etc/']
- args: ['cp', '@SOURCE_ROOT@/extrafiles/.bashrc', '@THIS_COLLECT_DIR@/root']
- args: ['cp', '@SOURCE_ROOT@/extrafiles/profile', '@THIS_COLLECT_DIR@/etc']
- args: ['cp', '@SOURCE_ROOT@/extrafiles/bash.bashrc', '@THIS_COLLECT_DIR@/etc']
- args: ['ln', '-sf', 'bash', '@THIS_COLLECT_DIR@/usr/bin/sh']
113 changes: 113 additions & 0 deletions bootstrap.d/dev-lang.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
sources:
- name: 'python'
subdir: 'ports'
git: 'https://github.com/python/cpython.git'
tag: 'v3.8.2'
tools_required:
- host-autoconf-v2.69
- host-automake-v1.15
- host-libtool
- host-pkg-config
regenerate:
- args: ['autoreconf', '-f', '-i']

tools:
- name: host-python
from_source: python
configure:
- args:
- '@THIS_SOURCE_DIR@/configure'
- '--prefix=@PREFIX@'
compile:
- args: ['make', '-j@PARALLELISM@']
install:
- args: ['make', 'install']

packages:
- name: perl-cross
source:
subdir: 'ports'
git: 'https://github.com/arsv/perl-cross.git'
tag: '1.3.3'
sources_required:
- perl
regenerate:
- args: ['cp', '-r', '@THIS_SOURCE_DIR@/.', '@THIS_SOURCE_DIR@/../perl']
configure: []
build: []

- name: perl
default: false
source:
subdir: ports
git: 'https://github.com/Perl/perl5.git'
tag: 'v5.30.2'
tools_required:
- system-gcc
pkgs_required:
- zlib
- bzip2
- perl-cross
configure:
- args: ['cp', '-r', '@THIS_SOURCE_DIR@/.', '@THIS_BUILD_DIR@']
- args:
- './configure'
- '--mode=cross'
- '--target=x86_64-managarm'
- '--targetarch=x86_64-managarm'
- '--target-tools-prefix=x86_64-managarm-'
- '--prefix=/usr'
- '-Dusethreads'
- '-Dvendorprefix=/usr'
- '-Dman1dir=/usr/share/man/man1'
- '-Dman3dir=/usr/share/man/man3'
- '-Dpager="/usr/bin/less -isR"'
- '--sysroot=@SYSROOT_DIR@'
environ:
BUILD_ZLIB: 'False'
BUILD_BZIP2: '0'
build:
- args: ['make', '-j@PARALLELISM@']
environ:
BUILD_ZLIB: 'False'
BUILD_BZIP2: '0'
- args: ['make', 'install']
environ:
DESTDIR: '@THIS_COLLECT_DIR@'
BUILD_ZLIB: 'False'
BUILD_BZIP2: '0'

- name: python
from_source: python
tools_required:
- host-pkg-config
- host-python
- system-gcc
pkgs_required:
- zlib
- libexpat
- libffi
- ncurses
- readline
configure:
- args:
- '@THIS_SOURCE_DIR@/configure'
- '--host=x86_64-managarm'
- '--build=x86_64-linux-gnu'
- '--prefix=/usr'
- '--enable-shared'
- '--with-sysroot=@SYSROOT_DIR@' # Set libtool's lt_sysroot.
- '--with-system-ffi'
- '--with-system-expat'
- '--disable-ipv6'
- '--without-ensurepip'
environ:
CONFIG_SITE: '@SOURCE_ROOT@/scripts/python-config-site'
PKG_CONFIG_SYSROOT_DIR: '@BUILD_ROOT@/system-root'
PKG_CONFIG_LIBDIR: '@BUILD_ROOT@/system-root/usr/lib/pkgconfig:@BUILD_ROOT@/system-root/usr/share/pkgconfig'
build:
- args: ['make', '-j@PARALLELISM@']
- args: ['make', 'install']
environ:
DESTDIR: '@THIS_COLLECT_DIR@'
quiet: true
74 changes: 73 additions & 1 deletion bootstrap.d/dev-libs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -230,4 +230,76 @@ packages:
- args: ['make', '-j@PARALLELISM@']
- args: ['make', 'install']
environ:
DESTDIR: '@THIS_COLLECT_DIR@'
DESTDIR: '@THIS_COLLECT_DIR@'

- name: libgpg-error
default: false
source:
subdir: 'ports'
git: 'https://github.com/gpg/libgpg-error.git'
tag: 'libgpg-error-1.37'
tools_required:
- host-autoconf-v2.69
- host-automake-v1.15
- host-libtool
regenerate:
- args: ['./autogen.sh']
- args: ['cp',
'@BUILD_ROOT@/tools/host-automake-v1.15/share/automake-1.15/config.sub',
'@THIS_SOURCE_DIR@/build-aux/']
tools_required:
- system-gcc
configure:
# libgpg-error does not know about managarm, teach it
- args: ['cp', '-v', '@THIS_SOURCE_DIR@/src/syscfg/lock-obj-pub.x86_64-unknown-linux-gnu.h',
'@THIS_SOURCE_DIR@/src/syscfg/lock-obj-pub.managarm.h']
- args:
- '@THIS_SOURCE_DIR@/configure'
- '--host=x86_64-managarm'
- '--prefix=/usr'
- '--disable-nls'
- '--disable-doc'
build:
- args: ['make', '-j@PARALLELISM@']
- args: ['make', 'install']
environ:
DESTDIR: '@THIS_COLLECT_DIR@'
quiet: true

- name: libgcrypt
default: false
source:
subdir: 'ports'
git: 'https://github.com/gpg/libgcrypt.git'
tag: 'libgcrypt-1.8.5'
tools_required:
- host-autoconf-v2.69
- host-automake-v1.15
- host-libtool
regenerate:
- args: ['./autogen.sh']
- args: ['cp',
'@BUILD_ROOT@/tools/host-automake-v1.15/share/automake-1.15/config.sub',
'@THIS_SOURCE_DIR@/build-aux/']
tools_required:
- system-gcc
pkgs_required:
- libgpg-error
configure:
- args:
- '@THIS_SOURCE_DIR@/configure'
- '--host=x86_64-managarm'
- '--prefix=/usr'
- '--disable-nls'
- '--disable-doc'
- '--disable-dev-random'
- '--with-libgpg-error-prefix=@SYSROOT_DIR@/usr'
- '--disable-asm'
environ:
LIBS: '-lgpg-error'
build:
- args: ['make', '-j@PARALLELISM@']
- args: ['make', 'install']
environ:
DESTDIR: '@THIS_COLLECT_DIR@'
quiet: true
53 changes: 0 additions & 53 deletions bootstrap.d/dev-perl.yml

This file was deleted.

16 changes: 15 additions & 1 deletion bootstrap.d/net-misc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,18 @@ packages:
- args: ['make', '-j@PARALLELISM@']
- args: ['make', 'install']
environ:
DESTDIR: '@THIS_COLLECT_DIR@'
DESTDIR: '@THIS_COLLECT_DIR@'

- name: iana-etc
source:
subdir: ports
url: 'http://anduin.linuxfromscratch.org/LFS/iana-etc-2.30.tar.bz2'
format: 'tar.bz2'
extract_path: 'iana-etc-2.30'
tools_required:
- system-gcc
configure:
- args: ['cp', '-r', '@THIS_SOURCE_DIR@/.', '@THIS_BUILD_DIR@']
build:
- args: ['make', '-j@PARALLELISM@']
- args: ['make', 'DESTDIR=@THIS_COLLECT_DIR@', 'install']
59 changes: 59 additions & 0 deletions bootstrap.d/sys-devel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,65 @@ packages:
- '@THIS_SOURCE_DIR@/configure'
- '--host=x86_64-managarm'
- '--prefix=/usr'
build:
- args: ['make', '-j@PARALLELISM@']
- args: ['make', 'install']
environ:
DESTDIR: '@THIS_COLLECT_DIR@'

- name: bc
default: false
source:
subdir: 'ports'
git: 'https://github.com/gavinhoward/bc.git'
tag: '2.7.2'
tools_required:
- system-gcc
configure:
- args: ['cp', '-r', '@THIS_SOURCE_DIR@/.', '@THIS_BUILD_DIR@']
- args: ['./configure.sh', '-G', '-O3']
environ:
PREFIX: '/usr'
CC: 'x86_64-managarm-gcc'
CFLAGS: '-std=c99'
GEN_HOST: '0'
build:
- args: ['make', '-j@PARALLELISM@']
- args: ['make', 'install']
environ:
DESTDIR: '@THIS_COLLECT_DIR@'

- name: m4
default: false
source:
subdir: 'ports'
git: 'https://git.savannah.gnu.org/git/m4.git'
tag: 'v1.4.18'
tools_required:
- host-autoconf-v2.69
- host-automake-v1.15
- host-libtool
regenerate:
- args: |
if ! [ -d gnulib ]; then
git clone git://git.sv.gnu.org/gnulib.git gnulib
else
git -C gnulib pull --unshallow || true
fi
- args: ['./bootstrap']
- args: ['cp',
'@BUILD_ROOT@/tools/host-automake-v1.15/share/automake-1.15/config.sub',
'@THIS_SOURCE_DIR@/build-aux/']
tools_required:
- system-gcc
configure:
- args:
- '@THIS_SOURCE_DIR@/configure'
- '--host=x86_64-managarm'
- '--prefix=/usr'
- args: 'sed -i s/-Werror//g @THIS_BUILD_DIR@/src/Makefile'
# This sed disables the building of the documentation
- args: 'sed -i s/"SUBDIRS = . examples lib src doc checks tests"/"SUBDIRS = . examples lib src checks tests"/ @THIS_BUILD_DIR@/Makefile'
build:
- args: ['make', '-j@PARALLELISM@']
- args: ['make', 'install']
Expand Down
Loading

0 comments on commit 20a7109

Please sign in to comment.