mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-03 05:28:53 +02:00
freetype: fixed pkg-config and libtool files.
to use package links as described by Ingo. * added devel packages requirements for libpng, zlib, bzip2
This commit is contained in:
@@ -23,10 +23,10 @@ SECONDARY_ARCHITECTURES="x86 x86_gcc2"
|
||||
PATCHES="bison-${portVersion}.patchset"
|
||||
|
||||
PROVIDES="
|
||||
bison$secondaryArchSuffix = $portVersion compat >= 2.6
|
||||
cmd:bison$secondaryArchSuffix = $portVersion compat >= 2.6
|
||||
bison$secondaryArchSuffix = $portVersion compat >= 2.5
|
||||
cmd:bison$secondaryArchSuffix = $portVersion compat >= 2.5
|
||||
cmd:yacc$secondaryArchSuffix
|
||||
devel:liby$secondaryArchSuffix = $portVersion compat >= 2.6
|
||||
devel:liby$secondaryArchSuffix = $portVersion compat >= 2.5
|
||||
"
|
||||
|
||||
REQUIRES="
|
||||
|
||||
@@ -1,159 +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/download/BuildtoolsPM.git#b1ef802
|
||||
git+git://github.com/haiku/BuildtoolsPM.git#b1ef802
|
||||
"
|
||||
REVISION="2"
|
||||
ARCHITECTURES="x86_gcc2"
|
||||
if [ $effectiveTargetArchitecture = x86_gcc2 -a $targetArchitecture = x86 ]
|
||||
then
|
||||
ARCHITECTURES="$ARCHITECTURES x86"
|
||||
fi
|
||||
SECONDARY_ARCHITECTURES="x86_gcc2"
|
||||
|
||||
PROVIDES="
|
||||
gcc = $portVersion compat >= 2.95.3
|
||||
cmd:cc$secondaryArchSuffix
|
||||
cmd:c++$secondaryArchSuffix = $portVersion compat >= 2.95.3
|
||||
cmd:c++filt$secondaryArchSuffix = $portVersion compat >= 2.95.3
|
||||
cmd:cpp$secondaryArchSuffix = $portVersion compat >= 2.95.3
|
||||
cmd:g++$secondaryArchSuffix = $portVersion compat >= 2.95.3
|
||||
cmd:gcc$secondaryArchSuffix = $portVersion compat >= 2.95.3
|
||||
cmd:gcov$secondaryArchSuffix = 1.5 compat >= 1.5
|
||||
cmd:i586_pc_haiku_gcc$secondaryArchSuffix = $portVersion compat >= 2.95.3
|
||||
cmd:protoize$secondaryArchSuffix = $portVersion compat >= 2.95.3
|
||||
cmd:unprotoize$secondaryArchSuffix = $portVersion compat >= 2.95.3
|
||||
"
|
||||
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix >= $haikuVersion
|
||||
binutils$secondaryArchSuffix
|
||||
"
|
||||
BUILD_REQUIRES="
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel >= $haikuVersion
|
||||
cmd:autoconf
|
||||
gcc$secondaryArchSuffix
|
||||
cmd:flex
|
||||
cmd:make
|
||||
cmd:sed
|
||||
cmd:tar
|
||||
cmd:makeinfo
|
||||
"
|
||||
|
||||
SOURCE_DIR="$portVersionedName/legacy/gcc"
|
||||
BUILD_PACKAGE_ACTIVATION_PHASE=INSTALL
|
||||
|
||||
gccDir=$(pwd)
|
||||
gccDate=$(echo $portVersion | sed 's,.*_,,')
|
||||
relativeGccInstallDir="develop/tools$secondaryArchSubDir"
|
||||
gccInstallDir="$prefix/$relativeGccInstallDir"
|
||||
gccObjectsDir=$gccDir/../gcc-obj
|
||||
|
||||
BUILD()
|
||||
{
|
||||
rm -rf $gccObjectsDir
|
||||
|
||||
# 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 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
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd $gccObjectsDir
|
||||
make install
|
||||
|
||||
rm $gccInstallDir/lib/libiberty.a
|
||||
# only needed for building gcc
|
||||
|
||||
base=$gccInstallDir
|
||||
|
||||
### HTML documentation ####################################
|
||||
|
||||
html_base=$docDir
|
||||
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 [ $targetArchitecture = 'x86_gcc2' ]; then
|
||||
echo "Symlinking binaries into default path"
|
||||
mkdir -p $prefix/bin
|
||||
cd $binDir
|
||||
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,159 +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/download/buildtools.git#2d0a2c6404ffae1a46eb7e74daab08099b45af2c
|
||||
git+git://github.com/haiku/buildtools.git#2d0a2c6404ffae1a46eb7e74daab08099b45af2c
|
||||
"
|
||||
REVISION="1"
|
||||
ARCHITECTURES="x86_gcc2"
|
||||
if [ $effectiveTargetArchitecture = x86_gcc2 -a $targetArchitecture = x86 ]
|
||||
then
|
||||
ARCHITECTURES="$ARCHITECTURES x86"
|
||||
fi
|
||||
SECONDARY_ARCHITECTURES="x86_gcc2"
|
||||
|
||||
PROVIDES="
|
||||
gcc = $portVersion compat >= 2.95.3
|
||||
cmd:cc$secondaryArchSuffix
|
||||
cmd:c++$secondaryArchSuffix = $portVersion compat >= 2.95.3
|
||||
cmd:c++filt$secondaryArchSuffix = $portVersion compat >= 2.95.3
|
||||
cmd:cpp$secondaryArchSuffix = $portVersion compat >= 2.95.3
|
||||
cmd:g++$secondaryArchSuffix = $portVersion compat >= 2.95.3
|
||||
cmd:gcc$secondaryArchSuffix = $portVersion compat >= 2.95.3
|
||||
cmd:gcov$secondaryArchSuffix = 1.5 compat >= 1.5
|
||||
cmd:i586_pc_haiku_gcc$secondaryArchSuffix = $portVersion compat >= 2.95.3
|
||||
cmd:protoize$secondaryArchSuffix = $portVersion compat >= 2.95.3
|
||||
cmd:unprotoize$secondaryArchSuffix = $portVersion compat >= 2.95.3
|
||||
"
|
||||
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix >= $haikuVersion
|
||||
binutils$secondaryArchSuffix
|
||||
"
|
||||
BUILD_REQUIRES="
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel >= $haikuVersion
|
||||
cmd:autoconf
|
||||
gcc$secondaryArchSuffix
|
||||
cmd:flex
|
||||
cmd:make
|
||||
cmd:sed
|
||||
cmd:tar
|
||||
cmd:makeinfo
|
||||
"
|
||||
|
||||
SOURCE_DIR="$portVersionedName/legacy/gcc"
|
||||
BUILD_PACKAGE_ACTIVATION_PHASE=INSTALL
|
||||
|
||||
gccDir=$(pwd)
|
||||
gccDate=$(echo $portVersion | sed 's,.*_,,')
|
||||
relativeGccInstallDir="develop/tools$secondaryArchSubDir"
|
||||
gccInstallDir="$prefix/$relativeGccInstallDir"
|
||||
gccObjectsDir=$gccDir/../gcc-obj
|
||||
|
||||
BUILD()
|
||||
{
|
||||
rm -rf $gccObjectsDir
|
||||
|
||||
# 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 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
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd $gccObjectsDir
|
||||
make install
|
||||
|
||||
rm $gccInstallDir/lib/libiberty.a
|
||||
# only needed for building gcc
|
||||
|
||||
base=$gccInstallDir
|
||||
|
||||
### HTML documentation ####################################
|
||||
|
||||
html_base=$docDir
|
||||
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 [ $targetArchitecture = 'x86_gcc2' ]; then
|
||||
echo "Symlinking binaries into default path"
|
||||
mkdir -p $prefix/bin
|
||||
cd $binDir
|
||||
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,156 +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/download/buildtools.git#9bfca2f40f0857932e8bc66b6d1fdae94acf8d9c
|
||||
git+git://github.com/haiku/buildtools.git#9bfca2f40f0857932e8bc66b6d1fdae94acf8d9c
|
||||
"
|
||||
REVISION="4"
|
||||
ARCHITECTURES="x86_gcc2"
|
||||
if [ $effectiveTargetArchitecture = x86_gcc2 -a $targetArchitecture = x86 ]
|
||||
then
|
||||
ARCHITECTURES="$ARCHITECTURES x86"
|
||||
fi
|
||||
SECONDARY_ARCHITECTURES="x86_gcc2"
|
||||
|
||||
PROVIDES="
|
||||
gcc$secondaryArchSuffix = $portVersion compat >= 2.95.3
|
||||
cmd:cc$secondaryArchSuffix
|
||||
cmd:c++$secondaryArchSuffix = $portVersion compat >= 2.95.3
|
||||
cmd:c++filt$secondaryArchSuffix = $portVersion compat >= 2.95.3
|
||||
cmd:cpp$secondaryArchSuffix = $portVersion compat >= 2.95.3
|
||||
cmd:g++$secondaryArchSuffix = $portVersion compat >= 2.95.3
|
||||
cmd:gcc$secondaryArchSuffix = $portVersion compat >= 2.95.3
|
||||
cmd:gcov$secondaryArchSuffix = 1.5 compat >= 1.5
|
||||
cmd:i586_pc_haiku_gcc$secondaryArchSuffix = $portVersion compat >= 2.95.3
|
||||
cmd:protoize$secondaryArchSuffix = $portVersion compat >= 2.95.3
|
||||
cmd:unprotoize$secondaryArchSuffix = $portVersion compat >= 2.95.3
|
||||
"
|
||||
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix >= $haikuVersion
|
||||
binutils$secondaryArchSuffix
|
||||
"
|
||||
BUILD_REQUIRES="
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel >= $haikuVersion
|
||||
cmd:autoconf
|
||||
gcc$secondaryArchSuffix
|
||||
cmd:flex
|
||||
cmd:make
|
||||
cmd:sed
|
||||
cmd:tar
|
||||
cmd:makeinfo
|
||||
"
|
||||
|
||||
SOURCE_DIR="$portVersionedName/legacy/gcc"
|
||||
BUILD_PACKAGE_ACTIVATION_PHASE=INSTALL
|
||||
|
||||
gccDir=$(pwd)
|
||||
relativeGccInstallDir="develop/tools$secondaryArchSubDir"
|
||||
gccInstallDir="$prefix/$relativeGccInstallDir"
|
||||
gccObjectsDir=$gccDir/../gcc-obj
|
||||
|
||||
BUILD()
|
||||
{
|
||||
rm -rf $gccObjectsDir
|
||||
|
||||
# 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 gcc; touch c-parse.c c-parse.h cexp.c cp/parse.c \
|
||||
cp/parse.h c-gperf.h)
|
||||
|
||||
mkdir -p $gccObjectsDir
|
||||
cd $gccObjectsDir
|
||||
|
||||
local additionalConfigureFlags
|
||||
if [ -n "$secondaryArchSuffix" ]; then
|
||||
additionalConfigureFlags="\
|
||||
--with-hybrid-secondary=${effectiveTargetArchitecture}"
|
||||
fi
|
||||
|
||||
CFLAGS="-O2" CXXFLAGS="-O2" "$gccDir/configure" \
|
||||
--prefix=$gccInstallDir \
|
||||
--disable-nls --enable-shared=yes --enable-languages=c,c++ \
|
||||
$additionalConfigureFlags
|
||||
make bootstrap
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd $gccObjectsDir
|
||||
make install
|
||||
|
||||
rm $gccInstallDir/lib/libiberty.a
|
||||
# only needed for building gcc
|
||||
|
||||
### HTML documentation ####################################
|
||||
|
||||
local html_base=$docDir
|
||||
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 $gccInstallDir/bin
|
||||
ln -sfn g++ c++
|
||||
ln -sfn gcc cc
|
||||
ln -sfn gcc $effectiveTargetMachineTriple-gcc
|
||||
|
||||
# make all tools available via default paths
|
||||
echo "Symlinking binaries into default path"
|
||||
mkdir -p $binDir
|
||||
symlinkRelative -s $gccInstallDir/bin/* $binDir
|
||||
|
||||
### Strip #################################################
|
||||
|
||||
echo "Strip debug info"
|
||||
|
||||
cd $gccInstallDir
|
||||
strip --strip-debug bin/*
|
||||
strip --strip-debug lib/gcc-lib/$effectiveTargetMachineTriple/2.95.3-*/* \
|
||||
&>/dev/null || true
|
||||
|
||||
### Cleanup ###############################################
|
||||
|
||||
echo "Cleanup"
|
||||
|
||||
cd $gccInstallDir
|
||||
rm -rf info
|
||||
rm -rf share
|
||||
rm man/man1/cccp.1
|
||||
|
||||
### C++ includes ##########################################
|
||||
|
||||
echo "Install C++ includes & library"
|
||||
|
||||
rm -rf $gccInstallDir/include/g++
|
||||
ln -snf /boot/system/develop/headers/c++/2.95.3 $gccInstallDir/include/g++
|
||||
|
||||
ln -snf /boot/system/lib$secondaryArchSubDir/libstdc++.r4.so $gccInstallDir/lib/
|
||||
}
|
||||
@@ -1,130 +0,0 @@
|
||||
SUMMARY="C/C++ cross-compiler for target ${effectiveTargetMachineTriple}"
|
||||
DESCRIPTION="Standard compiler for x86 platform."
|
||||
HOMEPAGE="http://gcc.gnu.org"
|
||||
LICENSE="
|
||||
GNU GPL v2
|
||||
GNU LGPL v2
|
||||
"
|
||||
COPYRIGHT="1988-2013 Free Software Foundation, Inc."
|
||||
SRC_URI="
|
||||
git+file://$portBaseDir/../binutils/download/BuildtoolsPM.git#7a87db2a172a406b79540188a23e52491ad3b741
|
||||
git+git://github.com/haiku/BuildtoolsPM.git#7a87db2a172a406b79540188a23e52491ad3b741
|
||||
"
|
||||
REVISION="1"
|
||||
ARCHITECTURES="x86"
|
||||
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
|
||||
# x86_gcc2 is fine as primary target architecture as long as we're building
|
||||
# for a different secondary architecture.
|
||||
ARCHITECTURES="$ARCHITECTURES x86_gcc2"
|
||||
fi
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
gcc$secondaryArchSuffix = $portVersion compat >= 4
|
||||
cmd:c++$secondaryArchSuffix = $portVersion compat >= 4
|
||||
cmd:cc$secondaryArchSuffix = $portVersion compat >= 4
|
||||
cmd:cpp$secondaryArchSuffix = $portVersion compat >= 4
|
||||
cmd:g++$secondaryArchSuffix = $portVersion compat >= 4
|
||||
cmd:gcc$secondaryArchSuffix = $portVersion compat >= 4
|
||||
cmd:gcc_4.7.3$secondaryArchSuffix = $portVersion compat >= 4
|
||||
cmd:gcov$secondaryArchSuffix = $portVersion compat >= 4
|
||||
"
|
||||
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix >= $haikuVersion
|
||||
"
|
||||
BUILD_REQUIRES="
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel >= $haikuVersion
|
||||
cmd:autoconf
|
||||
cmd:flex
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:makeinfo
|
||||
cmd:sed
|
||||
cmd:strip
|
||||
cmd:tar
|
||||
"
|
||||
|
||||
SOURCE_DIR="gcc-$portVersion/gcc"
|
||||
|
||||
sourceDir=$(pwd)
|
||||
relativeInstallDir="develop/tools$secondaryArchSubDir"
|
||||
installDir="$prefix/$relativeInstallDir"
|
||||
objectsDir=$(pwd)/../${portVersionedName}-obj
|
||||
|
||||
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 $sourceDir/gcc; touch c-parse.c c-parse.h cexp.c cp/parse.c \
|
||||
cp/parse.h c-gperf.h)
|
||||
|
||||
mkdir -p $objectsDir
|
||||
cd $objectsDir
|
||||
|
||||
local additionalConfigureFlags
|
||||
if [ -n "$secondaryArchSuffix" ]; then
|
||||
additionalConfigureFlags="\
|
||||
--with-hybrid-secondary=${effectiveTargetArchitecture}"
|
||||
fi
|
||||
|
||||
CFLAGS="-O2 -U_FORTIFY_SOURCE" CXXFLAGS="-O2" "$sourceDir/configure" \
|
||||
--prefix=$installDir --libexecdir=$installDir/lib --mandir=$manDir \
|
||||
--docdir=$docDir \
|
||||
--disable-nls --enable-shared \
|
||||
--enable-languages=c,c++ --enable-lto --enable-frame-pointer \
|
||||
--with-pkgversion=$(echo $portVersion | cut -c 7-) \
|
||||
$additionalConfigureFlags
|
||||
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd $objectsDir
|
||||
|
||||
make install-strip
|
||||
make install-html
|
||||
|
||||
### HTML documentation ####################################
|
||||
|
||||
echo "Organizing HTML documentation..."
|
||||
cd $docDir
|
||||
for dir in gmp libquadmath mpc mpfr; do
|
||||
mv ${dir}.html $dir
|
||||
ln -s $dir/index.html ${dir}.html
|
||||
done
|
||||
|
||||
### Strip #################################################
|
||||
|
||||
echo "Strip debug info"
|
||||
|
||||
cd $installDir
|
||||
strip --strip-debug bin/*
|
||||
for f in cc1 cc1plus collect2 lto1; do
|
||||
strip --strip-debug lib/gcc/$effectiveTargetMachineTriple/*/$f
|
||||
done
|
||||
strip --strip-debug lib/*.a
|
||||
|
||||
### Symlinks ##############################################
|
||||
|
||||
echo "Creating required symlinks"
|
||||
|
||||
# make all tools available via default paths
|
||||
mkdir -p $binDir
|
||||
for f in c++ cpp g++ gcc gcov; do
|
||||
symlinkRelative -sfn $installDir/bin/$f $binDir
|
||||
done
|
||||
|
||||
### Cleanup ###############################################
|
||||
|
||||
echo "Cleanup"
|
||||
rm -rf $installDir/info
|
||||
rm -rf $installDir/share
|
||||
}
|
||||
@@ -1,157 +0,0 @@
|
||||
SUMMARY="C/C++ cross-compiler for target ${effectiveTargetMachineTriple}"
|
||||
DESCRIPTION="
|
||||
Standard compiler for x86 platform.
|
||||
"
|
||||
HOMEPAGE="http://gcc.gnu.org"
|
||||
LICENSE="
|
||||
GNU GPL v2
|
||||
GNU LGPL v2
|
||||
"
|
||||
COPYRIGHT="1988-2013 Free Software Foundation, Inc."
|
||||
SRC_URI="
|
||||
git+file://$portBaseDir/../binutils/download/buildtools.git#fd576c8d8a83e3fe9a6443f9c0431bd11125314e
|
||||
git+git://github.com/haiku/buildtools.git#fd576c8d8a83e3fe9a6443f9c0431bd11125314e
|
||||
"
|
||||
REVISION="5"
|
||||
ARCHITECTURES="x86 x86_64"
|
||||
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
|
||||
# x86_gcc2 is fine as primary target architecture as long as we're building
|
||||
# for a different secondary architecture.
|
||||
ARCHITECTURES="$ARCHITECTURES x86_gcc2"
|
||||
fi
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
gcc$secondaryArchSuffix = $portVersion compat >= 4
|
||||
cmd:c++$secondaryArchSuffix = $portVersion compat >= 4
|
||||
cmd:cc$secondaryArchSuffix = $portVersion compat >= 4
|
||||
cmd:cpp$secondaryArchSuffix = $portVersion compat >= 4
|
||||
cmd:g++$secondaryArchSuffix = $portVersion compat >= 4
|
||||
cmd:gcc$secondaryArchSuffix = $portVersion compat >= 4
|
||||
cmd:gcc_4.7.3$secondaryArchSuffix = $portVersion compat >= 4
|
||||
cmd:gcov$secondaryArchSuffix = $portVersion compat >= 4
|
||||
"
|
||||
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix >= $haikuVersion
|
||||
cmd:as$secondaryArchSuffix
|
||||
"
|
||||
BUILD_REQUIRES="
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel >= $haikuVersion
|
||||
cmd:autoconf
|
||||
cmd:flex
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:makeinfo
|
||||
cmd:sed
|
||||
cmd:strip
|
||||
cmd:tar
|
||||
"
|
||||
|
||||
SOURCE_DIR="gcc-$portVersion/gcc"
|
||||
|
||||
sourceDir=$(pwd)
|
||||
relativeInstallDir="develop/tools$secondaryArchSubDir"
|
||||
installDir="$prefix/$relativeInstallDir"
|
||||
objectsDir=$(pwd)/../${portVersionedName}-obj
|
||||
|
||||
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 $sourceDir/gcc; touch c-parse.c c-parse.h cexp.c cp/parse.c \
|
||||
cp/parse.h c-gperf.h)
|
||||
|
||||
mkdir -p $objectsDir
|
||||
cd $objectsDir
|
||||
|
||||
local additionalConfigureFlags
|
||||
if [ -n "$secondaryArchSuffix" ]; then
|
||||
additionalConfigureFlags="\
|
||||
--with-hybrid-secondary=${effectiveTargetArchitecture}"
|
||||
fi
|
||||
if [ $effectiveTargetArchitecture == x86_64 ]; then
|
||||
# disable multilib support, as x86_64 by default tries to build the
|
||||
# 32-bit libraries, too, which fails as no 32-bit libroot is available
|
||||
additionalConfigureFlags+=" --disable-multilib"
|
||||
fi
|
||||
|
||||
CFLAGS="-O2 -U_FORTIFY_SOURCE" CXXFLAGS="-O2" "$sourceDir/configure" \
|
||||
--build=$effectiveTargetMachineTriple \
|
||||
--prefix=$installDir --libexecdir=$installDir/lib --mandir=$manDir \
|
||||
--docdir=$docDir \
|
||||
--disable-nls --enable-shared --with-gnu-ld \
|
||||
--enable-languages=c,c++ --enable-lto --enable-frame-pointer \
|
||||
--with-pkgversion=$(echo $portVersion | cut -c 7-) \
|
||||
$additionalConfigureFlags
|
||||
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd $objectsDir
|
||||
|
||||
make install-strip
|
||||
make install-html
|
||||
|
||||
### HTML documentation ####################################
|
||||
|
||||
echo "Organizing HTML documentation..."
|
||||
cd $docDir
|
||||
for dir in gmp libquadmath mpc mpfr; do
|
||||
mv ${dir}.html $dir
|
||||
ln -s $dir/index.html ${dir}.html
|
||||
done
|
||||
|
||||
### Strip #################################################
|
||||
|
||||
echo "Strip debug info"
|
||||
|
||||
cd $installDir
|
||||
strip --strip-debug bin/*
|
||||
for f in cc1 cc1plus collect2 lto1; do
|
||||
strip --strip-debug lib/gcc/$effectiveTargetMachineTriple/*/$f
|
||||
done
|
||||
strip --strip-debug lib/*.a
|
||||
|
||||
### Disable ASLR ##########################################
|
||||
|
||||
echo "Add SYS:ENV attribute to disable ASLR"
|
||||
|
||||
cd $installDir
|
||||
for f in bin/*; do
|
||||
if [ -r "$f" ]; then
|
||||
addattr SYS:ENV DISABLE_ASLR=1 $f
|
||||
fi
|
||||
done
|
||||
for f in cc1 cc1plus collect2 lto1; do
|
||||
addattr SYS:ENV DISABLE_ASLR=1 \
|
||||
lib/gcc/$effectiveTargetMachineTriple/*/$f
|
||||
done
|
||||
|
||||
### Symlinks ##############################################
|
||||
|
||||
echo "Creating required symlinks"
|
||||
|
||||
# create missing cc symlink
|
||||
ln -sf gcc $installDir/bin/cc
|
||||
|
||||
# make all tools available via default paths
|
||||
mkdir -p $binDir
|
||||
for f in c++ cc cpp g++ gcc gcov; do
|
||||
symlinkRelative -sfn $installDir/bin/$f $binDir
|
||||
done
|
||||
|
||||
### Cleanup ###############################################
|
||||
|
||||
echo "Cleanup"
|
||||
rm -rf $installDir/info
|
||||
rm -rf $installDir/share
|
||||
}
|
||||
@@ -1,164 +0,0 @@
|
||||
SUMMARY="C/C++ cross-compiler for target ${effectiveTargetMachineTriple}"
|
||||
DESCRIPTION="
|
||||
Standard compiler for x86 platform.
|
||||
"
|
||||
HOMEPAGE="http://gcc.gnu.org"
|
||||
|
||||
srcGitRev="c20a732df8f8b6d0f32c872817f3a0498a5c4761"
|
||||
SRC_URI="https://github.com/haiku/buildtools/archive/$srcGitRev.tar.gz"
|
||||
CHECKSUM_SHA256="6d3b677cd8ef777bf6fb3186a15b5122e46345595a996370325c758b3d8a4ab6"
|
||||
SRC_FILENAME="$portVersionedName.tar.gz"
|
||||
REVISION="1"
|
||||
LICENSE="
|
||||
GNU GPL v2
|
||||
GNU LGPL v2
|
||||
"
|
||||
COPYRIGHT="1988-2013 Free Software Foundation, Inc."
|
||||
|
||||
|
||||
ARCHITECTURES="x86 x86_64 arm"
|
||||
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
|
||||
# x86_gcc2 is fine as primary target architecture as long as we're building
|
||||
# for a different secondary architecture.
|
||||
ARCHITECTURES="$ARCHITECTURES x86_gcc2"
|
||||
fi
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
gcc$secondaryArchSuffix = $portVersion compat >= 4
|
||||
cmd:c++$secondaryArchSuffix = $portVersion compat >= 4
|
||||
cmd:cc$secondaryArchSuffix = $portVersion compat >= 4
|
||||
cmd:cpp$secondaryArchSuffix = $portVersion compat >= 4
|
||||
cmd:g++$secondaryArchSuffix = $portVersion compat >= 4
|
||||
cmd:gcc$secondaryArchSuffix = $portVersion compat >= 4
|
||||
cmd:gcc_4.8.2$secondaryArchSuffix = $portVersion compat >= 4
|
||||
cmd:gcov$secondaryArchSuffix = $portVersion compat >= 4
|
||||
lib:libstdc++$secondaryArchSuffix = $portVersion compat >= 4
|
||||
"
|
||||
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix >= $haikuVersion
|
||||
cmd:as$secondaryArchSuffix
|
||||
"
|
||||
BUILD_REQUIRES="
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel >= $haikuVersion
|
||||
cmd:autoconf
|
||||
cmd:awk
|
||||
cmd:find
|
||||
cmd:flex
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:makeinfo
|
||||
cmd:sed
|
||||
cmd:strip
|
||||
cmd:tar
|
||||
cmd:xargs
|
||||
"
|
||||
|
||||
SOURCE_DIR="buildtools-$srcGitRev/gcc"
|
||||
|
||||
sourceDir=$(pwd)
|
||||
relativeInstallDir="develop/tools$secondaryArchSubDir"
|
||||
installDir="$prefix/$relativeInstallDir"
|
||||
objectsDir=$(pwd)/../${portVersionedName}-obj
|
||||
|
||||
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 $sourceDir/gcc; touch c-parse.c c-parse.h cexp.c cp/parse.c \
|
||||
cp/parse.h c-gperf.h)
|
||||
|
||||
mkdir -p $objectsDir
|
||||
cd $objectsDir
|
||||
|
||||
local additionalConfigureFlags
|
||||
if [ -n "$secondaryArchSuffix" ]; then
|
||||
additionalConfigureFlags="\
|
||||
--with-hybrid-secondary=${effectiveTargetArchitecture}"
|
||||
fi
|
||||
if [ $effectiveTargetArchitecture == x86_64 ]; then
|
||||
# disable multilib support, as x86_64 by default tries to build the
|
||||
# 32-bit libraries, too, which fails as no 32-bit libroot is available
|
||||
additionalConfigureFlags+=" --disable-multilib"
|
||||
fi
|
||||
|
||||
CFLAGS="-O2 -U_FORTIFY_SOURCE" CXXFLAGS="-O2" "$sourceDir/configure" \
|
||||
--build=$effectiveTargetMachineTriple \
|
||||
--prefix=$installDir --libexecdir=$installDir/lib --mandir=$manDir \
|
||||
--docdir=$docDir --enable-threads=posix \
|
||||
--disable-nls --enable-shared --with-gnu-ld \
|
||||
--enable-languages=c,c++ --enable-lto --enable-frame-pointer \
|
||||
--with-pkgversion=$(echo $portVersion | cut -c 7-) \
|
||||
$additionalConfigureFlags
|
||||
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd $objectsDir
|
||||
|
||||
make install-strip
|
||||
make install-html
|
||||
|
||||
### HTML documentation ####################################
|
||||
|
||||
echo "Organizing HTML documentation..."
|
||||
cd $docDir
|
||||
for dir in gmp libquadmath mpc mpfr; do
|
||||
mv ${dir}.html $dir
|
||||
ln -s $dir/index.html ${dir}.html
|
||||
done
|
||||
|
||||
### Strip #################################################
|
||||
|
||||
echo "Strip debug info"
|
||||
|
||||
cd $installDir
|
||||
strip --strip-debug bin/*
|
||||
for f in cc1 cc1plus collect2 lto1; do
|
||||
strip --strip-debug lib/gcc/$effectiveTargetMachineTriple/*/$f
|
||||
done
|
||||
strip --strip-debug lib/*.a
|
||||
|
||||
### Disable ASLR ##########################################
|
||||
|
||||
echo "Add SYS:ENV attribute to disable ASLR"
|
||||
|
||||
cd $installDir
|
||||
for f in bin/*; do
|
||||
if [ -r "$f" ]; then
|
||||
addattr SYS:ENV DISABLE_ASLR=1 $f
|
||||
fi
|
||||
done
|
||||
for f in cc1 cc1plus collect2 lto1; do
|
||||
addattr SYS:ENV DISABLE_ASLR=1 \
|
||||
lib/gcc/$effectiveTargetMachineTriple/*/$f
|
||||
done
|
||||
|
||||
### Symlinks ##############################################
|
||||
|
||||
echo "Creating required symlinks"
|
||||
|
||||
# create missing cc symlink
|
||||
ln -sf gcc $installDir/bin/cc
|
||||
|
||||
# make all tools available via default paths
|
||||
mkdir -p $binDir
|
||||
for f in c++ cc cpp g++ gcc gcov; do
|
||||
symlinkRelative -sfn $installDir/bin/$f $binDir
|
||||
done
|
||||
|
||||
### Cleanup ###############################################
|
||||
|
||||
echo "Cleanup"
|
||||
rm -rf $installDir/info
|
||||
rm -rf $installDir/share
|
||||
}
|
||||
Reference in New Issue
Block a user