summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6326253)
raw | patch | inline | side by side (parent: 6326253)
author | mjwybrow <mjwybrow@users.sourceforge.net> | |
Tue, 8 Sep 2009 01:59:06 +0000 (01:59 +0000) | ||
committer | mjwybrow <mjwybrow@users.sourceforge.net> | |
Tue, 8 Sep 2009 01:59:06 +0000 (01:59 +0000) |
config files/resources" Include the ImageMagick resources in the bundle.
Note that this only works when the user does not have a version installed
in the same prefix as the one originally built for the bundle. This should
be okay since the official package is built with a long obscure prefix.
- Fix bug #392693: "Conflict between bundled and system libxml dylib"
The official package no longer uses the DYLD_LIBRARY_PATH magic. Instead
all paths within the dylibs, executable and shared objects get rewritten
to be relative to the executable. Note: Packagers will need to install
Macports into a PREFIX of 50 characters in length to allow enough space
within all the libraries for path rewriting.
Note that this only works when the user does not have a version installed
in the same prefix as the one originally built for the bundle. This should
be okay since the official package is built with a long obscure prefix.
- Fix bug #392693: "Conflict between bundled and system libxml dylib"
The official package no longer uses the DYLD_LIBRARY_PATH magic. Instead
all paths within the dylibs, executable and shared objects get rewritten
to be relative to the executable. Note: Packagers will need to install
Macports into a PREFIX of 50 characters in length to allow enough space
within all the libraries for path rewriting.
packaging/macosx/Resources/bin/inkscape | patch | blob | history | |
packaging/macosx/Resources/script | patch | blob | history | |
packaging/macosx/osx-app.sh | patch | blob | history |
index a085ca4981b7ccb231774ca034d2636cfbc9bf4c..f3686511793ec3a7e93944ae9de91c12cf623634 100755 (executable)
export PYTHONPATH="$TOP/python/site-packages/$ARCH/$PYTHON_VERS"
# NB: we are only preprending some stuff to the default python path so if the directory does not exist it should not harm the rest
-export DYLD_LIBRARY_PATH="$TOP/lib"
+# No longer required if path rewriting has been conducted.
+# export DYLD_LIBRARY_PATH="$TOP/lib"
export FONTCONFIG_PATH="$TOP/etc/fonts"
export XDG_DATA_DIRS="$TOP/share"
export ASPELL_CONF="prefix $TOP;"
+# Note: This requires the path with the exact ImageMagic version number.
+# FIXME: Make the osx-app.sh script write the version into this file when
+# building the package. Note, that ImageMagick will only work if
+# it does not find a version installed into the same PREFIX as it
+# was originally installed. Luckily, this is very unlikely given
+# the extra long and strangely named install prefix we use.
+export MAGICK_CONFIGURE_PATH="$TOP/lib/ImageMagick-6.5.5/config:$TOP/share/ImageMagick-6.5.5/config"
+export MAGICK_CODER_FILTER_PATH="$TOP/lib/ImageMagick-6.5.5/modules-Q16/filters"
+export MAGICK_CODER_MODULE_PATH="$TOP/lib/ImageMagick-6.5.5/modules-Q16/coders"
+
export INKSCAPE_SHAREDIR="$TOP"
# TODO: move the share directory to a its own folder to make things a bit cleaner in the app bundle
export INKSCAPE_PLUGINDIR="$TOP/lib/inkscape"
index c58361d8625615ddc86f1e1fa2485322712ee8d3..f0fe88efea48ccb1f93c0ac078ce6dc096c6da7b 100755 (executable)
export DISPLAY=`cat /tmp/display.$UID`
ps -wx -ocommand | grep -e '[X]11' > /dev/null || exit 11
-
- # Warn the user about time-consuming generation of fontconfig caches.
- test -f "${HOME}/.inkscape/.fccache-new" || exit 12
-else
- # Leopard onwards...
-
- # Warn the user about time-consuming generation of fontconfig caches.
- test -d "${HOME}/.fontconfig" || exit 12
fi
+
+# Warn the user about time-consuming generation of fontconfig caches.
+test -f "${HOME}/.inkscape/.fccache-new" || exit 12
index b8d608a80b7d27a51546f1765a1b00439fb17ba9..251fc128947bc5ae88c621485c7f78a41d21ab69 100755 (executable)
exit 1
fi
+if ! pkg-config --modversion ImageMagick >/dev/null 2>&1; then
+ echo "Missing ImageMagick -- please install ImageMagick and try again." >&2
+ exit 1
+fi
+
if [ ! -e "$LIBPREFIX/lib/aspell-0.60/en.dat" ]; then
echo "Missing aspell en dictionary -- please install at least 'aspell-dict-en', but" >&2
echo "preferably all dictionaries ('aspell-dict-*') and try again." >&2
mkdir -p $pkglib/gnome-vfs-2.0/modules
cp $LIBPREFIX/lib/gnome-vfs-2.0/modules/*.so $pkglib/gnome-vfs-2.0/modules/
+imagemagick_version=`pkg-config --modversion ImageMagick`
+cp -r "$LIBPREFIX/lib/ImageMagick-$imagemagick_version" "$pkglib/"
+cp -r "$LIBPREFIX/share/ImageMagick-$imagemagick_version" "$pkgresources/share/"
+
# Copy aspell dictionary files:
cp -r "$LIBPREFIX/lib/aspell-0.60" "$pkglib/"
cp -r "$LIBPREFIX/share/aspell" "$pkgresources/share/"
endl=true
while $endl; do
echo -e "\033[1mLooking for dependencies.\033[0m Round" $a
- libs="`otool -L $pkglib/gtk-2.0/$gtk_version/{engines,immodules,loaders,printbackends}/*.{dylib,so} $pkglib/pango/$pango_version/modules/* $pkglib/gnome-vfs-2.0/modules/* $package/Contents/Resources/lib/* $binary 2>/dev/null | fgrep compatibility | cut -d\( -f1 | grep $LIBPREFIX | sort | uniq`"
+ libs="`otool -L $pkglib/gtk-2.0/$gtk_version/{engines,immodules,loaders,printbackends}/*.{dylib,so} $pkglib/pango/$pango_version/modules/* $pkglib/gnome-vfs-2.0/modules/* $package/Contents/Resources/lib/* $pkglib/ImageMagick/modules-Q16/{filters,coders}/*.so $binary 2>/dev/null | fgrep compatibility | cut -d\( -f1 | grep $LIBPREFIX | sort | uniq`"
cp -f $libs $package/Contents/Resources/lib
let "a+=1"
nnfiles=`ls $package/Contents/Resources/lib | wc -l`
done
fi
}
-#
-# Fix package deps
-# (cd "$package/Contents/Resources/lib/gtk-2.0/2.10.0/loaders"
-# for file in *.so; do
-# echo "Rewriting dylib paths for $file..."
-# fixlib "$file" "`pwd`"
-# done
-# )
-# (cd "$package/Contents/Resources/lib/gtk-2.0/2.10.0/engines"
-# for file in *.so; do
-# echo "Rewriting dylib paths for $file..."
-# fixlib "$file" "`pwd`"
-# done
-# )
-# (cd "$package/Contents/Resources/lib/gtk-2.0/2.10.0/immodules"
-# for file in *.so; do
-# echo "Rewriting dylib paths for $file..."
-# fixlib "$file" "`pwd`"
-# done
-# )
-# (cd "$package/Contents/Resources/lib/gtk-2.0/2.10.0/printbackends"
-# for file in *.so; do
-# echo "Rewriting dylib paths for $file..."
-# fixlib "$file" "`pwd`"
-# done
-# )
-# (cd "$package/Contents/Resources/bin"
-# for file in *; do
-# echo "Rewriting dylib paths for $file..."
-# fixlib "$file" "`pwd`"
-# done
-# cd ../lib
-# for file in *.dylib; do
-# echo "Rewriting dylib paths for $file..."
-# fixlib "$file" "`pwd`"
-# done
-# )
+
+rewritelibpaths () {
+ #
+ # Fix package deps
+ (cd "$package/Contents/Resources/lib/gtk-2.0/2.10.0/loaders"
+ for file in *.so; do
+ echo "Rewriting dylib paths for $file..."
+ fixlib "$file" "`pwd`"
+ done
+ )
+ (cd "$package/Contents/Resources/lib/gtk-2.0/2.10.0/engines"
+ for file in *.so; do
+ echo "Rewriting dylib paths for $file..."
+ fixlib "$file" "`pwd`"
+ done
+ )
+ (cd "$package/Contents/Resources/lib/gtk-2.0/2.10.0/immodules"
+ for file in *.so; do
+ echo "Rewriting dylib paths for $file..."
+ fixlib "$file" "`pwd`"
+ done
+ )
+ (cd "$package/Contents/Resources/lib/gtk-2.0/2.10.0/printbackends"
+ for file in *.so; do
+ echo "Rewriting dylib paths for $file..."
+ fixlib "$file" "`pwd`"
+ done
+ )
+ (cd "$package/Contents/Resources/lib/gnome-vfs-2.0/modules"
+ for file in *.so; do
+ echo "Rewriting dylib paths for $file..."
+ fixlib "$file" "`pwd`"
+ done
+ )
+ (cd "$package/Contents/Resources/lib/pango/1.6.0/modules"
+ for file in *.so; do
+ echo "Rewriting dylib paths for $file..."
+ fixlib "$file" "`pwd`"
+ done
+ )
+ (cd "$package/Contents/Resources/lib/ImageMagick/modules-Q16/filters"
+ for file in *.so; do
+ echo "Rewriting dylib paths for $file..."
+ fixlib "$file" "`pwd`"
+ done
+ )
+ (cd "$package/Contents/Resources/lib/ImageMagick/modules-Q16/coders"
+ for file in *.so; do
+ echo "Rewriting dylib paths for $file..."
+ fixlib "$file" "`pwd`"
+ done
+ )
+ (cd "$package/Contents/Resources/bin"
+ for file in *; do
+ echo "Rewriting dylib paths for $file..."
+ fixlib "$file" "`pwd`"
+ done
+ cd ../lib
+ for file in *.dylib; do
+ echo "Rewriting dylib paths for $file..."
+ fixlib "$file" "`pwd`"
+ done
+ )
+}
+
+PATHLENGTH=`echo $LIBPREFIX | wc -c`
+if [ "$PATHLENGTH" -ge "50" ]; then
+ # If the LIBPREFIX path is long enough to allow
+ # path rewriting, then do this.
+ rewritelibpaths
+else
+ echo "Could not rewrite dylb paths for bundled libraries. This requires" >&2
+ echo "Macports to be installed in a PREFIX of at least 50 characters in length." >&2
+ echo "" >&2
+ echo "The package will still work if the following line is uncommented in" >&2
+ echo "Inkscape.app/Contents/Resources/bin/inkscape:" >&2
+ echo ' export DYLD_LIBRARY_PATH="$TOP/lib"' >&2
+ exit 1
+
+fi
exit 0