From 1b7e2948fc4c5db7bd3648f4b552d0ef71d2f88d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole-Andr=C3=A9=20Rodlie?= Date: Sun, 29 Oct 2023 18:46:24 +0100 Subject: [PATCH] More build stuff --- src/scripts/build_vfxplatform_friction.sh | 2 +- src/scripts/build_vfxplatform_package_tar.sh | 2 - src/scripts/build_vfxplatform_sdk.sh | 34 --------------- src/scripts/build_vfxplatform_skia.sh | 46 +++++++++++++++++++- 4 files changed, 46 insertions(+), 38 deletions(-) diff --git a/src/scripts/build_vfxplatform_friction.sh b/src/scripts/build_vfxplatform_friction.sh index 2f32e3dc0..1f816f0bb 100644 --- a/src/scripts/build_vfxplatform_friction.sh +++ b/src/scripts/build_vfxplatform_friction.sh @@ -106,5 +106,5 @@ cmake --build . FRICTION_INSTALL_DIR=friction-${VERSION} mkdir -p ${BUILD}/${FRICTION_INSTALL_DIR}/opt/friction/{bin,lib,share} || true -mkdir -p ${BUILD}/${FRICTION_INSTALL_DIR}/opt/friction/plugins/{audio,generic,imageformats,platforminputcontexts,platforms,xcbglintegrations} || true +mkdir -p ${BUILD}/${FRICTION_INSTALL_DIR}/opt/friction/plugins/{audio,generic,platforminputcontexts,platforms,xcbglintegrations} || true DESTDIR=${BUILD}/${FRICTION_INSTALL_DIR} cmake --build . --target install diff --git a/src/scripts/build_vfxplatform_package_tar.sh b/src/scripts/build_vfxplatform_package_tar.sh index 6a315d33c..1c28f514f 100644 --- a/src/scripts/build_vfxplatform_package_tar.sh +++ b/src/scripts/build_vfxplatform_package_tar.sh @@ -67,7 +67,6 @@ cp ${SDK}/plugins/generic/libqevdevmouseplugin.so ${PLUG_DIR}/generic/ cp ${SDK}/plugins/generic/libqevdevtabletplugin.so ${PLUG_DIR}/generic/ cp ${SDK}/plugins/generic/libqevdevtouchplugin.so ${PLUG_DIR}/generic/ cp ${SDK}/plugins/generic/libqtuiotouchplugin.so ${PLUG_DIR}/generic/ -cp ${SDK}/plugins/imageformats/libqsvg.so ${PLUG_DIR}/imageformats/ cp ${SDK}/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so ${PLUG_DIR}/platforminputcontexts/ cp ${SDK}/plugins/platforms/libqoffscreen.so ${PLUG_DIR}/platforms/ cp ${SDK}/plugins/platforms/libqxcb.so ${PLUG_DIR}/platforms/ @@ -166,7 +165,6 @@ done PLUGS=" audio generic -imageformats platforminputcontexts platforms xcbglintegrations diff --git a/src/scripts/build_vfxplatform_sdk.sh b/src/scripts/build_vfxplatform_sdk.sh index 66b12b302..48ec58d02 100644 --- a/src/scripts/build_vfxplatform_sdk.sh +++ b/src/scripts/build_vfxplatform_sdk.sh @@ -32,19 +32,14 @@ JOBS=${JOBS:-4} XKBCOMMON_V=0.7.1 QT_V=5.12.12 QSCINTILLA_V=2.14.1 -GPERF_V=4df0b85 PELF_V=0.17.0 CMAKE_V=3.26.3 -UNWIND_V=1.4.0 NINJA_BIN=${SDK}/bin/ninja CMAKE_BIN=${SDK}/bin/cmake PELF_BIN=${SDK}/bin/patchelf QMAKE_BIN=${SDK}/bin/qmake -GPERF_DIR=${SDK}/gperftools -GPERF_LIB=${GPERF_DIR}/.libs/libtcmalloc.a - export PATH="${SDK}/bin:${PATH}" export PKG_CONFIG_PATH="${SDK}/lib/pkgconfig" export LD_LIBRARY_PATH="${SDK}/lib:${LD_LIBRARY_PATH}" @@ -91,35 +86,6 @@ if [ ! -f "${CMAKE_BIN}" ]; then make install fi # cmake -# libunwind -if [ ! -f "${SDK}/lib/pkgconfig/libunwind.pc" ]; then - cd ${SRC} - UNWIND_SRC=libunwind-${UNWIND_V} - rm -rf ${UNWIND_SRC} || true - tar xf ${DIST}/${UNWIND_SRC}.tar.gz - cd ${UNWIND_SRC} - ./configure ${DEFAULT_CONFIGURE} --disable-minidebuginfo --disable-tests - make -j${JOBS} - make install -fi # libunwind - -# gperftools -if [ ! -f "${GPERF_LIB}" ]; then - cd ${SRC} - GPERF_SRC=gperftools-${GPERF_V} - rm -rf ${GPERF_SRC} || true - rm -rf ${GPERF_DIR} || true - tar xf ${DIST}/${GPERF_SRC}.tar.xz - mv ${GPERF_SRC} ${GPERF_DIR} - cd ${GPERF_DIR} - ./autogen.sh - CFLAGS="${DEFAULT_CFLAGS}" \ - CXXFLAGS="${DEFAULT_CFLAGS}" \ - LDFLAGS="${DEFAULT_LDFLAGS} -lunwind" \ - ./configure ${STATIC_CONFIGURE} --enable-libunwind - make -j${JOBS} -fi # gperftools - # libxkbcommon if [ ! -f "${SDK}/lib/pkgconfig/xkbcommon.pc" ]; then cd ${SRC} diff --git a/src/scripts/build_vfxplatform_skia.sh b/src/scripts/build_vfxplatform_skia.sh index f3bb5cfba..5a037fe26 100644 --- a/src/scripts/build_vfxplatform_skia.sh +++ b/src/scripts/build_vfxplatform_skia.sh @@ -31,13 +31,27 @@ JOBS=${JOBS:-4} NINJA_V=1.11.1 GN_V=82d673ac +UNWIND_V=1.4.0 +GPERF_V=4df0b85 SKIA_V=4fcb5c225a NINJA_BIN=${SDK}/bin/ninja GN_BIN=${SDK}/bin/gn + +GPERF_DIR=${SDK}/gperftools +GPERF_LIB=${GPERF_DIR}/.libs/libtcmalloc.a + SKIA_DIR=${SDK}/skia SKIA_LIB=${SKIA_DIR}/out/build/libskia.a +STATIC_CFLAGS="-fPIC" +DEFAULT_CFLAGS="-I${SDK}/include" +DEFAULT_LDFLAGS="-L${SDK}/lib" +COMMON_CONFIGURE="--prefix=${SDK}" +SHARED_CONFIGURE="${COMMON_CONFIGURE} --enable-shared --disable-static" +STATIC_CONFIGURE="${COMMON_CONFIGURE} --disable-shared --enable-static" +DEFAULT_CONFIGURE="${SHARED_CONFIGURE}" + export PATH="${SDK}/bin:${PATH}" export PKG_CONFIG_PATH="${SDK}/lib/pkgconfig" export LD_LIBRARY_PATH="${SDK}/lib:${LD_LIBRARY_PATH}" @@ -88,4 +102,34 @@ if [ ! -f "${SKIA_LIB}" ]; then ${NINJA_BIN} -C out/build -j${JOBS} skia fi # skia -echo "SKIA DONE" +# libunwind +if [ ! -f "${SDK}/lib/pkgconfig/libunwind.pc" ]; then + cd ${SRC} + UNWIND_SRC=libunwind-${UNWIND_V} + rm -rf ${UNWIND_SRC} || true + tar xf ${DIST}/${UNWIND_SRC}.tar.gz + cd ${UNWIND_SRC} + CC=clang CXX=clang++ ./configure ${DEFAULT_CONFIGURE} --disable-minidebuginfo --disable-tests + make -j${JOBS} + make install +fi # libunwind + +# gperftools +if [ ! -f "${GPERF_LIB}" ]; then + cd ${SRC} + GPERF_SRC=gperftools-${GPERF_V} + rm -rf ${GPERF_SRC} || true + rm -rf ${GPERF_DIR} || true + tar xf ${DIST}/${GPERF_SRC}.tar.xz + mv ${GPERF_SRC} ${GPERF_DIR} + cd ${GPERF_DIR} + ./autogen.sh + CC=clang CXX=clang++ \ + CFLAGS="${DEFAULT_CFLAGS}" \ + CXXFLAGS="${DEFAULT_CFLAGS}" \ + LDFLAGS="${DEFAULT_LDFLAGS} -lunwind" \ + ./configure ${STATIC_CONFIGURE} --enable-libunwind + make -j${JOBS} +fi # gperftools + +echo "SDK PART 1 DONE"