Browse Source

Continue linux build scripts, WIP

Signed-off-by: falkTX <falktx@falktx.com>
tags/v2.1-rc1
falkTX 6 years ago
parent
commit
41c73f2e3c
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
3 changed files with 87 additions and 107 deletions
  1. +5
    -5
      data/linux/build-all.sh
  2. +62
    -0
      data/linux/build-deps.sh
  3. +20
    -102
      data/linux/build-pyqt.sh

+ 5
- 5
data/linux/build-all.sh View File

@@ -46,12 +46,12 @@ if [ -d ${TARGETDIR}/chroot64 ]; then
fi

if [ -d ${TARGETDIR}/chroot32 ]; then
sudo mv ${TARGETDIR}/chroot32 ${TARGETDIR}/chroot32-deleteme
sudo mv ${TARGETDIR}/chroot32 ${TARGETDIR}/chroot32-deleteme2
sudo rm -rf ${TARGETDIR}/chroot32-deleteme || true
fi

if [ -d ${TARGETDIR}/chroot64 ]; then
sudo mv ${TARGETDIR}/chroot64 ${TARGETDIR}/chroot64-deleteme
sudo mv ${TARGETDIR}/chroot64 ${TARGETDIR}/chroot64-deleteme2
sudo rm -rf ${TARGETDIR}/chroot64-deleteme || true
fi

@@ -471,9 +471,9 @@ EOF
# ---------------------------------------------------------------------------------------------------------------------
# create chroots

if [ ! -d ${TARGETDIR}/chroot32 ]; then
sudo debootstrap --no-check-gpg --arch=i386 lucid ${TARGETDIR}/chroot32 http://old-releases.ubuntu.com/ubuntu/
fi
# if [ ! -d ${TARGETDIR}/chroot32 ]; then
# sudo debootstrap --no-check-gpg --arch=i386 lucid ${TARGETDIR}/chroot32 http://old-releases.ubuntu.com/ubuntu/
# fi

if [ ! -d ${TARGETDIR}/chroot64 ]; then
sudo debootstrap --no-check-gpg --arch=amd64 lucid ${TARGETDIR}/chroot64 http://old-releases.ubuntu.com/ubuntu/


+ 62
- 0
data/linux/build-deps.sh View File

@@ -33,6 +33,8 @@ rm -rf libogg-*
rm -rf libsndfile-*
rm -rf libvorbis-*
rm -rf pkg-config-*
rm -rf qtbase-*
rm -rf qtsvg-*
rm -rf zlib-*

}
@@ -101,6 +103,66 @@ if [ x"${ARCH}" = x"32" ] && [ x"${TARGET}" != x"32" ]; then
return
fi

# ---------------------------------------------------------------------------------------------------------------------
# qt

if [ ! -d qtbase-opensource-src-${QT5_VERSION} ]; then
aria2c http://download.qt.io/archive/qt/${QT5_MVERSION}/${QT5_VERSION}/submodules/qtbase-opensource-src-${QT5_VERSION}.tar.xz
tar xf qtbase-opensource-src-${QT5_VERSION}.tar.xz
fi

if [ ! -f qtbase-opensource-src-${QT5_VERSION}/build-done ]; then
cd qtbase-opensource-src-${QT5_VERSION}
if [ ! -f configured ]; then
./configure -release -strip -silent \
-sse2 \
-no-sse3 -no-ssse3 -no-sse4.1 -no-sse4.2 \
-no-avx -no-avx2 -no-avx512 \
-prefix ${PREFIX} \
-opensource -confirm-license \
-optimize-size -optimized-qmake \
-qt-freetype \
-qt-harfbuzz \
-qt-libjpeg \
-qt-libpng \
-qt-pcre \
-qt-sqlite \
-qt-xcb \
-qt-zlib \
-opengl desktop \
-no-cups \
-no-gtk \
-no-icu \
-no-openssl \
-make libs \
-make tools \
-nomake examples \
-nomake tests
touch configured
fi
make ${MAKE_ARGS}
make install
touch build-done
cd ..
fi

# ---------------------------------------------------------------------------------------------------------------------
# qt5-svg

if [ ! -d qtsvg-opensource-src-${QT5_VERSION} ]; then
aria2c http://download.qt.io/archive/qt/${QT5_MVERSION}/${QT5_VERSION}/submodules/qtsvg-opensource-src-${QT5_VERSION}.tar.xz
tar xf qtsvg-opensource-src-${QT5_VERSION}.tar.xz
fi

if [ ! -f qtsvg-opensource-src-${QT5_VERSION}/build-done ]; then
cd qtsvg-opensource-src-${QT5_VERSION}
qmake
make ${MAKE_ARGS}
make install
touch build-done
cd ..
fi

# ---------------------------------------------------------------------------------------------------------------------
# zlib



+ 20
- 102
data/linux/build-pyqt.sh View File

@@ -28,8 +28,6 @@ rm -rf Python-*
rm -rf PyQt-*
rm -rf PyQt5_*
rm -rf pyliblo-*
rm -rf qtbase-*
rm -rf qtsvg-*
rm -rf sip-*

}
@@ -47,17 +45,14 @@ export PREFIX=${TARGETDIR}/carla${ARCH}
export PATH=${PREFIX}/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
export PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig

# ---------------------------------------------------------------------------------------------------------------------
# with visibility

export CFLAGS="-O3 -mtune=generic -msse -msse2 -mfpmath=sse"
export CFLAGS="${CFLAGS} -fPIC -DPIC -DNDEBUG -I${PREFIX}/include -m${ARCH}"
export CFLAGS="-O3 -mtune=generic -msse -msse2 -mfpmath=sse -fPIC -DPIC -DNDEBUG -m${ARCH}"
export CXXFLAGS="${CFLAGS}"

export LDFLAGS="-L${PREFIX}/lib -m${ARCH} -Wl,-O1"
export LDFLAGS="-m${ARCH} -Wl,-O1"

# TODO build libffi statically

cleanup

# ---------------------------------------------------------------------------------------------------------------------
# python

@@ -75,99 +70,6 @@ if [ ! -f Python-${PYTHON_VERSION}/build-done ]; then
cd ..
fi

# ---------------------------------------------------------------------------------------------------------------------
# cxfreeze

if [ ! -d cx_Freeze-${CXFREEZE_VERSION} ]; then
aria2c https://github.com/anthony-tuininga/cx_Freeze/archive/${CXFREEZE_VERSION}.tar.gz
tar -xf cx_Freeze-${CXFREEZE_VERSION}.tar.gz
fi

if [ ! -f cx_Freeze-${CXFREEZE_VERSION}/build-done ]; then
cd cx_Freeze-${CXFREEZE_VERSION}
python3 setup.py build
python3 setup.py install --prefix=${PREFIX}
touch build-done
cd ..
fi

# ---------------------------------------------------------------------------------------------------------------------
# without visibility

export CFLAGS="${CFLAGS} -fvisibility=hidden -fdata-sections -ffunction-sections"
export CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden"

export LDFLAGS="${LDFLAGS} -fdata-sections -ffunction-sections -Wl,--gc-sections -Wl,--as-needed -Wl,--strip-all -Wl,--no-undefined"

# ---------------------------------------------------------------------------------------------------------------------
# qt

if [ ! -d qtbase-opensource-src-${QT5_VERSION} ]; then
aria2c http://download.qt.io/archive/qt/${QT5_MVERSION}/${QT5_VERSION}/submodules/qtbase-opensource-src-${QT5_VERSION}.tar.xz
tar xf qtbase-opensource-src-${QT5_VERSION}.tar.xz
fi

if [ ! -f qtbase-opensource-src-${QT5_VERSION}/build-done ]; then
cd qtbase-opensource-src-${QT5_VERSION}
if [ ! -f configured ]; then
./configure -release -strip -silent \
-sse2 \
-no-sse3 -no-ssse3 -no-sse4.1 -no-sse4.2 \
-no-avx -no-avx2 -no-avx512 \
-prefix ${PREFIX} \
-opensource -confirm-license \
-optimize-size -optimized-qmake \
-qt-freetype \
-qt-harfbuzz \
-qt-libjpeg \
-qt-libpng \
-qt-pcre \
-qt-sqlite \
-qt-xcb \
-qt-zlib \
-opengl desktop \
-no-cups \
-no-gtk \
-no-icu \
-no-openssl \
-make libs \
-make tools \
-nomake examples \
-nomake tests
touch configured
fi
make ${MAKE_ARGS}
make install
touch build-done
cd ..
fi

# ---------------------------------------------------------------------------------------------------------------------
# qt5-svg

if [ ! -d qtsvg-opensource-src-${QT5_VERSION} ]; then
aria2c http://download.qt.io/archive/qt/${QT5_MVERSION}/${QT5_VERSION}/submodules/qtsvg-opensource-src-${QT5_VERSION}.tar.xz
tar xf qtsvg-opensource-src-${QT5_VERSION}.tar.xz
fi

if [ ! -f qtsvg-opensource-src-${QT5_VERSION}/build-done ]; then
cd qtsvg-opensource-src-${QT5_VERSION}
qmake
make ${MAKE_ARGS}
make install
touch build-done
cd ..
fi

# ---------------------------------------------------------------------------------------------------------------------
# with visibility

export CFLAGS="-O3 -mtune=generic -msse -msse2 -mfpmath=sse"
export CFLAGS="${CFLAGS} -fPIC -DPIC -DNDEBUG -I${PREFIX}/include -m${ARCH}"
export CXXFLAGS="${CFLAGS}"

export LDFLAGS="-L${PREFIX}/lib -m${ARCH} -Wl,-O1"

# ---------------------------------------------------------------------------------------------------------------------
# sip

@@ -225,6 +127,22 @@ fi

}

# ---------------------------------------------------------------------------------------------------------------------
# cxfreeze

if [ ! -d cx_Freeze-${CXFREEZE_VERSION} ]; then
aria2c https://github.com/anthony-tuininga/cx_Freeze/archive/${CXFREEZE_VERSION}.tar.gz
tar -xf cx_Freeze-${CXFREEZE_VERSION}.tar.gz
fi

if [ ! -f cx_Freeze-${CXFREEZE_VERSION}/build-done ]; then
cd cx_Freeze-${CXFREEZE_VERSION}
python3 setup.py build
python3 setup.py install --prefix=${PREFIX}
touch build-done
cd ..
fi

# ---------------------------------------------------------------------------------------------------------------------
# build base libs



Loading…
Cancel
Save