Skip to content

Commit

Permalink
Build m4, autoconf, automake, libtool and bison from source
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaski committed Jan 17, 2025
1 parent bc216b5 commit 8ca8eba
Showing 1 changed file with 182 additions and 21 deletions.
203 changes: 182 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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'
Expand Down

0 comments on commit 8ca8eba

Please sign in to comment.