Official:MacOS SVN
Mac OSX Hints and Notes - SVN
Editor's Note: These notes are based on advice and notes kindly provided by Martin Costabel, who has done a terrific job of maintaining the Scribus fink package, as well as, providing assistance to fink users on the mailing list.
Building Scribus SVN
Install the required libraries. The easiest way to get them in Fink is probably to run fink install scribus
and then stop it when all the prerequisites are installed and fink starts to build scribus. The list of required packages is given in the Fink scribus.info file in the Depends and BuildDepends lines. The depends are automatically installed by the Fink installer.
Depends
- x11
- ghostscript
- qt3-shlibs
- libjpeg-shlibs
- libjpeg-bin
- lcms-shlibs (>=1.09)
- libart2-shlibs
- libpng3-shlibs
- libtiff-shlibs
- freetype2-shlibs or freetype2-hinting-shlibs
Build Depends
- x11-dev
- lcms
- libjpeg
- qt3
- libart2
- cups-dev
- libpng3
- libtiff
- freetype2-dev or freetype2-hinting-dev
Setup the environment:
Using tcsh as the shell:
setenv CFLAGS -I/sw/include setenv LDFLAGS -L/sw/lib setenv CXXFLAGS $CFLAGS setenv CPPFLAGS $CXXFLAGS setenv ACLOCAL_FLAGS "-I /sw/share/aclocal" setenv PKG_CONFIG_PATH "/sw/lib/pkgconfig"
Using bash as the shell:
export CFLAGS=-I/sw/include export LDFLAGS=-L/sw/lib export CXXFLAGS=$CFLAGS export CPPFLAGS=$CXXFLAGS export ACLOCAL_FLAGS="-I /sw/share/aclocal" export PKG_CONFIG_PATH="/sw/lib/pkgconfig"
One can then run:
make -f Makefile.dist
It is not necessary to install autoconf and automake from Fink, they exist in Mac OSX 10.3 already. Then configure
as follows:
./configure --with-qt-dir=/sw --with-qt-includes=/sw/include/qt --with-qt-libraries=/sw/lib
--with-extra-includes=/sw/include
--with-pythondir=/System/Library/Frameworks/Python.framework/Versions/2.3/
Before one can run make
, one needs the patches that are done in the PatchScript of the Fink scribus.info file.
The first group of patches helps find the right versions of the freetype headers and libraries (those from Fink, Apple's X11 has a freetype version that is too old) and the right python version (the one from MacOSX):
perl -pi -e 's,usr/X11/bin,usr/X11R6/bin,g' configure perl -pi -e 's,FREETYPE_CONFIG=\"\",FREETYPE_CONFIG=\"/sw/lib/freetype2/bin/freetype-config\",g' configure perl -pi -e 's,LIBS=\"\-lfreetype,LIBS=\"\$LIBFREETYPE_LIBS,g' configure perl -pi -e "s,PYTHONLIB=.*,PYTHONLIB='-framework Python'\npython_libdir=yes\nLIBPYTHON=' ',g" configure perl -pi -e "s,LIBPYTHON =.*,LIBPYTHON=,g" scribus/plugins/scriptplugin/Makefile.in
The second group is necessary for building the plugins. This is a hack that could probably be done differently.
perl -pi -e 's|^AM_LDFLAGS = .*\-s|AM_LDFLAGS = \$(all_libraries) \$(LIB_QT)|g' `find . -name Makefile.in` perl -pi -e 's|(lib.*)\.la|$1.so|g' `find . -name Makefile.in` perl -pi -e 's|-version-info 0:0:0|-bundle -undefined dynamic_lookup -bind_at_load|g' `find . -name Makefile.in` perl -pi -e 's|libpdf_la_LIBADD =|libpdf_la_LIBADD =\$(LIBTIFF)|g' scribus/libpdf/Makefile.in
One can then run:
make sudo make install
It installs scribus into /usr/local
, so it does not interfere with a different version installed by Fink, which goes into /sw
.