diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c9bf832c..d684aa53 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,16 +41,22 @@ jobs: echo "Commit Hash:" cat llvm-hash.txt - - name: Cache the toolchain and sysroot + - name: Cache the toolchain uses: actions/cache@v2 with: + key: ${{ runner.os }}-lemon-toolchain path: | **/Build/tool-builds **/Toolchain **/mlibc - key: ${{ runner.os }}-lemon-toolchain-${{ hashFiles('llvm-hash.txt') }} - restore-keys: | - ${{ runner.os }}-lemon-toolchain-${{ hashFiles('llvm-hash.txt') }} + + - name: Cache packages + uses: actions/cache@v2 + with: + key: ${{ runner.os }}-lemon-pkgs + path: | + **/Build/pkg-builds + **/Ports - name: Init xbstrap run: | @@ -61,13 +67,12 @@ jobs: - name: Build the toolchain run: | cd Build - xbstrap regenerate lemon-llvm binutils --recursive - xbstrap install-tool --all + xbstrap install-tool -u --all - name: Building system run: | cd Build - xbstrap install lemon-base + xbstrap install -u --recursive lemon-base - name: Building disk image run: | @@ -100,16 +105,22 @@ jobs: echo "Commit Hash:" cat llvm-hash.txt - - name: Cache the toolchain and sysroot + - name: Cache the toolchain uses: actions/cache@v2 with: + key: ${{ runner.os }}-lemon-toolchain path: | **/Build/tool-builds **/Toolchain **/mlibc - key: ${{ runner.os }}-lemon-toolchain-${{ hashFiles('llvm-hash.txt') }} - restore-keys: | - ${{ runner.os }}-lemon-toolchain-${{ hashFiles('llvm-hash.txt') }} + + - name: Cache packages + uses: actions/cache@v2 + with: + key: ${{ runner.os }}-lemon-pkgs + path: | + **/Build/pkg-builds + **/Ports - name: Init xbstrap run: | @@ -120,13 +131,12 @@ jobs: - name: Build the toolchain run: | cd Build - xbstrap regenerate lemon-llvm binutils --recursive - xbstrap install-tool --all + xbstrap install-tool -u --all - name: Building system run: | cd Build - xbstrap install lemon-base nyancat curl busybox binutils lemondoom + xbstrap install -u --recursive lemon-base nyancat curl busybox binutils lemondoom - name: Building disk image run: | diff --git a/Ports/packages.yml b/Ports/packages.yml index 98fe68f2..d32b02c2 100644 --- a/Ports/packages.yml +++ b/Ports/packages.yml @@ -271,5 +271,38 @@ packages: - args: ['ninja', 'install'] environ: DESTDIR: '@THIS_COLLECT_DIR@' - + - name: python + from_source: python + tools_required: + - host-llvm + - host-pkgconfig + pkgs_required: + - mlibc + - libexpat + - libffi + - libressl + - zlib + configure: + - args: + - '@THIS_SOURCE_DIR@/configure' + - '--host=x86_64-lemon' + - '--build=x86_64' + - '--prefix=/system' + - '--enable-shared' + - '--disable-ipv6' + - '--without-ensurepip' + - '--with-sysroot=@SYSROOT_DIR@' + - '--with-system-ffi' + - '--with-system-expat' + environ: + ac_cv_file__dev_ptmx: 'yes' + ac_cv_file__dev_ptc: 'no' + CC: 'clang' + CXX: 'clang++' + build: + - args: ['make', '-j@PARALLELISM@'] + - args: ['make', 'install'] + environ: + DESTDIR: '@THIS_COLLECT_DIR@' + diff --git a/Scripts/docker-bootstrap-site.yml b/Scripts/docker-bootstrap-site.yml index fc0eda0c..c0e52ad0 100644 --- a/Scripts/docker-bootstrap-site.yml +++ b/Scripts/docker-bootstrap-site.yml @@ -1,5 +1,6 @@ container: runtime: docker image: lemontoolchain + allow_containerless: true src_mount: /var/LemonOS build_mount: /var/LemonOS/Build diff --git a/bootstrap.yml b/bootstrap.yml index fd648bc5..524012fc 100644 --- a/bootstrap.yml +++ b/bootstrap.yml @@ -66,6 +66,19 @@ sources: '@BUILD_ROOT@/tools/host-automake/share/automake-1.16/config.sub', '@THIS_SOURCE_DIR@/icu4c/source'] + - name: python + subdir: 'Ports' + git: 'https://github.com/python/cpython' + tag: 'v3.8.2' + version: '3.8.2' + patch-path-strip: 1 + tools_required: + - host-libtool + - host-pkgconfig + regenerate: + - args: ['autoreconf', '-f', '-i'] + - args: ['cp', '@BUILD_ROOT@/tools/host-automake/share/automake-1.16/config.sub', '@THIS_SOURCE_DIR@/'] + tools: - name: host-automake from_source: automake diff --git a/patches/python/0001-Add-LemonOS-specific-changes.patch b/patches/python/0001-Add-LemonOS-specific-changes.patch new file mode 100644 index 00000000..cd9ad9ab --- /dev/null +++ b/patches/python/0001-Add-LemonOS-specific-changes.patch @@ -0,0 +1,65 @@ +From f18dba045f7a53f2e5d8675ab657a8460c6f3b7f Mon Sep 17 00:00:00 2001 +From: JJ Roberts-White +Date: Mon, 31 Jan 2022 12:14:36 +1100 +Subject: [PATCH] Add LemonOS specific changes + +--- + configure.ac | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/configure.ac b/configure.ac +index e57ef7c..5eede17 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -379,6 +379,9 @@ then + *-*-cygwin*) + ac_sys_system=Cygwin + ;; ++ *-*-lemon*) ++ ac_sys_system=Lemon ++ ;; + *-*-vxworks*) + ac_sys_system=VxWorks + ;; +@@ -431,6 +434,9 @@ if test "$cross_compiling" = yes; then + *-*-vxworks*) + _host_cpu=$host_cpu + ;; ++ *-*-lemon*) ++ _host_cpu=$host_cpu ++ ;; + *) + # for now, limit cross builds to known configurations + MACHDEP="unknown" +@@ -2641,6 +2647,9 @@ then + CYGWIN*) + LDSHARED="gcc -shared -Wl,--enable-auto-image-base" + LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";; ++ Lemon*) ++ LDSHARED='$(CC) -shared' ++ LDCXXSHARED='$(CXX) -shared';; + *) LDSHARED="ld";; + esac + fi +@@ -2676,6 +2685,9 @@ then + then CCSHARED="-fPIC" + else CCSHARED="-Kpic -belf" + fi;; ++ Lemon*) ++ CCSHARED="-fPIC" ++ ;; + VxWorks*) + CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic" + esac +@@ -2738,6 +2750,8 @@ then + LINKFORSHARED='-Wl,-E -N 2048K';; + VxWorks*) + LINKFORSHARED='--export-dynamic';; ++ Lemon*) ++ LINKFORSHARED='-export-dynamic';; + esac + fi + AC_MSG_RESULT($LINKFORSHARED) +-- +2.34.1 +