From 50150858eb2577fbdb47ab5d10da73037e53f20c Mon Sep 17 00:00:00 2001 From: Juan RP Date: Fri, 21 May 2010 00:29:47 +0200 Subject: [PATCH] gcc-multilib: install some multilib headers required for g++ -m32. --- srcpkgs/gcc-multilib/gcc-c++-multilib.template | 8 +++++--- srcpkgs/gcc-multilib/gcc-objc-multilib.template | 2 ++ srcpkgs/gcc-multilib/libgcc32.template | 2 ++ srcpkgs/gcc-multilib/libgomp32.template | 2 ++ .../gcc-multilib/libmudflap32-devel.template | 2 ++ srcpkgs/gcc-multilib/libmudflap32.template | 2 ++ srcpkgs/gcc-multilib/libobjc32.template | 2 ++ srcpkgs/gcc-multilib/libssp32.template | 2 ++ srcpkgs/gcc-multilib/libstdc++32-devel.template | 16 ++++++++++++++++ srcpkgs/gcc-multilib/libstdc++32.template | 2 ++ srcpkgs/gcc-multilib/template | 17 +++++++++++++---- srcpkgs/libstdc++32-devel | 1 + 12 files changed, 51 insertions(+), 7 deletions(-) create mode 100644 srcpkgs/gcc-multilib/libstdc++32-devel.template create mode 120000 srcpkgs/libstdc++32-devel diff --git a/srcpkgs/gcc-multilib/gcc-c++-multilib.template b/srcpkgs/gcc-multilib/gcc-c++-multilib.template index 293ddd20078..7724e0ed152 100644 --- a/srcpkgs/gcc-multilib/gcc-c++-multilib.template +++ b/srcpkgs/gcc-multilib/gcc-c++-multilib.template @@ -7,9 +7,11 @@ long_desc=" On architectures with multilib support, the package contains files and dependencies for the non-default multilib architecture(s)." -Add_dependency run gcc-c++ ">=${version}" -Add_dependency run gcc-multilib ">=${version}" -Add_dependency run libstdc++32 ">=${version}" +revision=1 + +Add_dependency run gcc-c++ ">=${version}" +Add_dependency run gcc-multilib ">=${version}" +Add_dependency run libstdc++32-devel ">=${version}" do_install() { diff --git a/srcpkgs/gcc-multilib/gcc-objc-multilib.template b/srcpkgs/gcc-multilib/gcc-objc-multilib.template index b1ed37b8192..74691533b78 100644 --- a/srcpkgs/gcc-multilib/gcc-objc-multilib.template +++ b/srcpkgs/gcc-multilib/gcc-objc-multilib.template @@ -8,6 +8,8 @@ long_desc=" On architectures with multilib support, the package contains files and dependencies for the non-default multilib architecture(s)." +revision=1 + Add_dependency run gcc ">=${version}" Add_dependency run gcc-multilib ">=${version}" Add_dependency run gcc-objc ">=${version}" diff --git a/srcpkgs/gcc-multilib/libgcc32.template b/srcpkgs/gcc-multilib/libgcc32.template index c205829e3f1..e174ed675c5 100644 --- a/srcpkgs/gcc-multilib/libgcc32.template +++ b/srcpkgs/gcc-multilib/libgcc32.template @@ -5,6 +5,8 @@ long_desc="${long_desc} This package contains the 32bit GCC shared library for x86_64 systems." +revision=1 + do_install() { mkdir -p ${DESTDIR}/usr/lib32 diff --git a/srcpkgs/gcc-multilib/libgomp32.template b/srcpkgs/gcc-multilib/libgomp32.template index 7bf524dba3b..f6e6ff9aa62 100644 --- a/srcpkgs/gcc-multilib/libgomp32.template +++ b/srcpkgs/gcc-multilib/libgomp32.template @@ -6,6 +6,8 @@ long_desc="${long_desc} This package contains the 32bit GCC shared support library which is needed for OpenMP v3.0 support." +revision=1 + Add_dependency run libgcc32 Add_dependency run glibc32 diff --git a/srcpkgs/gcc-multilib/libmudflap32-devel.template b/srcpkgs/gcc-multilib/libmudflap32-devel.template index 63be61fdbd7..f974716d75c 100644 --- a/srcpkgs/gcc-multilib/libmudflap32-devel.template +++ b/srcpkgs/gcc-multilib/libmudflap32-devel.template @@ -7,6 +7,8 @@ long_desc=" This package contains the headers and the static libraries." +revision=1 + Add_dependency run gcc-multilib Add_dependency run glibc32-devel Add_dependency run libmudflap32 diff --git a/srcpkgs/gcc-multilib/libmudflap32.template b/srcpkgs/gcc-multilib/libmudflap32.template index ed41ee3a181..58f9646932a 100644 --- a/srcpkgs/gcc-multilib/libmudflap32.template +++ b/srcpkgs/gcc-multilib/libmudflap32.template @@ -5,6 +5,8 @@ long_desc=" The libmudflap libraries are used by GCC for instrumenting pointer and array dereferencing operations." +revision=1 + Add_dependency run gcc-multilib Add_dependency run glibc32 diff --git a/srcpkgs/gcc-multilib/libobjc32.template b/srcpkgs/gcc-multilib/libobjc32.template index 114dd9f69cc..8e64cbc5602 100644 --- a/srcpkgs/gcc-multilib/libobjc32.template +++ b/srcpkgs/gcc-multilib/libobjc32.template @@ -6,6 +6,8 @@ long_desc="${long_desc} This package contains the 32bit GCC Objective-C shared support library which is needed to run Objective-C dynamically linked programs." +revision=1 + Add_dependency run libgcc32 Add_dependency run glibc32 diff --git a/srcpkgs/gcc-multilib/libssp32.template b/srcpkgs/gcc-multilib/libssp32.template index 2ae3af5b490..1b1e0d99aa2 100644 --- a/srcpkgs/gcc-multilib/libssp32.template +++ b/srcpkgs/gcc-multilib/libssp32.template @@ -6,6 +6,8 @@ long_desc="${long_desc} This package contains the 32bit Stack Smashing Protection shared library provided by GCC." +revision=1 + Add_dependency run glibc32 do_install() diff --git a/srcpkgs/gcc-multilib/libstdc++32-devel.template b/srcpkgs/gcc-multilib/libstdc++32-devel.template new file mode 100644 index 00000000000..378d9d470a3 --- /dev/null +++ b/srcpkgs/gcc-multilib/libstdc++32-devel.template @@ -0,0 +1,16 @@ +# Template file for 'libstdc++32-devel'. +# +short_desc="GCC Standard C++ Library (32bit) development files" +long_desc="${long_desc} + + This package contains a rewritten 32bit standard compliant GCC Standard + C++ development files and headers for x86_64 systems." + +Add_dependency run libstdc++-devel +Add_dependency run libstdc++32 + +do_install() +{ + mkdir -p ${DESTDIR}/usr + mv ${SRCPKGDESTDIR}/usr/include ${DESTDIR}/usr +} diff --git a/srcpkgs/gcc-multilib/libstdc++32.template b/srcpkgs/gcc-multilib/libstdc++32.template index da01be247b5..f781e19ed38 100644 --- a/srcpkgs/gcc-multilib/libstdc++32.template +++ b/srcpkgs/gcc-multilib/libstdc++32.template @@ -6,6 +6,8 @@ long_desc="${long_desc} This package contains a rewritten standard compliant GCC Standard C++ library 32bit for x86_64 systems." +revision=1 + Add_dependency run libgcc32 Add_dependency run glibc32 diff --git a/srcpkgs/gcc-multilib/template b/srcpkgs/gcc-multilib/template index 29b1e8eed88..df4729e35c5 100644 --- a/srcpkgs/gcc-multilib/template +++ b/srcpkgs/gcc-multilib/template @@ -1,6 +1,7 @@ # Template build file for 'gcc-multilib' pkgname=gcc-multilib version=4.5.0 +revision=1 _gmp_ver=5.0.1 _mpfr_ver=2.4.2 _mpc_ver=0.8.1 @@ -31,11 +32,11 @@ long_desc=" code on x86_64 systems." subpackages="libgcc32 libssp32 libgomp32 libobjc32 libstdc++32 libmudflap32" -subpackages="${subpackages} libmudflap32-devel gcc-c++-multilib" -subpackages="${subpackages} gcc-objc-multilib gcc-objc++-multilib" +subpackages="${subpackages} libstdc++32-devel libmudflap32-devel" +subpackages="${subpackages} gcc-c++-multilib gcc-objc-multilib" +subpackages="${subpackages} gcc-objc++-multilib" disable_parallel_build=yes -nostrip=yes noverifyrdeps=yes only_for_archs=x86_64 @@ -65,9 +66,10 @@ pre_install() post_install() { local libmddir="/usr/lib/gcc/x86_64-unknown-linux-gnu/${version}" + local dirn _dir_ # We are only interested in 32bit stuff, remove anything else. - rm -rf ${DESTDIR}/usr/{lib64,include,libexec,bin,share} + rm -rf ${DESTDIR}/usr/{lib64,libexec,bin,share} rm -f ${DESTDIR}/usr/lib/*.{spec,a,so*} rm -f ${DESTDIR}/usr/lib32/{libiberty*,*.py} rm -rf ${DESTDIR}/${libmddir}/{include,include-fixed,install-tools,plugin} @@ -78,6 +80,13 @@ post_install() mv ${DESTDIR}/usr/lib32/lib{gomp,objc*}.a ${DESTDIR}/${libmddir}/32 mv ${DESTDIR}/usr/lib32/libssp*.a ${DESTDIR}/${libmddir}/32 + # Keep libstdc++ 32bit headers, remove anything else. + mv ${DESTDIR}/usr/include/c++/${version}/x86_64-unknown-linux-gnu/32 \ + ${wrksrc}/xbps_32bits_libstdc++ + rm -rf ${DESTDIR}/usr/include/c++/${version}/* + install -d ${DESTDIR}/usr/include/c++/${version}/x86_64-unknown-linux-gnu + mv ${wrksrc}/xbps_32bits_libstdc++ \ + ${DESTDIR}/usr/include/c++/${version}/x86_64-unknown-linux-gnu/32 # Install specs file overriding native gcc with no multilib support. install -m644 ${wrksrc}/build/gcc/specs \ ${DESTDIR}/${libmddir} diff --git a/srcpkgs/libstdc++32-devel b/srcpkgs/libstdc++32-devel new file mode 120000 index 00000000000..9f2eca37b15 --- /dev/null +++ b/srcpkgs/libstdc++32-devel @@ -0,0 +1 @@ +gcc-multilib \ No newline at end of file