fix multilib issues

This commit is contained in:
Tom Callaway 2015-12-11 13:57:51 -05:00
parent 81d07323db
commit dbe53f0986
2 changed files with 70 additions and 1 deletions

View File

@ -9,7 +9,7 @@
Name: lua Name: lua
Version: %{major_version}.2 Version: %{major_version}.2
Release: 1%{?dist} Release: 2%{?dist}
Summary: Powerful light-weight programming language Summary: Powerful light-weight programming language
Group: Development/Languages Group: Development/Languages
License: MIT License: MIT
@ -21,6 +21,8 @@ Source1: mit.txt
Source2: http://www.lua.org/ftp/lua-%{bootstrap_version}.tar.gz Source2: http://www.lua.org/ftp/lua-%{bootstrap_version}.tar.gz
%endif %endif
Source3: http://www.lua.org/tests/lua-%{version}-tests.tar.gz Source3: http://www.lua.org/tests/lua-%{version}-tests.tar.gz
# multilib
Source4: luaconf.h
Patch0: %{name}-5.3.0-autotoolize.patch Patch0: %{name}-5.3.0-autotoolize.patch
Patch1: %{name}-5.3.0-idsize.patch Patch1: %{name}-5.3.0-idsize.patch
#Patch2: %%{name}-5.3.0-luac-shared-link-fix.patch #Patch2: %%{name}-5.3.0-luac-shared-link-fix.patch
@ -139,6 +141,11 @@ rm $RPM_BUILD_ROOT%{_libdir}/*.la
mkdir -p $RPM_BUILD_ROOT%{_libdir}/lua/%{major_version} mkdir -p $RPM_BUILD_ROOT%{_libdir}/lua/%{major_version}
mkdir -p $RPM_BUILD_ROOT%{_datadir}/lua/%{major_version} mkdir -p $RPM_BUILD_ROOT%{_datadir}/lua/%{major_version}
# Rename luaconf.h to luaconf-<arch>.h to avoid file conflicts on
# multilib systems and install luaconf.h wrapper
mv %{buildroot}%{_includedir}/luaconf.h %{buildroot}%{_includedir}/luaconf-%{_arch}.h
install -p -m 644 %{SOURCE4} %{buildroot}%{_includedir}/luaconf.h
%if 0%{?bootstrap} %if 0%{?bootstrap}
pushd lua-%{bootstrap_version} pushd lua-%{bootstrap_version}
mkdir $RPM_BUILD_ROOT/installdir mkdir $RPM_BUILD_ROOT/installdir
@ -180,6 +187,9 @@ popd
%changelog %changelog
* Fri Dec 11 2015 Tom Callaway <spot@fedoraproject.org> - 5.3.2-2
- fix multilib support (#1229992)
* Fri Dec 11 2015 "D. Johnson" <fenris02@fedoraproject.org> - 5.3.2-1 * Fri Dec 11 2015 "D. Johnson" <fenris02@fedoraproject.org> - 5.3.2-1
- Update to 5.3.2 (#1039249,1173984) - Update to 5.3.2 (#1039249,1173984)

59
luaconf.h Normal file
View File

@ -0,0 +1,59 @@
/*
* This luaconf.h is a wrapper include file for the original luaconf.h,
* which has been renamed to luaconf-<arch>.h. There are conflicts for the
* original luaconf.h on multilib systems, which result from arch-specific
* configuration options. Please do not use the arch-specific file directly.
*
* Copyright (C) 2015 Tom Callaway <spot@fedoraproject.org>
*/
/**
* \file luaconf.h
*/
#ifdef luaconf_wrapper_h
#error "luaconf_wrapper_h should not be defined!"
#endif
#define luaconf_wrapper_h
#if defined(__i386__)
#include "luaconf-i386.h"
#elif defined(__ia64__)
#include "luaconf-ia64.h"
#elif defined(__powerpc64__)
# if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
#include "luaconf-ppc64.h"
# else
#include "luaconf-ppc64le.h"
# endif
#elif defined(__powerpc__)
#include "luaconf-ppc.h"
#elif defined(__s390x__)
#include "luaconf-s390x.h"
#elif defined(__s390__)
#include "luaconf-s390.h"
#elif defined(__x86_64__)
#include "luaconf-x86_64.h"
#elif defined(__arm__)
#include "luaconf-arm.h"
#elif defined(__alpha__)
#include "luaconf-alpha.h"
#elif defined(__sparc__) && defined (__arch64__)
#include "luaconf-sparc64.h"
#elif defined(__sparc__)
#include "luaconf-sparc.h"
#elif defined(__aarch64__)
#include "luaconf-aarch64.h"
#elif defined(__mips64) && defined(__MIPSEL__)
#include "luaconf-mips64el.h"
#elif defined(__mips64)
#include "luaconf-mips64.h"
#elif defined(__mips) && defined(__MIPSEL__)
#include "luaconf-mipsel.h"
#elif defined(__mips)
#include "luaconf-mips.h"
#else
#error "The lua-devel package is not usable with the architecture."
#endif
#undef luaconf_wrapper_h