From fa8a2ee7e2539b145a87ac9af0d9748effa91631 Mon Sep 17 00:00:00 2001 From: Alexander Valavanis Date: Tue, 27 Jun 2017 15:03:58 +0200 Subject: GdkScreen deprecation fixes --- CMakeScripts/DefineDependsandFlags.cmake | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'CMakeScripts') diff --git a/CMakeScripts/DefineDependsandFlags.cmake b/CMakeScripts/DefineDependsandFlags.cmake index 52410fb2b..1fead418a 100644 --- a/CMakeScripts/DefineDependsandFlags.cmake +++ b/CMakeScripts/DefineDependsandFlags.cmake @@ -258,6 +258,18 @@ set(TRY_GTKSPELL ON) set (WITH_GTKMM_3_10 ON) endif() + # Check whether we can use new features in Gtkmm 3.22 + # TODO: Drop this test and bump the version number in the GTK test above + # as soon as all supported distributions provide Gtkmm >= 3.22 + pkg_check_modules(GTKMM_3_22 + gtkmm-3.0>=3.22, + ) + + if("${GTKMM_3_22_FOUND}") + message("Using Gtkmm 3.22 build") + set (WITH_GTKMM_3_22 ON) + endif() + pkg_check_modules(GDL_3_6 gdl-3.0>=3.6) if("${GDL_3_6_FOUND}") -- cgit v1.2.3 From 47d4199fcf2b032a02bf23c80c3b2c9f3155c5c5 Mon Sep 17 00:00:00 2001 From: Alexander Valavanis Date: Thu, 29 Jun 2017 18:13:30 +0200 Subject: aboutbox: Gtk3 fixes --- CMakeScripts/DefineDependsandFlags.cmake | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'CMakeScripts') diff --git a/CMakeScripts/DefineDependsandFlags.cmake b/CMakeScripts/DefineDependsandFlags.cmake index 1fead418a..a98ebcf2b 100644 --- a/CMakeScripts/DefineDependsandFlags.cmake +++ b/CMakeScripts/DefineDependsandFlags.cmake @@ -258,6 +258,30 @@ set(TRY_GTKSPELL ON) set (WITH_GTKMM_3_10 ON) endif() + # Check whether we can use new features in Gtkmm 3.12 + # TODO: Drop this test and bump the version number in the GTK test above + # as soon as all supported distributions provide Gtkmm >= 3.12 + pkg_check_modules(GTKMM_3_12 + gtkmm-3.0>=3.12, + ) + + if("${GTKMM_3_12_FOUND}") + message("Using Gtkmm 3.12 build") + set (WITH_GTKMM_3_12 ON) + endif() + + # Check whether we can use new features in Gtkmm 3.16 + # TODO: Drop this test and bump the version number in the GTK test above + # as soon as all supported distributions provide Gtkmm >= 3.16 + pkg_check_modules(GTKMM_3_16 + gtkmm-3.0>=3.16, + ) + + if("${GTKMM_3_16_FOUND}") + message("Using Gtkmm 3.16 build") + set (WITH_GTKMM_3_16 ON) + endif() + # Check whether we can use new features in Gtkmm 3.22 # TODO: Drop this test and bump the version number in the GTK test above # as soon as all supported distributions provide Gtkmm >= 3.22 -- cgit v1.2.3 From e4ed7cef32c637af1466b6b41d77a246576ce9b7 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Fri, 30 Jun 2017 14:15:54 +0200 Subject: Fix revno --- CMakeScripts/inkscape-version.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'CMakeScripts') diff --git a/CMakeScripts/inkscape-version.cmake b/CMakeScripts/inkscape-version.cmake index 2e23925c4..65903c47b 100644 --- a/CMakeScripts/inkscape-version.cmake +++ b/CMakeScripts/inkscape-version.cmake @@ -11,14 +11,14 @@ set(INKSCAPE_REVISION "unknown") set(INKSCAPE_CUSTOM "custom") -if(EXISTS ${INKSCAPE_SOURCE_DIR}/.bzr/) +if(EXISTS ${INKSCAPE_SOURCE_DIR}/.git/) execute_process(COMMAND - bzr revno --tree ${INKSCAPE_SOURCE_DIR} + git describe ${INKSCAPE_SOURCE_DIR} OUTPUT_VARIABLE INKSCAPE_REVISION OUTPUT_STRIP_TRAILING_WHITESPACE) execute_process(COMMAND - bzr status -S -V ${INKSCAPE_SOURCE_DIR}/src + git status -s ${INKSCAPE_SOURCE_DIR}/src OUTPUT_VARIABLE INKSCAPE_SOURCE_MODIFIED OUTPUT_STRIP_TRAILING_WHITESPACE) if(NOT INKSCAPE_SOURCE_MODIFIED STREQUAL "") -- cgit v1.2.3 From a90a18e6e5ac6a8d12d12043419e86e22d016efa Mon Sep 17 00:00:00 2001 From: "chr[]" Date: Fri, 30 Jun 2017 15:02:50 +0200 Subject: Replace ImageMagic with GraphicsMagic ... just a matter of taste. But both wanna be initialized: fixed. --- CMakeScripts/DefineDependsandFlags.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CMakeScripts') diff --git a/CMakeScripts/DefineDependsandFlags.cmake b/CMakeScripts/DefineDependsandFlags.cmake index a98ebcf2b..981598527 100644 --- a/CMakeScripts/DefineDependsandFlags.cmake +++ b/CMakeScripts/DefineDependsandFlags.cmake @@ -373,7 +373,7 @@ list(APPEND INKSCAPE_INCS_SYS ${ZLIB_INCLUDE_DIRS}) list(APPEND INKSCAPE_LIBS ${ZLIB_LIBRARIES}) if(WITH_IMAGE_MAGICK) - pkg_check_modules(ImageMagick ImageMagick MagickCore Magick++ ) + pkg_check_modules(ImageMagick ImageMagick++ ) if(ImageMagick_FOUND) list(APPEND INKSCAPE_LIBS ${ImageMagick_LDFLAGS}) -- cgit v1.2.3 From d6f2d85a424751ac9dd468949a950ecc46148ff2 Mon Sep 17 00:00:00 2001 From: "chr[]" Date: Fri, 30 Jun 2017 15:08:14 +0200 Subject: jemalloc cmake module (shamelessly stolen from Blender) libstdc++ memory allocator is broken: "Notes about deallocation. This allocator does not explicitly release memory." The story: https://www.zerotier.com/blog/2017-05-05-theleak.shtml The solution?! http://jemalloc.net/ No need to recompile, just install it and a simple test run: LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.1 inkscape --- CMakeScripts/DefineDependsandFlags.cmake | 5 +++ CMakeScripts/Modules/FindJeMalloc.cmake | 70 ++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 CMakeScripts/Modules/FindJeMalloc.cmake (limited to 'CMakeScripts') diff --git a/CMakeScripts/DefineDependsandFlags.cmake b/CMakeScripts/DefineDependsandFlags.cmake index 981598527..0a8782f27 100644 --- a/CMakeScripts/DefineDependsandFlags.cmake +++ b/CMakeScripts/DefineDependsandFlags.cmake @@ -67,6 +67,11 @@ if(WITH_GNOME_VFS) endif() endif() +find_package(JeMalloc) +if (JEMALLOC_FOUND) + list(APPEND INKSCAPE_LIBS ${JEMALLOC_LIBRARIES}) +endif() + if(ENABLE_LCMS) unset(HAVE_LIBLCMS1) unset(HAVE_LIBLCMS2) diff --git a/CMakeScripts/Modules/FindJeMalloc.cmake b/CMakeScripts/Modules/FindJeMalloc.cmake new file mode 100644 index 000000000..5c7aa2cf1 --- /dev/null +++ b/CMakeScripts/Modules/FindJeMalloc.cmake @@ -0,0 +1,70 @@ +# - Find JeMalloc library +# Find the native JeMalloc includes and library +# This module defines +# JEMALLOC_INCLUDE_DIRS, where to find jemalloc.h, Set when +# JEMALLOC_INCLUDE_DIR is found. +# JEMALLOC_LIBRARIES, libraries to link against to use JeMalloc. +# JEMALLOC_ROOT_DIR, The base directory to search for JeMalloc. +# This can also be an environment variable. +# JEMALLOC_FOUND, If false, do not try to use JeMalloc. +# +# also defined, but not for general use are +# JEMALLOC_LIBRARY, where to find the JeMalloc library. + +#============================================================================= +# Copyright 2011 Blender Foundation. +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= + +# If JEMALLOC_ROOT_DIR was defined in the environment, use it. +IF(NOT JEMALLOC_ROOT_DIR AND NOT $ENV{JEMALLOC_ROOT_DIR} STREQUAL "") + SET(JEMALLOC_ROOT_DIR $ENV{JEMALLOC_ROOT_DIR}) +ENDIF() + +SET(_jemalloc_SEARCH_DIRS + ${JEMALLOC_ROOT_DIR} + /usr/local + /sw # Fink + /opt/local # DarwinPorts + /opt/csw # Blastwave +) + +FIND_PATH(JEMALLOC_INCLUDE_DIR + NAMES + jemalloc.h + HINTS + ${_jemalloc_SEARCH_DIRS} + PATH_SUFFIXES + include/jemalloc +) + +FIND_LIBRARY(JEMALLOC_LIBRARY + NAMES + jemalloc + HINTS + ${_jemalloc_SEARCH_DIRS} + PATH_SUFFIXES + lib64 lib + ) + +# handle the QUIETLY and REQUIRED arguments and set JEMALLOC_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(JeMalloc DEFAULT_MSG + JEMALLOC_LIBRARY JEMALLOC_INCLUDE_DIR) + +IF(JEMALLOC_FOUND) + SET(JEMALLOC_LIBRARIES ${JEMALLOC_LIBRARY}) + SET(JEMALLOC_INCLUDE_DIRS ${JEMALLOC_INCLUDE_DIR}) +ENDIF(JEMALLOC_FOUND) + +MARK_AS_ADVANCED( + JEMALLOC_INCLUDE_DIR + JEMALLOC_LIBRARY +) -- cgit v1.2.3 From 7811297f0ad86acaad0477096dd919f51e18b3e7 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Fri, 30 Jun 2017 15:20:13 +0200 Subject: Fix revno with git --- CMakeScripts/inkscape-version.cmake | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'CMakeScripts') diff --git a/CMakeScripts/inkscape-version.cmake b/CMakeScripts/inkscape-version.cmake index 65903c47b..12b8a26d8 100644 --- a/CMakeScripts/inkscape-version.cmake +++ b/CMakeScripts/inkscape-version.cmake @@ -12,10 +12,18 @@ set(INKSCAPE_REVISION "unknown") set(INKSCAPE_CUSTOM "custom") if(EXISTS ${INKSCAPE_SOURCE_DIR}/.git/) - execute_process(COMMAND - git describe ${INKSCAPE_SOURCE_DIR} - OUTPUT_VARIABLE INKSCAPE_REVISION - OUTPUT_STRIP_TRAILING_WHITESPACE) + + execute_process(COMMAND git describe + COMMAND tr "\n" " " + WORKING_DIRECTORY ${INKSCAPE_SOURCE_DIR} + OUTPUT_VARIABLE INKSCAPE_REV1) + execute_process(COMMAND git show --format=format:%ad --date=short + COMMAND head -n 1 + COMMAND tr "\n" " " + WORKING_DIRECTORY ${INKSCAPE_SOURCE_DIR} + OUTPUT_VARIABLE INKSCAPE_REV2 + OUTPUT_STRIP_TRAILING_WHITESPACE) + set(INKSCAPE_REVISION ${INKSCAPE_REV1} ${INKSCAPE_REV2}) execute_process(COMMAND git status -s ${INKSCAPE_SOURCE_DIR}/src -- cgit v1.2.3