How to build SOPE, SOPEX and your first example.

Building subversion

You need to get the latest version of SOPE with subversion (currently SOPE-4.5).

In order to build subversion on Mac OS X 10.4.5, you need subversion and Berkeley DB (this is optionnal but during subversion build, the make process will complain).

Download db-4.3.29.tar.gz (note that the current version db-4.4.20.tar.gz can NOT be used with subversion-1.3.0).
Building does not pose problem :
$ tar zxvf db-4.3.29.tar.gz
$ cd db-4.3.29
$ ./configure
$ make
$ sudo make install

Download subversion. Currently the latest version is: subversion-1.3.0

$ tar zxvf subversion-1.3.0.tar.gz
$ cd subversion-1.3.0
$ ./configure
$ make
$ sudo make install

Building postgresql

In order to use database access (GDL1), you can have sqlite3, postgresql, mysql installed.
I had already sqlite3 installed on my computer. I downloaded postgresql-8.1.3.

$ tar zxvf postgresql-8.1.3.tar.gz
$ cd postgresql-8.1.3.
$ ./configure
$ make
$ sudo make install

Building SOPE

To get the SOPE-4.5 source tree in your home directory, we will use our fresh version of subversion.
$ cd
$ svn co http://svn.opengroupware.org/SOPE/trunk/ SOPE-4.5

You have two options to build SOPE on Mac OS X. You can either use XCode 2.2 or use make.

Building SOPE with the command line

I will first show you how to build SOPE from the command line.

In order to build the SOPE driver for postgresql, you must have the library /usr/local/pgsql/bin in your PATH environment.
as the make process use the tool pg_config in this folder.

Modify your bash_profile file in your home directory to include /usr/local/pgsql/bin in the PATH.
$ cd
$ more .bash_profile
export PATH=$PATH:/usr/local/pgsql/bin

Or, in the terminal windows used for building SOPE, type:
$ export PATH=$PATH:/usr/local/pgsql/bin

$ cd SOPE-4.5/
$ ./configure
GNUstep environment:
  system: /Users/philippe/SOPE-4.5/.gsmake
  local:  /Users/philippe/SOPE-4.5/.gsmake
  user:   /Users/philippe/GNUstep
  path:   /Users/philippe/GNUstep:/Users/philippe/SOPE-4.5/.gsmake
  flat:   yes
  arch:   powerpc-apple-darwin8.5.0
  combo:  apple-apple-nil

Configuration:
  FHS:    install in FHS root
  debug:  yes
  strip:  no
  prefix:     /usr/local/
  frameworks:
  gstep:      /Users/philippe/SOPE-4.5/.gsmake/Library/Makefiles/
  config:     /Users/philippe/SOPE-4.5/config.make
  script:     /Users/philippe/SOPE-4.5/.gsmake/Library/Makefiles//GNUstep.sh

creating: /Users/philippe/SOPE-4.5/config.make
optional library found: xml2
optional library found: ldap
required library found: ssl
optional library found: pq
optional library found: sqlite3
failed to link optional library: mysqlclient
configuring NGStreams library .... done (log in config-NGStreams.log).

$ make
Read the documentation of SOPE during the build.

Building SOPE with XCode 2.2

If you decide to use XCode 2.2, open the project SOPE.xcodeproj in the folder SOPE-4.5.
Choose "all" for active target and "Wrapper" for Active Build Configuration.
Click on the "Build" button.

Verify that you get your job done

You have build a lot of thing for now, they are located in your Library directory.

$ cd ~/Library/EmbeddedFrameworks
$ ls
DOM.build               NGHttp.build            NGObjWeb.build          SOPEX.build             WEExtensions.build      XmlRpc.build
EOControl.build         NGImap4.build           NGStreams.build         SQLite3.build           WEPrototype.build       libxmlSAXDriver.build
EOCoreData.build        NGLdap.build            NGXmlRpc.build          SaxObjC.build           WOExtensions.build      versitSaxDriver.build
GDLAccess.build         NGMail.build            NGiCal.build            SoOFS.build             WebDAV.build
NGExtensions.build      NGMime.build            PostgreSQL.build        SoObjects.build         Wrapper

Change to the Wrapper directory:
$ cd Wrapper/
$ ls
DOM.framework           NGHttp.framework        NGObjWeb.framework      SOPEX.framework         SoObjects.framework     XmlRpc.framework
EOControl.framework     NGImap4.framework       NGStreams.framework     SQLite3.gdladaptor      WEExtensions.framework  libxmlSAXDriver.sax
EOCoreData.framework    NGLdap.framework        NGXmlRpc.framework      SaxObjC.framework       WEPrototype.framework   saxxml
GDLAccess.framework     NGMail.framework        NGiCal.framework        SoCore.sxp              WOExtensions.framework  versitSaxDriver.sax
NGExtensions.framework  NGMime.framework        PostgreSQL.gdladaptor   SoOFS.framework         WebDAV.framework

You can see there :
- drivers for database: SQLite3.gdladaptor, PostgreSQL.gdladaptor.
- sax drivers : libxmlSAXDriver.sax, versitSaxDriver.sax
- a lot of frameword (*.framework).

You may link your framework from /Library/Framework (check that).
I have simply copied all the framework to the directory /Library/Frameworks.
You need to do that because some project requir the framework to be there in order to find the header files (*.h).

Build SOPEX and example

Go in the directory SOPE-4.5/sopex/SOPEX
Open the project SOPEX.xcodeproj with XCode 2.2.
Choose "SOPEX" for active target and "Wrapper" for Active Build Configuration.
Click on the "Build" button.

Go in the directory SOPE-4.5/sopex/Samples/WOxExtTest
Open the project WOExtTest.xcodeproj with XCode 2.2.
Choose "WOExtTest" for active target and "Development" for Active Build Configuration.
In order for "Rapid Development" to work properly you need to open Xcode's "Project" menu and select "Edit active executable" (Apple-Option-X). In the following dialog navigate to the "General" tab and select the "Project Directory" as the working directory when launching the executable.
Click on the "Build and Go" button. You will see a SOPEX application (that is a SOPE application running as an AppKit application and using WebKit to see your web application content). This is a self hosted web application.

NB : in version 4.5 r1233 you can also use Xcode 2.2. So download the latest version with subversion.

Look at what is available and be happy :-)