Inkscapeのインストール

結論から言うと、公式のInkscape-0.46-1.LEOPARD.UNIVERSAL.dmgをダウンロードした方がいい。
以下は数日前にやったport install inkscapeでひっかかった場所と修正の作業。

port install desktop-file-utils

Error: Target org.macports.activate returned: shell command "/opt/local/bin/update-desktop-database /opt/local/share/applications" returned error 1
Command output: No directories in update-desktop-database search path could be processed and updated.

desktop-file-utilsのPortfileを確認する限りでは、post-activateで/opt/local/share/applicationsに対してupdate-desktop-databaseコマンドを実行しようとしているんだけど、そんなディレクトリは存在しないのでエラーを吐いてる。
/opt/local/share/applicationsってGNOME関連かなぁ。port clean desktop-file-utilsで掃除しとけばエラーそのものは無視して大丈夫だと思うんだけど。

port install glibmm

--->  Building glibmm with target all
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_glibmm/work/glibmm-2.14.2" && make all " returned error 2
Command output: /bin/sh ../../libtool --tag=CXX   --mode=link /usr/bin/g++-4.0  -O2 -Wall -Wno-long-long  -version-info 1:24:0 -L/opt/local/lib -o libglibmm_generate_extra_defs-2.4.la -rpath /opt/local/lib  generate_extra_defs.lo -L/opt/local/lib -lsigc-2.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl -liconv   -L/opt/local/lib -lsigc-2.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl -liconv  
/usr/bin/g++-4.0 -dynamiclib -single_module ${wl}-flat_namespace ${wl}-undefined ${wl}suppress -o .libs/libglibmm_generate_extra_defs-2.4.1.0.24.dylib  .libs/generate_extra_defs.o  -L/opt/local/lib /opt/local/lib/libsigc-2.0.dylib /opt/local/lib/libgobject-2.0.dylib /opt/local/lib/libgmodule-2.0.dylib /opt/local/lib/libglib-2.0.dylib /opt/local/lib/libintl.dylib /opt/local/lib/libiconv.dylib  -install_name  /opt/local/lib/libglibmm_generate_extra_defs-2.4.1.dylib -Wl,-compatibility_version -Wl,2 -Wl,-current_version -Wl,2.24
(cd .libs && rm -f libglibmm_generate_extra_defs-2.4.1.dylib && ln -s libglibmm_generate_extra_defs-2.4.1.0.24.dylib libglibmm_generate_extra_defs-2.4.1.dylib)
(cd .libs && rm -f libglibmm_generate_extra_defs-2.4.dylib && ln -s libglibmm_generate_extra_defs-2.4.1.0.24.dylib libglibmm_generate_extra_defs-2.4.dylib)
creating libglibmm_generate_extra_defs-2.4.la
(cd .libs && rm -f libglibmm_generate_extra_defs-2.4.la && ln -s ../libglibmm_generate_extra_defs-2.4.la libglibmm_generate_extra_defs-2.4.la)
/usr/bin/g++-4.0 -DHAVE_CONFIG_H -I. -I../.. -I../../glib -I/opt/local/include/sigc++-2.0 -I/opt/local/lib/sigc++-2.0/include -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include    -I/opt/local/include  -O2 -Wall -Wno-long-long -MT generate_defs_glib.o -MD -MP -MF .deps/generate_defs_glib.Tpo -c -o generate_defs_glib.o generate_defs_glib.cc
mv -f .deps/generate_defs_glib.Tpo .deps/generate_defs_glib.Po
/bin/sh ../../libtool --tag=CXX   --mode=link /usr/bin/g++-4.0  -O2 -Wall -Wno-long-long  -L/opt/local/lib -o generate_extra_defs generate_defs_glib.o libglibmm_generate_extra_defs-2.4.la -L/opt/local/lib -lsigc-2.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl -liconv  
/usr/bin/g++-4.0 -O2 -Wall -Wno-long-long -o .libs/generate_extra_defs generate_defs_glib.o -Wl,-bind_at_load  -L/opt/local/lib ./.libs/libglibmm_generate_extra_defs-2.4.dylib /opt/local/lib/libsigc-2.0.dylib /opt/local/lib/libgobject-2.0.dylib /opt/local/lib/libgmodule-2.0.dylib /opt/local/lib/libglib-2.0.dylib /opt/local/lib/libintl.dylib -lc /opt/local/lib/libiconv.dylib
creating generate_extra_defs
make[3]: Nothing to be done for `all-am'.
Making all in glib
make  all-recursive
Making all in src
make[4]: Nothing to be done for `all'.
Making all in glibmm
Making all in private
make[5]: Nothing to be done for `all'.
/bin/sh ../../libtool --tag=CXX   --mode=compile /usr/bin/g++-4.0 -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"glibmm\"  -I../../glib -I../../glib -I/opt/local/include/sigc++-2.0 -I/opt/local/lib/sigc++-2.0/include -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -D_REENTRANT -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include  -I/opt/local/include  -O2 -Wall -Wno-long-long -MT convert.lo -MD -MP -MF .deps/convert.Tpo -c -o convert.lo convert.cc
mkdir .libs
 /usr/bin/g++-4.0 -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"glibmm\" -I../../glib -I../../glib -I/opt/local/include/sigc++-2.0 -I/opt/local/lib/sigc++-2.0/include -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -D_REENTRANT -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include -O2 -Wall -Wno-long-long -MT convert.lo -MD -MP -MF .deps/convert.Tpo -c convert.cc  -fno-common -DPIC -o .libs/convert.o
convert.cc: In constructor 'Glib::IConv::IConv(const std::string&, const std::string&)':
convert.cc:52: error: 'g_assert' was not declared in this scope
make[5]: *** [convert.lo] Error 1
make[4]: *** [all-recursive] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Error: The following dependencies failed to build: gtkmm glibmm lcms libcroco libgnomeprintui gnome-icon-theme icon-naming-utils p5-getopt-long p5-pathtools p5-xml-simple p5-xml-namespacesupport p5-xml-sax libgnomecanvas gail libart_lgpl libglade2 libgnomeprint bison m4 libgnomecups py25-numpy fftw-3 g95 py25-hashlib python25 py25-xml
Error: Status 1 encountered during processing.

ローカルでglibmm-2.16.0なPortfileを書いて無理矢理コンパイルを通した。

port install p5-getopt-long

Error: Target org.macports.activate returned: Image error: /opt/local/lib/perl5/5.8.8/Getopt/Long.pm is being used by the active perl5.8 port.  Please deactivate this port first, or use the -f flag to force the activation.
Error: Status 1 encountered during processing.

fオプションで無理矢理入れた。

Warning: File /opt/local/lib/perl5/5.8.8/Getopt/Long.pm already exists.  Moving to: /opt/local/lib/perl5/5.8.8/Getopt/Long.pm.mp_1205833734.
Warning: File /opt/local/lib/perl5/5.8.8/newgetopt.pl already exists.  Moving to: /opt/local/lib/perl5/5.8.8/newgetopt.pl.mp_1205833734.

port install py25-hashlib

--->  Building py25-hashlib with target build
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py25-hashlib/work/Python-2.5.2/Modules" && /opt/local/bin/python2.5 setup.py build " returned error 1
Command output: running build
running build_ext
building '_hashlib' extension
creating build
creating build/temp.macosx-10.3-i386-2.5
-DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/opt/local/include -I/opt/local/include/python2.5 -c _hashopenssl.c -o build/temp.macosx-10.3-i386-2.5/_hashopenssl.o
unable to execute -DNDEBUG: No such file or directory
error: command '-DNDEBUG' failed with exit status 1

Error: The following dependencies failed to build: py25-numpy py25-hashlib py25-xml
Error: Status 1 encountered during processing.

cleanしてもう一度installしたら通った。

port install inkscape

Fetching inkscape
--->  Building inkscape with target all
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_gnome_inkscape/work/inkscape-0.45.1" && make all " returned error 2
Command output: make  all-recursive
Making all in src
if /usr/bin/g++-4.0 -DHAVE_CONFIG_H -I. -I. -I.. -I/opt/local/lib/perl5/5.8.8/darwin-2level/CORE  -I/opt/local/include/python2.5 -I/opt/local/include/freetype2 -I/opt/local/include -DXTHREADS -I/opt/local/include/libgnomeprint-2.2 -I/opt/local/include/libart-2.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/libxml2 -I/opt/local/include/pango-1.0 -I/opt/local/include/libgnomeprintui-2.2 -I/opt/local/include/libgnomecanvas-2.0 -I/opt/local/include/gail-1.0 -I/opt/local/include/gtk-2.0 -I/opt/local/include/freetype2 -I/opt/local/include/atk-1.0 -I/opt/local/lib/gtk-2.0/include -I/opt/local/include/cairo -I/opt/local/include/libpng12 -I/usr/X11/include   -D_REENTRANT -DORBIT2=1 -I/opt/local/include/gnome-vfs-2.0 -I/opt/local/lib/gnome-vfs-2.0/include -I/opt/local/include/gconf/2 -I/opt/local/include/orbit-2.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include   -DRELAYTOOL_CRYPTO='static const int libcrypto_is_present = 1; static int __attribute__((unused)) libcrypto_symbol_is_present(char *m) { return 1; }' -DRELAYTOOL_SSL='static const int libssl_is_present = 1; static int __attribute__((unused)) libssl_symbol_is_present(char *m) { return 1; }' -I/opt/local/include   -DHAVE_SSL -DXTHREADS -I/opt/local/include -I/usr/X11/include -I/opt/local/include/freetype2   -DPOTRACE=\"potrace\" -DXTHREADS -D_REENTRANT -I/opt/local/include/gdkmm-2.4 -I/opt/local/lib/gdkmm-2.4/include -I/opt/local/include/glibmm-2.4 -I/opt/local/lib/glibmm-2.4/include -I/opt/local/include/pangomm-1.4 -I/opt/local/include/gtk-2.0 -I/opt/local/lib/gtk-2.0/include -I/opt/local/include/cairomm-1.0 -I/opt/local/include/sigc++-2.0 -I/opt/local/lib/sigc++-2.0/include -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/pango-1.0 -I/opt/local/include/cairo -I/opt/local/include/freetype2 -I/opt/local/include/libpng12 -I/usr/X11/include -I/opt/local/include/gtkmm-2.4 -I/opt/local/lib/gtkmm-2.4/include -I/opt/local/include/atkmm-1.6 -I/opt/local/include/atk-1.0 -I/opt/local/include/libxml2   -I../cxxtest  -I/opt/local/include  -Wall -Wformat-security -W -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch  -Wno-unused-parameter -O2 -MT arc-context.o -MD -MP -MF ".deps/arc-context.Tpo" \
	  -c -o arc-context.o `test -f 'arc-context.cpp' || echo './'`arc-context.cpp; \
	then mv -f ".deps/arc-context.Tpo" ".deps/arc-context.Po"; \
	else rm -f ".deps/arc-context.Tpo"; exit 1; \
	fi
if /usr/bin/g++-4.0 -DHAVE_CONFIG_H -I. -I. -I.. -I/opt/local/lib/perl5/5.8.8/darwin-2level/CORE  -I/opt/local/include/python2.5 -I/opt/local/include/freetype2 -I/opt/local/include -DXTHREADS -I/opt/local/include/libgnomeprint-2.2 -I/opt/local/include/libart-2.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/libxml2 -I/opt/local/include/pango-1.0 -I/opt/local/include/libgnomeprintui-2.2 -I/opt/local/include/libgnomecanvas-2.0 -I/opt/local/include/gail-1.0 -I/opt/local/include/gtk-2.0 -I/opt/local/include/freetype2 -I/opt/local/include/atk-1.0 -I/opt/local/lib/gtk-2.0/include -I/opt/local/include/cairo -I/opt/local/include/libpng12 -I/usr/X11/include   -D_REENTRANT -DORBIT2=1 -I/opt/local/include/gnome-vfs-2.0 -I/opt/local/lib/gnome-vfs-2.0/include -I/opt/local/include/gconf/2 -I/opt/local/include/orbit-2.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include   -DRELAYTOOL_CRYPTO='static const int libcrypto_is_present = 1; static int __attribute__((unused)) libcrypto_symbol_is_present(char *m) { return 1; }' -DRELAYTOOL_SSL='static const int libssl_is_present = 1; static int __attribute__((unused)) libssl_symbol_is_present(char *m) { return 1; }' -I/opt/local/include   -DHAVE_SSL -DXTHREADS -I/opt/local/include -I/usr/X11/include -I/opt/local/include/freetype2   -DPOTRACE=\"potrace\" -DXTHREADS -D_REENTRANT -I/opt/local/include/gdkmm-2.4 -I/opt/local/lib/gdkmm-2.4/include -I/opt/local/include/glibmm-2.4 -I/opt/local/lib/glibmm-2.4/include -I/opt/local/include/pangomm-1.4 -I/opt/local/include/gtk-2.0 -I/opt/local/lib/gtk-2.0/include -I/opt/local/include/cairomm-1.0 -I/opt/local/include/sigc++-2.0 -I/opt/local/lib/sigc++-2.0/include -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/pango-1.0 -I/opt/local/include/cairo -I/opt/local/include/freetype2 -I/opt/local/include/libpng12 -I/usr/X11/include -I/opt/local/include/gtkmm-2.4 -I/opt/local/lib/gtkmm-2.4/include -I/opt/local/include/atkmm-1.6 -I/opt/local/include/atk-1.0 -I/opt/local/include/libxml2   -I../cxxtest  -I/opt/local/include  -Wall -Wformat-security -W -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch  -Wno-unused-parameter -O2 -MT attributes.o -MD -MP -MF ".deps/attributes.Tpo" \
	  -c -o attributes.o `test -f 'attributes.cpp' || echo './'`attributes.cpp; \
	then mv -f ".deps/attributes.Tpo" ".deps/attributes.Po"; \
	else rm -f ".deps/attributes.Tpo"; exit 1; \
	fi
attributes.cpp: In function 'unsigned int sp_attribute_lookup(const gchar*)':
attributes.cpp:400: error: 'g_assert' was not declared in this scope
make[2]: *** [attributes.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Error: Status 1 encountered during processing.

こちらもinkscape-0.4.6のPortfileを書いた。

configure: error: You need the boost package (e.g. libboost-dev)

boostが必要らしいので依存パッケージに追加。

port install boost

--->  Building boost with target all
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_boost/work/boost_1_34_1" && gmake all " returned error 2
Command output: Makefile:2: *** missing separator.  Stop.

この時点では何故かport installではエラーが出て、port buildは通った。build後にinstallしたら何故かインストールできた。

port install inkscape

ここまででインストールは完了するけどまともに動かない。boehmgcの不具合らしい。
以下を参考にローカルにboehmgc-6.8のPortfileを書いた。

これでInkscapeが問題なく起動する。