mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 19:50:05 +02:00
Add bep file for gcc 2.95.3
Includes binutils as usual (we might want to break that out eventually).
This commit is contained in:
165
sys-devel/gcc/gcc-2.95.3_110711.bep
Normal file
165
sys-devel/gcc/gcc-2.95.3_110711.bep
Normal file
@@ -0,0 +1,165 @@
|
||||
SUMMARY="C/C++ compiler"
|
||||
DESCRIPTION="Standard compiler for x86_gcc2 platform, ABI-compatible with BeOS R5."
|
||||
HOMEPAGE="http://gcc.gnu.org"
|
||||
# TODO: Also: http://www.gnu.org/software/binutils
|
||||
SRC_URI="git+file:///Transfer/buildtools-pm/.git#ba94fdf309096bd9bbf432ad53efba62bc47f98e"
|
||||
REVISION="2"
|
||||
STATUS_HAIKU="stable"
|
||||
|
||||
PROVIDES="cmd:cpp = $portVersion compat >= 2.95.3
|
||||
cmd:gcc = $portVersion compat >= 2.95.3
|
||||
cmd:g++ = $portVersion compat >= 2.95.3
|
||||
binutils = 2.17_110711 compat >= 2.17
|
||||
cmd:ar = 2.17_110711 compat >= 2.17
|
||||
cmd:as = 2.17_110711 compat >= 2.17
|
||||
cmd:c++filt = 2.17_110711 compat >= 2.17
|
||||
cmd:gcov = 1.5 compat >= 1.5
|
||||
cmd:gprof = 2.17_110711 compat >= 2.17
|
||||
cmd:ld = 2.17_110711 compat >= 2.17
|
||||
cmd:nm = 2.17_110711 compat >= 2.17
|
||||
cmd:objcopy = 2.17_110711 compat >= 2.17
|
||||
cmd:objdump = 2.17_110711 compat >= 2.17
|
||||
cmd:protoize = 2.17_110711 compat >= 2.17
|
||||
cmd:ranlib = 2.17_110711 compat >= 2.17
|
||||
cmd:readelf = 2.17_110711 compat >= 2.17
|
||||
cmd:size = 2.17_110711 compat >= 2.17
|
||||
cmd:strings = 2.17_110711 compat >= 2.17
|
||||
cmd:strip = 2.17_110711 compat >= 2.17
|
||||
cmd:unprotoize = 2.17_110711 compat >= 2.17"
|
||||
|
||||
REQUIRES="haiku >= $haikuVersion"
|
||||
BUILD_PREREQUIRES="haiku-devel >= $haikuVersion
|
||||
binutils
|
||||
gcc
|
||||
make
|
||||
texinfo"
|
||||
|
||||
SOURCE_DIR="$portVersionedName"
|
||||
|
||||
BUILD {
|
||||
gccDate=110711
|
||||
gccInstallDir="$prefix/develop/tools/gcc-2.95.3-${gccDate}"
|
||||
objectsDir=$(pwd)/../${portVersionedName}-obj
|
||||
binutilsObjectsDir=$objectsDir/binutils
|
||||
gccObjectsDir=$objectsDir/gcc
|
||||
buildtoolsDir=$(pwd)/legacy
|
||||
|
||||
rm -rf $objectsDir
|
||||
|
||||
# Touch some files generated by bison, so that bison won't run to update
|
||||
# them. Fixes issues with newer bison versions.
|
||||
# And while at it, touch gperf target, too (as gperf may not be installed).
|
||||
(cd $buildtoolsDir/gcc/gcc; touch c-parse.c c-parse.h cexp.c cp/parse.c \
|
||||
cp/parse.h c-gperf.h)
|
||||
|
||||
# build binutils
|
||||
mkdir -p $binutilsObjectsDir
|
||||
cd $binutilsObjectsDir
|
||||
CFLAGS="-O2" CXXFLAGS="-O2" "$buildtoolsDir/binutils/configure" \
|
||||
--prefix=$gccInstallDir \
|
||||
--disable-nls --enable-shared=yes
|
||||
make
|
||||
|
||||
# install binutils before building gcc
|
||||
make install
|
||||
|
||||
# build gcc
|
||||
mkdir $gccObjectsDir
|
||||
cd $gccObjectsDir
|
||||
CFLAGS="-O2" CXXFLAGS="-O2" "$buildtoolsDir/gcc/configure" \
|
||||
--prefix=$gccInstallDir \
|
||||
--disable-nls --enable-shared=yes --enable-languages=c,c++
|
||||
make bootstrap || true
|
||||
# The above will fail when compiling builtinbuf.cc, but we can ignore
|
||||
# that since it's trying to build libstdc++.so, which haiku provides
|
||||
# anyway.
|
||||
}
|
||||
|
||||
INSTALL {
|
||||
# TODO: Avoid the duplication by defining the variables globally once we've
|
||||
# moved the bep-format to shell.
|
||||
gccDate=110711
|
||||
gccInstallDir="$prefix/develop/tools/gcc-2.95.3-${gccDate}"
|
||||
objectsDir=$(pwd)/../${portVersionedName}-obj
|
||||
binutilsObjectsDir=$objectsDir/binutils
|
||||
gccObjectsDir=$objectsDir/gcc
|
||||
buildtoolsDir=$(pwd)/legacy
|
||||
|
||||
cd $binutilsObjectsDir
|
||||
make install
|
||||
|
||||
cd $gccObjectsDir
|
||||
make install
|
||||
|
||||
base=$gccInstallDir
|
||||
|
||||
### HTML documentation ####################################
|
||||
|
||||
html_base=$base/html-docs
|
||||
if [ ! -d "$html_base" ]; then
|
||||
echo "Building HTML documentation..."
|
||||
mkdir $html_base
|
||||
cd $html_base
|
||||
|
||||
makeinfo --html "$buildtoolsDir/gcc/gcc/cpp.texi"
|
||||
makeinfo --html "$buildtoolsDir/gcc/gcc/gcc.texi"
|
||||
makeinfo --html "$buildtoolsDir/binutils/libiberty/libiberty.texi"
|
||||
makeinfo --force --html "$buildtoolsDir/gcc/libio/iostream.texi" \
|
||||
&& true
|
||||
# some errors
|
||||
|
||||
ln -sf cpp/index.html $html_base/cpp.html
|
||||
ln -sf gcc/index.html $html_base/gcc.html
|
||||
ln -sf libiberty/index.html $html_base/libiberty.html
|
||||
ln -sf iostream/index.html $html_base/iostream.html
|
||||
fi
|
||||
if [ -d "$base/share/doc" ]; then
|
||||
echo "Adding binutils HTML documentation..."
|
||||
|
||||
mv $base/share/doc/as.html $html_base/as
|
||||
mv $base/share/doc/binutils.html $html_base/binutils
|
||||
mv $base/share/doc/gprof.html $html_base/gprof
|
||||
mv $base/share/doc/ld.html $html_base/ld
|
||||
#mv $base/share/doc/configure.html $html_base/
|
||||
|
||||
ln -sf as/index.html $html_base/as.html
|
||||
ln -sf binutils/index.html $html_base/binutils.html
|
||||
ln -sf gprof/index.html $html_base/gprof.html
|
||||
ln -sf ld/index.html $html_base/ld.html
|
||||
fi
|
||||
if [ ! -e "$html_base/as.html" ]; then
|
||||
echo "binutils HTML documentation missing, see" \
|
||||
"INSTALL-gcc2-from-source-Haiku."
|
||||
fi
|
||||
|
||||
### Cleanup ###############################################
|
||||
|
||||
echo "Cleanup"
|
||||
|
||||
cd $base/bin
|
||||
for binary in ../i586-pc-haiku/bin/*; do
|
||||
ln -sfn $binary .
|
||||
done
|
||||
|
||||
if [ -d $base/man -o -d $base/info -o -d $base/share ]; then
|
||||
rm -rf $base/man
|
||||
rm -rf $base/info
|
||||
rm -rf $base/share
|
||||
fi
|
||||
|
||||
rm -f $base/lib/gcc-lib/i586-pc-haiku/2.95.3-haiku-$gccDate/include/math.h
|
||||
|
||||
### C++ includes ######################################
|
||||
|
||||
echo "Install C++ includes & library"
|
||||
|
||||
rm -rf $base/include/g++
|
||||
ln -snf /boot/system/develop/headers/c++/2.95.3 $base/include/g++
|
||||
|
||||
ln -snf /boot/system/lib/libstdc++.r4.so $base/lib/
|
||||
ln -snf /boot/system/lib/libstdc++.so $base/lib/
|
||||
}
|
||||
|
||||
LICENSE="GNU GPL v2
|
||||
GNU LGPL v2"
|
||||
COPYRIGHT="1988-2000 Free Software Foundation, Inc."
|
||||
Reference in New Issue
Block a user