[sisyphus] Re: fpc&lazarus [-]

Alexey Tourbin =?iso-8859-1?q?at_=CE=C1_altlinux=2Eru?=
Ср Окт 19 20:40:23 MSD 2005


On Wed, Oct 19, 2005 at 05:08:24PM +0300, Led wrote:
> Есть ряд ответов:) В частности, на предмет сборки документации в пакете 
> (изначально make docs не работает, нужны минимальные правки). Сейчас немного 

Это я уже подкрутил.  Надо договориться, что fpc-2.0 буду выкладывать я,
а то все будут делать двойную работу.  Я даже реализовал поиск
зависимостей на основе контрольной суммы интерфейса .ppu файлов.  Я пока
просто выкладывать не хочу, т.к. надо определиться с gdb, и ещё
несколько мелочей нужно довести до ума.
----------- следующая часть -----------
#!/bin/sh -ef

atexit()
{
	local rc=$?
	trap - EXIT
	rm -f "$tmpfile"
	exit $rc
}
tmpfile=`mktemp -t fpc2req.XXXXXXXX`
trap atexit EXIT HUP INT QUIT PIPE TERM

cat >"$tmpfile"

: ${PPUDUMP:=ppudump}
while read -r file; do
	[ -n "$file" -a -z "${file##*.ppu}" ] || continue
	$PPUDUMP -vi "$file" |awk '/^Uses unit:/{ sub(")$","");
		printf "fpc2(%s) = %s\n", tolower($3), $NF }'
done <"$tmpfile"

/usr/lib/rpm/find-requires ${1+"$@"} <"$tmpfile"
----------- следующая часть -----------
#!/bin/sh -ef

atexit()
{
	local rc=$?
	trap - EXIT
	rm -f "$tmpfile"
	exit $rc
}
tmpfile=`mktemp -t fpc2prov.XXXXXXXX`
trap atexit EXIT HUP INT QUIT PIPE TERM

cat >"$tmpfile"

: ${PPUDUMP:=ppudump}
while read -r file; do
	[ -n "$file" -a -z "${file##*.ppu}" ] || continue
	$PPUDUMP -vh "$file" |awk -v ppu="$(basename "$file" .ppu)" \
		'/^Interface Checksum/{printf "fpc2(%s) = %s\n", tolower(ppu), $NF}'
done <"$tmpfile"

/usr/lib/rpm/find-provides ${1+"$@"} <"$tmpfile"
----------- следующая часть -----------
Name: fpc
Version: 2.0.0
Release: alt1

Summary: Free Pascal Compiler
License: GPL
Group: Development/Other

URL: http://www.freepascal.org
Source0: %name-%version.tar.bz2

Source1: fpc2.req
Source2: fpc2.prov

Patch0: %name-2.0.0-alt-fpcdir.patch
Patch1: %name-2.0.0-alt-smartlink-ld.patch

ExclusiveOS: Linux
ExclusiveArch: %ix86

# Added by buildreq2 on Sat Oct 15 2005
BuildRequires: fpc ghostscript-module-X latex2html libgpm-devel libncurses-devel netpbm

%description
The Free Pascal Compiler is a Turbo Pascal 7.0 and Delphi compatible
32/64-bit Pascal Compiler. It comes with a fully compatible TP 7.0
runtime library.  Some extensions are added to the language, like
function overloading.  Basic Delphi support is already implemented
(classes, exceptions, ansistrings).

%prep
%setup -q -n %name
%patch0 -p1
%patch1 -p1

%build
# bootstrap
%make_build -C compiler cycle RELEASE=1
%__cp -pvf compiler/ppc386 ppc386

%define fpc_build %make_build clean all FPC=$PWD/ppc386 RELEASE=1
%fpc_build -C rtl CREATESMART=1
%fpc_build -C compiler LINKSMART=1 msg2inc

%fpc_build -C packages/base CREATESMART=1
%fpc_build -C fcl CREATESMART=1
%fpc_build -C utils LINKSMART=1 DATA2INC=$PWD/utils/data2inc

%fpc_build -C packages/extra CREATESMART=1
%fpc_build -C fv CREATESMART=1
%fpc_build -C ide LINKSMART=1

%define fpc_build_win32 %make_build all FPC=$PWD/ppc386 RELEASE=1 OS_TARGET=win32 BINUTILSPREFIX=i386-mingw32msvc-
%fpc_build_win32 -C rtl CREATESMART=1
%fpc_build_win32 -C packages/base CREATESMART=1
%fpc_build_win32 -C fcl CREATESMART=1

(cd docs; sh tex2htex; touch refex.chk progex.chk)
%__subst -p 's/2\\$/2 \\/;s/--warn-no-node//g' docs/Makefile*
%make_build -C docs html USEL2H=1 FPDOC=$PWD/utils/fpdoc/fpdoc

%install
%define installdirs INSTALL_BINDIR=%buildroot%_bindir INSTALL_BASEDIR=%buildroot%_libdir/fpc2 INSTALL_DOCDIR=%buildroot%_docdir/fpc2
%define fpc_install %make_install distinstall FPC=$PWD/ppc386 FPCMAKE=$PWD/utils/fpcm/fpcmake %installdirs
%fpc_install -C rtl
%fpc_install -C compiler

%fpc_install -C packages/base
%fpc_install -C fcl
%fpc_install -C utils CODPATH=%buildroot%_libdir/fpc2/lexyacc

%fpc_install -C packages/extra
%fpc_install -C fv
%fpc_install -C ide

%define fpc_install_win32 %make_install install FPC=$PWD/ppc386 FPCMAKE=$PWD/utils/fpcm/fpcmake OS_TARGET=win32 INSTALL_BASEDIR=%buildroot%_libdir/fpc2
%fpc_install_win32 -C rtl
%fpc_install_win32 -C packages/base
%fpc_install_win32 -C fcl

# this symbolic link must be absolute
%__ln_s %_libdir/fpc2/ppc386 %buildroot%_bindir/ppc386

%__mkdir_p %buildroot%_man1dir %buildroot%_man5dir
%__install -p -m755 install/man/man1/*.1 %buildroot%_man1dir
%__install -p -m755 install/man/man5/*.5 %buildroot%_man5dir

%define pkgdocdir %_docdir/%name-%version
%__mkdir_p %buildroot%pkgdocdir
%__cp -a docs/{ref,rtl,user,prog} %buildroot%pkgdocdir

%__install -pD -m755 %SOURCE1 %buildroot%_prefix/lib/rpm/fpc2.req
%__install -pD -m755 %SOURCE2 %buildroot%_prefix/lib/rpm/fpc2.prov

%define __find_requires PPUDUMP=%buildroot%_bindir/ppudump %buildroot%_prefix/lib/rpm/fpc2.req
%define __find_provides PPUDUMP=%buildroot%_bindir/ppudump %buildroot%_prefix/lib/rpm/fpc2.prov

%files
%dir %_libdir/fpc2
%dir %_libdir/fpc2/units
%dir %_libdir/fpc2/units/i386-linux
%_libdir/fpc2/units/i386-linux/rtl
%_bindir/fpc
%_bindir/ppc386
%_bindir/fpcmake
%_bindir/ppudump
%_libdir/fpc2/msg
%_libdir/fpc2/ppc386
%_libdir/fpc2/samplecfg
%_prefix/lib/rpm/fpc2.req
%_prefix/lib/rpm/fpc2.prov
%_man1dir/fpc.*
%_man1dir/ppc386.*
%_man1dir/fpcmake.*
%_man1dir/ppudump.*
%_man5dir/fpc.*
%_man5dir/fpcmake.*

# utils
%package utils
Summary: utils
Group: Development/Other
Requires: %name = %version-%release

%description utils
utils

%files utils
%_bindir/*
%exclude %_bindir/fpc
%exclude %_bindir/ppc386
%exclude %_bindir/fpcmake
%exclude %_bindir/ppudump
%_man1dir/*.*
%exclude %_man1dir/fpc.*
%exclude %_man1dir/ppc386.*
%exclude %_man1dir/fpcmake.*
%exclude %_man1dir/ppudump.*
%_man5dir/*.*
%exclude %_man5dir/fpc.*
%exclude %_man5dir/fpcmake.*
%dir %_libdir/fpc2
%dir %_libdir/fpc2/units
%dir %_libdir/fpc2/units/i386-linux
%_libdir/fpc2/lexyacc
%_libdir/fpc2/units/i386-linux/lexyacc

# packages/base
%package packages
Summary: packages
Group: Development/Other
Requires: %name = %version-%release

%description packages
packages

%files packages
%dir %_libdir/fpc2
%dir %_libdir/fpc2/units
%dir %_libdir/fpc2/units/i386-linux
%_libdir/fpc2/units/i386-linux/gdbint
%_libdir/fpc2/units/i386-linux/ibase
%_libdir/fpc2/units/i386-linux/libasync
%_libdir/fpc2/units/i386-linux/libc
%_libdir/fpc2/units/i386-linux/md5
%_libdir/fpc2/units/i386-linux/mysql
%_libdir/fpc2/units/i386-linux/netdb
%_libdir/fpc2/units/i386-linux/odbc
%_libdir/fpc2/units/i386-linux/oracle
%_libdir/fpc2/units/i386-linux/pasjpeg
%_libdir/fpc2/units/i386-linux/paszlib
%_libdir/fpc2/units/i386-linux/postgres
%_libdir/fpc2/units/i386-linux/pthreads
%_libdir/fpc2/units/i386-linux/regexpr
%_libdir/fpc2/units/i386-linux/sqlite

# fcl
%package fcl
Summary: Free Component Library for Free Pascal
Group: Development/Other
Requires: %name = %version-%release

%description fcl
The Free Pascal Compiler is a Turbo Pascal 7.0 and Delphi compatible
32/64-bit Pascal Compiler.  It comes with a fully compatible TP 7.0
runtime library.  This package contains the Free Component Library for
the Free Pascal Compiler.

%files fcl
%dir %_libdir/fpc2
%dir %_libdir/fpc2/units
%dir %_libdir/fpc2/units/i386-linux
%_libdir/fpc2/units/i386-linux/fcl

# packages/extra/x11
%package x11
Summary: x11
Group: Development/Other
Requires: %name = %version-%release

%description x11

%files x11
%dir %_libdir/fpc2
%dir %_libdir/fpc2/units
%dir %_libdir/fpc2/units/i386-linux
%_libdir/fpc2/units/i386-linux/x11

# packages/extra/opengl
%package opengl
Summary: opengl
Group: Development/Other
Requires: %name = %version-%release

%description opengl

%files opengl
%dir %_libdir/fpc2
%dir %_libdir/fpc2/units
%dir %_libdir/fpc2/units/i386-linux
%_libdir/fpc2/units/i386-linux/opengl

# packages/extra/fpgtk
%package fpgtk
Summary: Free Component Library for Free Pascal
Group: Development/Other
Requires: %name = %version-%release

%description fpgtk
fpgtk

%files fpgtk
%dir %_libdir/fpc2
%dir %_libdir/fpc2/units
%dir %_libdir/fpc2/units/i386-linux
%_libdir/fpc2/units/i386-linux/fpgtk

# packages/extra/gnome
%package gnome
Summary: Free Component Library for Free Pascal
Group: Development/Other
Requires: %name = %version-%release

%description gnome
gnome

%files gnome
%dir %_libdir/fpc2
%dir %_libdir/fpc2/units
%dir %_libdir/fpc2/units/i386-linux
%_libdir/fpc2/units/i386-linux/gnome

# packages/extra/gtk
%package gtk
Summary: Free Component Library for Free Pascal
Group: Development/Other
Requires: %name = %version-%release

%description gtk
gtk

%files gtk
%dir %_libdir/fpc2
%dir %_libdir/fpc2/units
%dir %_libdir/fpc2/units/i386-linux
%_libdir/fpc2/units/i386-linux/gtk

# packages/extra/gtk2
%package gtk2
Summary: Free Component Library for Free Pascal
Group: Development/Other
Requires: %name = %version-%release

%description gtk2
gtk2

%files gtk2
%dir %_libdir/fpc2
%dir %_libdir/fpc2/units
%dir %_libdir/fpc2/units/i386-linux
%_libdir/fpc2/units/i386-linux/gtk2

# packages/extra
%package extra
Summary: Free Component Library for Free Pascal
Group: Development/Other
Requires: %name = %version-%release

%description extra
extra

%files extra
%dir %_libdir/fpc2
%dir %_libdir/fpc2/units
%dir %_libdir/fpc2/units/i386-linux
%_libdir/fpc2/units/i386-linux/bfd
%_libdir/fpc2/units/i386-linux/cdrom
%_libdir/fpc2/units/i386-linux/forms
%_libdir/fpc2/units/i386-linux/gconf
%_libdir/fpc2/units/i386-linux/gdbm
%_libdir/fpc2/units/i386-linux/ggi
%_libdir/fpc2/units/i386-linux/imlib
%_libdir/fpc2/units/i386-linux/libgd
%_libdir/fpc2/units/i386-linux/libpng
%_libdir/fpc2/units/i386-linux/ncurses
%_libdir/fpc2/units/i386-linux/newt
%_libdir/fpc2/units/i386-linux/svgalib
%_libdir/fpc2/units/i386-linux/syslog
%_libdir/fpc2/units/i386-linux/tcl
%_libdir/fpc2/units/i386-linux/unixutil
%_libdir/fpc2/units/i386-linux/unzip
%_libdir/fpc2/units/i386-linux/utmp
%_libdir/fpc2/units/i386-linux/zlib
%_libdir/fpc2/units/i386-linux/zvt

# fv
%package fv
Summary: Free Component Library for Free Pascal
Group: Development/Other
Requires: %name = %version-%release

%description fv
The Free Pascal Compiler is a Turbo Pascal 7.0 and Delphi compatible
32/64-bit Pascal Compiler. It comes with a fully compatible TP 7.0
runtime library.  Some extensions are added to the language, like
function overloading.  This package contains the Integrated Development
Environment (IDE).

%files fv
%dir %_libdir/fpc2
%dir %_libdir/fpc2/units
%dir %_libdir/fpc2/units/i386-linux
%_libdir/fpc2/units/i386-linux/fv

# ide
%package ide
Summary: Free Component Library for Free Pascal
Group: Development/Other
Requires: %name = %version-%release

%description ide
The Free Pascal Compiler is a Turbo Pascal 7.0 and Delphi compatible
32/64-bit Pascal Compiler. It comes with a fully compatible TP 7.0
runtime library.  Some extensions are added to the language, like
function overloading.  This package contains the Integrated Development
Environment (IDE).

%files ide
%_bindir/fp
%_libdir/fpc2/ide

# docs
%package docs
Summary: docs
Group: Development/Other
Requires: %name = %version-%release

%description docs
The Free Pascal Compiler is a Turbo Pascal 7.0 and Delphi compatible
32/64-bit Pascal Compiler. It comes with a fully compatible TP 7.0
runtime library.  Some extensions are added to the language, like
function overloading.  This package contains the Integrated Development
Environment (docs).

%files docs
%dir %pkgdocdir
%pkgdocdir/ref
%pkgdocdir/rtl
%pkgdocdir/user
%pkgdocdir/prog

# win32
%package win32
Summary: win32
Group: Development/Other
AutoReqProv: no
Requires: i386-mingw32msvc-binutils
Requires: %name = %version-%release

%description win32
The Free Pascal Compiler is a Turbo Pascal 7.0 and Delphi compatible
32/64-bit Pascal Compiler. It comes with a fully compatible TP 7.0
runtime library.  Some extensions are added to the language, like
function overloading.  This package contains the Integrated Development
Environment (win32).

%files win32
%dir %_libdir/fpc2
%dir %_libdir/fpc2/units
%dir %_libdir/fpc2/units/i386-win32
# rtl
%_libdir/fpc2/units/i386-win32/rtl
# packages/base
%_libdir/fpc2/units/i386-win32/gdbint
%_libdir/fpc2/units/i386-win32/ibase
%_libdir/fpc2/units/i386-win32/md5
%_libdir/fpc2/units/i386-win32/mysql
%_libdir/fpc2/units/i386-win32/netdb
%_libdir/fpc2/units/i386-win32/odbc
%_libdir/fpc2/units/i386-win32/pasjpeg
%_libdir/fpc2/units/i386-win32/paszlib
%_libdir/fpc2/units/i386-win32/postgres
%_libdir/fpc2/units/i386-win32/regexpr
%_libdir/fpc2/units/i386-win32/sqlite
# fcl
%_libdir/fpc2/units/i386-win32/fcl

%changelog
* Sat Oct 15 2005 Alexey Tourbin <at на altlinux.ru> 2.0.0-alt1
- 1.0.10 -> 2.0.0
- fpcdir:='%_libdir/fpc2'; fpcdocdir:='%_docdir/fpc2'

* Tue Feb 11 2004 Sergey P. Kondratyev <seirge на altlinux.ru> 1.0.10-alt1
- new version + docs and examples

* Mon Oct 07 2002 Michael Shigorin <mike на altlinux.ru> 1.0.6-alt1.1
- spec cleanup

* Sat Sep 19 2002 Sergey <skrivulja на erec.ru>
- adopted for Master
----------- следующая часть -----------
--- fpc/compiler/options.pas-	2005-05-05 14:53:55 +0000
+++ fpc/compiler/options.pas	2005-10-15 16:58:10 +0000
@@ -2039,6 +2039,12 @@ begin
 {$ELSE USE_SYSUTILS}
   fpcdir:=FixPath(getenv('FPCDIR'),false);
 {$ENDIF USE_SYSUTILS}
+{$ifdef x86_64}
+  if (fpcdir='') and PathExists('/usr/lib64/fpc2/') then
+       fpcdir:='/usr/lib64/fpc2/';
+{$endif}
+  if (fpcdir='') and PathExists('/usr/lib/fpc2/') then
+       fpcdir:='/usr/lib/fpc2/';
   if fpcdir='' then
    begin
      if PathExists('/usr/local/lib/fpc/'+version_string) then
----------- следующая часть -----------
--- fpc/compiler/systems/t_linux.pas-	2005-03-07 17:10:00 +0000
+++ fpc/compiler/systems/t_linux.pas	2005-10-15 16:43:15 +0000
@@ -450,9 +450,8 @@ begin
    StaticStr:='-static';
   if (cs_link_strip in aktglobalswitches) then
    StripStr:='-s';
-  if (cs_link_smart in aktglobalswitches) and
-     (tf_smartlink_sections in target_info.flags) then
-   GCSectionsStr:='--gc-sections';
+  if (cs_link_smart in aktglobalswitches) then
+   GCSectionsStr:='--gc-sections --no-keep-memory -O1';
   If (cs_profile in aktmoduleswitches) or
      ((Info.DynamicLinker<>'') and (not SharedLibFiles.Empty)) then
    begin
----------- следующая часть -----------
Было удалено вложение не в текстовом формате...
Имя     : =?iso-8859-1?q?=CF=D4=D3=D5=D4=D3=D4=D7=D5=C5=D4?=
Тип     : application/pgp-signature
Размер  : 189 байтов
Описание: =?iso-8859-1?q?=CF=D4=D3=D5=D4=D3=D4=D7=D5=C5=D4?=
Url     : <http://lists.altlinux.org/pipermail/sisyphus/attachments/20051019/605c4886/attachment-0003.bin>


Подробная информация о списке рассылки Sisyphus