diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2016-03-14 16:37:50 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2016-03-14 16:37:50 +0000 |
| commit | b8d22beef5345210ad27cdc2685083aeae6f8f3b (patch) | |
| tree | d69b8bfd19d3627a8425a1b265c2abf229b05354 /packaging | |
| parent | fixes for update to trunk (diff) | |
| parent | "Relative to" option for node alignment. (diff) | |
| download | inkscape-b8d22beef5345210ad27cdc2685083aeae6f8f3b.tar.gz inkscape-b8d22beef5345210ad27cdc2685083aeae6f8f3b.zip | |
update to trunk
(bzr r13708.1.39)
Diffstat (limited to 'packaging')
| -rwxr-xr-x | packaging/macosx/Resources/bin/inkscape | 3 | ||||
| -rwxr-xr-x | packaging/macosx/osx-app.sh | 44 | ||||
| -rwxr-xr-x | packaging/macosx/osx-build.sh | 1 | ||||
| -rw-r--r-- | packaging/macosx/ports/devel/inkscape-packaging/Portfile | 4 | ||||
| -rwxr-xr-x | packaging/release-sign-tarballs | 259 |
5 files changed, 298 insertions, 13 deletions
diff --git a/packaging/macosx/Resources/bin/inkscape b/packaging/macosx/Resources/bin/inkscape index dd6a888b7..85c9f8eba 100755 --- a/packaging/macosx/Resources/bin/inkscape +++ b/packaging/macosx/Resources/bin/inkscape @@ -43,7 +43,7 @@ if [ -z "$INK_PATH_ORIG" ]; then # Fink # MacPorts (former DarwinPorts) # LaTeX distribution for Mac OS X - PATH_OTHER="/usr/texbin:/opt/local/bin:/sw/bin/:/usr/local/bin" + PATH_OTHER="/Library/TeX/texbin:/usr/texbin:/opt/local/bin:/sw/bin/:/usr/local/bin" # Put /usr/bin at beginning of path so we make sure we use Apple's python # over one that may be installed be Macports, Fink or some other means. @@ -167,6 +167,7 @@ esac unset INK_DEBUG # ignore for recursive calls if [ "x$INK_DEBUG_SHELL" != "x" ]; then + unset INK_DEBUG_SHELL # ignore for recursive calls exec bash else $EXEC "$CWD/inkscape-bin" "$@" diff --git a/packaging/macosx/osx-app.sh b/packaging/macosx/osx-app.sh index ad41e844a..2a6e9ed15 100755 --- a/packaging/macosx/osx-app.sh +++ b/packaging/macosx/osx-app.sh @@ -247,12 +247,19 @@ if ! pkg-config --exists poppler; then exit 1 fi +if [ ! -e "$LIBPREFIX/lib/libpotrace.dylib" ]; then + echo "Missing potrace -- please install potrace and try again." >&2 + exit 1 +fi + if ! pkg-config --exists ImageMagick; then echo "Missing ImageMagick -- please install ImageMagick and try again." >&2 exit 1 fi -if [ ! -e "$LIBPREFIX/lib/aspell-0.60/en.dat" ]; then +# FIXME: retrieve aspell version from installed files (no pkg-config support) +ASPELL_VERSION="0.60" +if [ ! -e "$LIBPREFIX/lib/aspell-$ASPELL_VERSION/en.dat" ]; then echo "Missing aspell en dictionary -- please install at least 'aspell-dict-en', but" >&2 echo "preferably more dictionaries ('aspell-dict-*') and try again." >&2 exit 1 @@ -484,7 +491,9 @@ if [ ${add_python} = "true" ]; then fi $cp_cmd -RL "$packages_path/sk1libs" "$pkgpython" $cp_cmd -RL "$packages_path/uniconvertor" "$pkgpython" - # PyGTK (Sozi) + # pySerial for HPGL plotting + $cp_cmd -RL "$packages_path/serial" "$pkgpython" + # PyGTK (optional) $cp_cmd -RL "$packages_path/cairo" "$pkgpython" $cp_cmd -RL "$packages_path/glib" "$pkgpython" $cp_cmd -RL "$packages_path/gobject" "$pkgpython" @@ -537,8 +546,15 @@ sed -e "s,__build_arch__,$_build_arch,g" -i "" "$scrpath" echo "APPLInks" > $package/Contents/PkgInfo # Pull in extra requirements for Pango and GTK -mkdir -p $pkgetc/pango -touch "$pkgetc/pango/pangorc" +PANGOVERSION=$(pkg-config --modversion pango) +PANGOVERSION_MINOR="$(cut -d. -f2 <<< $PANGOVERSION)" + +if [ $PANGOVERSION_MINOR -lt 37 ]; then + mkdir -p $pkgetc/pango + touch "$pkgetc/pango/pangorc" +else + echo "Newer pango version found, modules are built-in" +fi # We use a modified fonts.conf file so only need the dtd mkdir -p $pkgshare/xml/fontconfig @@ -550,9 +566,12 @@ $cp_cmd -r $LIBPREFIX/share/fontconfig/conf.avail $pkgshare/fontconfig/ (cd $pkgetc/fonts/conf.d && $ln_cmd ../../../share/fontconfig/conf.avail/10-autohint.conf) (cd $pkgetc/fonts/conf.d && $ln_cmd ../../../share/fontconfig/conf.avail/70-no-bitmaps.conf) -pango_version=`pkg-config --variable=pango_module_version pango` -mkdir -p $pkglib/pango/$pango_version/modules -$cp_cmd $LIBPREFIX/lib/pango/$pango_version/modules/*.so $pkglib/pango/$pango_version/modules/ +if [ $PANGOVERSION_MINOR -lt 37 ]; then + # Pull in modules + pango_mod_version=`pkg-config --variable=pango_module_version pango` + mkdir -p $pkglib/pango/$pango_mod_version/modules + $cp_cmd $LIBPREFIX/lib/pango/$pango_mod_version/modules/*.so $pkglib/pango/$pango_mod_version/modules/ +fi gtk_version=`pkg-config --variable=gtk_binary_version gtk+-2.0` mkdir -p $pkglib/gtk-2.0/$gtk_version/{engines,immodules,printbackends} @@ -571,9 +590,11 @@ sed -e "s,__gdk_pixbuf_version__,$gdk_pixbuf_version,g" -i "" "$scrpath" # recreate loaders and modules caches based on actually included modules # Pango modules -pango-querymodules "$pkglib/pango/$pango_version"/modules/*.so \ - | sed -e "s,$PWD/$pkgresources,@loader_path/..,g" \ - > "$pkgetc"/pango/pango.modules +if [ $PANGOVERSION_MINOR -lt 37 ]; then + pango-querymodules "$pkglib/pango/$pango_mod_version"/modules/*.so \ + | sed -e "s,$PWD/$pkgresources,@loader_path/..,g" \ + > "$pkgetc"/pango/pango.modules +fi # Gtk immodules gtk-query-immodules-2.0 "$pkglib/gtk-2.0/$gtk_version"/immodules/*.so \ @@ -625,7 +646,8 @@ sed -e "s,IMAGEMAGICKVER,$IMAGEMAGICKVER,g" -i "" "$scrpath" sed -e "s,IMAGEMAGICKVER_MAJOR,$IMAGEMAGICKVER_MAJOR,g" -i "" "$scrpath" # Copy aspell dictionary files: -$cp_cmd -r "$LIBPREFIX/share/aspell" "$pkgresources/share/" +$cp_cmd -r "$LIBPREFIX/lib/aspell-$ASPELL_VERSION" "$pkglib/" +$cp_cmd -r "$LIBPREFIX/share/aspell" "$pkgshare/" # Copy Poppler data: $cp_cmd -r "$LIBPREFIX/share/poppler" "$pkgshare" diff --git a/packaging/macosx/osx-build.sh b/packaging/macosx/osx-build.sh index d5e428a0c..048523143 100755 --- a/packaging/macosx/osx-build.sh +++ b/packaging/macosx/osx-build.sh @@ -395,6 +395,7 @@ Included dependency versions (build or runtime): LibWPG $(checkversion libwpg-0.2 libwpg) Libcdr $(checkversion libcdr-0.0 libcdr) Libvisio $(checkversion libvisio-0.0 libvisio) + Potrace $(checkversion potrace potrace) Included python modules: lxml $(checkversion py27-lxml py27-lxml) numpy $(checkversion py27-numpy py27-numpy) diff --git a/packaging/macosx/ports/devel/inkscape-packaging/Portfile b/packaging/macosx/ports/devel/inkscape-packaging/Portfile index b3e2bfe4a..de5d9ef35 100644 --- a/packaging/macosx/ports/devel/inkscape-packaging/Portfile +++ b/packaging/macosx/ports/devel/inkscape-packaging/Portfile @@ -51,7 +51,8 @@ depends_build-append port:popt \ port:ImageMagick \ port:gtkspell2 \ port:aspell-dict-en \ - port:poppler + port:poppler \ + port:potrace # ports for Inkscape.app depends_build-append port:gnome-icon-theme \ @@ -66,6 +67,7 @@ depends_build-append port:py27-lxml \ port:py27-numpy \ port:py27-Pillow \ port:py27-uniconvertor \ + port:py27-serial \ port:py27-pygtk if {${os.major} <= 10} { diff --git a/packaging/release-sign-tarballs b/packaging/release-sign-tarballs new file mode 100755 index 000000000..1c895d877 --- /dev/null +++ b/packaging/release-sign-tarballs @@ -0,0 +1,259 @@ +#!/bin/bash + +SIGNER="bryce@bryceharrington.org" +VERSION="0.92" +PKG_NAME="inkscape" +LIST_TO="inkscape-announce@lists.sf.net" +LIST_CC="inkscape-devel@lists.sf.net" +VCS_SYSTEM="bzr" + +# Locate Dependencies +#------------------------------------------------------------------------------ + +MD5SUM=`which md5sum || which gmd5sum` +SHA1SUM=`which sha1sum || which gsha1sum` +SHA256SUM=`which sha256sum || which gsha256sum` + +# Choose which make program to use (could be gmake) +MAKE=${MAKE:="make"} + +# Set the default make tarball creation command +MAKE_DIST_CMD=distcheck + +# Choose which grep program to use (on Solaris, must be gnu grep) +if [ "x$GREP" = "x" ] ; then + if [ -x /usr/gnu/bin/grep ] ; then + GREP=/usr/gnu/bin/grep + else + GREP=grep + fi +fi + +# Find path for GnuPG v2 +if [ "x$GPG" = "x" ] ; then + if [ -x /usr/bin/gpg2 ] ; then + GPG=/usr/bin/gpg2 + else + GPG=gpg + fi +fi + +#------------------------------------------------------------------------------ + +usage() { + basename="`expr "//$0" : '.*/\([^/]*\)'`" + cat <<HELP + +Usage: $basename [options] path... + +Where "path" is a relative path to a ${VCS_SYSTEM} module, including '.'. + +Options: + (none) + +Environment variables: + MAKE: The name of the make command [make] + MAKEFLAGS: Options to pass to all \$(MAKE) invocations [] + +HELP +} + +#------------------------------------------------------------------------------ + +check_local_changes() { + lines=$(bzr diff | wc -l) + if [ $lines -gt 0 ]; then + echo "" + echo "Uncommitted changes found. Did you forget to commit? Aborting." + echo "" + echo "You can clone the module in another directory" + echo "and run ./configure. No need to build if testing was finished." + echo "" + return 1 + fi + + return 0 +} + +#------------------------------------------------------------------------------ +# Function: make_dist +# +# Create the package distribution +# Return 0 on success, 1 on fail +make_dist() { + if [ $VCS_SYSTEM = "bzr" ] && [ ! -d .bzr ]; then + echo "Error: There is no bzr repository here: $(pwd)" + return 1 + else + echo "Error: Unrecognized version control '$VCS_SYSTEM'." + return 1 + fi + + # Change to an out-of-source build directory + config_indicator=CMakeCache.txt + status_file=$(find . -name ${config_indicator} -type f) + if [ $? -ne 0 ]; then + echo "Error: Failed to locate ${config_indicator}." + echo "Has the module been configured?" + return 1 + fi + configNum=$(echo "$status_file" | wc -l | sed 's:^ *::') + if [ x"$configNum" = x0 ]; then + echo "Error: Failed to locate ${config_indicator}, has the module been configured?" + return 1 + elif [ x"$configNum" != x1 ]; then + echo "Error: More than one ${config_indicator} file was found." + echo "Please cleanup previously failed attempts at distcheck." + fi + + build_dir=$(dirname ${status_file}) + cd ${build_dir} + if [ $? -ne 0 ]; then + echo "Error: Failed to cd to build directory ${build_dir}." + return 1 + fi + + check_local_changes + if [ $? -ne 0 ]; then + cd ${top_src} + return 1 + fi + + echo "Info: running 'make $MAKE_DIST_CMD' to create tarballs:" + ${MAKE} ${MAKEFLAGS} ${MAKE_DIST_CMD} > /dev/null + if [ $? -ne 0 ]; then + echo "Error: '${MAKE} ${MAKEFLAGS} ${MAKE_DIST_CMD}' failed." + cd $top_src + return 1 + fi + + return 0 +} + +# Function: sign_or_fail +#------------------------------------------------------------------------------ +# +# Sign the given file, if any +# Output the name of the signature generated to stdout (all other output to +# stderr) +# Return 0 on success, 1 on fail +# +sign_or_fail() { + if [ -n "$1" ]; then + sig=$1.sig + rm -f $sig + + [ -n ${SIGNER} ] && signer="-u $SIGNER" + + echo "$GPG $signer --detach-sign $1" 1>&2 + $GPG $signer --detach-sign $1 1>&2 + if [ $? -ne 0 ]; then + echo "Error: failed to sign $1." >&2 + return 1 + fi + echo $sig + fi + return 0 +} + + +sign_packages() { + tar_name="$1" + targz="${tar_name}.tar.gz" + tarbz2="${tar_name}.tar.bz2" + tarxz="${tar_name}.tar.xz" + zip="${tar_name}.zip" + + for tarball in $targz $tarxz $tarbz2 $zip; do + if [ -e "${tarball}" ]; then + sig="$(sign_or_fail ${tarball})" + gpgsignerr=$((${gpgsignerr} + $?)) + sig_url="http://inkscape.org/.../$sig" + cat <<EOF +https://inkscape.org/en/download/source/ +MD5: `$MD5SUM $tarball` +SHA1: `$SHA1SUM $tarball` +SHA256: `$SHA256SUM $tarball` +$sig_url + +EOF + fi + done + + if [ ${gpgsignerr} -ne 0 ]; then + echo "Error: unable to sign at least one of the tarballs." + return 1 + elif [ -z "$siggz" ]; then + # The tar.gz is always required + echo "Error: Unable to sign the tar.gz file." + return 2 + fi + + return 0; +} + +generate_announce() { + cat <<RELEASE +Subject: [ANNOUNCE] $PKG_NAME $VERSION +To: $LIST_TO +Cc: $LIST_CC + +The Inkscape community proudly announces the release of Inkscape $VERSION. + + https://inkscape.org/en/download/ + +Inkscape is a drawing and painting tool similar to Illustrator, +CorelDraw, and Xara X, but with features, new tools, and interface style +of its own. It emphasizes the W3C standard Scalable Vector Graphics +(SVG) file format, but reads and writes a wealth of other formats +including PDF, so it is an easy complement to your other graphics and +desktop tools. Best of all, Inkscape is created *by* the community *for* +the community: Inkscape is 100% Open Source and freely available to +everyone in the world. + +<INSERT DETAILS ABOUT THE RELEASE HERE> + +The above barely scratches the surface of what's included in this +release. For the full scoop, please see our detailed Release Notes: + + http://wiki.inkscape.org/wiki/index.php/Release_notes/$VERSION + +RELEASE +} + +process() { + top_src=$(pwd) + + tar_name=$(make_dist) + generate_announce > "${tar_name}.announce" + + # TODO: Once converted to git, enable display of shortlog + #tag_previous=`git describe --abbrev=0 HEAD^ 2>/dev/null` + #tag_range="FIXME..FIXME" + #`git log --no-merges "$tag_range" | git shortlog` + echo "${VCS_SYSTEM} tag: $tar_name" >> ${tar_name}.announce + + sign_packages ${tar_name} >> "${tar_name}.announce" + if [ $? -ne 0 ]; then + rm "${tar_name}.announce" + echo "Error: Failed signatures" + return 1 + fi + + # TODO: Verify the top commit SHA has a version bump + # local_top_commit_sha=`git rev-list --max-count=1 HEAD` + # git diff --unified=0 HEAD^ | $GREP -F $pkg_version >/dev/null 2>&1 + # TODO: Check that the top commit is pushed to remote + # git rev-list --max-count=1 $remote_name/$remote_branch + + echo "TODO: Tag the top commit as $tar_name" + echo "TODO: Upload the tarballs to the remote" + echo "TODO: Push all local changes and tags to remote" + + echo "Info: [ANNOUNCE] template generated in \"$tar_name.announce\" file." + echo " Please pgp sign and send it." + + return 0 +} + +process |
