Skip to content

Commit

Permalink
build: Fix build with inkscape 1.0beta
Browse files Browse the repository at this point in the history
  • Loading branch information
jnsh committed Feb 1, 2020
1 parent 762228f commit d7bac2e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
4 changes: 4 additions & 0 deletions common/gtk-2.0/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ $(light): $(srcdir)/light/assets.svg | light/assets
$(dark): $(srcdir)/dark/assets.svg | dark/assets

$(light) $(dark):
if INKSCAPE_1_0_OR_NEWER
$(INKSCAPE) --export-id-only --export-file="$@" --export-id="$(basename $(notdir $@))" --export-dpi=$(if $(filter $(OPTION_GTK2_HIDPI),true),192,96) "$<" >/dev/null
else !INKSCAPE_1_0_OR_NEWER
$(INKSCAPE) --export-id-only --export-png="$@" --export-id="$(basename $(notdir $@))" --export-dpi=$(if $(filter $(OPTION_GTK2_HIDPI),true),192,96) "$<" >/dev/null
endif
$(OPTIPNG) -o7 --quiet "$@"

menubar-toolbar/%-dark.png: dark/assets/%.png | menubar-toolbar
Expand Down
8 changes: 8 additions & 0 deletions common/gtk-3.0/common.am
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,19 @@ clean:
rm -rf assets/ light/ dark/ darker/ lighter/

$(normal): $(srcdir)/assets.svg | assets
if INKSCAPE_1_0_OR_NEWER
$(INKSCAPE) --export-id-only --export-file="$@" --export-id="$(basename $(notdir $@))" --export-dpi=96 "$<" >/dev/null
else !INKSCAPE_1_0_OR_NEWER
$(INKSCAPE) --export-id-only --export-png="$@" --export-id="$(basename $(notdir $@))" --export-dpi=96 "$<" >/dev/null
endif
$(OPTIPNG) -o7 --quiet "$@"

$(hidpi): $(srcdir)/assets.svg | assets
if INKSCAPE_1_0_OR_NEWER
$(INKSCAPE) --export-id-only --export-file="$@" --export-id="$(patsubst %@2,%,$(basename $(notdir $@)))" --export-dpi=192 "$<" >/dev/null
else !INKSCAPE_1_0_OR_NEWER
$(INKSCAPE) --export-id-only --export-png="$@" --export-id="$(patsubst %@2,%,$(basename $(notdir $@)))" --export-dpi=192 "$<" >/dev/null
endif
$(OPTIPNG) -o7 --quiet "$@"

.PHONY: normal hidpi clean
Expand Down
4 changes: 4 additions & 0 deletions common/xfwm4/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ $(light): $(srcdir)/light/assets.svg | light/assets
$(dark): $(srcdir)/dark/assets.svg | dark/assets

$(light) $(dark):
if INKSCAPE_1_0_OR_NEWER
$(INKSCAPE) --export-id-only --export-file="$@" --export-id="$(basename $(notdir $@))" --export-dpi=$(if $(filter $(OPTION_GTK2_HIDPI),true),192,96) "$<" >/dev/null
else !INKSCAPE_1_0_OR_NEWER
$(INKSCAPE) --export-id-only --export-png="$@" --export-id="$(basename $(notdir $@))" --export-dpi=$(if $(filter $(OPTION_GTK2_HIDPI),true),192,96) "$<" >/dev/null
endif
$(OPTIPNG) -o7 --quiet "$@"

.PHONY: light dark clean
Expand Down
4 changes: 4 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ AS_IF([test "x$ENABLE_CINNAMON" != xno], [ARC_CINNAMON])
AS_IF([test "x$ENABLE_GTK2" != xno -o "x$ENABLE_GTK3" != xno -o "x$ENABLE_XFWM" != xno], [
AC_PATH_PROG([INKSCAPE], [inkscape])
AS_IF([test "x$ac_cv_path_INKSCAPE" = x], [AC_MSG_ERROR([inkscape not found])])
AS_IF([test "x$ac_cv_path_INKSCAPE" != x],
[INKSCAPE_VERSMJR=`inkscape --version 2> /dev/null | cut -d' ' -f2 | cut -d'.' -f1`]
AM_CONDITIONAL([INKSCAPE_1_0_OR_NEWER], [test "x$INKSCAPE_VERSMJR" = x1])
)
AC_PATH_PROG([OPTIPNG], [optipng])
AS_IF([test "x$ac_cv_path_OPTIPNG" = x], [AC_MSG_ERROR([optipng not found])])
])
Expand Down

0 comments on commit d7bac2e

Please sign in to comment.