- Rewrite mingw32-scripts to run in the current shell

- (Re-add mingw32-make) - Removed by RWMJ.
- Add mingw32-env to mingw32.sh
This commit is contained in:
Richard W.M. Jones 2008-12-06 14:33:41 +00:00
parent b8c580465a
commit 1ea30e613c
4 changed files with 57 additions and 34 deletions

View File

@ -1,8 +1,8 @@
%define debug_package %{nil}
Name: mingw32-filesystem
Version: 39
Release: 3%{?dist}
Version: 40
Release: 2%{?dist}
Summary: MinGW base filesystem and environment
Group: Development/Libraries
@ -13,7 +13,7 @@ BuildArch: noarch
Source0: mingw32-COPYING
Source1: mingw32-macros.mingw32
#Source2: mingw32.sh
Source2: mingw32.sh
#Source3: mingw32.csh
Source4: mingw32-find-requires.sh
Source5: mingw32-find-provides.sh
@ -75,13 +75,14 @@ install -m 755 %{SOURCE6} $RPM_BUILD_ROOT%{_libexecdir}/mingw32-scripts
mkdir -p $RPM_BUILD_ROOT%{_bindir}
pushd $RPM_BUILD_ROOT%{_bindir}
for i in mingw32-configure; do
for i in mingw32-configure ; do
ln -s %{_libexecdir}/mingw32-scripts $i
done
popd
#mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/profile.d
#install -m 644 %{SOURCE2} %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/profile.d
install -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/
#install -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rpm
install -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rpm/macros.mingw32
@ -133,7 +134,7 @@ rm -rf $RPM_BUILD_ROOT
%defattr(-,root,root,-)
%doc COPYING
%config(noreplace) %{_sysconfdir}/rpm/macros.mingw32
#%config(noreplace) %{_sysconfdir}/profile.d/mingw32.sh
%config(noreplace) %{_sysconfdir}/profile.d/mingw32.sh
#%config(noreplace) %{_sysconfdir}/profile.d/mingw32.csh
%{_bindir}/mingw32-configure
%{_libexecdir}/mingw32-scripts
@ -142,6 +143,11 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Sat Dec 6 2008 Levente Farkas <lfarkas@lfarkas.org> - 40-2
- Rewrite mingw32-scripts to run in the current shell
- (Re-add mingw32-make) - Removed by RWMJ.
- Add mingw32-env to mingw32.sh
* Mon Nov 24 2008 Richard W.M. Jones <rjones@redhat.com> - 39-3
- Unify mingw32-filesystem packages from all three branches again, and test.
- Fix mingw32-scripts so it can handle extra parameters correctly.

View File

@ -1,7 +1,9 @@
# RPM macros for Fedora MinGW.
%_mingw32_target i686-pc-mingw32
# Paths.
%_mingw32_sysroot %{_prefix}/i686-pc-mingw32/sys-root
%_mingw32_sysroot %{_prefix}/%{_mingw32_target}/sys-root
%_mingw32_prefix %{_mingw32_sysroot}/mingw
%_mingw32_exec_prefix %{_mingw32_prefix}
%_mingw32_bindir %{_mingw32_exec_prefix}/bin
@ -18,22 +20,33 @@
%_mingw32_includedir %{_mingw32_prefix}/include
# Build macros.
%_mingw32_host i686-pc-mingw32
%_mingw32_target i686-pc-mingw32
%_mingw32_host %{_mingw32_target}
%_mingw32_cflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
%_mingw32_cc i686-pc-mingw32-gcc
%_mingw32_cpp i686-pc-mingw32-gcc -E
%_mingw32_ar i686-pc-mingw32-ar
%_mingw32_as i686-pc-mingw32-as
%_mingw32_dlltool i686-pc-mingw32-dlltool
%_mingw32_ranlib i686-pc-mingw32-ranlib
%_mingw32_strip i686-pc-mingw32-strip
%_mingw32_objdump i686-pc-mingw32-objdump
%_mingw32_nm i686-pc-mingw32-nm
%_mingw32_windres i686-pc-mingw32-windres
%_mingw32_cxx i686-pc-mingw32-g++
%_mingw32_cc %{_mingw32_target}-gcc
%_mingw32_cxx %{_mingw32_target}-g++
%_mingw32_cpp %{_mingw32_target}-gcc -E
%_mingw32_addr2line %{_mingw32_target}-addr2line
%_mingw32_ar %{_mingw32_target}-ar
%_mingw32_as %{_mingw32_target}-as
%_mingw32_c++ %{_mingw32_target}-c++
%_mingw32_c++filt %{_mingw32_target}-c++filt
%_mingw32_dlltool %{_mingw32_target}-dlltool
%_mingw32_dllwrap %{_mingw32_target}-dllwrap
%_mingw32_gcov %{_mingw32_target}-gcov
%_mingw32_gprof %{_mingw32_target}-gprof
%_mingw32_ld %{_mingw32_target}-ld
%_mingw32_nm %{_mingw32_target}-nm
%_mingw32_objcopy %{_mingw32_target}-objcopy
%_mingw32_objdump %{_mingw32_target}-objdump
%_mingw32_ranlib %{_mingw32_target}-ranlib
%_mingw32_readelf %{_mingw32_target}-readelf
%_mingw32_size %{_mingw32_target}-size
%_mingw32_strings %{_mingw32_target}-strings
%_mingw32_strip %{_mingw32_target}-strip
%_mingw32_windmc %{_mingw32_target}-windmc
%_mingw32_windres %{_mingw32_target}-windres
%_mingw32_cache mingw32-config.cache
@ -41,19 +54,23 @@
%_mingw32_findrequires /usr/lib/rpm/mingw32-find-requires.sh
%_mingw32_env HOST_CC=gcc; export HOST_CC; \
AS="%{_mingw32_as}"; export AS; \
AR="%{_mingw32_ar}"; export AR; \
NM="%{_mingw32_nm}"; export NM; \
OBJDUMP="%{_mingw32_objdump}"; export OBJDUMP; \
PKG_CONFIG_PATH="%{_mingw32_libdir}/pkgconfig"; export PKG_CONFIG_PATH; \
CC="${MINGW32_CC:-%_mingw32_cc}"; export CC; \
CXX="${MINGW32_CXX:-%_mingw32_cxx}"; export CXX; \
CFLAGS="${MINGW32_CFLAGS:-%_mingw32_cflags}"; export CFLAGS; \
CXXFLAGS="${MINGW32_CXXFLAGS:-%_mingw32_cflags}"; export CXXFLAGS; \
for i in `ls %{_mingw32_bindir}|grep -- "-config\$"` ; do \
CONFIG_NAME=`echo $i|tr "a-z-" "A-Z_"`; \
declare -x $CONFIG_NAME="%{_mingw32_bindir}/$i" ; export $CONFIG_NAME; \
done
_PREFIX="%{_bindir}/%{_mingw32_target}-"; \
for i in `ls ${_PREFIX}*|egrep -v "gcc-"`; do \
x=`echo $i|sed "s,${_PREFIX},,"|tr "a-z+-" "A-ZX_"`; \
declare -x $x="$i" ; export $x; \
done; \
unset _PREFIX; \
for i in `ls %{_mingw32_bindir}/*|grep -- "-config\$"` ; do \
x=`basename $i|tr "a-z+-" "A-ZX_"`; \
declare -x $x="$i" ; export $x; \
done; \
unset x i
%_mingw32_configure %{_mingw32_env} ; \
./configure --cache-file=%{_mingw32_cache} \\\

View File

@ -1,6 +1,6 @@
#!/bin/sh -
# mingw32-configure
# mingw32-scripts
# Copyright (C) 2008 Red Hat Inc., Richard W.M. Jones.
# Copyright (C) 2008 Levente Farkas
#
@ -21,7 +21,5 @@
# This is a useful command-line script through which one can use the
# macros from mingw32-macros.mingw32 cross-compilation.
# XXX This doesn't handle quoting of extra parameters which contain
# spaces correctly.
rpm --eval "%{_"`basename $0|tr "-" "_"`"} $@"|sh
NAME="_`basename $0|tr -- - _`"
eval "`rpm --eval "%{$NAME}"`" "$@"

View File

@ -1 +1,3 @@
# Environment variables for MinGW.
alias mingw32-env='eval `rpm --eval %{_mingw32_env}`'