ReadMe.rtf 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816
  1. {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf460
  2. {\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fnil\fcharset0 Monaco;}
  3. {\colortbl;\red255\green255\blue255;}
  4. \margl1440\margr1440\vieww8720\viewh11500\viewkind0
  5. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\qc\pardirnatural
  6. \f0\b\fs36 \cf0 GRASS Mac OS X Build\
  7. \b0 (and other Mac notes)\
  8. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  9. \fs24 \cf0 \
  10. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  11. \cf0 \ul \ulc0 Contents\
  12. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  13. \cf0 \ulnone \
  14. \pard\tx360\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  15. \cf0 Quickstart\
  16. About\
  17. Building GRASS\
  18. Application Build\
  19. Universal Build*\
  20. Optimization*\
  21. Configure Example*\
  22. Leopard Notes*\
  23. Building an Installer Package\
  24. Bundling Libraries and Programs\
  25. Developer Notes\
  26. Help Files*\
  27. Addon Modules\
  28. Dependency Build Notes\
  29. Universal Aqua Tcl/Tk*\
  30. Universal GPSBabel*\
  31. Universal NetPBM*\
  32. Universal FFMPEG*\
  33. \
  34. \pard\tx360\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  35. \b \cf0 (* apply to any OSX build, not just an application package build)
  36. \b0 \
  37. \
  38. \
  39. \b Quickstart\
  40. \pard\tx360\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  41. \b0 \cf0 \
  42. To build a Mac OS X application, add this to your configure options:\
  43. \
  44. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  45. \f1\fs20 \cf0 --prefix=/Applications --enable-macosx-app
  46. \f0\fs24 \
  47. \pard\tx360\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  48. \cf0 \
  49. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  50. \cf0 \
  51. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  52. \b \cf0 About\
  53. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  54. \b0 \cf0 \
  55. This builds GRASS as a Mac OS X application, more or less.\
  56. \
  57. The startup wrapper is a simple AppleScript that fires up a custom grass.sh (instead of the standard grass6x) and quits, leaving grass.sh running in a new Terminal window. The custom grass.sh takes care of some default and required environment settings (so the user doesn't have to fiddle with .bash_profile), makes sure X11 in running, then starts init.sh.\
  58. \
  59. \
  60. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  61. \b \cf0 Building GRASS\
  62. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  63. \b0 \cf0 \
  64. Building GRASS as a Mac OS X application is pretty much the same as for a unix build (see the "INSTALL" document for details). For an application, just add this option to configure:\
  65. \
  66. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  67. \f1\fs20 \cf0 --enable-macosx-app\
  68. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  69. \f0\fs24 \cf0 \
  70. With this option, the
  71. \f1\fs20 --prefix
  72. \f0\fs24 specified is the path where GRASS.app will be installed. The default GRASS prefix is
  73. \f1\fs20 /usr/local
  74. \f0\fs24 , but for a Mac OS X application it should be
  75. \f1\fs20 /Applications
  76. \f0\fs24 . It is not possible to have alternative default prefixes in configure, so you must set
  77. \f1\fs20 --prefix=/Applications
  78. \f0\fs24 yourself for configure.\
  79. \
  80. The makefile tries to figure out the location of the GDAL programs, from the configured GDAL libs. This is set in grass.sh, and if it doesn't correctly figure it out (some GRASS commands fail to find needed GDAL commands), set GDAL_BIN before running make:\
  81. \
  82. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  83. \f1\fs20 \cf0 export GDAL_BIN=[/path/to/gdal/bin]\
  84. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  85. \f0\fs24 \cf0 \
  86. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  87. \cf0 \ul Universal Build\
  88. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  89. \cf0 \ulnone \
  90. The GRASS build system is very friendly to a Universal build (unlike libtool-based builds).
  91. \i This applies to a standard unix build as well as the app build.
  92. \i0 First, a couple things to check:\
  93. \
  94. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  95. \b \cf0 \'95 The Universal SDK
  96. \b0 .
  97. \i This is only needed when building on OSX 10.4 PPC - the Intel system is all Universal, and so is 10.5 for both architectures (though you may still want to use an SDK).
  98. \i0 Using the SDK forces GCC to use an alternate root for everything, so if a dependency is not in the SDK (/usr/local is NOT in the SDK), you will get configure, compile and link errors about missing stuff. To fix this, create symlinks in the SDK to where you have your extra dependencies. The SDKs in Leopard are mostly taken care of.\
  99. \
  100. For example, /usr/local:\
  101. \
  102. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  103. \f1\fs20 \cf0 sudo ln -s /usr/local /Developer/SDKs/MacOSX10.4u.sdk/usr/local\
  104. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  105. \f0\fs24 \cf0 \
  106. For Leopard, there may be problems locating
  107. \f1\fs20 bin
  108. \f0\fs24 programs. Add the following:\
  109. \
  110. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  111. \f1\fs20 \cf0 sudo ln -s /usr/local/bin /Developer/SDKs/MacOSX10.4u.sdk/usr/local/bin\
  112. sudo ln -s /usr/local/bin /Developer/SDKs/MacOSX10.5.sdk/usr/local/bin\
  113. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  114. \f0\fs24 \cf0 \
  115. If there are subfolders involved that are not already in the SDK, add them first. Say you have some libraries in /Users/Shared/unix (I put my static libraries there):\
  116. \
  117. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  118. \f1\fs20 \cf0 sudo mkdir -p /Developer/SDKs/MacOSX10.4u.sdk/Users/Shared\
  119. ln -s /Users/Shared/unix /Developer/SDKs/MacOSX10.4u.sdk/Users/Shared/unix
  120. \f0\fs24 \
  121. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  122. \cf0 \
  123. For /Library/Frameworks:\
  124. \
  125. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  126. \f1\fs20 \cf0 sudo mkdir -p /Developer/SDKs/MacOSX10.4u.sdk/Library\
  127. sudo ln -s /Library/Frameworks /Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks
  128. \f0\fs24 \
  129. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  130. \cf0 \
  131. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  132. \b \cf0 \'95 Universal Dependencies
  133. \b0 . Make sure all your extra dependencies are Universal.\
  134. \
  135. \b \'95\'a0 Tiger+
  136. \b0 . This will NOT work on anything less than OSX 10.4.\
  137. \
  138. If those check OK, here's what to do. Simply add the universal flags to all compile and link commands. This is done by setting CFLAGS, CXXFLAGS and LDFLAGS before configuring the build. The basic flags are:\
  139. \
  140. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  141. \f1\fs20 \cf0 -arch ppc -arch i386\
  142. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  143. \f0\fs24 \cf0 \
  144. If you are building on OSX 10.4 PPC only, also add this:\
  145. \
  146. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  147. \f1\fs20 \cf0 -isysroot /Developer/SDKs/MacOSX10.4u.sdk\
  148. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  149. \f0\fs24 \cf0 \
  150. Put it all together, for an Intel Mac on OSX 10.4 or any Mac on 10.5+:\
  151. \
  152. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  153. \f1\fs20 \cf0 export CFLAGS="-arch ppc -arch i386"\
  154. export CXXFLAGS="-arch ppc -arch i386"\
  155. export LDFLAGS="-arch ppc -arch i386"\
  156. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  157. \f0\fs24 \cf0 \
  158. Or for OSX 10.4 PPC:\
  159. \
  160. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  161. \f1\fs20 \cf0 export SDKROOT=/Developer/SDKs/MacOSX10.4u.sdk\
  162. export CFLAGS="-arch ppc -arch i386 -isysroot $SDKROOT"\
  163. export CXXFLAGS="-arch ppc -arch i386 -isysroot $SDKROOT"\
  164. export LDFLAGS="-arch ppc -arch i386 -isysroot $SDKROOT"\
  165. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  166. \f0\fs24 \cf0 \
  167. For OSX 10.5, you can also build for 64bit (all processors except the first Intel Core Duo), just add:\
  168. \
  169. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  170. \f1\fs20 \cf0 -arch ppc64 -arch x86_64\
  171. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  172. \f0\fs24 \cf0 \
  173. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  174. \cf0 \ul Optimization\ulnone \
  175. \
  176. By default, GRASS configures with debugging symbols turned on (the "-g" flag), and level 2 optimization ("-O2"). If you don't want debugging on (it greatly increases the binary size) or want to use a different optimization, just add an optimization flag to the above CFLAGS and CXXFLAGS exports. Specifying an optimization disables debugging. Some common optimizations are (see the gcc man page for complete details):\
  177. \
  178. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  179. \f1\fs20 \cf0 -O2
  180. \f0\fs24 most optimizations, a common default\
  181. \f1\fs20 -O3
  182. \f0\fs24 high\
  183. \f1\fs20 -Os
  184. \f0\fs24 optimize for speed, also keep the binary size small (the Apple standard)\
  185. \
  186. If you want debugging with a different optimization flag, use one of the above optimization flags plus "
  187. \f1\fs20 -g
  188. \f0\fs24 ".\
  189. \
  190. Remember to separate all flags with spaces.\
  191. \
  192. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  193. \cf0 \ul Configure Example\ulnone \
  194. \
  195. As an example, to build GRASS using my frameworks and Tcl/Tk as built in the build notes below, this should work
  196. \i (for a standard unix build, just remove the --prefix and --enable-macosx-app flags)
  197. \i0 :\
  198. \
  199. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  200. \f1\fs20 \cf0 ./configure --with-freetype --with-freetype-includes="/Library/Frameworks/FreeType.framework/unix/include/freetype2 /Library/Frameworks/FreeType.framework/unix/include" --with-freetype-libs=/Library/Frameworks/FreeType.framework/unix/lib --with-gdal=/Library/Frameworks/GDAL.framework/Programs/gdal-config --with-geos=/Library/Frameworks/GEOS.framework/Programs/geos-config --with-proj --with-proj-includes=/Library/Frameworks/PROJ.framework/unix/include --with-proj-libs=/Library/Frameworks/PROJ.framework/unix/lib --with-proj-share=/Library/Frameworks/PROJ.framework/Resources/proj --with-jpeg-includes=/Library/Frameworks/UnixImageIO.framework/unix/include --with-jpeg-libs=/Library/Frameworks/UnixImageIO.framework/unix/lib --with-png-includes=/Library/Frameworks/UnixImageIO.framework/unix/include --with-png-libs=/Library/Frameworks/UnixImageIO.framework/unix/lib --with-tiff-includes=/Library/Frameworks/UnixImageIO.framework/unix/include --with-tiff-libs=/Library/Frameworks/UnixImageIO.framework/unix/lib --without-postgres --without-mysql --with-odbc --with-sqlite --with-sqlite-libs=/Library/Frameworks/SQLite3.framework/unix/lib --with-sqlite-includes=/Library/Frameworks/SQLite3.framework/unix/include --with-fftw-includes=/Library/Frameworks/FFTW3.framework/unix/include --with-fftw-libs=/Library/Frameworks/FFTW3.framework/unix/lib --with-cxx --with-tcltk-includes="/Library/Frameworks/Tcl.framework/Headers /Library/Frameworks/Tk.framework/Headers /Library/Frameworks/Tk.framework/PrivateHeaders" --with-tcltk-libs=/usr/local/lib --with-x --without-motif --without-glw --with-opengl=aqua --without-readline --prefix=/Applications --enable-macosx-app
  201. \f0\fs24 \
  202. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  203. \cf0 \
  204. That's a long line, but you have to be very explicit in the GRASS configure (and yes, the UnixImageIO framework is used multiple times).\
  205. \
  206. If you don't have the PROJ framework programs folder in your shell PATH, it will fail to find nad2bin. To correct this set NAD2BIN before running configure:\
  207. \
  208. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  209. \f1\fs20 \cf0 export NAD2BIN=/Library/Frameworks/PROJ.framework/Programs/nad2bin\
  210. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  211. \f0\fs24 \cf0 \
  212. Sometimes, for mysterious reasons so far, the automatic check for X11 fails. Depending on various conditions, you may immediately notice this because configure stops. If X11 isn't found automatically, add this to the configure line
  213. \i (this applies to both the unix build and app build)
  214. \i0 :\
  215. \
  216. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  217. \f1\fs20 \cf0 --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib\
  218. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  219. \f0\fs24 \cf0 \
  220. To install the new Python GUI (see REQUIREMENTS.html and gui/wxpython/README, wxpython installer available at {\field{\*\fldinst{HYPERLINK "http://wxpython.org/"}}{\fldrslt wxpython.org}}), add this to configure (fill in the correct version at x.x.x.x for the wxpython you have installed):\
  221. \
  222. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  223. \f1\fs20 \cf0 --with-python\
  224. --with-wxwidgets=/usr/local/lib/wxPython-unicode-x.x.x.x/bin/wx-config\
  225. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  226. \f0\fs24 \cf0 \
  227. Note: as of wxpython 2.8.8.0 you can use an external wxpython with the system Python on Leopard.\
  228. \
  229. If you want ffmpeg support (see build instructions below), add this:\
  230. \
  231. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  232. \f1\fs20 \cf0 --with-ffmpeg --with-ffmpeg-includes="/usr/local/include /usr/local/include/libavcodec /usr/local/include/libavdevice /usr/local/include/libavformat /usr/local/include/libavutil /usr/local/include/libswscale" --with-ffmpeg-libs=/usr/local/lib
  233. \f0\fs24 \
  234. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  235. \cf0 \
  236. For cairo support (see build instructions at {\field{\*\fldinst{HYPERLINK "http://www.kyngchaos.com/macosx:build:cairo"}}{\fldrslt kyngchaos.com}}), add this:\
  237. \
  238. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  239. \f1\fs20 \cf0 --with-cairo --with-cairo-includes=/usr/local/include/cairo --with-cairo-libs=/usr/local/lib --with-cairo-ldflags=-lcairo
  240. \f0\fs24 \
  241. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  242. \cf0 \
  243. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  244. \cf0 \ul Leopard Notes\
  245. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  246. \cf0 \ulnone \
  247. \'95 Linker Problem\
  248. \
  249. The linker in Leopard's GCC from Xcode 3.0 has a bit of a problem with some libraries, notably X11's libGL. When trying to link libGL (for example), it spits back an error:\
  250. \
  251. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  252. \f1\fs20 \cf0 ld: cycle in dylib re-exports with /usr/X11/lib/libGL.dylib for architecture i386\
  253. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  254. \f0\fs24 \cf0 \
  255. Xcode 3.1 does not have this problem. In other words, make sure to install the latest Xcode.\
  256. \
  257. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  258. \cf0 \ul Building an Installer Package\
  259. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  260. \cf0 \ulnone \
  261. After running make,
  262. \f1\fs20 make bindist
  263. \f0\fs24 will assemble an installer package. This will have the name "GRASS-[version].pkg" and will be found in the macosx folder in the GRASS source. On Tiger, there
  264. \b will be
  265. \b0 some
  266. \b non-fatal errors
  267. \b0 -
  268. \i this is normal
  269. \i0 and the installer package is still generated correctly.\
  270. \
  271. The installer takes care of binary installation, and creating the /Library/GRASS support folder and Help Viewer link.\
  272. \
  273. This installer currently does NOT do any verification of installed dependencies or system version.\
  274. \
  275. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  276. \cf0 \ul Bundling Libraries and Programs\
  277. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  278. \cf0 \ulnone \
  279. Additional dependent libraries and programs can be bundled with the application package to make a more portable and easily installed GRASS application. See
  280. \f1\fs20 macosx/pkg/bundle.make
  281. \f0\fs24 for details.\
  282. \
  283. GRASS uses
  284. \f1\fs20 DYLD_LIBRARY_PATH
  285. \f0\fs24 , which is set to the application's lib folder, so it will find any libraries that are there that are not found in their expected locations. It also adds the application bin folder to the
  286. \f1\fs20 PATH
  287. \f0\fs24 , so helper programs installed there will be found.\
  288. \
  289. There is NO need to bundle
  290. \i everything
  291. \i0 . Bundling readily available libraries and programs installed in standard locations is not necessary. Some things you might want to bundle include:\
  292. \
  293. - GPSBabel (CLI)\
  294. - NetPBM programs (just what is used in GRASS)\
  295. - other support CLI programs for script modules\
  296. - ffmpeg libraries\
  297. - Postgres library (libpq)\
  298. \
  299. Things to leave out:\
  300. \
  301. - applications that duplicate the above items (ie GPSBabel.app)\
  302. - /Library/Frameworks stuff\
  303. \
  304. \
  305. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  306. \b\fs28 \cf0 Developer Notes\
  307. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  308. \b0\fs24 \cf0 \
  309. The applescript startup and grass.sh can be customized if desired, ie for a more complex startup that might give the user a dialog for startup options. They just provide the basic core to build upon.\
  310. \
  311. \
  312. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  313. \b\fs28 \cf0 Help Files\
  314. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  315. \b0\fs24 \cf0 \
  316. Help files are linked into the OSX help system. Independent of what browser you choose to open help files (
  317. \f1\fs20 GRASS_HTML_BROWSER
  318. \f0\fs24 ), you can open Help Viewer from almost any application's Help menu (it's best to use Mac Help from the Finder Help menu), and GRASS Help will be available in the Library menu.\
  319. \
  320. Since they are linked to the help system, if GRASS.app is moved or renamed, the link will be broken. This may change in the future.\
  321. \
  322. \
  323. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  324. \b\fs28 \cf0 Addon Modules\
  325. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  326. \b0\fs24 \cf0 \
  327. modbuild deprecated (not installed now). Makefile changes in progress to allow compiling external modules.\
  328. \
  329. \
  330. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  331. \b\fs28 \cf0 Universal Aqua Tcl/Tk\
  332. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  333. \b0\fs24 \cf0 \
  334. The simplest way to install Tcl/Tk Aqua is to download {\field{\*\fldinst{HYPERLINK "http://www.activestate.com/Products/activetcl/"}}{\fldrslt ActiveTcl}} from ActiveState. This will give you a universal 32bit Tcl/Tk Aqua (64bit is currently not possible). \ul Make sure to run the
  335. \i convenience
  336. \i0 commands below.\ulnone \
  337. \
  338. To make it easier to configure for GRASS (and other software), run these commands in a Terminal:\
  339. \
  340. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  341. \f1\fs20 \cf0 sudo ln -sf /Library/Frameworks/Tcl.framework/Versions/8.5/Tcl /usr/local/lib/libtcl.dylib\
  342. sudo ln -sf /Library/Frameworks/Tcl.framework/Versions/8.5/Tcl /usr/local/lib/libtcl8.5.dylib\
  343. sudo ln -sf /Library/Frameworks/Tcl.framework/Versions/8.5/libtclstub8.5.a /usr/local/lib/libtclstub8.5.a\
  344. sudo ln -sf /Library/Frameworks/Tk.framework/Versions/8.5/Tk /usr/local/lib/libtk.dylib\
  345. sudo ln -sf /Library/Frameworks/Tk.framework/Versions/8.5/Tk /usr/local/lib/libtk8.5.dylib\
  346. sudo ln -sf /Library/Frameworks/Tk.framework/Versions/8.5/libtkstub8.5.a /usr/local/lib/libtkstub8.5.a\
  347. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  348. \f0\fs24 \cf0 \
  349. \
  350. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  351. \b\fs28 \cf0 Universal GPSBabel\
  352. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  353. \b0\fs24 \cf0 \
  354. A universal GPSBabel CLI executable is now included in the OSX binary from {\field{\*\fldinst{HYPERLINK "http://www.gpsbabel.org/"}}{\fldrslt www.gpsbabel.org}}. This does not need to be 64bit.\
  355. \
  356. \
  357. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  358. \b\fs28 \cf0 Universal NetPBM\
  359. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  360. \b0\fs24 \cf0 \
  361. NetPBM is not too hard to build, it's just weird. These instructions use my UnixImageIO framework for the tiff, jpeg, png and jasper libraries.\
  362. \
  363. First, grab the {\field{\*\fldinst{HYPERLINK "http://netpbm.sourceforge.net/"}}{\fldrslt NetPBM}} source and unzip it. Now it gets strange - it's an interactive configuration, and the various stages don't communicate with each other. Cd to the source folder in a Terminal and:\
  364. \
  365. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  366. \f1\fs20 \cf0 ./configure\
  367. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  368. \f0\fs24 \cf0 \
  369. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  370. \b \cf0 <enter>
  371. \b0 to begin\
  372. \
  373. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  374. \f1\fs20 \cf0 Platform [darwin] ==>
  375. \f0\b\fs24 <enter>
  376. \b0 \
  377. \
  378. \f1\fs20 Netpbm shared library directory [default] ==>
  379. \f0\b\fs24 /usr/local
  380. \b0 \
  381. \
  382. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li360\ql\qnatural\pardirnatural
  383. \i \cf0 choose where you will install it\
  384. default is NOT /usr/local or any location at all, so you MUST set this\
  385. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  386. \i0 \cf0 \
  387. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  388. \f1\fs20 \cf0 regular or merge [regular] ==>
  389. \f0\b\fs24 <enter>
  390. \b0 \
  391. \
  392. \f1\fs20 static or shared [shared] ==>
  393. \f0\b\fs24 <enter>
  394. \b0 \
  395. \
  396. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li360\ql\qnatural\pardirnatural
  397. \i \cf0 could use static, since GRASS only needs a few of the progs\
  398. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  399. \i0 \cf0 \
  400. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  401. \f1\fs20 \cf0 '#include' argument or NONE [<inttypes.h>] ==>
  402. \f0\b\fs24 <enter>
  403. \b0 \
  404. \
  405. \f1\fs20 What is your JPEG (graphics format) library?\
  406. library filename or 'none' [libjpeg.so] ==>
  407. \f0\b\fs24 /Library/Frameworks/UnixImageIO.framework/unix/lib/libjpeg.dylib
  408. \b0 \
  409. \
  410. \f1\fs20 JPEG header directory [default] ==>
  411. \f0\b\fs24 /Library/Frameworks/UnixImageIO.framework/Headers
  412. \b0 \
  413. \
  414. \f1\fs20 What is your TIFF (graphics format) library?\
  415. library filename or 'none' [libtiff.so] ==>
  416. \f0\b\fs24 /Library/Frameworks/UnixImageIO.framework/unix/lib/libtiff.dylib
  417. \b0 \
  418. \
  419. \f1\fs20 TIFF header directory [default] ==>
  420. \f0\b\fs24 /Library/Frameworks/UnixImageIO.framework/Headers
  421. \b0 \
  422. \
  423. \f1\fs20 What is your PNG (graphics format) library?\
  424. library filename or 'none' [libpng.so] ==>
  425. \f0\b\fs24 /Library/Frameworks/UnixImageIO.framework/unix/lib/libpng.dylib
  426. \b0 \
  427. \
  428. \f1\fs20 PNG header directory [default] ==>
  429. \f0\b\fs24 /Library/Frameworks/UnixImageIO.framework/Headers
  430. \b0 \
  431. \
  432. \f1\fs20 What is your Z (compression) library?\
  433. library filename or 'none' [libz.so] ==>
  434. \f0\b\fs24 -lz
  435. \b0 \
  436. \
  437. \f1\fs20 Z header directory [default] ==>
  438. \f0\b\fs24 <enter>
  439. \b0 \
  440. \
  441. \f1\fs20 Documentation URL [http://netpbm.sourceforge.net/doc/] ==>
  442. \f0\b\fs24 <enter>
  443. \b0 \
  444. \
  445. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li360\ql\qnatural\pardirnatural
  446. \i \cf0 ignore warning about libz\
  447. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  448. \i0 \cf0 \
  449. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  450. \f1\fs20 \cf0 echo "JASPERLIB = /Library/Frameworks/UnixImageIO.framework/unix/lib/libjasper.dylib" >> Makefile.config\
  451. echo "JASPERHDR_DIR = /Library/Frameworks/UnixImageIO.framework/Headers" >> Makefile.config\
  452. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  453. \f0\fs24 \cf0 \
  454. For Tiger:\
  455. \
  456. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  457. \f1\fs20 \cf0 echo "CC = /usr/bin/gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk" >> Makefile.config\
  458. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  459. \cf0 \
  460. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  461. \f0\fs24 \cf0 For Leopard:\
  462. \
  463. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  464. \f1\fs20 \cf0 echo "CC = /usr/bin/gcc -arch ppc -arch i386 -arch ppc64 -arch x86_64" >> Makefile.config\
  465. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  466. \cf0 \
  467. make\
  468. make package pkgdir=/path/to/some/temp/dir\
  469. \
  470. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li360\ql\qnatural\pardirnatural
  471. \f0\i\fs24 \cf0 it will create the folder and copy all binaries there\
  472. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  473. \f1\i0\fs20 \cf0 \
  474. sudo ./installnetpbm\
  475. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  476. \f0\fs24 \cf0 \
  477. then answer some more questions:\
  478. \
  479. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  480. \f1\fs20 \cf0 Where is the install package you created with 'make package'?\
  481. package directory (/tmp/netpbm) ==>
  482. \f0\b\fs24 /path/to/some/temp/dir\
  483. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  484. \b0 \cf0 \
  485. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li360\ql\qnatural\pardirnatural
  486. \i \cf0 same location as specified in the make package step (lack of inter-communication!)\
  487. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  488. \i0 \cf0 \
  489. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  490. \f1\fs20 \cf0 install prefix (/usr/local/netpbm) ==>
  491. \f0\b\fs24 /usr/local\
  492. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  493. \b0 \cf0 \
  494. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li360\ql\qnatural\pardirnatural
  495. \i \cf0 same location used for the Netpbm shared library directory (again, lack of inter-communication!)\
  496. (it may ask you if you want to create the dir)\
  497. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  498. \i0 \cf0 \
  499. It'll ask for subfolders for bin, lib, data, headers, man\
  500. \
  501. For data, type:
  502. \b /usr/local/share/netpbm
  503. \b0 \
  504. \
  505. For man, type:
  506. \b /usr/local/share/man
  507. \b0 \
  508. \
  509. For the rest, use the defaults\
  510. \
  511. don't create the manweb.conf file\
  512. \
  513. And that's it.\
  514. \
  515. \
  516. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  517. \b\fs28 \cf0 Universal FFMPEG
  518. \b0\fs24 \
  519. \
  520. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  521. \cf0 \ul version: {\field{\*\fldinst{HYPERLINK "http://www.ffmpeg.org/download.html"}}{\fldrslt \ulnone 0.5}}\ulnone \
  522. \
  523. FFMPEG is constantly changing, and release versions are rare. For simplicity use the 0.5 release version. If you know anything about SVN you can try for a more up-to-date FFMPEG. Some options used below are not in more recent SVN versions, so if configure complains about an invalid option, just remove it.\
  524. \
  525. This will build a basic FFMPEG as dynamic libraries for use with GRASS. The default static libraries don't work now because of reloc errors and the need for extra link flags. No extra formats are included, such as mp3lame and xvid. None of the ffmpeg programs are included either (GRASS doesn't need them).\
  526. \
  527. It's a multi-step build, 1 for each architecture. Create a folder inside the source for each arch:\
  528. \
  529. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  530. \f1\fs20 \cf0 mkdir build-i386\
  531. mkdir build-ppc\
  532. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  533. \f0\fs24 \cf0 \
  534. and also for Leopard:\
  535. \
  536. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  537. \f1\fs20 \cf0 mkdir build-x86_64\
  538. mkdir build-ppc64\
  539. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  540. \f0\fs24 \cf0 \
  541. For i386 and ppc arches, if building on Tiger, you must add the following to extra-cflags and extra-ldflags in the configure command:\
  542. \
  543. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  544. \f1\fs20 \cf0 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
  545. \f0\fs24 \
  546. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  547. \cf0 \
  548. For i386:\
  549. \
  550. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  551. \f1\fs20 \cf0 cd build-i386\
  552. ../configure --enable-shared --disable-static --disable-debug --disable-ffserver --disable-network --enable-gpl --enable-pthreads --enable-swscale --disable-vhook --disable-ffplay --disable-ffmpeg --disable-amd3dnow --arch=i386 --extra-cflags="-arch i386" --extra-ldflags="-arch i386"
  553. \f0\fs24 \
  554. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  555. \cf0 \
  556. If you are building
  557. \i on
  558. \i0 a PPC Mac, you need to add the flag "
  559. \f1\fs20 --enable-cross-compile
  560. \f0\fs24 " to the above configure command.\
  561. \
  562. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  563. \f1\fs20 \cf0 make\
  564. sudo make install\
  565. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  566. \f0\fs24 \cf0 \
  567. Install at this point installs everything. We don't care about the installed libraries yet, we just need the headers there.\
  568. \
  569. Now, the PPC build:\
  570. \
  571. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  572. \f1\fs20 \cf0 cd ../build-ppc\
  573. ../configure --enable-shared --disable-static --disable-debug --disable-ffserver --disable-network --enable-gpl --enable-pthreads --enable-swscale --disable-vhook --disable-ffplay --disable-ffmpeg --enable-altivec --arch=ppc --extra-cflags="-arch ppc" --extra-ldflags="-arch ppc"
  574. \f0\fs24 \
  575. \f1\fs20 make\
  576. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  577. \f0\fs24 \cf0 \
  578. Don't install this one, there is no need.\
  579. \
  580. If you are building for Leopard, also do the 64bit varieties, otherwise skip to the lipo step below.\
  581. \
  582. For x86_64:\
  583. \
  584. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  585. \f1\fs20 \cf0 cd build-x86_64\
  586. ../configure --enable-shared --disable-static --disable-debug --disable-ffserver --disable-network --enable-gpl --enable-pthreads --enable-swscale --disable-vhook --disable-ffplay --disable-ffmpeg --disable-amd3dnow --arch=x86_64 --extra-cflags="-arch x86_64" --extra-ldflags="-arch x86_64"
  587. \f0\fs24 \
  588. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  589. \cf0 \
  590. Again, if you are building
  591. \i on
  592. \i0 a PPC Mac, you need to add the flag "
  593. \f1\fs20 --enable-cross-compile
  594. \f0\fs24 " to the above configure command.\
  595. \
  596. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  597. \f1\fs20 \cf0 make\
  598. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  599. \f0\fs24 \cf0 \
  600. And ppc64:\
  601. \
  602. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  603. \f1\fs20 \cf0 cd ../build-ppc64\
  604. ../configure --enable-shared --disable-static --disable-debug --disable-ffserver --disable-network --enable-gpl --enable-pthreads --enable-swscale --disable-vhook --disable-ffplay --disable-ffmpeg --enable-altivec --arch=ppc64 --extra-cflags="-arch ppc64" --extra-ldflags="-arch ppc64"
  605. \f0\fs24 \
  606. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  607. \cf0 \
  608. Here, if you are building
  609. \i on
  610. \i0 an Intel Mac, you need to add the flag "
  611. \f1\fs20 --enable-cross-compile
  612. \f0\fs24 " to the above configure command. Also, it will fail to completely identify it as 64bit, so you need to fix 2 files.\
  613. \
  614. In
  615. \b config.h
  616. \b0 , find the HAVE_PPC64 define and set it to 1:\
  617. \
  618. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  619. \f1\fs20 \cf0 #define HAVE_PPC64 1\
  620. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  621. \f0\fs24 \cf0 \
  622. In
  623. \b config.mak
  624. \b0 , add this line to the end of the file:\
  625. \
  626. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  627. \f1\fs20 \cf0 HAVE_PPC64=yes\
  628. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  629. \f0\fs24 \cf0 \
  630. Then finish:\
  631. \
  632. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  633. \f1\fs20 \cf0 make\
  634. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  635. \f0\fs24 \cf0 \
  636. \
  637. Now use lipo to merge them together, first drop down to the ffmpeg source folder:\
  638. \
  639. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  640. \f1\fs20 \cf0 cd ..\
  641. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  642. \f0\fs24 \cf0 \
  643. For each of the libraries:\
  644. \
  645. libavcodec\
  646. libavdevice\
  647. libavformat\
  648. libavutil\
  649. libswscale\
  650. \
  651. run the following lipo command (fill in the \ul libname\ulnone in all places). For Leopard:\
  652. \
  653. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  654. \f1\fs20 \cf0 sudo lipo -create build-ppc/\ul libname\ulnone /\ul libname\ulnone .dylib build-i386/\ul libname\ulnone /\ul libname\ulnone .dylib build-ppc64/\ul libname\ulnone /\ul libname\ulnone .dylib build-x86_64/\ul libname\ulnone /\ul libname\ulnone .dylib -output /usr/local/lib/\ul libname\ulnone .dylib\
  655. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  656. \f0\fs24 \cf0 \
  657. For Tiger:\
  658. \
  659. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi-180\ql\qnatural\pardirnatural
  660. \f1\fs20 \cf0 sudo lipo -create build-ppc/\ul libname\ulnone /\ul libname\ulnone .dylib build-i386/\ul libname\ulnone /\ul libname\ulnone .dylib -output /usr/local/lib/\ul libname\ulnone .dylib\
  661. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  662. \f0\fs24 \cf0 \
  663. Done.\
  664. \
  665. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural
  666. \fs28 \cf0 \
  667. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural
  668. \fs24 \cf0 \'a9 2006-2008 by the GRASS Development Team\
  669. This program is free software under the GNU General Public License (>=v2).\
  670. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural
  671. \fs28 \cf0 \
  672. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
  673. \fs24 \cf0 \
  674. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural
  675. \cf0 - William Kyngesburye\
  676. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural
  677. {\field{\*\fldinst{HYPERLINK "mailto:kyngchaos@kyngchaos.com"}}{\fldrslt \cf0 kyngchaos@kyngchaos.com}}
  678. \fs20 \
  679. \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural
  680. {\field{\*\fldinst{HYPERLINK "http://www.kyngchaos.com"}}{\fldrslt
  681. \fs24 \cf0 http://www.kyngchaos.com/}}
  682. \fs24 \
  683. }