mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 04:00:05 +02:00
gcc: add recipe for current version 2.95.3_2013_05_04
Also remove older recipes.
This commit is contained in:
@@ -1,151 +0,0 @@
|
||||
SUMMARY="C/C++ compiler"
|
||||
DESCRIPTION="Standard compiler for x86_gcc2 platform, ABI-compatible with BeOS R5."
|
||||
HOMEPAGE="http://gcc.gnu.org"
|
||||
LICENSE="
|
||||
GNU GPL v2
|
||||
GNU LGPL v2
|
||||
"
|
||||
COPYRIGHT="1988-2000 Free Software Foundation, Inc."
|
||||
SRC_URI="
|
||||
git+file://$portBaseDir/../binutils/work-2.17_130421/sources/binutils-2.17_130421#9f9e588ceb7baa6bc5ac0193fb90212fc7fd667c
|
||||
git+git://github.com/haiku/BuildtoolsPM.git#9f9e588ceb7baa6bc5ac0193fb90212fc7fd667c
|
||||
"
|
||||
REVISION="5"
|
||||
ARCHITECTURES="x86_gcc2 ?x86"
|
||||
|
||||
PROVIDES="
|
||||
gcc = $portVersion compat >= 2.95.3
|
||||
cmd:c++ = $portVersion compat >= 2.95.3
|
||||
cmd:cpp = $portVersion compat >= 2.95.3
|
||||
cmd:g++ = $portVersion compat >= 2.95.3
|
||||
cmd:gcc = $portVersion compat >= 2.95.3
|
||||
cmd:gcov = 1.5 compat >= 1.5
|
||||
cmd:protoize = $portVersion compat >= 2.95.3
|
||||
cmd:unprotoize = $portVersion compat >= 2.95.3
|
||||
"
|
||||
|
||||
REQUIRES="
|
||||
haiku >= $haikuVersion
|
||||
"
|
||||
BUILD_REQUIRES="
|
||||
binutils
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
haiku_devel >= $haikuVersion
|
||||
cmd:autoconf
|
||||
gcc
|
||||
cmd:flex
|
||||
cmd:make
|
||||
cmd:sed
|
||||
cmd:tar
|
||||
cmd:makeinfo
|
||||
"
|
||||
|
||||
SOURCE_DIR="$portVersionedName"
|
||||
BUILD_PACKAGE_ACTIVATION_PHASE=INSTALL
|
||||
|
||||
gccDir=$(pwd)/legacy/gcc
|
||||
gccDate=110711
|
||||
relativeGccInstallDir="develop/tools/gcc-2.95.3-${gccDate}"
|
||||
gccInstallDir="$prefix/$relativeGccInstallDir"
|
||||
objectsDir=$(pwd)/../${portVersionedName}-obj
|
||||
gccObjectsDir=$objectsDir/gcc
|
||||
|
||||
BUILD()
|
||||
{
|
||||
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 $gccDir/gcc; touch c-parse.c c-parse.h cexp.c cp/parse.c \
|
||||
cp/parse.h c-gperf.h)
|
||||
|
||||
# build gcc
|
||||
mkdir -p $gccObjectsDir
|
||||
cd $gccObjectsDir
|
||||
CFLAGS="-O2" CXXFLAGS="-O2" "$gccDir/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()
|
||||
{
|
||||
cd $gccObjectsDir
|
||||
make install
|
||||
|
||||
base=$gccInstallDir
|
||||
|
||||
### HTML documentation ####################################
|
||||
|
||||
html_base=$prefix/documentation/packages/$portVersionedName
|
||||
if [ ! -d "$html_base" ]; then
|
||||
echo "Building HTML documentation..."
|
||||
mkdir -p $html_base
|
||||
cd $html_base
|
||||
|
||||
makeinfo --html "$gccDir/gcc/cpp.texi"
|
||||
makeinfo --html "$gccDir/gcc/gcc.texi"
|
||||
makeinfo --force --html "$gccDir/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 iostream/index.html $html_base/iostream.html
|
||||
fi
|
||||
|
||||
### Symlinks ##############################################
|
||||
|
||||
echo "Creating required symlinks"
|
||||
|
||||
# convert to absolute links to relative ones
|
||||
cd $base/bin
|
||||
ln -sfn g++ c++
|
||||
ln -sfn gcc i586-pc-haiku-gcc
|
||||
|
||||
# make all tools available via default paths if this is the system
|
||||
# compiler
|
||||
if [ $architecture = 'x86_gcc2' ]; then
|
||||
echo "Symlinking binaries into default path"
|
||||
mkdir -p $prefix/bin
|
||||
cd $prefix/bin
|
||||
ln -sfn ../$relativeGccInstallDir/bin/* .
|
||||
fi
|
||||
|
||||
### Strip #################################################
|
||||
|
||||
echo "Strip debug info"
|
||||
|
||||
cd $base
|
||||
strip --strip-debug bin/*
|
||||
strip --strip-debug i586-pc-haiku/bin/*
|
||||
strip --strip-debug lib/gcc-lib/i586-pc-haiku/2.95.3-${gccDate}/* \
|
||||
&>/dev/null || true
|
||||
|
||||
### Cleanup ###############################################
|
||||
|
||||
echo "Cleanup"
|
||||
|
||||
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/
|
||||
}
|
||||
@@ -1,152 +0,0 @@
|
||||
SUMMARY="C/C++ compiler"
|
||||
DESCRIPTION="Standard compiler for x86_gcc2 platform, ABI-compatible with BeOS R5."
|
||||
HOMEPAGE="http://gcc.gnu.org"
|
||||
LICENSE="
|
||||
GNU GPL v2
|
||||
GNU LGPL v2
|
||||
"
|
||||
COPYRIGHT="1988-2000 Free Software Foundation, Inc."
|
||||
SRC_URI="
|
||||
git+file://$portBaseDir/../binutils/work-2.17_130421/sources/binutils-2.17_130421#278de7bc9243876c2e08f8d6a243d510c5000462
|
||||
git+git://github.com/haiku/BuildtoolsPM.git#278de7bc9243876c2e08f8d6a243d510c5000462
|
||||
"
|
||||
REVISION="1"
|
||||
ARCHITECTURES="x86_gcc2 ?x86"
|
||||
|
||||
PROVIDES="
|
||||
gcc = $portVersion compat >= 2.95.3
|
||||
cmd:c++ = $portVersion compat >= 2.95.3
|
||||
cmd:cpp = $portVersion compat >= 2.95.3
|
||||
cmd:g++ = $portVersion compat >= 2.95.3
|
||||
cmd:gcc = $portVersion compat >= 2.95.3
|
||||
cmd:gcov = 1.5 compat >= 1.5
|
||||
cmd:protoize = $portVersion compat >= 2.95.3
|
||||
cmd:unprotoize = $portVersion compat >= 2.95.3
|
||||
"
|
||||
|
||||
REQUIRES="
|
||||
haiku >= $haikuVersion
|
||||
"
|
||||
BUILD_REQUIRES="
|
||||
binutils
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
haiku_devel >= $haikuVersion
|
||||
cmd:autoconf
|
||||
gcc
|
||||
cmd:flex
|
||||
cmd:make
|
||||
cmd:sed
|
||||
cmd:tar
|
||||
cmd:makeinfo
|
||||
"
|
||||
|
||||
SOURCE_DIR="$portVersionedName"
|
||||
BUILD_PACKAGE_ACTIVATION_PHASE=INSTALL
|
||||
|
||||
gccDir=$(pwd)/legacy/gcc
|
||||
gccDate=110711
|
||||
relativeGccInstallDir="develop/tools/gcc-2.95.3-${gccDate}"
|
||||
gccInstallDir="$prefix/$relativeGccInstallDir"
|
||||
objectsDir=$(pwd)/../${portVersionedName}-obj
|
||||
gccObjectsDir=$objectsDir/gcc
|
||||
|
||||
BUILD()
|
||||
{
|
||||
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 $gccDir/gcc; touch c-parse.c c-parse.h cexp.c cp/parse.c \
|
||||
cp/parse.h c-gperf.h)
|
||||
|
||||
# build gcc
|
||||
mkdir -p $gccObjectsDir
|
||||
cd $gccObjectsDir
|
||||
CFLAGS="-O2" CXXFLAGS="-O2" "$gccDir/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()
|
||||
{
|
||||
cd $gccObjectsDir
|
||||
make install
|
||||
|
||||
base=$gccInstallDir
|
||||
|
||||
### HTML documentation ####################################
|
||||
|
||||
html_base=$prefix/documentation/packages/$portVersionedName
|
||||
if [ ! -d "$html_base" ]; then
|
||||
echo "Building HTML documentation..."
|
||||
mkdir -p $html_base
|
||||
cd $html_base
|
||||
|
||||
makeinfo --html "$gccDir/gcc/cpp.texi"
|
||||
makeinfo --html "$gccDir/gcc/gcc.texi"
|
||||
makeinfo --force --html "$gccDir/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 iostream/index.html $html_base/iostream.html
|
||||
fi
|
||||
|
||||
### Symlinks ##############################################
|
||||
|
||||
echo "Creating required symlinks"
|
||||
|
||||
# convert to absolute links to relative ones
|
||||
cd $base/bin
|
||||
ln -sfn g++ c++
|
||||
ln -sfn gcc cc
|
||||
ln -sfn gcc i586-pc-haiku-gcc
|
||||
|
||||
# make all tools available via default paths if this is the system
|
||||
# compiler
|
||||
if [ $architecture = 'x86_gcc2' ]; then
|
||||
echo "Symlinking binaries into default path"
|
||||
mkdir -p $prefix/bin
|
||||
cd $prefix/bin
|
||||
ln -sfn ../$relativeGccInstallDir/bin/* .
|
||||
fi
|
||||
|
||||
### Strip #################################################
|
||||
|
||||
echo "Strip debug info"
|
||||
|
||||
cd $base
|
||||
strip --strip-debug bin/*
|
||||
strip --strip-debug i586-pc-haiku/bin/*
|
||||
strip --strip-debug lib/gcc-lib/i586-pc-haiku/2.95.3-${gccDate}/* \
|
||||
&>/dev/null || true
|
||||
|
||||
### Cleanup ###############################################
|
||||
|
||||
echo "Cleanup"
|
||||
|
||||
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/
|
||||
}
|
||||
@@ -7,10 +7,10 @@ LICENSE="
|
||||
"
|
||||
COPYRIGHT="1988-2000 Free Software Foundation, Inc."
|
||||
SRC_URI="
|
||||
git+file://$portBaseDir/../binutils/work-2.17_130421/download/BuildtoolsPM.git#a57415355d72c2f0aa2afd1c374c9f7f9fc7f045
|
||||
git+git://github.com/haiku/BuildtoolsPM.git#a57415355d72c2f0aa2afd1c374c9f7f9fc7f045
|
||||
git+file://$portBaseDir/../binutils/download/BuildtoolsPM.git#d0613f2026ca25e7f673188291b63fd5d7a51c72
|
||||
git+git://github.com/haiku/BuildtoolsPM.git#d0613f2026ca25e7f673188291b63fd5d7a51c72
|
||||
"
|
||||
REVISION="2"
|
||||
REVISION="1"
|
||||
ARCHITECTURES="x86_gcc2 ?x86"
|
||||
|
||||
PROVIDES="
|
||||
Reference in New Issue
Block a user