]> granicus.if.org Git - graphviz/commitdiff
ci/build.sh: add support for static builds using configure options
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Mon, 30 Aug 2021 13:48:10 +0000 (15:48 +0200)
committerMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Wed, 8 Sep 2021 19:16:24 +0000 (21:16 +0200)
ci/build.sh

index d5b41d373e1824835994001555afaa12d68cae55..990a3b0998b47de040faa7289617f9d7765472ed 100755 (executable)
@@ -51,6 +51,16 @@ if [ "${build_system}" = "cmake" ]; then
         echo "Error: OSTYPE=${OSTYPE} is unknown" >&2
         exit 1
     fi
+elif [[ "${CONFIGURE_OPTIONS:-}" =~ "--enable-static" ]]; then
+    GV_VERSION=$( cat GRAPHVIZ_VERSION )
+    tar xfz graphviz-${GV_VERSION}.tar.gz
+    pushd graphviz-${GV_VERSION}
+    ./configure $CONFIGURE_OPTIONS --prefix=$( pwd )/build | tee >(../ci/extract-configure-log.sh >../${META_DATA_DIR}/configure.log)
+    make
+    make install
+    popd
+    tar cf - -C graphviz-${GV_VERSION}/build . | xz -9 -c - > graphviz-${GV_VERSION}-${ARCH}.tar.xz
+    mv graphviz-${GV_VERSION}-${ARCH}.tar.xz ${DIR}/os/${ARCH}/
 else
     GV_VERSION=$( cat GRAPHVIZ_VERSION )
     if [ "$OSTYPE" = "linux-gnu" ]; then