]> granicus.if.org Git - graphviz/commitdiff
Add support for macOS to ci/build.sh
authorMagnus Jacobsson <magnus.jacobsson@berotec.se>
Wed, 30 Sep 2020 15:05:11 +0000 (17:05 +0200)
committerMagnus Jacobsson <magnus.jacobsson@berotec.se>
Sun, 4 Oct 2020 07:58:14 +0000 (09:58 +0200)
ci/build.sh

index 211c2bcc869d93be13a820edc55f1ed3d2d2a78e..f7b4ae3da25ceb23980139685e00f2b513986c1f 100755 (executable)
@@ -7,6 +7,9 @@ set -o pipefail
 if test -f /etc/os-release; then
     cat /etc/os-release
     . /etc/os-release
+elif [ "$( uname -s )" = "Darwin" ]; then
+    ID=$( uname -s )
+    VERSION_ID=$( uname -r )
 else
     cat /etc/redhat-release
     ID=$( cat /etc/redhat-release | cut -d' ' -f1 | tr 'A-Z' 'a-z' )
@@ -30,6 +33,8 @@ if [ "${build_system}" = "cmake" ]; then
     cd ..
     if [ "${ID_LIKE}" = "debian" ]; then
         mv build/*.deb ${DIR}/os/${ARCH}/
+    elif [ "${ID}" = "Darwin" ]; then
+        mv build/*.zip ${DIR}/os/${ARCH}/
     fi
 else
     if [ "${ID_LIKE}" = "debian" ]; then
@@ -37,6 +42,11 @@ else
         (cd graphviz-${GV_VERSION}; fakeroot make -f debian/rules binary) | tee >(ci/extract-configure-log.sh >${META_DATA_DIR}/configure.log)
         mv *.deb ${DIR}/os/${ARCH}/
         mv *.ddeb ${DIR}/debug/${ARCH}/
+    elif [ "${ID}" = "Darwin" ]; then
+        ./autogen.sh
+        ./configure --prefix=$( pwd )/build
+        make
+        make install
     else
         rm -rf ${HOME}/rpmbuild
         rpmbuild -ta graphviz-${GV_VERSION}.tar.gz | tee >(ci/extract-configure-log.sh >${META_DATA_DIR}/configure.log)