lazarus stable port information

Info2: <<
Package: lazarus%type_pkg[uitype]
Type: uitype (-aqua -gtk2)
Version: 0.9.30.4
Revision: 1
License: GPL/LGPL

Recommends: fpc-doc, lazarus-doc

Source: mirror:sourceforge:lazarus/lazarus-%v-src.tar.bz2
Source-MD5: ebd40cdfdfc4b66d1ced7a0d48d6da84

SourceDirectory: lazarus

Depends: <<
fpc (>= 2.6.0),
fpc-sources (>= 2.6.0),
(%m = x86_64) fpc-cross-i386-darwin,
(%type_pkg[uitype] = -gtk2) gtk+2-shlibs,
(%type_pkg[uitype] = -gtk2) glib2-shlibs,
(%type_pkg[uitype] = -gtk2) cairo-shlibs
<<

Builddepends: <<
(%type_pkg[uitype] = -gtk2) gtk+2,
(%type_pkg[uitype] = -gtk2) gtk+2-dev,
(%type_pkg[uitype] = -gtk2) glib2-dev,
(%type_pkg[uitype] = -gtk2) cairo
<<

Conflicts: (%type_pkg[uitype] = -gtk2) lazarus-lcl-gtk2, lazarus-common, lazarus-aqua, lazarus-gtk, lazarus-gtk2
Replaces: (%type_pkg[uitype] = -gtk2) lazarus-lcl-gtk2, lazarus-common, lazarus-aqua, lazarus-gtk, lazarus-gtk2

Patchscript: <<
#!/bin/sh -ev

chmod 755 .

# add the fink directory tree. This might need a check in a new version
sed -i.bak 's|GenerateDwarf/Value'', false|GenerateDwarf/Value'', true|g' ide/compileroptions.pp
sed -i.bak 's|GenerateDwarf/Value'', GenerateDwarf, false|GenerateDwarf/Value'', GenerateDwarf, true|g' ide/compileroptions.pp
sed -i.bak 's|FGenerateDwarf := false;|FGenerateDwarf := true;|g' ide/compileroptions.pp

# Correct the version in Info.plist
sed -i.bak 's|\.1 beta|\.0|g' lazarus.app/Contents/Info.plist
rm -f lazarus.app/Contents/Info.plist.bak

# add the fink directory tree. This might need a check in a new version
sed -i.bak 's|1\.\.15|1\.\.16|g' ide/include/unix/lazbaseconf.inc
sed -i.bak "s|'/usr/share/fpcsrc'|'/usr/share/fpcsrc','%p/share/fpcsrc'|g" ide/include/unix/lazbaseconf.inc

sed -i.bak 's|1\.\.7|1\.\.8|g' ide/include/unix/lazbaseconf.inc
sed -i.bak "s|'/usr/share/lazarus',|'/usr/share/lazarus','%p/share/lazarus',|g" ide/include/unix/lazbaseconf.inc

sed -i.bak "s|'/etc/lazarus'|'%p/etc/lazarus'|g" ide/include/unix/lazbaseconf.inc

sed -i.bak "s|AddFilenameToList(List,'/usr/local/bin/'+GetDefaultCompilerFilename);|AddFilenameToList(List,'%p/bin/'+GetDefaultCompilerFilename); AddFilenameToList(List,'/usr/local/bin/'+GetDefaultCompilerFilename);|g" ide/include/unix/lazbaseconf.inc

# adjust the default paths to fink paths

sed -i.bak 's|/usr/local/bin/ppc386|%p/bin/fpc|g' tools/install/macosx/environmentoptions.xml
sed -i.bak 's|/usr/local/share|%p/share|g' tools/install/macosx/environmentoptions.xml
sed -i.bak 's|/Developer/lazarus|%p/share/lazarus|g' tools/install/macosx/environmentoptions.xml

# set the debug format to dwarf for Mac OS X 10.5 and up
#
# with 0.9.30 this should also be possible by adding compileroptions.xml to /%p/etc/lazarus with something like this:
#
#
#
#
#
#
#
#

#
#
#
#

#
#
#
#

#

#

#
#
#

#

#

#
# maybe only the branch to is needed.
#
# until then do it through changes in the source code:

<<

UseMaxBuildJobs: false

CompileScript: <<
#!/bin/sh -ev

debug_options="-gw -dDBG_WITH_TIMEOUT"
if [ "%m" = "x86_64" ]; then carbon_arch="PP=ppc386 CPU_TARGET=i386 CPU_SOURCE=i386" ; else carbon_arch="" ; fi


# ** Start compiling lazarus

AllUnits="lcl packager/registration ideintf bigidecomponents packager"
if [ "%type_raw[uitype]" == "-aqua" ]; then
make $AllUnits all LCL_PLATFORM=carbon OPT="$debug_options" $carbon_arch
elif [ "%type_raw[uitype]" == "-gtk2" ]; then
make $AllUnits all LCL_PLATFORM=gtk2 OPT="$debug_options -dHasX -Fl%p/lib/pango-ft219/lib/ -k-framework -kApplicationServices"

make $AllUnits LCL_PLATFORM=carbon OPT="$debug_options" $carbon_arch
fi

# 64 bit units
make $AllUnits LCL_PLATFORM=nogui OPT="$debug_options"

# ** Finish compiling Lazarus **
#
<<

InstallScript: <<
#!/bin/sh -ev

# ** Start installing Lazarus **

install -m 755 -d %i/etc/lazarus
install -c -m 644 %b/tools/install/macosx/environmentoptions.xml %i/etc/lazarus

make install INSTALL_PREFIX=%i

# ** fix the symbolic links in %i/bin**

ln -sf ../share/lazarus/lazarus %i/bin/lazarus-ide
ln -sf ../share/lazarus/startlazarus %i/bin/startlazarus
ln -sf ../share/lazarus/lazbuild %i/bin/lazbuild

# fix the symbolic links in the application bundle for the use
# with the "AppBundles:" field

ln -sf %p/share/lazarus/lazarus lazarus.app/Contents/MacOS/lazarus
ln -sf %p/share/lazarus/startlazarus lazarus.app/Contents/MacOS/startlazarus

# ** Finish installing Lazarus **
#
<<

# Documentation
DocFiles: docs/*.txt docs/*.pdf

# Create the Appliation Bundle
AppBundles: lazarus.app

Description: Free Pascal IDE

DescDetail: <<
Lazarus is an open-source development system that builds on the Free Pascal
compiler by adding an integrated development environment (IDE).
It includes a syntax-highlighting code editor and a visual form designer,
as well as a component library that is highly compatible with Delphi's
Visual Component Library (VCL). The Lazarus Component Library (LCL)
includes equivalents for many of the familiar VCL controls such as
forms, buttons, text boxes and so on, which are used to create
applications with a graphical user interface (GUI).

Release Notes:
http://wiki.freepascal.org/Lazarus_0.9.30_release_notes
<<

DescUsage: <<
Start by double click the lazarus application in /Applications/Fink
<<

DescPort: <<
Available versions of the lcl: carbon, gtk2 and nogui.
With extra package 'lazarus-common-gtk1' gtk1 is also possible.
On IntelMacs, crosscompilation is now enabled for:
powerpc-carbon
i386-win32
i386-wince
arm-wince.

CPU_SOURCE is needed to build the 32bit version on 64bit systems.
Otherwise building svn2revisioninc crashes.
gtk2-64bit needs additional -k-framework -kApplicationServices
<<

Homepage: http://wiki.freepascal.org/Main_Page
Maintainer: Karl-Michael Schindler
<<