* split packages in multiple procedures to prevent

procedure too complex
  * use separate includes so they can be regenerated
    with simple unix commands that are listed in fpmake.pp

git-svn-id: trunk@12162 -
This commit is contained in:
peter 2008-11-18 19:47:28 +00:00
parent 514ccae231
commit a1281fc98d
4 changed files with 680 additions and 109 deletions

2
.gitattributes vendored
View File

@ -1690,6 +1690,8 @@ packages/fpgtk/src/fpgtkext.pp svneol=native#text/plain
packages/fpgtk/src/pgtk/pgtk.pp svneol=native#text/plain
packages/fpgtk/src/pgtk/pgtk.ppr -text
packages/fpmake.pp svneol=native#text/plain
packages/fpmake_add.inc svneol=native#text/plain
packages/fpmake_proc.inc svneol=native#text/plain
packages/fpmkunit/Makefile svneol=native#text/plain
packages/fpmkunit/Makefile.fpc svneol=native#text/plain
packages/fpmkunit/examples/ppu2fpmake.sh svneol=native#text/plain

View File

@ -9,122 +9,33 @@ Var
PBuild,P : TPackage;
D : TDependency;
I : Integer;
begin
With Installer do
begin
(*
The include lines below are generated with the following command:
/bin/ls -1 */fpmake.pp | sed 's+\(.*\)+{$include \1}+'
The include files are generated with the following commands:
/bin/ls -1 */fpmake.pp | awk -F '/' '/fpmake.pp/ { printf "procedure add_%s;\nbegin\n with Installer do\n{$include %s}\nend;\n\n",gensub("-","_","g",$1),$0; }' > fpmake_proc.inc
/bin/ls -1 */fpmake.pp | awk -F '/' '/fpmake.pp/ { printf " add_%s;\n",gensub("-","_","g",$1); }' > fpmake_add.inc
*)
{$include a52/fpmake.pp}
{$include fpmake_proc.inc}
{$include aspell/fpmake.pp}
{$include bfd/fpmake.pp}
{$include bzip2/fpmake.pp}
{$include cairo/fpmake.pp}
{$include cdrom/fpmake.pp}
{$include chm/fpmake.pp}
{$include dbus/fpmake.pp}
{$include dts/fpmake.pp}
{$include fcl-async/fpmake.pp}
{$include fcl-base/fpmake.pp}
{$include fcl-db/fpmake.pp}
{$include fcl-fpcunit/fpmake.pp}
{$include fcl-image/fpmake.pp}
{$include fcl-json/fpmake.pp}
{$include fcl-net/fpmake.pp}
{$include fcl-passrc/fpmake.pp}
{$include fcl-process/fpmake.pp}
{$include fcl-registry/fpmake.pp}
{$include fcl-res/fpmake.pp}
{$include fcl-web/fpmake.pp}
{$include fcl-xml/fpmake.pp}
{$include fftw/fpmake.pp}
{$include fpgtk/fpmake.pp}
{$include fpmkunit/fpmake.pp}
{$include fv/fpmake.pp}
{$include gdbint/fpmake.pp}
{$include gdbm/fpmake.pp}
{$include ggi/fpmake.pp}
{$include gnome1/fpmake.pp}
{$include graph/fpmake.pp}
{$include gtk1/fpmake.pp}
{$include gtk2/fpmake.pp}
{$include hash/fpmake.pp}
{$include hermes/fpmake.pp}
{$include httpd13/fpmake.pp}
{$include httpd20/fpmake.pp}
{$include httpd22/fpmake.pp}
{$include ibase/fpmake.pp}
{$include iconvenc/fpmake.pp}
{$include imagemagick/fpmake.pp}
{$include imlib/fpmake.pp}
{$include ldap/fpmake.pp}
{$include libc/fpmake.pp}
{$include libcurl/fpmake.pp}
{$include libgbafpc/fpmake.pp}
{$include libgd/fpmake.pp}
{$include libndsfpc/fpmake.pp}
{$include libpng/fpmake.pp}
{$include libxml/fpmake.pp}
{$include lua/fpmake.pp}
{$include mad/fpmake.pp}
{$include matroska/fpmake.pp}
{$include modplug/fpmake.pp}
{$include mysql/fpmake.pp}
{$include ncurses/fpmake.pp}
{$include newt/fpmake.pp}
{$include numlib/fpmake.pp}
{$include odbc/fpmake.pp}
{$include oggvorbis/fpmake.pp}
{$include openal/fpmake.pp}
{$include opengl/fpmake.pp}
{$include openssl/fpmake.pp}
{$include oracle/fpmake.pp}
{$include os2units/fpmake.pp}
{$include palmunits/fpmake.pp}
{$include pasjpeg/fpmake.pp}
{$include paszlib/fpmake.pp}
{$include pcap/fpmake.pp}
{$include postgres/fpmake.pp}
{$include ptc/fpmake.pp}
{$include pthreads/fpmake.pp}
{$include pxlib/fpmake.pp}
{$include regexpr/fpmake.pp}
{$include rexx/fpmake.pp}
{$include sdl/fpmake.pp}
{$include sndfile/fpmake.pp}
{$include sqlite/fpmake.pp}
{$include svgalib/fpmake.pp}
{$include symbolic/fpmake.pp}
{$include syslog/fpmake.pp}
{$include tcl/fpmake.pp}
{$include univint/fpmake.pp}
{$include unixutil/fpmake.pp}
{$include unzip/fpmake.pp}
{$include users/fpmake.pp}
{$include utmp/fpmake.pp}
{$include uuid/fpmake.pp}
{$include winunits-base/fpmake.pp}
{$include winunits-jedi/fpmake.pp}
{$include x11/fpmake.pp}
{$include xforms/fpmake.pp}
{$include zlib/fpmake.pp}
begin
{$include fpmake_add.inc}
{$include amunits/fpmake.pp}
With Installer do
begin
// Create fpc-all package
PBuild:=AddPackage('fpc-all');
PBuild.Version:='2.2.2-0';
for i:=0 to Packages.Count-1 do
begin
P:=Packages.PackageItems[i];
if P.Name<>'fpc-all' then
D:=PBuild.Dependencies.Add(P.Name);
end;
// Create fpc-all package
PBuild:=AddPackage('fpc-all');
PBuild.Version:='2.2.2-0';
for i:=0 to Packages.Count-1 do
begin
P:=Packages.PackageItems[i];
D:=PBuild.Dependencies.Add(P.Name);
end;
Run;
Run;
end;
end.

94
packages/fpmake_add.inc Normal file
View File

@ -0,0 +1,94 @@
add_a52;
add_amunits;
add_aspell;
add_bfd;
add_bzip2;
add_cairo;
add_cdrom;
add_chm;
add_dbus;
add_dts;
add_fcl_async;
add_fcl_base;
add_fcl_db;
add_fcl_fpcunit;
add_fcl_image;
add_fcl_json;
add_fcl_net;
add_fcl_passrc;
add_fcl_process;
add_fcl_registry;
add_fcl_res;
add_fcl_web;
add_fcl_xml;
add_fftw;
add_fpgtk;
add_fpmkunit;
add_fv;
add_gdbint;
add_gdbm;
add_ggi;
add_gnome1;
add_graph;
add_gtk1;
add_gtk2;
add_hash;
add_hermes;
add_httpd13;
add_httpd20;
add_httpd22;
add_ibase;
add_iconvenc;
add_imagemagick;
add_imlib;
add_ldap;
add_libc;
add_libcurl;
add_libgbafpc;
add_libgd;
add_libndsfpc;
add_libpng;
add_libxml;
add_lua;
add_mad;
add_matroska;
add_modplug;
add_mysql;
add_ncurses;
add_newt;
add_numlib;
add_odbc;
add_oggvorbis;
add_openal;
add_opengl;
add_openssl;
add_oracle;
add_os2units;
add_palmunits;
add_pasjpeg;
add_paszlib;
add_pcap;
add_postgres;
add_ptc;
add_pthreads;
add_pxlib;
add_regexpr;
add_rexx;
add_sdl;
add_sndfile;
add_sqlite;
add_svgalib;
add_symbolic;
add_syslog;
add_tcl;
add_univint;
add_unixutil;
add_unzip;
add_users;
add_utmp;
add_uuid;
add_winunits_base;
add_winunits_jedi;
add_x11;
add_xforms;
add_zlib;

564
packages/fpmake_proc.inc Normal file
View File

@ -0,0 +1,564 @@
procedure add_a52;
begin
with Installer do
{$include a52/fpmake.pp}
end;
procedure add_amunits;
begin
with Installer do
{$include amunits/fpmake.pp}
end;
procedure add_aspell;
begin
with Installer do
{$include aspell/fpmake.pp}
end;
procedure add_bfd;
begin
with Installer do
{$include bfd/fpmake.pp}
end;
procedure add_bzip2;
begin
with Installer do
{$include bzip2/fpmake.pp}
end;
procedure add_cairo;
begin
with Installer do
{$include cairo/fpmake.pp}
end;
procedure add_cdrom;
begin
with Installer do
{$include cdrom/fpmake.pp}
end;
procedure add_chm;
begin
with Installer do
{$include chm/fpmake.pp}
end;
procedure add_dbus;
begin
with Installer do
{$include dbus/fpmake.pp}
end;
procedure add_dts;
begin
with Installer do
{$include dts/fpmake.pp}
end;
procedure add_fcl_async;
begin
with Installer do
{$include fcl-async/fpmake.pp}
end;
procedure add_fcl_base;
begin
with Installer do
{$include fcl-base/fpmake.pp}
end;
procedure add_fcl_db;
begin
with Installer do
{$include fcl-db/fpmake.pp}
end;
procedure add_fcl_fpcunit;
begin
with Installer do
{$include fcl-fpcunit/fpmake.pp}
end;
procedure add_fcl_image;
begin
with Installer do
{$include fcl-image/fpmake.pp}
end;
procedure add_fcl_json;
begin
with Installer do
{$include fcl-json/fpmake.pp}
end;
procedure add_fcl_net;
begin
with Installer do
{$include fcl-net/fpmake.pp}
end;
procedure add_fcl_passrc;
begin
with Installer do
{$include fcl-passrc/fpmake.pp}
end;
procedure add_fcl_process;
begin
with Installer do
{$include fcl-process/fpmake.pp}
end;
procedure add_fcl_registry;
begin
with Installer do
{$include fcl-registry/fpmake.pp}
end;
procedure add_fcl_res;
begin
with Installer do
{$include fcl-res/fpmake.pp}
end;
procedure add_fcl_web;
begin
with Installer do
{$include fcl-web/fpmake.pp}
end;
procedure add_fcl_xml;
begin
with Installer do
{$include fcl-xml/fpmake.pp}
end;
procedure add_fftw;
begin
with Installer do
{$include fftw/fpmake.pp}
end;
procedure add_fpgtk;
begin
with Installer do
{$include fpgtk/fpmake.pp}
end;
procedure add_fpmkunit;
begin
with Installer do
{$include fpmkunit/fpmake.pp}
end;
procedure add_fv;
begin
with Installer do
{$include fv/fpmake.pp}
end;
procedure add_gdbint;
begin
with Installer do
{$include gdbint/fpmake.pp}
end;
procedure add_gdbm;
begin
with Installer do
{$include gdbm/fpmake.pp}
end;
procedure add_ggi;
begin
with Installer do
{$include ggi/fpmake.pp}
end;
procedure add_gnome1;
begin
with Installer do
{$include gnome1/fpmake.pp}
end;
procedure add_graph;
begin
with Installer do
{$include graph/fpmake.pp}
end;
procedure add_gtk1;
begin
with Installer do
{$include gtk1/fpmake.pp}
end;
procedure add_gtk2;
begin
with Installer do
{$include gtk2/fpmake.pp}
end;
procedure add_hash;
begin
with Installer do
{$include hash/fpmake.pp}
end;
procedure add_hermes;
begin
with Installer do
{$include hermes/fpmake.pp}
end;
procedure add_httpd13;
begin
with Installer do
{$include httpd13/fpmake.pp}
end;
procedure add_httpd20;
begin
with Installer do
{$include httpd20/fpmake.pp}
end;
procedure add_httpd22;
begin
with Installer do
{$include httpd22/fpmake.pp}
end;
procedure add_ibase;
begin
with Installer do
{$include ibase/fpmake.pp}
end;
procedure add_iconvenc;
begin
with Installer do
{$include iconvenc/fpmake.pp}
end;
procedure add_imagemagick;
begin
with Installer do
{$include imagemagick/fpmake.pp}
end;
procedure add_imlib;
begin
with Installer do
{$include imlib/fpmake.pp}
end;
procedure add_ldap;
begin
with Installer do
{$include ldap/fpmake.pp}
end;
procedure add_libc;
begin
with Installer do
{$include libc/fpmake.pp}
end;
procedure add_libcurl;
begin
with Installer do
{$include libcurl/fpmake.pp}
end;
procedure add_libgbafpc;
begin
with Installer do
{$include libgbafpc/fpmake.pp}
end;
procedure add_libgd;
begin
with Installer do
{$include libgd/fpmake.pp}
end;
procedure add_libndsfpc;
begin
with Installer do
{$include libndsfpc/fpmake.pp}
end;
procedure add_libpng;
begin
with Installer do
{$include libpng/fpmake.pp}
end;
procedure add_libxml;
begin
with Installer do
{$include libxml/fpmake.pp}
end;
procedure add_lua;
begin
with Installer do
{$include lua/fpmake.pp}
end;
procedure add_mad;
begin
with Installer do
{$include mad/fpmake.pp}
end;
procedure add_matroska;
begin
with Installer do
{$include matroska/fpmake.pp}
end;
procedure add_modplug;
begin
with Installer do
{$include modplug/fpmake.pp}
end;
procedure add_mysql;
begin
with Installer do
{$include mysql/fpmake.pp}
end;
procedure add_ncurses;
begin
with Installer do
{$include ncurses/fpmake.pp}
end;
procedure add_newt;
begin
with Installer do
{$include newt/fpmake.pp}
end;
procedure add_numlib;
begin
with Installer do
{$include numlib/fpmake.pp}
end;
procedure add_odbc;
begin
with Installer do
{$include odbc/fpmake.pp}
end;
procedure add_oggvorbis;
begin
with Installer do
{$include oggvorbis/fpmake.pp}
end;
procedure add_openal;
begin
with Installer do
{$include openal/fpmake.pp}
end;
procedure add_opengl;
begin
with Installer do
{$include opengl/fpmake.pp}
end;
procedure add_openssl;
begin
with Installer do
{$include openssl/fpmake.pp}
end;
procedure add_oracle;
begin
with Installer do
{$include oracle/fpmake.pp}
end;
procedure add_os2units;
begin
with Installer do
{$include os2units/fpmake.pp}
end;
procedure add_palmunits;
begin
with Installer do
{$include palmunits/fpmake.pp}
end;
procedure add_pasjpeg;
begin
with Installer do
{$include pasjpeg/fpmake.pp}
end;
procedure add_paszlib;
begin
with Installer do
{$include paszlib/fpmake.pp}
end;
procedure add_pcap;
begin
with Installer do
{$include pcap/fpmake.pp}
end;
procedure add_postgres;
begin
with Installer do
{$include postgres/fpmake.pp}
end;
procedure add_ptc;
begin
with Installer do
{$include ptc/fpmake.pp}
end;
procedure add_pthreads;
begin
with Installer do
{$include pthreads/fpmake.pp}
end;
procedure add_pxlib;
begin
with Installer do
{$include pxlib/fpmake.pp}
end;
procedure add_regexpr;
begin
with Installer do
{$include regexpr/fpmake.pp}
end;
procedure add_rexx;
begin
with Installer do
{$include rexx/fpmake.pp}
end;
procedure add_sdl;
begin
with Installer do
{$include sdl/fpmake.pp}
end;
procedure add_sndfile;
begin
with Installer do
{$include sndfile/fpmake.pp}
end;
procedure add_sqlite;
begin
with Installer do
{$include sqlite/fpmake.pp}
end;
procedure add_svgalib;
begin
with Installer do
{$include svgalib/fpmake.pp}
end;
procedure add_symbolic;
begin
with Installer do
{$include symbolic/fpmake.pp}
end;
procedure add_syslog;
begin
with Installer do
{$include syslog/fpmake.pp}
end;
procedure add_tcl;
begin
with Installer do
{$include tcl/fpmake.pp}
end;
procedure add_univint;
begin
with Installer do
{$include univint/fpmake.pp}
end;
procedure add_unixutil;
begin
with Installer do
{$include unixutil/fpmake.pp}
end;
procedure add_unzip;
begin
with Installer do
{$include unzip/fpmake.pp}
end;
procedure add_users;
begin
with Installer do
{$include users/fpmake.pp}
end;
procedure add_utmp;
begin
with Installer do
{$include utmp/fpmake.pp}
end;
procedure add_uuid;
begin
with Installer do
{$include uuid/fpmake.pp}
end;
procedure add_winunits_base;
begin
with Installer do
{$include winunits-base/fpmake.pp}
end;
procedure add_winunits_jedi;
begin
with Installer do
{$include winunits-jedi/fpmake.pp}
end;
procedure add_x11;
begin
with Installer do
{$include x11/fpmake.pp}
end;
procedure add_xforms;
begin
with Installer do
{$include xforms/fpmake.pp}
end;
procedure add_zlib;
begin
with Installer do
{$include zlib/fpmake.pp}
end;