Skip to content

Instantly share code, notes, and snippets.

@ingenieroariel
Created December 12, 2023 16:15
Show Gist options
  • Select an option

  • Save ingenieroariel/429163d20b71abd4be7f8c6ce0bbcd13 to your computer and use it in GitHub Desktop.

Select an option

Save ingenieroariel/429163d20b71abd4be7f8c6ce0bbcd13 to your computer and use it in GitHub Desktop.

Revisions

  1. ingenieroariel created this gist Dec 12, 2023.
    48 changes: 48 additions & 0 deletions superconfigure
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,48 @@
    x@ceon:~/c/superconfigure/gui$ cat freetype-2.13.2/superconfigure
    #!/usr/bin/env bash
    set -e
    shopt -s expand_aliases

    # Check for COSMO directories
    if [ -z ${COSMO+x} ]; then
    echo "Could not find COSMO source directory!";
    exit 1
    fi

    if [ -z ${COSMOS+x} ]; then
    echo "Could not find COSMOS install directory!";
    exit 1
    fi

    alias strip=$STRIP
    alias ar=$AR

    # Handle FreeType source
    if [[ -f sources.tar.gz ]]; then
    # We already downloaded it
    cd freetype*
    make V=0 -s -i clean || true
    cd ..
    else
    # Download the source code
    wget -q https://download.savannah.gnu.org/releases/freetype/freetype-2.13.2.tar.gz -O sources.tar.gz
    tar -xzf sources.tar.gz

    # Apply patches if any
    # patch -p0 -i minimal.diff
    fi

    # Go into the source folder, configure
    cd freetype*
    cp $COSMOS/common.cache ./config.cache
    ./configure --cache-file=config.cache\
    --disable-shared --enable-static\
    --without-pic --prefix=$COSMOS\
    CFLAGS="-Os"

    # Run make and/or make install
    make V=0 -s -j$MAXPROC
    make install V=0 -s -j$MAXPROC

    echo "DONE."