]> git.pld-linux.org Git - packages/kBuild.git/blobdiff - kBuild.spec
x32 build fixes
[packages/kBuild.git] / kBuild.spec
index 06f5fec896297932bf4083d1cc616b5080797939..3ffb42a3a7b0ca7b148f770574f56937edc4b153 100644 (file)
@@ -8,11 +8,10 @@
 Summary:       A cross-platform build environment
 Name:          kBuild
 Version:       %{ver}.%{svnrev}
-Release:       1
+Release:       3
 Group:         Development/Tools
 # Most tools are from NetBSD, some are from FreeBSD, and make and sed are from GNU
 License:       BSD and GPL v2+
-URL:           http://svn.netlabs.org/kbuild
 Source0:       %{name}-r%{svnrev}.tar.bz2
 # Source0-md5: 7c394fbe248f903d0bc1aabd235dc0a9
 Source1:       get-source.sh
@@ -20,18 +19,23 @@ Patch0:             %{name}-0.1.3-escape.patch
 Patch1:                %{name}-0.1.5-dprintf.patch
 Patch2:                %{name}-0.1.5-pthread.patch
 Patch3:                re_string_fetch_byte_case-not-pure-attribute.patch
+Patch4:                x32.patch
+URL:           http://svn.netlabs.org/kbuild
 BuildRequires: acl-devel
-BuildRequires: autoconf
-BuildRequires: automake
 BuildRequires: byacc
-BuildRequires: cvs
 BuildRequires: flex
-BuildRequires: gettext-devel
-%{!?with_bootstrap:BuildRequires:      kBuild}
-ExclusiveArch: %{x8664} %{ix86}
+%if %{with bootstrap}
+BuildRequires: autoconf
+BuildRequires: automake
+BuildRequires: gettext-autopoint
+BuildRequires: libtool
+BuildRequires: texinfo
+%else
+BuildRequires: kBuild
+%endif
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%ifarch %{x8664}
+%ifarch %{x8664} x32
 %define                kbuild_arch     amd64
 %else
 %define                kbuild_arch     x86
@@ -43,7 +47,7 @@ tasks and portable versions of various UNIX tools to ensure
 cross-platform portability.
 
 The goals of the kBuild framework:
- - Similar behavior across all supported platforms
+- Similar behavior across all supported platforms
 - Flexibility, don't create unnecessary restrictions preventing ad-hoc
   solutions
 - Makefiles can be simple to write and maintain
@@ -60,6 +64,7 @@ mv %{name} .tmp; mv .tmp/* .
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
 
 cat > SvnInfo.kmk << EOF
 KBUILD_SVN_REV := %{svnrev}
@@ -68,6 +73,13 @@ EOF
 
 %{__sed} -i -e 's@_LDFLAGS\.%{kbuild_arch}*.*=@& %{rpmldflags}@g' Config.kmk
 
+%ifarch x32
+# probably should add full x32 configuration
+# but can't find place to submit code upstream, so this will do for now.
+# but then again, forcing -m64 is bad and pointless
+sed -i -e 's/-m64//' kBuild/tools/GCC64.kmk kBuild/tools/GXX64.kmk tests/Config.kmk Config.kmk
+%endif
+
 %build
 %define bootstrap_mflags %{?_smp_mflags} %{?with_verbose:KBUILD_VERBOSE=2} \\\
                CC="%{__cc}" TOOL_GCC3_CC="%{__cc}" CFLAGS="%{rpmcflags}"
This page took 0.853408 seconds and 4 git commands to generate.