From 8ca8ebad963004504bd273f99eaaef501299e726 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Fri, 17 Jan 2025 03:07:24 +0100 Subject: [PATCH] Build m4, autoconf, automake, libtool and bison from source --- .github/workflows/build.yml | 203 ++++++++++++++++++++++++++++++++---- 1 file changed, 182 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b55b4ee..1155347 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,6 +6,14 @@ env: cmake_version: '3.31.4' + m4_version: '1.4.19' + + autoconf_version: '2.72' + + automake_version: '1.17' + + libtool_version: '2.5.4' + gmp_version: '6.3.0' nasm_version: '2.16.03' @@ -38,6 +46,8 @@ env: flex_version: '2.6.4' + bison_version: '3.8.2' + libtasn1_version: '4.19.0' libidn2_version: '2.3.0' @@ -259,32 +269,11 @@ jobs: shell: bash run: echo "/opt/homebrew/bin" >> $GITHUB_PATH - - name: brew list - shell: bash - run: brew list - - name: Remove installed brew packages if: env.runner == 'macos-11' || env.runner == 'macos-12' || env.runner == 'macos-13' || env.runner == 'macos-14' shell: bash run: brew uninstall $(brew list) - - name: brew update - shell: bash - run: brew update - - - name: brew upgrade - shell: bash - run: brew upgrade - - - name: brew list - shell: bash - run: brew list - - - name: brew install - if: env.runner == 'macos-11' || env.runner == 'macos-12' || env.runner == 'macos-13' || env.runner == 'macos-14' - shell: bash - run: brew install autoconf automake bison libtool gh rustup-init - - name: brew list shell: bash run: brew list @@ -347,6 +336,15 @@ jobs: run: ls -la downloads build + - name: Install github tools + if: env.runner == 'macos-11' || env.runner == 'macos-12' || env.runner == 'macos-13' || env.runner == 'macos-14' + shell: bash + working-directory: build + run: | + git clone https://github.com/cli/cli.git gh-cli + cd gh-cli + make install + - name: Download pkgconf shell: bash working-directory: downloads @@ -381,6 +379,166 @@ jobs: run: which pkg-config + - name: Download bison + shell: bash + working-directory: downloads + run: curl ${{env.curl_options}} https://ftp.gnu.org/gnu/bison/bison-${{env.bison_version}}.tar.gz + + - name: Extract bison + shell: bash + working-directory: build + run: tar -xf ../downloads/bison-${{env.bison_version}}.tar.gz + + - name: Configure bison + shell: bash + working-directory: build/bison-${{env.bison_version}} + run: ./configure --prefix="${{env.prefix_path}}" --disable-static --enable-shared + + - name: Build bison + shell: bash + env: + PKG_CONFIG_EXECUTABLE: ${{env.prefix_path}}/bin/pkgconf + PKG_CONFIG_PATH: ${{env.prefix_path}}/lib/pkgconfig + CFLAGS: -I${{env.prefix_path}}/include + CXXFLAGS: -I${{env.prefix_path}}/include + LDFLAGS: -L${{env.prefix_path}}/lib -Wl,-rpath,${{env.prefix_path}}/lib + working-directory: build/bison-${{env.bison_version}} + run: make -j ${{env.make_jobs}} + + - name: Install bison + shell: bash + working-directory: build/bison-${{env.bison_version}} + run: make install + + + - name: Download m4 + shell: bash + working-directory: downloads + run: curl ${{env.curl_options}} https://ftp.gnu.org/gnu/m4/m4-${{env.m4_version}}.tar.gz + + - name: Extract m4 + shell: bash + working-directory: build + run: tar -xf ../downloads/m4-${{env.m4_version}}.tar.gz + + - name: Configure m4 + shell: bash + working-directory: build/m4-${{env.m4_version}} + run: ./configure --prefix="${{env.prefix_path}}" --disable-static --enable-shared + + - name: Build m4 + shell: bash + env: + PKG_CONFIG_EXECUTABLE: ${{env.prefix_path}}/bin/pkgconf + PKG_CONFIG_PATH: ${{env.prefix_path}}/lib/pkgconfig + CFLAGS: -I${{env.prefix_path}}/include + CXXFLAGS: -I${{env.prefix_path}}/include + LDFLAGS: -L${{env.prefix_path}}/lib -Wl,-rpath,${{env.prefix_path}}/lib + working-directory: build/m4-${{env.m4_version}} + run: make -j ${{env.make_jobs}} + + - name: Install m4 + shell: bash + working-directory: build/m4-${{env.m4_version}} + run: make install + + + - name: Download autoconf + shell: bash + working-directory: downloads + run: curl ${{env.curl_options}} https://ftp.gnu.org/gnu/autoconf/autoconf-${{env.autoconf_version}}.tar.gz + + - name: Extract autoconf + shell: bash + working-directory: build + run: tar -xf ../downloads/autoconf-${{env.autoconf_version}}.tar.gz + + - name: Configure autoconf + shell: bash + working-directory: build/autoconf-${{env.autoconf_version}} + run: ./configure --prefix="${{env.prefix_path}}" --disable-static --enable-shared + + - name: Build autoconf + shell: bash + env: + PKG_CONFIG_EXECUTABLE: ${{env.prefix_path}}/bin/pkgconf + PKG_CONFIG_PATH: ${{env.prefix_path}}/lib/pkgconfig + CFLAGS: -I${{env.prefix_path}}/include + CXXFLAGS: -I${{env.prefix_path}}/include + LDFLAGS: -L${{env.prefix_path}}/lib -Wl,-rpath,${{env.prefix_path}}/lib + working-directory: build/autoconf-${{env.autoconf_version}} + run: make -j ${{env.make_jobs}} + + - name: Install autoconf + shell: bash + working-directory: build/autoconf-${{env.autoconf_version}} + run: make install + + + - name: Download automake + shell: bash + working-directory: downloads + run: curl ${{env.curl_options}} https://ftp.gnu.org/gnu/automake/automake-${{env.automake_version}}.tar.gz + + - name: Extract automake + shell: bash + working-directory: build + run: tar -xf ../downloads/automake-${{env.automake_version}}.tar.gz + + - name: Configure automake + shell: bash + working-directory: build/automake-${{env.automake_version}} + run: ./configure --prefix="${{env.prefix_path}}" --disable-static --enable-shared + + - name: Build automake + shell: bash + env: + PKG_CONFIG_EXECUTABLE: ${{env.prefix_path}}/bin/pkgconf + PKG_CONFIG_PATH: ${{env.prefix_path}}/lib/pkgconfig + CFLAGS: -I${{env.prefix_path}}/include + CXXFLAGS: -I${{env.prefix_path}}/include + LDFLAGS: -L${{env.prefix_path}}/lib -Wl,-rpath,${{env.prefix_path}}/lib + working-directory: build/automake-${{env.automake_version}} + run: make -j ${{env.make_jobs}} + + - name: Install automake + shell: bash + working-directory: build/automake-${{env.automake_version}} + run: make install + + + - name: Download libtool + shell: bash + working-directory: downloads + run: curl ${{env.curl_options}} https://ftp.gnu.org/gnu/libtool/libtool-${{env.libtool_version}}.tar.gz + + - name: Extract libtool + shell: bash + working-directory: build + run: tar -xf ../downloads/libtool-${{env.libtool_version}}.tar.gz + + - name: Configure libtool + shell: bash + working-directory: build/libtool-${{env.libtool_version}} + run: ./configure --prefix="${{env.prefix_path}}" --disable-static --enable-shared + + - name: Build libtool + shell: bash + env: + PKG_CONFIG_EXECUTABLE: ${{env.prefix_path}}/bin/pkgconf + PKG_CONFIG_PATH: ${{env.prefix_path}}/lib/pkgconfig + CFLAGS: -I${{env.prefix_path}}/include + CXXFLAGS: -I${{env.prefix_path}}/include + LDFLAGS: -L${{env.prefix_path}}/lib -Wl,-rpath,${{env.prefix_path}}/lib + working-directory: build/libtool-${{env.libtool_version}} + run: make -j ${{env.make_jobs}} + + - name: Install libtool + shell: bash + working-directory: build/libtool-${{env.libtool_version}} + run: make install + + - name: Download cmake shell: bash working-directory: downloads @@ -2884,6 +3042,9 @@ jobs: working-directory: build/gst-libav-${{env.gstreamer_version}}/build run: ninja install + - name: Install rustup + shell: bash + run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh - name: Install cargo-c if: env.runner == 'macos-11' || env.runner == 'macos-12' || env.runner == 'macos-13' || env.runner == 'macos-14'