diff options
author | gotwo <gotwo@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2010-01-22 18:52:26 +0000 |
---|---|---|
committer | gotwo <gotwo@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2010-01-22 18:52:26 +0000 |
commit | def9d5b3e9c374b5f757ad1431b1d3cbec8748ce (patch) | |
tree | ad69e91d5b2555d16a39aa35eb6a0bcbf7b1d83e /navit/xpm | |
parent | 875ddb5829d2cf38936bb2dfda8fb675605cea2f (diff) | |
download | navit-def9d5b3e9c374b5f757ad1431b1d3cbec8748ce.tar.gz |
FIX: windows build process: enable png build
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@2920 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/xpm')
-rw-r--r-- | navit/xpm/Makefile.am | 20 | ||||
-rwxr-xr-x | navit/xpm/navit_svg2png | 18 |
2 files changed, 22 insertions, 16 deletions
diff --git a/navit/xpm/Makefile.am b/navit/xpm/Makefile.am index 4ebcac60c..9022344df 100644 --- a/navit/xpm/Makefile.am +++ b/navit/xpm/Makefile.am @@ -180,18 +180,20 @@ flag_svgs += country_VA.svgz country_VC.svgz country_VE.svgz country_VG.svgz cou flag_svgs += country_WF.svgz country_WS.svgz country_YE.svgz country_YT.svgz country_ZA.svgz country_ZM.svgz country_ZW.svgz if USE_SVG - xpm_DATA += $(svgs) $(nav_svgs) $(flag_svgs) + xpm_DATA += $(svgs) $(nav_svgs) $(flag_svgs) endif if USE_SVG2PNG -%.png:$(srcdir)/*.svgz - SRCDIR=$(srcdir) $(srcdir)/navit_svg2png "@SVG2PNG@" "$@" -%.png:$(srcdir)/*.svg - SRCDIR=$(srcdir) $(srcdir)/navit_svg2png "@SVG2PNG@" "$@" -pngs = $(addsuffix .png,$(basename $(svgs))) -xsize=$(word 1,$(subst x, ,$(scale))) -ysize=$(word $(words $(scale)),$(subst x, ,$(scale))) -comma=, +%.png: $(srcdir)/*.svgz + SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir) $(srcdir)/navit_svg2png "@SVG2PNG@" "$@" +%.png: $(srcdir)/*.svg + SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir) $(srcdir)/navit_svg2png "@SVG2PNG@" "$@" + +pngs = $(addsuffix .png,$(basename $(svgs))) +xsize = $(word 1,$(subst x, ,$(scale))) +ysize = $(word $(words $(scale)),$(subst x, ,$(scale))) +comma =, + if USE_SVG2PNG_SCALES pngs += $(foreach scale, $(subst $(comma), ,@SVG2PNG_SCALES@), $(addsuffix _$(xsize)_$(ysize).png,$(basename $(svgs)))) endif diff --git a/navit/xpm/navit_svg2png b/navit/xpm/navit_svg2png index d71bc2d58..63ac57097 100755 --- a/navit/xpm/navit_svg2png +++ b/navit/xpm/navit_svg2png @@ -1,4 +1,4 @@ -#! /bin/bash +#!/bin/sh function svgtopng { @@ -10,18 +10,21 @@ function svgtopng $svgtopng --width=$1 --height=$2 --output $4 $3 ;; *inkscape) - $svgtopng --without-gui --export-width=$1 --export-height=$2 --export-png=$4 $3 + $svgtopng --without-gui --export-width=$1 --export-height=$2 --export-png=$BUILDDIR/$4 $3 ;; *convert) $svgtopng $3 -resize $1x$2 $4 - ;; + ;; esac } -ulimit -t 5 +if test "$OSTYPE" != "cygwin" -a "$OSTYPE" != "msys"; then + ulimit -t 5 +fi + svgtopng=$1 png=$2 -if [[ "$png" = *_[1-9]*_[1-9]*.png ]]; +if [[ "$png" = *_[1-9]*_[1-9]*.png ]]; then svg=${png%_*_*.png}; h=${png##*_} @@ -35,10 +38,11 @@ if [ ! -f $svg.svg -a ! -f $svg.svgz ] then svg="$SRCDIR/$svg" fi -if [ -f $png -a ! -f $svg.svg ] -then +if [ -f $png -a ! -f $svg.svg ]; then + # width and height seems to be defined as part of the file name touch $png else + # use width and hight from the svg image if [ -f $svg.svg ] then if [ -z "$w" ] |