First of all, AbiWord relies on a number of Fink libraries, so make sure they are installed.
fink install \ libgsf glib2 libxml2 gettext libiconv bzip2 libwpd-0.8Alternatively, you may use apt-get to avoid compiling these packages from scratch if you know what you're doing.
The official way to build AbiWord is to go to ${SRCDIR}/pbx and read the instructions there and proceed. However, before running build_all.sh, I had to adjust a couple of things.
First,
# current working directory is ${SRCDIR}/pbx ln -s ../{popt,libpng,wv} .so build_all.sh can find them.
Notice that for fribidi, you cannot use the source code supplied in ${SRCDIR}/fribidi, which is for building on Windows only. Prepare it by the following steps:
- Download and unpack a fresh copy of fribidi. You should get a directory called fribidi-${version}, where ${version} is some version of fribidi you downloaded.
- Make a symbolic link from fribidi to fribidi-${version} so build_all.sh can find it.
- Run configure script there to generate config.h
- Make a symbolic link from wcwidth.c and wcwidth.i to fribidi_wcwidth.c and fribidi_wcwidth.i respectively.
- Open fribidipbx/fribidipbx2.pbproj, then add fribidi/fribidi_types.i and fribidi/fribidi_char_sets.i to the project. The paths should be "relative to project," and make sure their roles are "public" under Targets/fribidipbx/Headers and the file types are "sourcecode.c.h".
# current working directory is ${SRCDIR}/pbx export CVSROOT=':pserver:anoncvs@anoncvs.abisource.com:/cvsroot' cvs login # password is 'anoncvs' cvs export -renchant-1-3-0 enchant cvs export -rrelease-1-2-1 enchantpbx unset CVSROOTOpen enchantpbx/enchantpbx.xcode with Xcode and add enchant/src/pwl.c to the target "enchant framework." Now enchant should build.
The last phase is to prepare the source of abi/, using the commands:
# current working directory is still ${SRCDIR}/pbx wget http://www.abisource.com/.../link-grammar-4.2.4.tar.gz tar zxvf link-grammar-4.2.4 ln -s link-grammar-4.2.4 link-grammar (cd .. && ln -s pbx/link-grammar-4.2.4 link-grammar) perl -pi -e 's,DICTIONARY_DIR=\\"\\",DICTIONARY_DIR=\\\\\\".\\\\\\",' \ link-grammar/link-grammar.xcode/project.pbxproj ln -s ../{abi,abipbx,abidistfiles,abiword-plugins} . (cd abi/src/wp/ap/xp/ToolbarIcons/ && make) perl -pi -e 's/hdiutil create -megabytes 30/hdiutil create -megabytes 40/' \ build_all.shFinally, one should be able to build AbiWord using the command ./build_all.sh all. However, the resulting AbiWord won't run if your glib2 depends on libgettext3 (libintl.3.dylib) instead of gettext (libintl.1.dylib). This, of course, depends on the versions of Fink packages you use. If this is a problem for you, you can either try to add libintl.3.dylib to abipbx/abipbx2.pbproj (add that to preparelibs.sh as well), or just copy /sw/lib/libintl.3.dylib to AbiWord.app/Content/Frameworks.
It is great to have AbiWord on Mac OS X, but users should not jump through so many hoops to compile it from source. The source tree needs a good clean-up, and Xcode project files need to be made consistent with the latest versions of fribidi and enchant. They should bundle fribidi (for building Mac OS X framework), enchant, and link-grammar. They should definitely fix the build_all.sh script, so the symbolic links are no longer necessary.
Furthermore, I think it's a bad idea to depend on compiled Fink binaries. This has at least two problems.
- Fink package versions vary wildly from machine to machine. Fink itself ensures only that minimal dependencies are met, and will happily use more recent packages if available. The situation of gettext vs. libgettext3 is just one of the many examples.
- One usually expects that Fink packages are compiled from source and run on the same machine. It is common to find packages that assume MACOSX_DEPLOYMENT_TARGET to be the same version as the host machine. If you compile AbiWord on 10.3, you can't run it on 10.2.
2 comments:
You would have come around on IRC and asked, you would have known the following:
-checking out "abicocoa" from CVS gets you what you need and avoid to have to do all the links you did.
-the proper fribidi version to be build, which is not the latest but likely does not matter....
-there is a script to download other stuff that you could just have run
-build_devel.sh is actually the right script to build.
Glad you commented. This is something you need to put down on record so people can search for it. All I could find are out-dated mailing list posts. The source tree itself isn't that well documented either.
Now please just merge abicocoa with HEAD. That'd be terrific.
Post a Comment