diff options
| author | René de Hesselle <dehesselle@web.de> | 2019-05-31 22:49:15 +0000 |
|---|---|---|
| committer | René de Hesselle <dehesselle@web.de> | 2019-05-31 22:49:15 +0000 |
| commit | b56b894b55ceff922dedbb13782d01a97228b0f6 (patch) | |
| tree | 5001f253e059fc96ccc61010fd3091f91d06863f /packaging/macos | |
| parent | Document snap build (diff) | |
| download | inkscape-b56b894b55ceff922dedbb13782d01a97228b0f6.tar.gz inkscape-b56b894b55ceff922dedbb13782d01a97228b0f6.zip | |
Include more feature libraries
- gtkspell
- libyaml
- cppunit
- librevenge
- libcdr
- ImageMagick 6
- OpenMP
Diffstat (limited to 'packaging/macos')
| -rw-r--r-- | packaging/macos/020-vars.sh | 12 | ||||
| -rw-r--r-- | packaging/macos/030-funcs.sh | 2 | ||||
| -rwxr-xr-x | packaging/macos/150-jhbuild-inkdeps.sh | 53 | ||||
| -rwxr-xr-x | packaging/macos/210-inkscape-build.sh | 29 | ||||
| -rw-r--r-- | packaging/macos/README.md | 2 | ||||
| -rw-r--r-- | packaging/macos/inkscape.bundle | 7 |
6 files changed, 90 insertions, 15 deletions
diff --git a/packaging/macos/020-vars.sh b/packaging/macos/020-vars.sh index c6ec9089d..7b831a964 100644 --- a/packaging/macos/020-vars.sh +++ b/packaging/macos/020-vars.sh @@ -30,7 +30,7 @@ export MAKEFLAGS="-j $CORES" ### ramdisk #################################################################### RAMDISK_ENABLE=true # mount ramdisk to $WRK_DIR -RAMDISK_SIZE=10 # unit is GiB +RAMDISK_SIZE=9 # unit is GiB ### try to use pre-built toolset ############################################### @@ -122,6 +122,7 @@ APP_PLIST=$APP_CON_DIR/Info.plist # any JHBuild moduleset. (They are candidates for a custom Inkscape moduleset.) URL_BOOST=https://dl.bintray.com/boostorg/release/1.69.0/source/boost_1_69_0.tar.bz2 +URL_CPPUNIT=https://dev-www.libreoffice.org/src/cppunit-1.14.0.tar.gz URL_DOUBLE_CONVERSION=https://github.com/google/double-conversion/archive/v3.1.4.tar.gz URL_FREETYPE=https://download.savannah.gnu.org/releases/freetype/freetype-2.10.0.tar.bz2 URL_GC=https://github.com/ivmai/bdwgc/releases/download/v8.0.4/gc-8.0.4.tar.gz @@ -131,6 +132,7 @@ URL_GTK_MAC_BUNDLER=https://gitlab.gnome.org/GNOME/gtk-mac-bundler/-/archive/727 URL_GTK_OSX=https://raw.githubusercontent.com/dehesselle/gtk-osx/inkscape URL_GTK_OSX_BUILD_SETUP=$URL_GTK_OSX/gtk-osx-build-setup.sh URL_GTK_OSX_MODULESET=$URL_GTK_OSX/modulesets-stable/gtk-osx.modules +URL_IMAGEMAGICK=https://github.com/ImageMagick/ImageMagick6/archive/6.9.7-10.tar.gz # Inkscape Git repository URL_INKSCAPE=https://gitlab.com/inkscape/inkscape # TODO icon in icns format @@ -142,12 +144,18 @@ URL_INKSCAPE=https://gitlab.com/inkscape/inkscape # repository. URL_INKSCAPE_ICNS=https://github.com/dehesselle/mibap/raw/master/inkscape.icns URL_LCMS2=https://netcologne.dl.sourceforge.net/project/lcms/lcms/2.9/lcms2-2.9.tar.gz +URL_LIBCDR=https://github.com/LibreOffice/libcdr/archive/libcdr-0.1.5.tar.gz URL_LIBPSL=https://github.com/rockdaboot/libpsl/releases/download/libpsl-0.20.2/libpsl-0.20.2.tar.gz +URL_LIBREVENGE=https://ayera.dl.sourceforge.net/project/libwpd/librevenge/librevenge-0.0.4/librevenge-0.0.4.tar.gz URL_LIBSOUP=https://ftp.gnome.org/pub/GNOME/sources/libsoup/2.65/libsoup-2.65.92.tar.xz +URL_LIBVISIO=https://github.com/LibreOffice/libvisio/archive/libvisio-0.1.6.tar.gz +URL_LIBWPG=https://netcologne.dl.sourceforge.net/project/libwpg/libwpg/libwpg-0.3.3/libwpg-0.3.3.tar.xz +URL_LIBYAML=https://github.com/yaml/libyaml/archive/0.2.2.tar.gz URL_OPENJPEG=https://github.com/uclouvain/openjpeg/archive/v2.3.0.tar.gz +URL_OPENMP=https://github.com/llvm/llvm-project/releases/download/llvmorg-7.1.0/openmp-7.1.0.src.tar.xz URL_OPENSSL=https://www.openssl.org/source/openssl-1.1.1b.tar.gz URL_POPPLER=https://gitlab.freedesktop.org/poppler/poppler/-/archive/poppler-0.74.0/poppler-poppler-0.74.0.tar.gz URL_POTRACE=http://potrace.sourceforge.net/download/1.15/potrace-1.15.tar.gz # A pre-built version of the complete toolset. -URL_TOOLSET_CACHE=https://github.com/dehesselle/mibap/releases/download/v0.9/mibap_v0.9.tar.xz +URL_TOOLSET_CACHE=https://github.com/dehesselle/mibap/releases/download/v0.10/mibap_v0.10.tar.xz diff --git a/packaging/macos/030-funcs.sh b/packaging/macos/030-funcs.sh index 841c26f29..74210470d 100644 --- a/packaging/macos/030-funcs.sh +++ b/packaging/macos/030-funcs.sh @@ -56,7 +56,7 @@ function get_source # the directory the files have been extracted to. curl -L $url | tar xv$(get_comp_flag $url) 2>$log cd $(head -1 $log | awk '{ print $2 }') - rm $log + [ $? -eq 0 ] && rm $log || echo "$FUNCNAME: check $log" } ### make, make install in jhbuild environment ################################## diff --git a/packaging/macos/150-jhbuild-inkdeps.sh b/packaging/macos/150-jhbuild-inkdeps.sh index d13c7f844..bddf4d82f 100755 --- a/packaging/macos/150-jhbuild-inkdeps.sh +++ b/packaging/macos/150-jhbuild-inkdeps.sh @@ -12,17 +12,21 @@ SELF_DIR=$(cd $(dirname "$0"); pwd -P) for script in $SELF_DIR/0??-*.sh; do source $script; done -### install GNU Scientific Library ############################################# - -get_source $URL_GSL -configure_make_makeinstall - ### install additional GNOME libraries ######################################### -# libsoup - GNOME http client/server library # adwaita-icon-theme - icons used by Inkscape/GTK +# gtkspell3 - GtkSpell spellchecking/highlighting +# libsoup - GNOME http client/server library + +jhbuild build \ + adwaita-icon-theme \ + gtkspell3 \ + libsoup -jhbuild build adwaita-icon-theme libsoup +### install GNU Scientific Library ############################################# + +get_source $URL_GSL +configure_make_makeinstall ### install Garbage Collector for C/C++ ######################################## @@ -51,6 +55,36 @@ configure_make_makeinstall get_source $URL_OPENJPEG cmake_make_makeinstall +### install libyaml ############################################################ + +get_source $URL_LIBYAML +cmake_make_makeinstall -DBUILD_SHARED_LIBS=ON + +### install CppUnit ############################################################ + +# required by librevenge + +get_source $URL_CPPUNIT +configure_make_makeinstall + +### install librevenge ######################################################### + +# required by libcdr + +get_source $URL_LIBREVENGE +configure_make_makeinstall + +### install libcdr ############################################################# + +get_source $URL_LIBCDR +jhbuild run ./autogen.sh +configure_make_makeinstall + +### install ImageMagick 6 ###################################################### + +get_source $URL_IMAGEMAGICK +configure_make_makeinstall + ### install Poppler ############################################################ get_source $URL_POPPLER @@ -73,3 +107,8 @@ cmake_make_makeinstall get_source $URL_POTRACE configure_make_makeinstall --with-libpotrace +### install OpenMP ############################################################# + +get_source $URL_OPENMP +cmake_make_makeinstall + diff --git a/packaging/macos/210-inkscape-build.sh b/packaging/macos/210-inkscape-build.sh index a0ab93624..12497df71 100755 --- a/packaging/macos/210-inkscape-build.sh +++ b/packaging/macos/210-inkscape-build.sh @@ -15,26 +15,51 @@ set -e ### build Inkscape ############################################################# +INKSCAPE_SRC_DIR=.. + if [ -z $CI_JOB_ID ]; then # running standalone cd $SRC_DIR git clone --recurse-submodules --depth 10 $URL_INKSCAPE #git clone --recurse-submodules $URL_INKSCAPE # this is a >1.6 GiB download mkdir inkscape_build cd inkscape_build - cmake -DCMAKE_PREFIX_PATH=$OPT_DIR -DCMAKE_INSTALL_PREFIX=$OPT_DIR -DWITH_OPENMP=OFF ../inkscape + INKSCAPE_SRC_DIR=$INKSCAPE_SRC_DIR/inkscape else # running as CI job if [ -d $SELF_DIR/../../build ]; then # cleanup previous run rm -rf $SELF_DIR/../../build fi mkdir $SELF_DIR/../../build cd $SELF_DIR/../../build - cmake -DCMAKE_PREFIX_PATH=$OPT_DIR -DCMAKE_INSTALL_PREFIX=$OPT_DIR -DWITH_OPENMP=OFF .. fi +# All the settings for OpenMP are to trigger the detection during 'cmake'. +# Experimenting with a "Hello World"-style example shows that linking with +# '-lomp' would suffice, no '-fopenmp' required. +# TODO further investigation into required flags + +cmake \ + -DCMAKE_PREFIX_PATH=$OPT_DIR \ + -DCMAKE_INSTALL_PREFIX=$OPT_DIR \ + -DOpenMP_CXX_FLAGS="-Xclang -fopenmp" \ + -DOpenMP_C_FLAGS="-Xclang -fopenmp" \ + -DOpenMP_CXX_LIB_NAMES="omp" \ + -DOpenMP_C_LIB_NAMES="omp" \ + -DOpenMP_omp_LIBRARY=$LIB_DIR/libomp.dylib \ + $INKSCAPE_SRC_DIR + make make install # patch library locations before packaging +# poppler install_name_tool -change @rpath/libpoppler.85.dylib $LIB_DIR/libpoppler.85.dylib $BIN_DIR/inkscape install_name_tool -change @rpath/libpoppler-glib.8.dylib $LIB_DIR/libpoppler-glib.8.dylib $BIN_DIR/inkscape +install_name_tool -change @rpath/libpoppler.85.dylib $LIB_DIR/libpoppler.85.dylib $LIB_DIR/inkscape/libinkscape_base.dylib +install_name_tool -change @rpath/libpoppler-glib.8.dylib $LIB_DIR/libpoppler-glib.8.dylib $LIB_DIR/inkscape/libinkscape_base.dylib +# LibYAML +install_name_tool -change @rpath/libyaml.dylib $LIB_DIR/libyaml.dylib $BIN_DIR/inkscape +install_name_tool -change @rpath/libyaml.dylib $LIB_DIR/libyaml.dylib $LIB_DIR/inkscape/libinkscape_base.dylib +# OpenMP +install_name_tool -change @rpath/libomp.dylib $LIB_DIR/libomp.dylib $BIN_DIR/inkscape +install_name_tool -change @rpath/libomp.dylib $LIB_DIR/libomp.dylib $LIB_DIR/inkscape/libinkscape_base.dylib diff --git a/packaging/macos/README.md b/packaging/macos/README.md index 866e88d79..ac1cd3c24 100644 --- a/packaging/macos/README.md +++ b/packaging/macos/README.md @@ -21,7 +21,7 @@ _(comments based on default configuration)_ $HOME/.profile # will be overwritten ``` -- __16 GiB RAM__, since we're using a 10 GiB ramdisk to build everything. +- __16 GiB RAM__, since we're using a 9 GiB ramdisk to build everything. - Using a ramdisk speeds up the process significantly and avoids wearing out your ssd. - You can choose to not use a ramdisk by overriding `RAMDISK_ENABLE=false` in a e.g. `021-custom.sh` file. - The build environment takes up ~6.1 GiB of disk space, the Inkscape Git repository ~1.6 GiB. Subject to change and YMMV. diff --git a/packaging/macos/inkscape.bundle b/packaging/macos/inkscape.bundle index ed2cc3512..7bed2ea04 100644 --- a/packaging/macos/inkscape.bundle +++ b/packaging/macos/inkscape.bundle @@ -117,8 +117,6 @@ ${prefix}/share/gtk3-demo </data --> - <!-- Copy in the themes data. You may want to trim this to save space - in your bundle. --> <data> ${prefix}/etc/fonts </data> @@ -132,8 +130,13 @@ ${prefix}/share/icons </data> <data> + ${prefix}/share/ImageMagick-6 + </data> + <data> ${prefix}/share/inkscape </data> + <!-- Copy in the themes data. You may want to trim this to save space + in your bundle. --> <data> ${prefix}/share/themes </data> |
