Merge commit.
authorRichard W.M. Jones <rjones@redhat.com>
Sat, 14 Feb 2009 13:05:50 +0000 (13:05 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Sat, 14 Feb 2009 13:05:50 +0000 (13:05 +0000)
25 files changed:
.hgignore
mingw64-binutils/mingw64-binutils.spec [new file with mode: 0644]
mingw64-filesystem/COPYING [new file with mode: 0644]
mingw64-filesystem/macros.mingw64 [new file with mode: 0644]
mingw64-filesystem/mingw64-filesystem.spec [new file with mode: 0644]
mingw64-filesystem/mingw64-find-provides.sh [new file with mode: 0755]
mingw64-filesystem/mingw64-find-requires.sh [new file with mode: 0755]
mingw64-filesystem/mingw64-rpmlint.config [new file with mode: 0644]
mingw64-filesystem/mingw64-scripts.sh [new file with mode: 0755]
mingw64-filesystem/mingw64.csh [new file with mode: 0644]
mingw64-filesystem/mingw64.sh [new file with mode: 0644]
mingw64-gcc/mingw64-gcc-bootstrap.spec [new file with mode: 0644]
mingw64-gcc/mingw64-gcc-build.patch [new file with mode: 0644]
mingw64-gcc/mingw64-gcc.spec [new file with mode: 0644]
mingw64-headers/mingw-w64-headers-607.tar.gz [new file with mode: 0644]
mingw64-headers/mingw64-headers.spec [new file with mode: 0644]
mingw64-runtime/mingw-w64-crt-607.tar.gz [new file with mode: 0644]
mingw64-runtime/mingw64-runtime.spec [new file with mode: 0644]
nsis/mingw32-nsis.spec
nsis/nsis-2.19-debian-64bit-fixes.patch [deleted file]
nsis/nsis-2.19-debian-debug-opt.patch [deleted file]
nsis/nsis-2.39-debian-debug-opt.patch [deleted file]
nsis/nsis-2.39-mingw32-search.patch [deleted file]
nsis/nsis-2.42-debian-64bit-fixes.patch [moved from nsis/nsis-2.39-debian-64bit-fixes.patch with 75% similarity]
nsis/nsis-2.43-debian-debug-opt.patch [new file with mode: 0644]

index c3214d3..a656870 100644 (file)
--- a/.hgignore
+++ b/.hgignore
@@ -85,9 +85,13 @@ libxml2/libxml2-2.6.32.tar.gz
 libxml2/libxml2-2.7.1.tar.gz
 libxml2/libxml2-2.7.2.tar.gz
 libxslt/libxslt-1.1.24.tar.gz
+mingw64-binutils/binutils-2.19.1.tar.bz2
+mingw64-gcc/gcc-core-4.4-20090206.tar.bz2
+mingw64-gcc/gcc-g++-4.4-20090206.tar.bz2
 mpfr/mpfr-2.3.2.tar.bz2
 nsis/nsis-2.19-src.tar.bz2
 nsis/nsis-2.39-src.tar.bz2
+nsis/nsis-2.43-src.tar.bz2
 nspr/nspr-4.7.2.tar.gz
 nss/nss-3.12.2.0-stripped.tar.bz2
 nss/nss-pem-20080124.tar.bz2
diff --git a/mingw64-binutils/mingw64-binutils.spec b/mingw64-binutils/mingw64-binutils.spec
new file mode 100644 (file)
index 0000000..4793bab
--- /dev/null
@@ -0,0 +1,101 @@
+Name:           mingw64-binutils
+Version:        2.19.1
+Release:        4%{?dist}
+Summary:        MinGW Windows binutils
+
+License:        GPLv2+ and LGPLv2+ and GPLv3+ and LGPLv3+
+Group:          Development/Libraries
+
+URL:            http://www.gnu.org/software/binutils/
+Source0:        http://ftp.gnu.org/gnu/binutils/binutils-%{version}.tar.bz2
+
+# Possible patch added after 2.19.1:
+# http://sourceware.org/ml/binutils/2009-02/msg00090.html
+
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildRequires:  flex
+BuildRequires:  bison
+BuildRequires:  texinfo
+BuildRequires:  mingw64-filesystem >= 6
+
+# NB: This must be left in.
+Requires:       mingw64-filesystem >= 6
+
+
+%description
+MinGW Windows binutils (utilities like 'strip', 'as', 'ld') which
+understand Windows executables and DLLs.
+
+
+%prep
+%setup -q -n binutils-%{version}
+
+
+%build
+mkdir -p build
+cd build
+CFLAGS="$RPM_OPT_FLAGS" \
+../configure \
+  --build=%_build --host=%_host \
+  --target=%{_mingw64_target} \
+  --verbose --disable-nls \
+  --without-included-gettext \
+  --disable-win32-registry \
+  --disable-werror \
+  --with-sysroot=%{_mingw64_sysroot} \
+  --prefix=%{_prefix} --bindir=%{_bindir} \
+  --includedir=%{_includedir} --libdir=%{_libdir} \
+  --mandir=%{_mandir} --infodir=%{_infodir}
+
+make %{?_smp_mflags} all
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+cd build
+make DESTDIR=$RPM_BUILD_ROOT install
+
+# These files conflict with ordinary binutils.
+rm -rf $RPM_BUILD_ROOT%{_infodir}
+rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%files
+%defattr(-,root,root)
+%{_mandir}/man1/*
+%{_bindir}/x86_64-pc-mingw32-*
+%{_prefix}/x86_64-pc-mingw32/bin
+%{_prefix}/x86_64-pc-mingw32/lib/ldscripts
+
+
+%changelog
+* Wed Feb 11 2009 Richard W.M. Jones <rjones@redhat.com> - 2.19.1-4
+- Started mingw64 development.
+
+* Tue Feb 10 2009 Richard W.M. Jones <rjones@redhat.com> - 2.19.1-1
+- New upstream version 2.19.1.
+
+* Mon Dec 15 2008 Richard W.M. Jones <rjones@redhat.com> - 2.19-1
+- New upstream version 2.19.
+
+* Sat Nov 29 2008 Richard W.M. Jones <rjones@redhat.com> - 2.18.50_20080109_2-10
+- Must runtime-require mingw32-filesystem.
+
+* Fri Nov 21 2008 Levente Farkas <lfarkas@lfarkas.org> - 2.18.50_20080109_2-9
+- BR mingw32-filesystem >= 38
+
+* Wed Sep 24 2008 Richard W.M. Jones <rjones@redhat.com> - 2.18.50_20080109_2-8
+- Rename mingw -> mingw32.
+- BR mingw32-filesystem >= 26.
+
+* Thu Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 2.18.50_20080109_2-7
+- Use mingw-filesystem.
+
+* Mon Jul  7 2008 Richard W.M. Jones <rjones@redhat.com> - 2.18.50_20080109_2-5
+- Initial RPM release, largely based on earlier work from several sources.
diff --git a/mingw64-filesystem/COPYING b/mingw64-filesystem/COPYING
new file mode 100644 (file)
index 0000000..e77696a
--- /dev/null
@@ -0,0 +1,339 @@
+                   GNU GENERAL PUBLIC LICENSE
+                      Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+                          675 Mass Ave, Cambridge, MA 02139, USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                           Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+\f
+                   GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+\f
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+\f
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+\f
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+                           NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+                    END OF TERMS AND CONDITIONS
+\f
+           How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) 19yy  <name of author>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) 19yy name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/mingw64-filesystem/macros.mingw64 b/mingw64-filesystem/macros.mingw64
new file mode 100644 (file)
index 0000000..40a4da8
--- /dev/null
@@ -0,0 +1,133 @@
+# RPM macros for Fedora MinGW.
+
+%_mingw64_target          x86_64-pc-mingw32
+
+# Paths.
+%_mingw64_sysroot         %{_prefix}/%{_mingw64_target}/sys-root
+%_mingw64_prefix          %{_mingw64_sysroot}
+%_mingw64_exec_prefix     %{_mingw64_prefix}
+%_mingw64_bindir          %{_mingw64_exec_prefix}/bin
+%_mingw64_sbindir         %{_mingw64_exec_prefix}/sbin
+%_mingw64_libexecdir      %{_mingw64_exec_prefix}/libexec
+%_mingw64_libdir          %{_mingw64_exec_prefix}/lib
+%_mingw64_datadir         %{_mingw64_prefix}/share
+%_mingw64_docdir          %{_mingw64_prefix}/share/doc
+%_mingw64_infodir         %{_mingw64_prefix}/share/info
+%_mingw64_mandir          %{_mingw64_prefix}/share/man
+%_mingw64_sysconfdir      %{_mingw64_prefix}/etc
+%_mingw64_sharedstatedir  %{_mingw64_prefix}/com
+%_mingw64_localstatedir   %{_mingw64_prefix}/var
+%_mingw64_includedir      %{_mingw64_prefix}/include
+
+# Build macros.
+%_mingw64_host            %{_mingw64_target}
+
+%_mingw64_cflags          -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
+
+%_mingw64_cc              %{_mingw64_target}-gcc
+%_mingw64_cxx             %{_mingw64_target}-g++
+%_mingw64_cpp             %{_mingw64_target}-gcc -E
+%_mingw64_addr2line       %{_mingw64_target}-addr2line
+%_mingw64_ar              %{_mingw64_target}-ar
+%_mingw64_as              %{_mingw64_target}-as
+%_mingw64_c++             %{_mingw64_target}-c++
+%_mingw64_c++filt         %{_mingw64_target}-c++filt
+%_mingw64_dlltool         %{_mingw64_target}-dlltool
+%_mingw64_dllwrap         %{_mingw64_target}-dllwrap
+%_mingw64_gcov            %{_mingw64_target}-gcov
+%_mingw64_gprof           %{_mingw64_target}-gprof
+%_mingw64_ld              %{_mingw64_target}-ld
+%_mingw64_nm              %{_mingw64_target}-nm
+%_mingw64_objcopy         %{_mingw64_target}-objcopy
+%_mingw64_objdump         %{_mingw64_target}-objdump
+%_mingw64_ranlib          %{_mingw64_target}-ranlib
+%_mingw64_readelf         %{_mingw64_target}-readelf
+%_mingw64_size            %{_mingw64_target}-size
+%_mingw64_strings         %{_mingw64_target}-strings
+%_mingw64_strip           %{_mingw64_target}-strip
+%_mingw64_windmc          %{_mingw64_target}-windmc
+%_mingw64_windres         %{_mingw64_target}-windres
+
+%_mingw64_cache           mingw64-config.cache
+
+%_mingw64_findprovides    /usr/lib/rpm/mingw64-find-provides.sh
+%_mingw64_findrequires    /usr/lib/rpm/mingw64-find-requires.sh
+
+%_mingw64_env HOST_CC=gcc; export HOST_CC; \
+  PKG_CONFIG_LIBDIR="%{_mingw64_libdir}/pkgconfig"; export PKG_CONFIG_LIBDIR; \
+  unset PKG_CONFIG_PATH; \
+  _PREFIX="%{_bindir}/%{_mingw64_target}-"; \
+  for i in `ls -1 ${_PREFIX}* | grep -v 'gcc-'`; do \
+    x=`echo $i|sed "s,${_PREFIX},,"|tr "a-z+-" "A-ZX_"`; \
+    declare -x $x="$i" ; export $x; \
+  done; \
+  unset _PREFIX; \
+  CC="${MINGW64_CC:-%_mingw64_cc}"; export CC; \
+  CFLAGS="${MINGW64_CFLAGS:-%_mingw64_cflags}"; export CFLAGS; \
+  if [ -x "%{_bindir}/%{_mingw64_cxx}" ]; then \
+    CXX="${MINGW64_CXX:-%_mingw64_cxx}"; export CXX; \
+    CXXFLAGS="${MINGW64_CXXFLAGS:-%_mingw64_cflags}"; export CXXFLAGS; \
+  else \
+    CXX=; export CXX; \
+    ac_cv_prog_CXX=no; export ac_cv_prog_CXX; \
+    CXXFLAGS=; export CXXFLAGS; \
+  fi; \
+  for i in `ls %{_mingw64_bindir}/*|grep -- "-config\$"` ; do \
+    x=`basename $i|tr "a-z+-" "A-ZX_"`; \
+    declare -x $x="$i" ; export $x; \
+  done; \
+  unset x i
+
+
+%_mingw64_configure %{_mingw64_env} ; \
+  ./configure --cache-file=%{_mingw64_cache} \\\
+       --host=%{_mingw64_host} \\\
+       --build=%_build \\\
+       --target=%{_mingw64_target} \\\
+       --prefix=%{_mingw64_prefix} \\\
+       --exec-prefix=%{_mingw64_exec_prefix} \\\
+       --bindir=%{_mingw64_bindir} \\\
+       --sbindir=%{_mingw64_sbindir} \\\
+       --sysconfdir=%{_mingw64_sysconfdir} \\\
+       --datadir=%{_mingw64_datadir} \\\
+       --includedir=%{_mingw64_includedir} \\\
+       --libdir=%{_mingw64_libdir} \\\
+       --libexecdir=%{_mingw64_libexecdir} \\\
+       --localstatedir=%{_mingw64_localstatedir} \\\
+       --sharedstatedir=%{_mingw64_sharedstatedir} \\\
+       --mandir=%{_mingw64_mandir} \\\
+       --infodir=%{_mingw64_infodir}
+
+%_mingw64_make %{_mingw64_env} ; \
+  make \\\
+       prefix=%{_mingw64_prefix} \\\
+       exec_prefix=%{_mingw64_exec_prefix} \\\
+       bindir=%{_mingw64_bindir} \\\
+       sbindir=%{_mingw64_sbindir} \\\
+       sysconfdir=%{_mingw64_sysconfdir} \\\
+       datadir=%{_mingw64_datadir} \\\
+       includedir=%{_mingw64_includedir} \\\
+       libdir=%{_mingw64_libdir} \\\
+       libexecdir=%{_mingw64_libexecdir} \\\
+       localstatedir=%{_mingw64_localstatedir} \\\
+       sharedstatedir=%{_mingw64_sharedstatedir} \\\
+       mandir=%{_mingw64_mandir} \\\
+       infodir=%{_mingw64_infodir}
+
+%_mingw64_makeinstall %{_mingw64_env} ; \
+  make \\\
+       prefix=%{?buildroot:%{buildroot}}%{_mingw64_prefix} \\\
+       exec_prefix=%{?buildroot:%{buildroot}}%{_mingw64_exec_prefix} \\\
+       bindir=%{?buildroot:%{buildroot}}%{_mingw64_bindir} \\\
+       sbindir=%{?buildroot:%{buildroot}}%{_mingw64_sbindir} \\\
+       sysconfdir=%{?buildroot:%{buildroot}}%{_mingw64_sysconfdir} \\\
+       datadir=%{?buildroot:%{buildroot}}%{_mingw64_datadir} \\\
+       includedir=%{?buildroot:%{buildroot}}%{_mingw64_includedir} \\\
+       libdir=%{?buildroot:%{buildroot}}%{_mingw64_libdir} \\\
+       libexecdir=%{?buildroot:%{buildroot}}%{_mingw64_libexecdir} \\\
+       localstatedir=%{?buildroot:%{buildroot}}%{_mingw64_localstatedir} \\\
+       sharedstatedir=%{?buildroot:%{buildroot}}%{_mingw64_sharedstatedir} \\\
+       mandir=%{?buildroot:%{buildroot}}%{_mingw64_mandir} \\\
+       infodir=%{?buildroot:%{buildroot}}%{_mingw64_infodir} \\\
+  install
+
diff --git a/mingw64-filesystem/mingw64-filesystem.spec b/mingw64-filesystem/mingw64-filesystem.spec
new file mode 100644 (file)
index 0000000..1e2e7a3
--- /dev/null
@@ -0,0 +1,280 @@
+%define debug_package %{nil}
+
+Name:           mingw64-filesystem
+Version:        10
+Release:        1%{?dist}
+Summary:        MinGW base filesystem and environment
+
+Group:          Development/Libraries
+License:        GPLv2+
+URL:            http://hg.et.redhat.com/misc/fedora-mingw--devel/
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildArch:      noarch
+
+Source0:        COPYING
+Source1:        macros.mingw64
+Source2:        mingw64.sh
+#Source3:        mingw64.csh
+Source4:        mingw64-find-requires.sh
+Source5:        mingw64-find-provides.sh
+Source6:        mingw64-scripts.sh
+Source7:        mingw64-rpmlint.config
+
+Requires:       setup
+Requires:       rpm
+Requires:       rpmlint >= 0.85-2
+
+BuildRequires:  rpmlint >= 0.85-2
+
+# Note about 'Provides: mingw64(foo.dll)'
+# ------------------------------------------------------------
+#
+# We want to be able to build & install mingw64 libraries without
+# necessarily needing to install wine.  (And certainly not needing to
+# install Windows!)  There is no requirement to have wine installed in
+# order to use the mingw toolchain to develop software (ie. to
+# compile more stuff on top of it), so why require that?
+#
+# So for expediency, this base package provides the "missing" DLLs
+# from Windows.  Another way to do it would be to exclude these
+# proprietary DLLs in our find-requires checking script - essentially
+# it comes out the same either way.
+#
+#Provides:       mingw64(gdi32.dll)
+
+
+%description
+This package contains the base filesystem layout, RPM macros and
+environment for all Fedora MinGW packages.
+
+This environment is maintained by the Fedora MinGW SIG at:
+
+  http://fedoraproject.org/wiki/SIGs/MinGW
+
+
+%prep
+%setup -q -c -T
+cp %{SOURCE0} COPYING
+sed 's/@VERSION@/%{version}/' < %{SOURCE4} > mingw64-find-requires.sh
+
+
+%build
+# nothing
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+mkdir -p $RPM_BUILD_ROOT
+
+mkdir -p $RPM_BUILD_ROOT%{_libexecdir}
+install -m 755 %{SOURCE6} $RPM_BUILD_ROOT%{_libexecdir}/mingw64-scripts
+
+mkdir -p $RPM_BUILD_ROOT%{_bindir}
+pushd $RPM_BUILD_ROOT%{_bindir}
+for i in mingw64-configure mingw64-make; do
+  ln -s %{_libexecdir}/mingw64-scripts $i
+done
+popd
+
+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.mingw64
+
+mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rpmlint
+install -m 644 %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/rpmlint/
+
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32
+
+# These directories are used by GCC for cross-compilation.
+# NOTE different contents from mingw32.
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/bin
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/lib
+
+# The system root which will contain Windows native binaries
+# and Windows-specific header files, pkgconfig, etc.
+# NOTE different from mingw32.
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/bin
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/include
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/include/sys
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/lib
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/lib/pkgconfig
+
+# GCC wants to look in include64/ directory for some reason.
+pushd $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root
+ln -s include include64
+popd
+
+# We don't normally package manual pages and info files, except
+# where those are not supplied by a Fedora native package.  So we
+# need to create the directories.
+#
+# Note that some packages try to install stuff in
+#   /usr/x86_64-pc-mingw32/sys-root/man and
+#   /usr/x86_64-pc-mingw32/sys-root/doc
+# but those are both packaging bugs.
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/share
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/share/doc
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/share/info
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/share/man
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/share/man/man{1,2,3,4,5,6,7,8,l,n}
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/share/aclocal
+
+pushd $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root
+ln -s . mingw
+popd
+
+
+# NB. NOT _libdir
+mkdir -p $RPM_BUILD_ROOT/usr/lib/rpm
+install -m 0755 mingw64-find-requires.sh $RPM_BUILD_ROOT/usr/lib/rpm
+install -m 0755 %{SOURCE5} $RPM_BUILD_ROOT/usr/lib/rpm
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%files
+%defattr(-,root,root,-)
+%doc COPYING
+%config(noreplace) %{_sysconfdir}/rpm/macros.mingw64
+%config(noreplace) %{_sysconfdir}/profile.d/mingw64.sh
+#%config(noreplace) %{_sysconfdir}/profile.d/mingw64.csh
+%config(noreplace) %{_sysconfdir}/rpmlint/mingw64-rpmlint.config
+%{_bindir}/mingw64-configure
+%{_bindir}/mingw64-make
+%{_libexecdir}/mingw64-scripts
+%{_prefix}/x86_64-pc-mingw32/
+/usr/lib/rpm/mingw64-*
+
+
+%changelog
+* Wed Feb 11 2009 Richard W.M. Jones <rjones@redhat.com> - 10-1
+- Start mingw64 development.
+
+* Sun Feb  1 2009 Richard W.M. Jones <rjones@redhat.com> - 46-1
+- Unset PKG_CONFIG_PATH because /usr/lib/rpm/macros sets it (Erik van
+  Pienbroek).
+
+* Wed Jan 28 2009 Richard W.M. Jones <rjones@redhat.com> - 45-1
+- Use PKG_CONFIG_LIBDIR instead of PKG_CONFIG_PATH so that native pkgconfig
+  is never searched.
+
+* Mon Jan 26 2009 Richard W.M. Jones <rjones@redhat.com> - 44-1
+- Install rpmlint overrides file to suppress some rpmlint warnings.
+
+* Sat Jan 24 2009 Richard W.M. Jones <rjones@redhat.com> - 43-6
+- Don't claim C++ compiler exists if it's not installed, as this
+  breaks autoconf and (in particular) libtool.
+
+* Wed Jan 14 2009 Richard W.M. Jones <rjones@redhat.com> - 42-1
+- Add pseudo-provides secur32.dll
+
+* Wed Dec 17 2008 Levente Farkas <lfarkas@lfarkas.org> - 41-1
+- Re-add mingw32-make
+
+* 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.
+- Remove mingw32-env & mingw32-make since neither of them actually work.
+
+* Sun Nov 23 2008 Richard Jones <rjones@redhat.com> - 38-1
+- Added mingw32(glut32.dll).
+
+* Wed Nov 19 2008 Richard Jones <rjones@redhat.com> - 37-1
+- Revert part of the 36-1 patch.  --build option to configure was wrong.
+
+* Wed Nov 19 2008 Richard Jones <rjones@redhat.com> - 36-1
+- Greatly improved macros (Levente Farkas).
+- Added -mms-bitfields.
+
+* Thu Nov 13 2008 Richard Jones <rjones@redhat.com> - 35-1
+- Added mingw32(wldap32.dll) pseudo-provides.
+
+* Wed Oct 29 2008 Richard Jones <rjones@redhat.com> - 34-1
+- Set --prefix correctly.
+
+* Wed Oct 29 2008 Richard Jones <rjones@redhat.com> - 33-1
+- Remove mingw32.{sh,csh} which are unused.
+
+* Mon Oct 27 2008 Richard Jones <rjones@redhat.com> - 32-1
+- Add mingw32-configure script.
+
+* Mon Oct 27 2008 Richard Jones <rjones@redhat.com> - 31-1
+- Update the spec file with explanation of the 'Provides: mingw32(...)'
+  lines for Windows system DLLs.
+
+* Mon Oct  6 2008 Richard Jones <rjones@redhat.com> - 30-1
+- Added _mingw32_cxx.
+
+* Thu Sep 25 2008 Richard Jones <rjones@redhat.com> - 29-1
+- Added _mingw32_as, _mingw32_dlltool, _mingw32_windres.
+
+* Wed Sep 24 2008 Richard W.M. Jones <rjones@redhat.com> - 27-1
+- Begin the grand renaming of mingw -> mingw32.
+- Added mingw32(mscoree.dll).
+
+* Sun Sep 21 2008 Richard W.M. Jones <rjones@redhat.com> - 25-1
+- Add shared aclocal directory.
+
+* Sun Sep 21 2008 Richard W.M. Jones <rjones@redhat.com> - 24-1
+- Remove mingw-defs, since no longer used.
+- Add _mingw_infodir.
+
+* Thu Sep 11 2008 Daniel P. Berrange <berrange@redhat.com> - 23-1
+- Add macros for find-provides/requires scripts
+
+* Wed Sep 10 2008 Richard W.M. Jones <rjones@redhat.com> - 22-1
+- Windows provides OLE32.DLL.
+
+* Wed Sep 10 2008 Richard W.M. Jones <rjones@redhat.com> - 21-1
+- Allow '.' in dll names for find-requires
+- Windows provides GDI32.DLL.
+
+* Fri Sep  5 2008 Richard W.M. Jones <rjones@redhat.com> - 20-1
+- On 64 bit install in /usr/lib/rpm always.
+
+* Thu Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 19-1
+- 'user32.dll' is provided by Windows.
+- Allow '-' in DLL names.
+- More accurate detection of DLLs in requires/provides scripts.
+
+* Mon Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 17-1
+- Automatically add mingw-filesystem and mingw-runtime requires.
+- Add --prefix to _mingw_configure macro.
+- Three backslashes required on each continuation line in RPM macros.
+
+* Mon Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 14-1
+- Fix path to mingw-find-requires/provides scripts.
+
+* Mon Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 12-1
+- Put CFLAGS on a single line to avoid problems in some configure scripts.
+
+* Mon Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 10-1
+- Provides certain base Windows DLLs (not literally).
+
+* Mon Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 9-1
+- Include RPM dependency generators and definitions.
+
+* Mon Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 4-1
+- Add _mingw_cc/cflags/etc. and _mingw_configure macros.
+
+* Mon Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 3-1
+- Add _mingw_host macro.
+
+* Mon Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 2-1
+- Add _mingw_sysroot macro.
+- Add _mingw_target macro.
+
+* Mon Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 1-1
+- Basic filesystem layout.
diff --git a/mingw64-filesystem/mingw64-find-provides.sh b/mingw64-filesystem/mingw64-find-provides.sh
new file mode 100755 (executable)
index 0000000..527d184
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+# This script reads filenames from STDIN and outputs any relevant provides
+# information that needs to be included in the package.
+
+if [ "$1" ]
+then
+   package_name="$1"
+fi
+
+[ -z "$OBJDUMP" ] && OBJDUMP=x86_64-pc-mingw32-objdump
+
+filelist=`sed "s/['\"]/\\\&/g"`
+
+dlls=$(echo $filelist | tr [:blank:] '\n' | grep '\.dll$')
+
+for f in $dlls; do
+    basename=`basename $f | tr [:upper:] [:lower:]`
+    echo "mingw64($basename)"
+done
diff --git a/mingw64-filesystem/mingw64-find-requires.sh b/mingw64-filesystem/mingw64-find-requires.sh
new file mode 100755 (executable)
index 0000000..114a07b
--- /dev/null
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+# This script reads filenames from STDIN and outputs any relevant provides
+# information that needs to be included in the package.
+
+if [ "$1" ]
+then
+   package_name="$1"
+fi
+
+[ -z "$OBJDUMP" ] && OBJDUMP=x86_64-pc-mingw32-objdump
+
+# Get the list of files.
+
+filelist=`sed "s/['\"]/\\\&/g"`
+
+# Everything requires mingw64-filesystem of at least the current version
+# and mingw64-runtime.
+echo 'mingw64-filesystem >= @VERSION@'
+echo 'mingw64-runtime'
+
+dlls=$(echo $filelist | tr [:blank:] '\n' | grep -Ei '\.(dll|exe)$')
+
+for f in $dlls; do
+    $OBJDUMP -p $f | grep 'DLL Name' | grep -Eo '[-._[:alnum:]]+\.dll' |
+        tr [:upper:] [:lower:] |
+        sed 's/\(.*\)/mingw64(\1)/'
+done | sort -u
diff --git a/mingw64-filesystem/mingw64-rpmlint.config b/mingw64-filesystem/mingw64-rpmlint.config
new file mode 100644 (file)
index 0000000..0466085
--- /dev/null
@@ -0,0 +1,19 @@
+# rpmlint overrides file.
+# This file filters out MinGW warnings.
+# See: http://fedoraproject.org/wiki/MinGW/Rpmlint
+
+# Unconditionally remove devel-file-in-non-devel rpmlint warning.
+addFilter ("^mingw64-.*devel-file-in-non-devel")
+
+# /usr/x86_64-pc-mingw32 is permitted by MinGW packaging guidelines.
+addFilter ("^mingw64-.*non-standard-dir-in-usr x86_64-pc-mingw32")
+
+# Permit *.la files (error is a bit odd, but it's what rpmlint prints).
+addFilter ("^mingw64-.*script-without-shebang.*\.la$")
+
+# GCC and libtool create executable archive files.  It's not clear
+# why, but we permit this for now.
+addFilter ("^mingw64-.*spurious-executable-perm.*\.dll\.a$")
+
+# *.dll.a files are permitted arch-independent objects.
+addFilter ("^mingw64-.*arch-independent-package-contains-binary-or-object.*\.dll\.a$")
diff --git a/mingw64-filesystem/mingw64-scripts.sh b/mingw64-filesystem/mingw64-scripts.sh
new file mode 100755 (executable)
index 0000000..918ca68
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/sh -
+
+# mingw64-scripts
+# Copyright (C) 2008 Red Hat Inc., Richard W.M. Jones.
+# Copyright (C) 2008 Levente Farkas
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+# This is a useful command-line script through which one can use the
+# macros from mingw64-macros.mingw64 cross-compilation. 
+
+NAME="_`basename $0|tr -- - _`"
+eval "`rpm --eval "%{$NAME}"`" "$@"
diff --git a/mingw64-filesystem/mingw64.csh b/mingw64-filesystem/mingw64.csh
new file mode 100644 (file)
index 0000000..89d8b66
--- /dev/null
@@ -0,0 +1 @@
+# Environment variables for MinGW.
diff --git a/mingw64-filesystem/mingw64.sh b/mingw64-filesystem/mingw64.sh
new file mode 100644 (file)
index 0000000..87a515d
--- /dev/null
@@ -0,0 +1,3 @@
+# Environment variables for MinGW.
+
+alias mingw64-env='eval `rpm --eval %{_mingw64_env}`'
diff --git a/mingw64-gcc/mingw64-gcc-bootstrap.spec b/mingw64-gcc/mingw64-gcc-bootstrap.spec
new file mode 100644 (file)
index 0000000..2a4b4b9
--- /dev/null
@@ -0,0 +1,163 @@
+# This is the bootstrap GCC which is required for bootstrapping
+# mingw64-runtime.
+
+%define __os_install_post /usr/lib/rpm/brp-compress %{nil}
+
+%define upstream_version 4.4-20090206
+
+Name:           mingw64-gcc-bootstrap
+Version:        4.4.0
+Release:        0.20090206.6%{?dist}
+Summary:        MinGW Windows cross-compiler (GCC) for C
+
+License:        GPLv2+
+Group:          Development/Languages
+URL:            http://www.mingw.org/
+Source0:        ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/snapshots/4.4-20090206/gcc-core-4.4-20090206.tar.bz2
+
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildRequires:  texinfo
+BuildRequires:  mingw64-filesystem >= 6
+BuildRequires:  mingw64-binutils
+BuildRequires:  mingw64-headers
+BuildRequires:  gmp-devel
+%if 0%{?fedora} >= 9
+BuildRequires:  mpfr-devel
+%endif
+BuildRequires:  libgomp
+
+# NB: Explicit mingw64-filesystem dependency is REQUIRED here.
+Requires:       mingw64-filesystem >= 6
+Requires:       mingw64-binutils
+Requires:       mingw64-headers
+Requires:       mingw64-cpp-bootstrap
+
+
+%description
+MinGW Windows cross-compiler (GCC) for C
+
+
+%package -n mingw64-cpp-bootstrap
+Summary: MinGW Windows cross-C Preprocessor.
+Group: Development/Languages
+
+
+%description -n mingw64-cpp-bootstrap
+MinGW Windows cross-C Preprocessor
+
+
+%prep
+%setup -q -c
+
+
+%build
+cd gcc-%{upstream_version}
+
+mkdir -p build
+cd build
+
+languages="c"
+
+CC="%{__cc} ${RPM_OPT_FLAGS}" \
+../configure \
+  --prefix=%{_prefix} \
+  --bindir=%{_bindir} \
+  --includedir=%{_includedir} \
+  --libdir=%{_libdir} \
+  --mandir=%{_mandir} \
+  --infodir=%{_infodir} \
+  --datadir=%{_datadir} \
+  --build=%_build --host=%_host \
+  --target=%{_mingw64_target} \
+  --with-gnu-as --with-gnu-ld --verbose \
+  --without-newlib \
+  --disable-multilib \
+  --with-system-zlib \
+  --disable-nls --without-included-gettext \
+  --disable-win32-registry \
+  --enable-version-specific-runtime-libs \
+  --with-sysroot=%{_mingw64_sysroot} \
+  --enable-languages="$languages" $optargs
+
+make %{?_smp_mflags} all-gcc
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+cd gcc-%{upstream_version}
+cd build
+make DESTDIR=$RPM_BUILD_ROOT install-gcc
+
+# These files conflict with existing installed files.
+rm -rf $RPM_BUILD_ROOT%{_infodir}
+rm -f $RPM_BUILD_ROOT%{_mandir}/man7/*
+
+mkdir -p $RPM_BUILD_ROOT/lib
+ln -sf ..%{_prefix}/bin/x86_64-pc-mingw32-cpp \
+  $RPM_BUILD_ROOT/lib/x86_64-pc-mingw32-cpp
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%files
+%defattr(-,root,root)
+%{_bindir}/x86_64-pc-mingw32-gcc
+%{_bindir}/x86_64-pc-mingw32-gcc-%{version}
+%{_bindir}/x86_64-pc-mingw32-gccbug
+%{_bindir}/x86_64-pc-mingw32-gcov
+%dir %{_libdir}/gcc/x86_64-pc-mingw32
+%dir %{_libdir}/gcc/x86_64-pc-mingw32/%{version}
+%dir %{_libdir}/gcc/x86_64-pc-mingw32/%{version}/include
+%dir %{_libdir}/gcc/x86_64-pc-mingw32/%{version}/include-fixed
+%{_libdir}/gcc/x86_64-pc-mingw32/%{version}/include-fixed/README
+%{_libdir}/gcc/x86_64-pc-mingw32/%{version}/include-fixed/*.h
+%{_libdir}/gcc/x86_64-pc-mingw32/%{version}/include/*.h
+%dir %{_libdir}/gcc/x86_64-pc-mingw32/%{version}/install-tools
+%{_libdir}/gcc/x86_64-pc-mingw32/%{version}/install-tools/*
+%dir %{_libexecdir}/gcc/x86_64-pc-mingw32/%{version}/install-tools
+%{_libexecdir}/gcc/x86_64-pc-mingw32/%{version}/install-tools/*
+%{_mandir}/man1/x86_64-pc-mingw32-gcc.1*
+%{_mandir}/man1/x86_64-pc-mingw32-gcov.1*
+
+
+%files -n mingw64-cpp-bootstrap
+%defattr(-,root,root)
+/lib/x86_64-pc-mingw32-cpp
+%{_bindir}/x86_64-pc-mingw32-cpp
+%{_mandir}/man1/x86_64-pc-mingw32-cpp.1*
+%dir %{_libdir}/gcc/x86_64-pc-mingw32
+%dir %{_libdir}/gcc/x86_64-pc-mingw32/%{version}
+%{_libexecdir}/gcc/x86_64-pc-mingw32/%{version}/cc1
+%{_libexecdir}/gcc/x86_64-pc-mingw32/%{version}/collect2
+
+
+%changelog
+* Wed Feb 11 2009 Richard W.M. Jones <rjones@redhat.com> - 4.4.0-0.20090206.6
+- Started mingw64 development.
+
+* Mon Nov 24 2008 Richard W.M. Jones <rjones@redhat.com> - 4.3.2-12
+- Rebuild against latest filesystem package.
+
+* Fri Nov 21 2008 Richard W.M. Jones <rjones@redhat.com> - 4.3.2-11
+- Remove obsoletes for a long dead package.
+
+* Wed Nov 19 2008 Richard W.M. Jones <rjones@redhat.com> - 4.3.2-10
+- Rebuild against mingw32-filesystem 37
+
+* Wed Nov 19 2008 Richard W.M. Jones <rjones@redhat.com> - 4.3.2-9
+- Rebuild against mingw32-filesystem 36
+
+* Thu Oct 30 2008 Richard W.M. Jones <rjones@redhat.com> - 4.3.2-8
+- Don't BR mpfr-devel for RHEL/EPEL-5 (Levente Farkas).
+
+* Thu Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 4.3.2-7
+- Rename mingw -> mingw32.
+
+* Thu Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 4.3.2-6
+- Use RPM macros from mingw-filesystem.
+
+* Mon Jul  7 2008 Richard W.M. Jones <rjones@redhat.com> - 4.3.2-3
+- Initial RPM release, largely based on earlier work from several sources.
diff --git a/mingw64-gcc/mingw64-gcc-build.patch b/mingw64-gcc/mingw64-gcc-build.patch
new file mode 100644 (file)
index 0000000..5ef4de1
--- /dev/null
@@ -0,0 +1,54 @@
+diff -rup mingw-gcc-4.3.2.orig/gcc-4.3.2/gcc/toplev.c mingw-gcc-4.3.2.new/gcc-4.3.2/gcc/toplev.c
+--- mingw-gcc-4.3.2.orig/gcc-4.3.2/gcc/toplev.c        2008-04-24 13:59:01.000000000 -0400
++++ mingw-gcc-4.3.2.new/gcc-4.3.2/gcc/toplev.c 2008-09-02 07:31:12.000000000 -0400
+@@ -536,7 +536,7 @@ read_integral_parameter (const char *p, 
+    for floor_log2 and exact_log2; see toplev.h.  That construct, however,
+    conflicts with the ISO C++ One Definition Rule.   */
+-#if GCC_VERSION < 3004 || !defined (__cplusplus)
++#if GCC_VERSION < 3004
+ /* Given X, an unsigned number, return the largest int Y such that 2**Y <= X.
+    If X is 0, return -1.  */
+diff -rup mingw-gcc-4.3.2.orig/gcc-4.3.2/gcc/toplev.h mingw-gcc-4.3.2.new/gcc-4.3.2/gcc/toplev.h
+--- mingw-gcc-4.3.2.orig/gcc-4.3.2/gcc/toplev.h        2007-09-23 15:18:27.000000000 -0400
++++ mingw-gcc-4.3.2.new/gcc-4.3.2/gcc/toplev.h 2008-09-03 07:08:46.000000000 -0400
+@@ -154,12 +154,6 @@ extern void decode_d_option               (const char
+ /* Return true iff flags are set as if -ffast-math.  */
+ extern bool fast_math_flags_set_p     (void);
+-/* Return log2, or -1 if not exact.  */
+-extern int exact_log2                  (unsigned HOST_WIDE_INT);
+-
+-/* Return floor of log2, with -1 for zero.  */
+-extern int floor_log2                  (unsigned HOST_WIDE_INT);
+-
+ /* Inline versions of the above for speed.  */
+ #if GCC_VERSION >= 3004
+ # if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG
+@@ -173,17 +167,23 @@ extern int floor_log2                  (
+ #  define CTZ_HWI __builtin_ctz
+ # endif
+-extern inline int
++static inline int
+ floor_log2 (unsigned HOST_WIDE_INT x)
+ {
+   return x ? HOST_BITS_PER_WIDE_INT - 1 - (int) CLZ_HWI (x) : -1;
+ }
+-extern inline int
++static inline int
+ exact_log2 (unsigned HOST_WIDE_INT x)
+ {
+   return x == (x & -x) && x ? (int) CTZ_HWI (x) : -1;
+ }
++#else
++/* Return log2, or -1 if not exact.  */
++extern int exact_log2                  (unsigned HOST_WIDE_INT);
++
++/* Return floor of log2, with -1 for zero.  */
++extern int floor_log2                  (unsigned HOST_WIDE_INT);
+ #endif /* GCC_VERSION >= 3004 */
+ /* Functions used to get and set GCC's notion of in what directory
diff --git a/mingw64-gcc/mingw64-gcc.spec b/mingw64-gcc/mingw64-gcc.spec
new file mode 100644 (file)
index 0000000..d5ee083
--- /dev/null
@@ -0,0 +1,213 @@
+%define __os_install_post /usr/lib/rpm/brp-compress %{nil}
+
+%define upstream_version 4.4-20090206
+
+Name:           mingw64-gcc
+Version:        4.4.0
+Release:        0.20090206.7%{?dist}
+Summary:        MinGW Windows cross-compiler (GCC) for C
+
+License:        GPLv2+
+Group:          Development/Languages
+URL:            http://www.mingw.org/
+Source0:        ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/snapshots/%{upstream_version}/gcc-core-%{upstream_version}.tar.bz2
+Source1:        ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/snapshots/%{upstream_version}/gcc-g++-%{upstream_version}.tar.bz2
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildRequires:  texinfo
+BuildRequires:  mingw64-filesystem >= 10
+BuildRequires:  mingw64-binutils
+BuildRequires:  mingw64-headers
+BuildRequires:  mingw64-runtime
+BuildRequires:  gmp-devel
+%if 0%{?fedora} >= 9
+BuildRequires:  mpfr-devel
+%endif
+BuildRequires:  libgomp
+
+# NB: Explicit mingw64-filesystem dependency is REQUIRED here.
+Requires:       mingw64-filesystem >= 10
+Requires:       mingw64-binutils
+Requires:       mingw64-headers
+Requires:       mingw64-runtime
+Requires:       mingw64-cpp
+
+# Once this full GCC is installed, it obsoletes the bootstrap GCC.
+Obsoletes:      mingw64-gcc-bootstrap <= %{version}-%{release}
+Provides:       mingw64-gcc-bootstrap = %{version}-%{release}
+
+
+%description
+MinGW Windows cross-compiler (GCC) for C
+
+
+%package -n mingw64-cpp
+Summary: MinGW Windows cross-C Preprocessor.
+Group: Development/Languages
+Obsoletes:      mingw64-cpp-bootstrap <= %{version}-%{release}
+Provides:       mingw64-cpp-bootstrap = %{version}-%{release}
+
+
+%description -n mingw64-cpp
+MinGW Windows cross-C Preprocessor
+
+
+%package c++
+Summary: MinGW Windows cross-compiler for C++
+Group: Development/Languages
+
+%description c++
+MinGW Windows cross-compiler for C++
+
+
+%prep
+%setup -q -c
+%setup -q -D -T -a1
+
+
+%build
+cd gcc-%{upstream_version}
+
+mkdir -p build
+pushd build
+
+languages="c,c++"
+
+CC="%{__cc} ${RPM_OPT_FLAGS}" \
+../configure \
+  --prefix=%{_prefix} \
+  --bindir=%{_bindir} \
+  --includedir=%{_includedir} \
+  --libdir=%{_libdir} \
+  --mandir=%{_mandir} \
+  --infodir=%{_infodir} \
+  --datadir=%{_datadir} \
+  --build=%_build --host=%_host \
+  --target=%{_mingw64_target} \
+  --with-gnu-as --with-gnu-ld --verbose \
+  --without-newlib \
+  --disable-multilib \
+  --with-system-zlib \
+  --disable-nls --without-included-gettext \
+  --disable-win32-registry \
+  --enable-version-specific-runtime-libs \
+  --with-sysroot=%{_mingw64_sysroot} \
+  --enable-languages="$languages" $optargs
+
+make %{?_smp_mflags} all
+popd
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+cd gcc-%{upstream_version}
+cd build
+make DESTDIR=$RPM_BUILD_ROOT install
+
+# These files conflict with existing installed files.
+rm -rf $RPM_BUILD_ROOT%{_infodir}
+rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty*
+rm -f $RPM_BUILD_ROOT%{_mandir}/man7/*
+
+mkdir -p $RPM_BUILD_ROOT/lib
+ln -sf ..%{_prefix}/bin/x86_64-pc-mingw32-cpp \
+  $RPM_BUILD_ROOT/lib/x86_64-pc-mingw32-cpp
+
+# This DLL should definitely not be in /usr/bin ...
+mkdir -p $RPM_BUILD_ROOT%{_mingw64_bindir}
+mv $RPM_BUILD_ROOT%{_bindir}/libgcc_s_sjlj-1.dll \
+  $RPM_BUILD_ROOT%{_mingw64_bindir}
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%files
+%defattr(-,root,root)
+%{_bindir}/x86_64-pc-mingw32-gcc
+%{_bindir}/x86_64-pc-mingw32-gcc-%{version}
+%{_bindir}/x86_64-pc-mingw32-gccbug
+%{_bindir}/x86_64-pc-mingw32-gcov
+%{_prefix}/x86_64-pc-mingw32/lib/libiberty.a
+%dir %{_libdir}/gcc/x86_64-pc-mingw32
+%dir %{_libdir}/gcc/x86_64-pc-mingw32/%{version}
+%{_libdir}/gcc/x86_64-pc-mingw32/%{version}/crtfastmath.o
+%{_libdir}/gcc/x86_64-pc-mingw32/%{version}/libgcc.a
+%{_libdir}/gcc/x86_64-pc-mingw32/%{version}/libgcc_eh.a
+%{_libdir}/gcc/x86_64-pc-mingw32/%{version}/libgcc_s.a
+%{_libdir}/gcc/x86_64-pc-mingw32/%{version}/libgcov.a
+%{_libdir}/gcc/x86_64-pc-mingw32/%{version}/libssp.a
+%{_libdir}/gcc/x86_64-pc-mingw32/%{version}/libssp.dll.a
+%{_libdir}/gcc/x86_64-pc-mingw32/%{version}/libssp.la
+%{_libdir}/gcc/x86_64-pc-mingw32/%{version}/libssp_nonshared.a
+%{_libdir}/gcc/x86_64-pc-mingw32/%{version}/libssp_nonshared.la
+%dir %{_libdir}/gcc/x86_64-pc-mingw32/%{version}/include
+%dir %{_libdir}/gcc/x86_64-pc-mingw32/%{version}/include-fixed
+%dir %{_libdir}/gcc/x86_64-pc-mingw32/%{version}/include/ssp
+%{_libdir}/gcc/x86_64-pc-mingw32/%{version}/include-fixed/README
+%{_libdir}/gcc/x86_64-pc-mingw32/%{version}/include-fixed/*.h
+%{_libdir}/gcc/x86_64-pc-mingw32/%{version}/include/*.h
+%{_libdir}/gcc/x86_64-pc-mingw32/%{version}/include/ssp/*.h
+%dir %{_libdir}/gcc/x86_64-pc-mingw32/%{version}/install-tools
+%{_libdir}/gcc/x86_64-pc-mingw32/%{version}/install-tools/*
+%{_libdir}/gcc/x86_64-pc-mingw32/bin/libssp-0.dll
+%dir %{_libexecdir}/gcc/x86_64-pc-mingw32/%{version}/install-tools
+%{_libexecdir}/gcc/x86_64-pc-mingw32/%{version}/install-tools/*
+%{_mandir}/man1/x86_64-pc-mingw32-gcc.1*
+%{_mandir}/man1/x86_64-pc-mingw32-gcov.1*
+%{_mingw64_bindir}/libgcc_s_sjlj-1.dll
+
+
+%files -n mingw64-cpp
+%defattr(-,root,root)
+/lib/x86_64-pc-mingw32-cpp
+%{_bindir}/x86_64-pc-mingw32-cpp
+%{_mandir}/man1/x86_64-pc-mingw32-cpp.1*
+%dir %{_libdir}/gcc/x86_64-pc-mingw32
+%dir %{_libdir}/gcc/x86_64-pc-mingw32/%{version}
+%{_libexecdir}/gcc/x86_64-pc-mingw32/%{version}/cc1
+
+
+%files c++
+%defattr(-,root,root)
+%{_bindir}/x86_64-pc-mingw32-g++
+%{_bindir}/x86_64-pc-mingw32-c++
+%{_mandir}/man1/x86_64-pc-mingw32-g++.1*
+%{_libdir}/gcc/x86_64-pc-mingw32/%{version}/include/c++/
+%{_libdir}/gcc/x86_64-pc-mingw32/%{version}/libstdc++.a
+%{_libdir}/gcc/x86_64-pc-mingw32/%{version}/libstdc++.la
+%{_libdir}/gcc/x86_64-pc-mingw32/%{version}/libsupc++.a
+%{_libdir}/gcc/x86_64-pc-mingw32/%{version}/libsupc++.la
+%{_libexecdir}/gcc/x86_64-pc-mingw32/%{version}/cc1plus
+%{_libexecdir}/gcc/x86_64-pc-mingw32/%{version}/collect2
+
+
+%changelog
+* Wed Feb 11 2009 Richard W.M. Jones <rjones@redhat.com> - 4.4.0-0.20090206.7
+- Started mingw64 development.
+
+* Mon Nov 24 2008 Richard W.M. Jones <rjones@redhat.com> - 4.3.2-12
+- Rebuild against latest filesystem package.
+
+* Fri Nov 21 2008 Richard W.M. Jones <rjones@redhat.com> - 4.3.2-11
+- Remove obsoletes for a long dead package.
+
+* Wed Nov 19 2008 Richard W.M. Jones <rjones@redhat.com> - 4.3.2-10
+- Rebuild against mingw32-filesystem 37
+
+* Wed Nov 19 2008 Richard W.M. Jones <rjones@redhat.com> - 4.3.2-9
+- Rebuild against mingw32-filesystem 36
+
+* Thu Oct 30 2008 Richard W.M. Jones <rjones@redhat.com> - 4.3.2-8
+- Don't BR mpfr-devel for RHEL/EPEL-5 (Levente Farkas).
+
+* Thu Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 4.3.2-7
+- Rename mingw -> mingw32.
+
+* Thu Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 4.3.2-6
+- Use RPM macros from mingw-filesystem.
+
+* Mon Jul  7 2008 Richard W.M. Jones <rjones@redhat.com> - 4.3.2-3
+- Initial RPM release, largely based on earlier work from several sources.
diff --git a/mingw64-headers/mingw-w64-headers-607.tar.gz b/mingw64-headers/mingw-w64-headers-607.tar.gz
new file mode 100644 (file)
index 0000000..40926ed
Binary files /dev/null and b/mingw64-headers/mingw-w64-headers-607.tar.gz differ
diff --git a/mingw64-headers/mingw64-headers.spec b/mingw64-headers/mingw64-headers.spec
new file mode 100644 (file)
index 0000000..c03cb2a
--- /dev/null
@@ -0,0 +1,109 @@
+# SVN repo: https://mingw-w64.svn.sourceforge.net/svnroot/mingw-w64
+# svn co https://....
+# tar zcf mingw-w64-headers-%{svn_revision}.tar.gz \
+#   mingw-w64/trunk/mingw-w64-headers
+%define svn_revision 607
+
+Name:           mingw64-headers
+Version:        0.1
+Release:        0.svn%{svn_revision}.10%{?dist}
+Summary:        Win32 header files and stubs
+
+License:        Public Domain and LGPLv2+
+Group:          Development/Libraries
+
+URL:            http://mingw-w64.sourceforge.net/
+Source0:        mingw-w64-headers-%{svn_revision}.tar.gz
+
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildArch:      noarch
+
+BuildRequires:  mingw64-filesystem >= 10
+
+Requires:       mingw64-filesystem >= 10
+
+
+%description
+MinGW Windows cross-compiler Win64 header files.
+
+
+%prep
+%setup -q -n mingw-w64
+
+find -name .svn | xargs rm -r
+find -name ChangeLog -delete
+
+# There are a few other odd *.c and *.dlg files amongst the
+# headers.  Should we delete them?  (XXX)
+
+
+%build
+# nothing
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+# This is different from mingw32.  By default GCC 4.4 searches for
+# headers in these two directories:
+#   /usr/x86_64-pc-mingw32/include
+#   /usr/x86_64-pc-mingw32/sys-root/mingw/include64  (symlink to ./include)
+
+mkdir -p $RPM_BUILD_ROOT%{_mingw64_includedir}
+
+cp -a trunk/mingw-w64-headers/include/* $RPM_BUILD_ROOT%{_mingw64_includedir}
+cp -a trunk/mingw-w64-headers/direct-x/include/* $RPM_BUILD_ROOT%{_mingw64_includedir}
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%files
+%defattr(-,root,root)
+%{_mingw64_includedir}/*
+
+
+%changelog
+* Wed Feb 11 2009 Richard W.M. Jones <rjones@redhat.com> - 0.1-0.svn607.10
+- Started mingw64 development.
+
+* Mon Dec 15 2008 Richard W.M. Jones <rjones@redhat.com> - 3.13-1
+- New upstream version 3.13.
+
+* Tue Dec  9 2008 Richard W.M. Jones <rjones@redhat.com> - 3.12-8
+- Force rebuild to get rid of the binary bootstrap package and replace
+  with package built from source.
+
+* Wed Nov 26 2008 Richard W.M. Jones <rjones@redhat.com> - 3.12-7
+- No runtime dependency on binutils or gcc.
+
+* Mon Nov 24 2008 Richard W.M. Jones <rjones@redhat.com> - 3.12-6
+- Rebuild against latest filesystem package.
+- Rewrite the summary for accuracy and brevity.
+
+* Fri Nov 21 2008 Richard W.M. Jones <rjones@redhat.com> - 3.12-4
+- Remove obsoletes for a long dead package.
+- Enable _mingw32_configure (Levente Farkas).
+
+* Wed Nov 19 2008 Richard W.M. Jones <rjones@redhat.com> - 3.12-3
+- Rebuild against mingw32-filesystem 37
+
+* Wed Nov 19 2008 Richard W.M. Jones <rjones@redhat.com> - 3.12-2
+- Rebuild against mingw32-filesystem 36
+
+* Thu Oct 16 2008 Richard W.M. Jones <rjones@redhat.com> - 3.12-1
+- New upstream version 3.12.
+
+* Wed Sep 24 2008 Richard W.M. Jones <rjones@redhat.com> - 3.11-7
+- Rename mingw -> mingw32.
+
+* Wed Sep 10 2008 Richard W.M. Jones <rjones@redhat.com> - 3.11-6
+- Moved ole provides to mingw-filesystem package.
+
+* Thu Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 3.11-3
+- Use the RPM macros from mingw-filesystem.
+
+* Mon Jul  7 2008 Richard W.M. Jones <rjones@redhat.com> - 3.11-2
+- Initial RPM release, largely based on earlier work from several sources.
diff --git a/mingw64-runtime/mingw-w64-crt-607.tar.gz b/mingw64-runtime/mingw-w64-crt-607.tar.gz
new file mode 100644 (file)
index 0000000..5377c03
Binary files /dev/null and b/mingw64-runtime/mingw-w64-crt-607.tar.gz differ
diff --git a/mingw64-runtime/mingw64-runtime.spec b/mingw64-runtime/mingw64-runtime.spec
new file mode 100644 (file)
index 0000000..fcab2df
--- /dev/null
@@ -0,0 +1,127 @@
+%define __strip %{_mingw64_strip}
+%define __objdump %{_mingw64_objdump}
+%define _use_internal_dependency_generator 0
+%define __find_requires %{_mingw64_findrequires}
+%define __find_provides %{_mingw64_findprovides}
+
+# SVN repo: https://mingw-w64.svn.sourceforge.net/svnroot/mingw-w64
+# svn co https://....
+# tar zcf mingw-w64-headers-%{svn_revision}.tar.gz \
+#   mingw-w64/trunk/mingw-w64-headers
+%define svn_revision 607
+
+Name:           mingw64-runtime
+Version:        0.1
+Release:        0.svn%{svn_revision}.3%{?dist}
+Summary:        MinGW Windows cross-compiler runtime
+
+License:        Public Domain
+Group:          Development/Libraries
+URL:            http://mingw-w64.sourceforge.net/
+Source0:        mingw-w64-crt-%{svn_revision}.tar.gz
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildArch:      noarch
+
+BuildRequires:  mingw64-filesystem >= 10
+BuildRequires:  mingw64-binutils
+BuildRequires:  mingw64-headers
+BuildRequires:  mingw64-gcc-bootstrap
+
+
+%description
+MinGW Windows cross-compiler runtime, base libraries.
+
+
+%prep
+%setup -q -n mingw-w64
+
+
+%build
+pushd trunk/mingw-w64-crt
+%{_mingw64_configure} --with-sysroot=%{_mingw64_sysroot}
+make %{?_smp_mflags}
+popd
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+pushd trunk/mingw-w64-crt
+make DESTDIR=$RPM_BUILD_ROOT install
+popd
+
+# The above installs in /usr/x86_64-pc-mingw32/sys-root/x86_64-pc-mingw32/lib
+# which is the wrong location.  Move it to %{_mingw64_libdir}.
+mv $RPM_BUILD_ROOT%{_mingw64_sysroot}/%{_mingw64_target}/lib \
+  $RPM_BUILD_ROOT%{_mingw64_libdir}
+
+# However GCC when building looks in /usr/x86_64-pc-mingw32/lib for
+# libraries.  Make symlinks so that this works.
+# XXX Hack - why is this needed?
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{_mingw64_target}/lib
+pushd $RPM_BUILD_ROOT%{_prefix}/%{_mingw64_target}/lib
+for f in ../sys-root/lib/*.[ao]; do
+  ln -s $f
+done
+popd
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%files
+%defattr(-,root,root)
+%{_mingw64_libdir}/*
+%{_prefix}/%{_mingw64_target}/lib/*
+
+
+%changelog
+* Wed Feb 11 2009 Richard W.M. Jones <rjones@redhat.com> - 0.1-0.svn607.3
+- Started mingw64 development.
+
+* Tue Feb 10 2009 Richard W.M. Jones <rjones@redhat.com> - 3.15.2-1
+- New upstream release 3.15.2.
+
+* Tue Dec  9 2008 Richard W.M. Jones <rjones@redhat.com> - 3.15.1-10
+- Force rebuild to get rid of the binary bootstrap package and replace
+  with package built from source.
+
+* Wed Nov 26 2008 Richard W.M. Jones <rjones@redhat.com> - 3.15.1-9
+- No runtime dependency on binutils or gcc.
+- But it DOES BR w32api.
+
+* Mon Nov 24 2008 Richard W.M. Jones <rjones@redhat.com> - 3.15.1-8
+- Rebuild against latest filesystem package.
+- MINGW_CFLAGS -> MINGW32_CFLAGS.
+- Rewrite the summary for accuracy and brevity.
+
+* Fri Nov 21 2008 Richard W.M. Jones <rjones@redhat.com> - 3.15.1-6
+- Remove obsoletes for a long dead package.
+- Reenable (and fix) _mingw32_configure (Levente Farkas).
+
+* Thu Nov 20 2008 Richard W.M. Jones <rjones@redhat.com> - 3.15.1-5
+- Don't use _mingw32_configure macro - doesn't work here.
+
+* Wed Nov 19 2008 Richard W.M. Jones <rjones@redhat.com> - 3.15.1-4
+- Rebuild against mingw32-filesystem 37
+
+* Wed Nov 19 2008 Richard W.M. Jones <rjones@redhat.com> - 3.15.1-3
+- Remove the useconds patch, which is no longer needed (Levente Farkas).
+- Use _mingw32_configure macro.
+
+* Wed Nov 19 2008 Richard W.M. Jones <rjones@redhat.com> - 3.15.1-2
+- Rebuild against mingw32-filesystem 36
+
+* Thu Oct 16 2008 Richard W.M. Jones <rjones@redhat.com> - 3.15.1-1
+- New upstream version 3.15.1.
+
+* Wed Sep 24 2008 Richard W.M. Jones <rjones@redhat.com> - 3.14-6
+- Rename mingw -> mingw32.
+
+* Thu Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 3.14-4
+- Use RPM macros from mingw-filesystem.
+
+* Mon Jul  7 2008 Richard W.M. Jones <rjones@redhat.com> - 3.14-2
+- Initial RPM release, largely based on earlier work from several sources.
index 5d78d00..5d299f6 100644 (file)
@@ -2,8 +2,8 @@
 %define _default_patch_fuzz 2
 
 Name:           mingw32-nsis
-Version:        2.39
-Release:        5%{?dist}
+Version:        2.43
+Release:        1%{?dist}
 Summary:        Nullsoft Scriptable Install System
 
 License:        zlib and CPL
@@ -13,30 +13,19 @@ Source0:        http://dl.sourceforge.net/sourceforge/nsis/nsis-%{version}-src.t
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 # Patches from Debian (mainly by Paul Wise).
-Patch0:         nsis-2.39-debian-64bit-fixes.patch
-Patch1:         nsis-2.39-debian-debug-opt.patch
+Patch0:         nsis-2.42-debian-64bit-fixes.patch
+Patch1:         nsis-2.43-debian-debug-opt.patch
 
-# This patch is required for NSIS to find the correct cross-compiler.
-Patch100:       nsis-2.39-mingw32-search.patch
-
-BuildRequires:  mingw32-filesystem >= 20
+BuildRequires:  mingw32-filesystem >= 40
 BuildRequires:  mingw32-gcc
 BuildRequires:  mingw32-gcc-c++
 BuildRequires:  mingw32-binutils
 BuildRequires:  python
-BuildRequires:  scons >= 0.96.93
-
-# We build with 'gcc -m32' and that fails on 64 bit platforms when we
-# include <gnu/stubs.h>.  On x86-64, this is provided by
-# glibc-devel.i386.  Depend on the file explicitly, since only recent
-# versions of RPM let you require a package by architecture.
-BuildRequires:  /usr/include/gnu/stubs-32.h
-
-# We really need the 32 bit version of this library.  The 64 bit
-# version will definitely not work.  XXX Need to do the right thing on
-# non-x86 architectures.
-BuildRequires:  /usr/lib/libwx_baseu-2.8.so
+BuildRequires:  scons
+BuildRequires:  wxGTK-devel
 
+# since nsis a 32 bit only apps
+ExclusiveArch:  i386 ppc
 
 %description
 NSIS, the Nullsoft Scriptable Install System, is a script-driven
@@ -51,10 +40,8 @@ assembler code.
 %prep
 %setup -q -n nsis-%{version}-src
 
-%patch0 -p1
-%patch1 -p1
-
-%patch100 -p1
+%patch0 -p1 -b .64bit
+%patch1 -p1 -b .debug
 
 
 %build
@@ -76,14 +63,21 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(-,root,root)
-%{_bindir}/*
-%config(noreplace) %{_sysconfdir}/nsisconf.nsh
-%{_includedir}/nsis
 %doc %{_docdir}/%{name}-%{version}
+%config(noreplace) %{_sysconfdir}/nsisconf.nsh
+%{_bindir}/*
+#{_includedir}/nsis
 %{_datadir}/nsis
 
 
 %changelog
+* Fri Feb 13 2009 Levente Farkas <lfarkas@lfarkas.org> - 2.43-1
+- update to the latest upstream
+
+* Wed Jan 14 2009 Levente Farkas <lfarkas@lfarkas.org> - 2.42-1
+- update to the latest upstream
+- a few small changes
+
 * Fri Oct 17 2008 Richard W.M. Jones <rjones@redhat.com> - 2.39-5
 - Fix the Summary line.
 
diff --git a/nsis/nsis-2.19-debian-64bit-fixes.patch b/nsis/nsis-2.19-debian-64bit-fixes.patch
deleted file mode 100644 (file)
index 83e7721..0000000
+++ /dev/null
@@ -1,218 +0,0 @@
-01_64bit_fixes.patch
-Andreas Jochens <aj@andaco.de>, Andreas Barth <aba@not.so.argh.org>,
-Steve Langasek <vorlon@debian.org>, Paul Wise <pabs@debian.org>
-Fix some issues with building and running makensis on 64-bit platforms
-Index: Source/DialogTemplate.cpp
-===================================================================
---- Source/DialogTemplate.cpp.orig     2007-01-30 09:03:35.000000000 +0100
-+++ Source/DialogTemplate.cpp  2007-01-30 09:03:56.000000000 +0100
-@@ -93,7 +93,7 @@
-     if (IS_INTRESOURCE(x)) { \\r
-       *(WORD*)seeker = 0xFFFF; \\r
-       seeker += sizeof(WORD); \\r
--      *(WORD*)seeker = ConvertEndianness(WORD(DWORD(x))); \\r
-+      *(WORD*)seeker = ConvertEndianness(WORD(long(x))); \\r
-       seeker += sizeof(WORD); \\r
-     } \\r
-     else { \\r
-@@ -629,7 +629,7 @@
-     }\r
-   }\r
\r
--  assert((DWORD) seeker - (DWORD) pbDlg == dwSize);\r
-+  assert((long) seeker - (long) pbDlg == dwSize);\r
\r
-   // DONE!\r
-   return pbDlg;\r
-Index: Source/Platform.h
-===================================================================
---- Source/Platform.h.orig     2007-01-30 09:03:35.000000000 +0100
-+++ Source/Platform.h  2007-01-30 09:05:35.000000000 +0100
-@@ -135,7 +135,7 @@
- #    define MAKEINTRESOURCE(i) (LPSTR)((DWORD)((WORD)(i)))\r
- #  endif\r
- #  ifndef IMAGE_FIRST_SECTION\r
--#    define IMAGE_FIRST_SECTION(h) ( PIMAGE_SECTION_HEADER( (DWORD) h + \\r
-+#    define IMAGE_FIRST_SECTION(h) ( PIMAGE_SECTION_HEADER( (long) h + \\r
-                                      FIELD_OFFSET(IMAGE_NT_HEADERS, OptionalHeader) + \\r
-                                      FIX_ENDIAN_INT16(PIMAGE_NT_HEADERS(h)->FileHeader.SizeOfOptionalHeader) ) )\r
- #  endif\r
-@@ -147,7 +147,7 @@
- #  endif\r
- #endif\r
- #ifndef IS_INTRESOURCE\r
--#  define IS_INTRESOURCE(_r) (((ULONG_PTR)(_r) >> 16) == 0)\r
-+#  define IS_INTRESOURCE(_r) (((unsigned long)(_r) >> 16) == 0)\r
- #endif\r
\r
- // functions\r
-@@ -666,7 +666,7 @@
-   WORD e_oemid;\r
-   WORD e_oeminfo;\r
-   WORD e_res2[10];\r
--  LONG e_lfanew;\r
-+  DWORD e_lfanew;\r
- } IMAGE_DOS_HEADER,*PIMAGE_DOS_HEADER;\r
- #  pragma pack()\r
- #  pragma pack(4)\r
-Index: Source/ResourceEditor.cpp
-===================================================================
---- Source/ResourceEditor.cpp.orig     2007-01-30 09:03:35.000000000 +0100
-+++ Source/ResourceEditor.cpp  2007-01-30 09:03:56.000000000 +0100
-@@ -545,7 +545,7 @@
-     rdDir.NumberOfIdEntries = ConvertEndianness(rdDir.NumberOfIdEntries);\r
\r
-     CopyMemory(seeker, &rdDir, sizeof(IMAGE_RESOURCE_DIRECTORY));\r
--    crd->m_dwWrittenAt = DWORD(seeker);\r
-+    crd->m_dwWrittenAt = long(seeker);\r
-     seeker += sizeof(IMAGE_RESOURCE_DIRECTORY);\r
\r
-     for (int i = 0; i < crd->CountEntries(); i++) {\r
-@@ -566,7 +566,7 @@
-       rDirE.NameString.NameIsString = (crd->GetEntry(i)->HasName()) ? 1 : 0;\r
\r
-       CopyMemory(seeker, &rDirE, sizeof(MY_IMAGE_RESOURCE_DIRECTORY_ENTRY));\r
--      crd->GetEntry(i)->m_dwWrittenAt = DWORD(seeker);\r
-+      crd->GetEntry(i)->m_dwWrittenAt = long(seeker);\r
-       seeker += sizeof(MY_IMAGE_RESOURCE_DIRECTORY_ENTRY);\r
-     }\r
-     qDirs.pop();\r
-@@ -582,7 +582,7 @@
-     rDataE.Size = ConvertEndianness(cRDataE->GetSize());\r
\r
-     CopyMemory(seeker, &rDataE, sizeof(IMAGE_RESOURCE_DATA_ENTRY));\r
--    cRDataE->m_dwWrittenAt = DWORD(seeker);\r
-+    cRDataE->m_dwWrittenAt = long(seeker);\r
-     seeker += sizeof(IMAGE_RESOURCE_DATA_ENTRY);\r
\r
-     qDataEntries.pop();\r
-@@ -594,7 +594,7 @@
-   while (!qStrings.empty()) {\r
-     CResourceDirectoryEntry* cRDirE = qStrings.front();\r
\r
--    PMY_IMAGE_RESOURCE_DIRECTORY_ENTRY(cRDirE->m_dwWrittenAt)->NameString.NameOffset = ConvertEndianness(DWORD(seeker) - DWORD(pbRsrcSec));\r
-+    PMY_IMAGE_RESOURCE_DIRECTORY_ENTRY(cRDirE->m_dwWrittenAt)->NameString.NameOffset = ConvertEndianness(long(seeker) - long(pbRsrcSec));\r
\r
-     char* szName = cRDirE->GetName();\r
-     WORD iLen = strlen(szName) + 1;\r
-@@ -636,7 +636,7 @@
-   /*\r
-    * Set all of the directory entries offsets.\r
-    */\r
--  SetOffsets(m_cResDir, DWORD(pbRsrcSec));\r
-+  SetOffsets(m_cResDir, long(pbRsrcSec));\r
- }\r
\r
- // Sets the offsets in directory entries\r
-@@ -758,7 +758,7 @@
- // Returns -1 if can not be found\r
- int CResourceDirectory::Find(char* szName) {\r
-   if (IS_INTRESOURCE(szName))\r
--    return Find((WORD) (DWORD) szName);\r
-+    return Find((WORD) (long) szName);\r
-   else\r
-     if (szName[0] == '#')\r
-       return Find(WORD(atoi(szName + 1)));\r
-@@ -836,7 +836,7 @@
-   if (IS_INTRESOURCE(szName)) {\r
-     m_bHasName = false;\r
-     m_szName = 0;\r
--    m_wId = (WORD) (DWORD) szName;\r
-+    m_wId = (WORD) (long) szName;\r
-   }\r
-   else {\r
-     m_bHasName = true;\r
-@@ -851,7 +851,7 @@
-   if (IS_INTRESOURCE(szName)) {\r
-     m_bHasName = false;\r
-     m_szName = 0;\r
--    m_wId = (WORD) (DWORD) szName;\r
-+    m_wId = (WORD) (long) szName;\r
-   }\r
-   else {\r
-     m_bHasName = true;\r
-Index: Source/util.cpp
-===================================================================
---- Source/util.cpp.orig       2007-01-30 09:03:35.000000000 +0100
-+++ Source/util.cpp    2007-01-30 09:07:54.000000000 +0100
-@@ -57,9 +57,9 @@
-   }\r
\r
-   if (width != 0) {\r
--    LONG biWidth;\r
-+    DWORD biWidth;\r
-     fseek(f, 18, SEEK_SET); // Seek to the width member of the header\r
--    fread(&biWidth, sizeof(LONG), 1, f);\r
-+    fread(&biWidth, sizeof(DWORD), 1, f);\r
-     FIX_ENDIAN_INT32_INPLACE(biWidth);\r
-     if (width != biWidth) {\r
-       fclose(f);\r
-@@ -68,12 +68,12 @@
-   }\r
\r
-   if (height != 0) {\r
--    LONG biHeight;\r
-+    DWORD biHeight;\r
-     fseek(f, 22, SEEK_SET); // Seek to the height member of the header\r
--    fread(&biHeight, sizeof(LONG), 1, f);\r
-+    fread(&biHeight, sizeof(DWORD), 1, f);\r
-     FIX_ENDIAN_INT32_INPLACE(biHeight);\r
-     // Bitmap height can be negative too...\r
--    if (height != abs(biHeight)) {\r
-+    if (height != abs((long int)biHeight)) {\r
-       fclose(f);\r
-       return -3;\r
-     }\r
-@@ -312,7 +312,7 @@
-   FIX_ENDIAN_INT32_INPLACE(rdEntry.OffsetToData);\r
-   MY_ASSERT(!rdEntry.DirectoryOffset.DataIsDirectory, "bad resource directory");\r
\r
--  PRESOURCE_DIRECTORY rdIcons = PRESOURCE_DIRECTORY(rdEntry.DirectoryOffset.OffsetToDirectory + DWORD(rdRoot));\r
-+  PRESOURCE_DIRECTORY rdIcons = PRESOURCE_DIRECTORY(rdEntry.DirectoryOffset.OffsetToDirectory + long(rdRoot));\r
\r
-   MY_ASSERT((size_t)rdIcons - (size_t)exeHeader > exeHeaderSize, "corrupted EXE - invalid pointer");\r
\r
-@@ -325,7 +325,7 @@
-     FIX_ENDIAN_INT32_INPLACE(icoEntry.OffsetToData);\r
\r
-     MY_ASSERT(!icoEntry.DirectoryOffset.DataIsDirectory, "bad resource directory");\r
--    PRESOURCE_DIRECTORY rd = PRESOURCE_DIRECTORY(icoEntry.DirectoryOffset.OffsetToDirectory + DWORD(rdRoot));\r
-+    PRESOURCE_DIRECTORY rd = PRESOURCE_DIRECTORY(icoEntry.DirectoryOffset.OffsetToDirectory + long(rdRoot));\r
-     \r
-     MY_ASSERT((size_t)rd - (size_t)exeHeader > exeHeaderSize, "corrupted EXE - invalid pointer");\r
\r
-@@ -334,7 +334,7 @@
\r
-     MY_ASSERT(datEntry.DirectoryOffset.DataIsDirectory, "bad resource directory");\r
-     \r
--    PIMAGE_RESOURCE_DATA_ENTRY rde = PIMAGE_RESOURCE_DATA_ENTRY(datEntry.OffsetToData + DWORD(rdRoot));\r
-+    PIMAGE_RESOURCE_DATA_ENTRY rde = PIMAGE_RESOURCE_DATA_ENTRY(datEntry.OffsetToData + long(rdRoot));\r
\r
-     MY_ASSERT((size_t)rde - (size_t)exeHeader > exeHeaderSize, "corrupted EXE - invalid pointer");\r
\r
-@@ -355,10 +355,10 @@
-     }\r
\r
-     // Set offset\r
--    DWORD dwOffset = FIX_ENDIAN_INT32(rde->OffsetToData) + DWORD(rdRoot) - dwResourceSectionVA - DWORD(exeHeader);\r
-+    DWORD dwOffset = FIX_ENDIAN_INT32(rde->OffsetToData) + long(rdRoot) - dwResourceSectionVA - long(exeHeader);\r
-     *(LPDWORD) seeker = FIX_ENDIAN_INT32(dwOffset);\r
\r
--    MY_ASSERT(dwOffset > exeHeaderSize || dwOffset < (DWORD)rdRoot - (DWORD)exeHeader, "invalid data offset - icon resource probably compressed");\r
-+    MY_ASSERT(dwOffset > exeHeaderSize || dwOffset < (long)rdRoot - (long)exeHeader, "invalid data offset - icon resource probably compressed");\r
-   }\r
\r
-   LPBYTE seeker = uninstIconData;\r
-Index: Source/Plugins.cpp
-===================================================================
---- Source/Plugins.cpp.orig    2007-01-30 09:05:50.000000000 +0100
-+++ Source/Plugins.cpp 2007-01-30 09:07:05.000000000 +0100
-@@ -120,7 +120,7 @@
-         DWORD prd = FIX_ENDIAN_INT32(sections[i].PointerToRawData);\r
-         PIMAGE_EXPORT_DIRECTORY exports = PIMAGE_EXPORT_DIRECTORY(&dlldata[0] + prd + ExportDirVA - va);\r
-         DWORD na = FIX_ENDIAN_INT32(exports->AddressOfNames);\r
--        unsigned long *names = (unsigned long*)((unsigned long) exports + (char *) na - ExportDirVA);\r
-+        unsigned int *names = (unsigned int*)((unsigned long) exports + (char *) na - ExportDirVA);\r
-         for (unsigned long j = 0; j < FIX_ENDIAN_INT32(exports->NumberOfNames); j++)\r
-         {\r
-           const string name = string((char*)exports + FIX_ENDIAN_INT32(names[j]) - ExportDirVA);\r
diff --git a/nsis/nsis-2.19-debian-debug-opt.patch b/nsis/nsis-2.19-debian-debug-opt.patch
deleted file mode 100644 (file)
index f7e5ef8..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-02_debug_symbols.patch
-Paul Wise <pabs@debian.org>
-Add an option to generate debugging symbols
-without side-effects on optimisation flags
-and an option to enable/disable optimisation
-Index: SCons/Config/gnu
-===================================================================
---- SCons/Config/gnu.orig      2007-02-02 20:34:33.000000000 +1100
-+++ SCons/Config/gnu   2007-02-08 15:33:51.000000000 +1100
-@@ -81,13 +81,16 @@
\r
- makensis_env = defenv.Copy()\r
\r
--if not defenv['DEBUG']:\r
--      makensis_env.Append(CCFLAGS = '-O2')            # optimize\r
-+if defenv['DEBUG_SYMBOLS']:\r
-+      makensis_env.Append(CCFLAGS = '-g')            # debugging\r
-+      makensis_env.Append(LINKFLAGS = '-g')            # debugging\r
-+if not defenv['DEBUG'] and defenv['OPT']:\r
-+              makensis_env.Append(CCFLAGS = '-O2')            # optimize\r
- makensis_env.Append(CCFLAGS = '-Wall')            # all warnings\r
\r
- conf = FlagsConfigure(makensis_env)\r
- conf.CheckLinkFlag('$MAP_FLAG')                   # generate map file\r
--if not defenv['DEBUG']:\r
-+if not defenv['DEBUG'] and not defenv['DEBUG_SYMBOLS']:\r
-       TestStrip(conf)                                 # strip\r
- conf.Finish()\r
\r
-@@ -110,13 +113,16 @@
\r
- cp_util_env = defenv.Copy()\r
\r
--if not defenv['DEBUG']:\r
-+if defenv['DEBUG_SYMBOLS']:\r
-+      cp_util_env.Append(CCFLAGS = '-g')            # debugging\r
-+      cp_util_env.Append(LINKFLAGS = '-g')            # debugging\r
-+if not defenv['DEBUG'] and defenv['OPT']:\r
-       cp_util_env.Append(CCFLAGS = '-O2')             # optimize\r
- cp_util_env.Append(CCFLAGS = '-Wall')             # all warnings\r
\r
- conf = FlagsConfigure(cp_util_env)\r
- conf.CheckLinkFlag('$MAP_FLAG')                   # generate map file\r
--if not defenv['DEBUG']:\r
-+if not defenv['DEBUG'] and not defenv['DEBUG_SYMBOLS']:\r
-       TestStrip(conf)                                 # strip\r
- conf.Finish()\r
\r
-@@ -131,6 +137,9 @@
- ### test environment\r
\r
- test_env = defenv.Copy()\r
-+if defenv['DEBUG_SYMBOLS']:\r
-+      test_env.Append(LINKFLAGS = '-g')            # debugging\r
-+      test_env.Append(CCFLAGS = '-g')            # debugging\r
\r
- ### weird GCC requirements\r
\r
-Index: SConstruct
-===================================================================
---- SConstruct.orig    2007-02-02 20:34:33.000000000 +1100
-+++ SConstruct 2007-02-08 15:48:40.000000000 +1100
-@@ -127,6 +127,8 @@
- opts.Add(PathOption('LIBPATH', 'Path to search for libraries', None))\r
- # build options\r
- opts.Add(BoolOption('DEBUG', 'Build executables with debugging information', 'no'))\r
-+opts.Add(BoolOption('DEBUG_SYMBOLS', 'Build with debugging information, but none of the side effects of DEBUG', 'no'))\r
-+opts.Add(BoolOption('OPT', 'Build with optimization', 'yes'))\r
- opts.Add(PathOption('CODESIGNER', 'A program used to sign executables', None))\r
- # path related build options\r
- opts.Add(('PREFIX_DEST', 'Intermediate installation prefix (extra install time prefix)', dirs['dest']))\r
diff --git a/nsis/nsis-2.39-debian-debug-opt.patch b/nsis/nsis-2.39-debian-debug-opt.patch
deleted file mode 100644 (file)
index fa112ac..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-diff -ur nsis-2.39-src.orig/SCons/Config/gnu nsis-2.39-src.debopt/SCons/Config/gnu
---- nsis-2.39-src.orig/SCons/Config/gnu        2008-03-03 16:33:56.000000000 +0000
-+++ nsis-2.39-src.debopt/SCons/Config/gnu      2008-09-22 12:53:18.000000000 +0100
-@@ -61,8 +61,11 @@
- stub_env = defenv.Clone()
- cross_env(stub_env)
--if not defenv['DEBUG']:
--      stub_env.Append(CCFLAGS = '-Os')                # optimize for size
-+if not defenv['DEBUG_SYMBOLS']:
-+      stub_env.Append(CCFLAGS = '-g')            # debugging
-+      stub_env.Append(LINKFLAGS = '-g')            # debugging
-+if not defenv['DEBUG'] and defenv['OPT']:
-+      stub_env.Append(CCFLAGS = '-O2')            # optimize
- stub_env.Append(CCFLAGS = '-Wall')                # all warnings
- stub_env.Append(CCFLAGS = '-x c')                 # force compile as c
- stub_env.Append(CCFLAGS = '-fno-strict-aliasing') # not safe for strict aliasing
-@@ -88,7 +91,7 @@
- conf.CheckCompileFlag('-m32')                     #
- conf.CheckLinkFlag('-m32')                        #
- conf.CheckLinkFlag('$MAP_FLAG')                   # generate map file
--if not defenv['DEBUG'] and defenv['STRIP'] and defenv['STRIP_CP']:
-+if not defenv['DEBUG'] and not defenv['DEBUG_SYMBOLS'] and defenv['STRIP'] and defenv['STRIP_CP']:
-       TestStrip(conf)                                 # strip
- conf.Finish()
-@@ -112,7 +115,10 @@
- cp_util_env = defenv.Clone()
--if not defenv['DEBUG']:
-+if defenv['DEBUG_SYMBOLS']:
-+      cp_util_env.Append(CCFLAGS = '-g')            # debugging
-+      cp_util_env.Append(LINKFLAGS = '-g')            # debugging
-+if not defenv['DEBUG'] and defenv['OPT']:
-       cp_util_env.Append(CCFLAGS = '-O2')             # optimize
- cp_util_env.Append(CCFLAGS = '-Wall')             # all warnings
- cp_util_env.Append(CCFLAGS = '-fno-strict-aliasing') # not safe for strict aliasing
-@@ -146,6 +152,10 @@
- ### test environment
- test_env = defenv.Clone()
-+if defenv['DEBUG_SYMBOLS']:
-+      test_env.Append(LINKFLAGS = '-g')            # debugging
-+      test_env.Append(CCFLAGS = '-g')            # debugging
-+
- conf = FlagsConfigure(test_env)
- conf.CheckCompileFlag('-m32')
- conf.CheckLinkFlag('-m32')
-diff -ur nsis-2.39-src.orig/SConstruct nsis-2.39-src.debopt/SConstruct
---- nsis-2.39-src.orig/SConstruct      2008-05-04 09:30:07.000000000 +0100
-+++ nsis-2.39-src.debopt/SConstruct    2008-09-22 12:55:55.000000000 +0100
-@@ -168,6 +168,8 @@
- opts.Add(('APPEND_LINKFLAGS', 'Additional linker flags'))\r
- # build options\r
- opts.Add(BoolOption('DEBUG', 'Build executables with debugging information', 'no'))\r
-+opts.Add(BoolOption('DEBUG_SYMBOLS', 'Build with debugging information, but none of the side effects of DEBUG', 'no'))\r
-+opts.Add(BoolOption('OPT', 'Build with optimization', 'yes'))\r
- opts.Add(PathOption('CODESIGNER', 'A program used to sign executables', None))\r
- opts.Add(BoolOption('STRIP', 'Strips executables of any unrequired data such as symbols', 'yes'))\r
- opts.Add(BoolOption('STRIP_CP', 'Strips cross-platform executables of any unrequired data such as symbols', 'yes'))\r
diff --git a/nsis/nsis-2.39-mingw32-search.patch b/nsis/nsis-2.39-mingw32-search.patch
deleted file mode 100644 (file)
index 83d5cc2..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
---- nsis-2.39-src/SCons/Tools/crossmingw.py.orig       2008-09-05 13:58:14.000000000 +0100
-+++ nsis-2.39-src/SCons/Tools/crossmingw.py    2008-09-05 13:58:32.000000000 +0100
-@@ -44,6 +44,7 @@
- # This is what we search for to find mingw:
- prefixes = SCons.Util.Split("""
-+    i686-pc-mingw32-
-     mingw32-
-     mingw32msvc-
-     i386-mingw32-
similarity index 75%
rename from nsis/nsis-2.39-debian-64bit-fixes.patch
rename to nsis/nsis-2.42-debian-64bit-fixes.patch
index 936c80d..b46f7e8 100644 (file)
@@ -1,81 +1,5 @@
-diff -ur nsis-2.34-src/SCons/Config/gnu nsis-2.34-src-64bit-fixes/SCons/Config/gnu
---- nsis-2.34-src/SCons/Config/gnu     2007-11-14 07:20:44.000000000 +0100
-+++ nsis-2.34-src-64bit-fixes/SCons/Config/gnu 2008-01-13 22:15:21.000000000 +0100
-@@ -85,8 +85,6 @@
- makensis_env.Append(CXXFLAGS = '-Wno-non-virtual-dtor') # ignore virtual dtor warnings
- conf = FlagsConfigure(makensis_env)
--conf.CheckCompileFlag('-m32')                     #
--conf.CheckLinkFlag('-m32')                        #
- conf.CheckLinkFlag('$MAP_FLAG')                   # generate map file
- if not defenv['DEBUG'] and defenv['STRIP'] and defenv['STRIP_CP']:
-       TestStrip(conf)                                 # strip
-diff -ur nsis-2.34-src/Source/DialogTemplate.cpp nsis-2.34-src-64bit-fixes/Source/DialogTemplate.cpp
---- nsis-2.34-src/Source/DialogTemplate.cpp    2007-11-30 10:54:13.000000000 +0100
-+++ nsis-2.34-src-64bit-fixes/Source/DialogTemplate.cpp        2008-01-13 19:01:02.000000000 +0100
-@@ -74,7 +74,7 @@
-     if (IS_INTRESOURCE(x)) { \
-       *(WORD*)seeker = 0xFFFF; \
-       seeker += sizeof(WORD); \
--      *(WORD*)seeker = ConvertEndianness(WORD(DWORD(x))); \
-+      *(WORD*)seeker = ConvertEndianness(WORD(long(x))); \
-       seeker += sizeof(WORD); \
-     } \
-     else { \
-@@ -622,7 +622,7 @@
-     }
-   }
--  assert((DWORD) seeker - (DWORD) pbDlg == dwSize);
-+  assert((long) seeker - (long) pbDlg == dwSize);
-   // DONE!
-   return pbDlg;
-diff -ur nsis-2.34-src/Source/mmap.cpp nsis-2.34-src-64bit-fixes/Source/mmap.cpp
---- nsis-2.34-src/Source/mmap.cpp      2007-12-22 10:41:57.000000000 +0100
-+++ nsis-2.34-src-64bit-fixes/Source/mmap.cpp  2008-01-13 19:01:59.000000000 +0100
-@@ -324,7 +324,7 @@
-   if (!pView)
-     return;
--  unsigned int alignment = ((unsigned int)pView) % m_iAllocationGranularity;
-+  unsigned int alignment = ((unsigned long)pView) % m_iAllocationGranularity;
-   pView = (char *)pView - alignment;
-   size += alignment;
- #ifdef _WIN32
-diff -ur nsis-2.34-src/Source/Platform.h nsis-2.34-src-64bit-fixes/Source/Platform.h
---- nsis-2.34-src/Source/Platform.h    2007-12-22 10:41:57.000000000 +0100
-+++ nsis-2.34-src-64bit-fixes/Source/Platform.h        2008-01-13 19:36:04.000000000 +0100
-@@ -185,7 +185,7 @@
- #    define MAKEINTRESOURCE MAKEINTRESOURCEA
- #  endif
- #  ifndef IMAGE_FIRST_SECTION
--#    define IMAGE_FIRST_SECTION(h) ( PIMAGE_SECTION_HEADER( (DWORD) h + \
-+#    define IMAGE_FIRST_SECTION(h) ( PIMAGE_SECTION_HEADER( (long) h + \
-                                      FIELD_OFFSET(IMAGE_NT_HEADERS, OptionalHeader) + \
-                                      FIX_ENDIAN_INT16(PIMAGE_NT_HEADERS(h)->FileHeader.SizeOfOptionalHeader) ) )
- #  endif
-@@ -217,7 +217,7 @@
- #endif
- #ifndef ULONG_PTR
--#  define ULONG_PTR DWORD
-+#  define ULONG_PTR ULONG
- #endif
- #ifndef IDC_HAND
-@@ -722,7 +722,7 @@
-   WORD e_oemid;
-   WORD e_oeminfo;
-   WORD e_res2[10];
--  LONG e_lfanew;
-+  DWORD e_lfanew;
- } IMAGE_DOS_HEADER,*PIMAGE_DOS_HEADER;
- #  pragma pack()
- #  pragma pack(4)
-diff -ur nsis-2.34-src/Source/Plugins.cpp nsis-2.34-src-64bit-fixes/Source/Plugins.cpp
---- nsis-2.34-src/Source/Plugins.cpp   2007-12-22 10:41:57.000000000 +0100
-+++ nsis-2.34-src-64bit-fixes/Source/Plugins.cpp       2008-01-13 19:01:59.000000000 +0100
+--- ./Source/Plugins.cpp.lfarkas       2009-01-14 17:03:11.000000000 +0100
++++ ./Source/Plugins.cpp       2009-01-14 17:03:58.000000000 +0100
 @@ -136,7 +136,7 @@
          DWORD prd = FIX_ENDIAN_INT32(sections[i].PointerToRawData);
          PIMAGE_EXPORT_DIRECTORY exports = PIMAGE_EXPORT_DIRECTORY(&dlldata[0] + prd + ExportDirVA - va);
@@ -85,9 +9,8 @@ diff -ur nsis-2.34-src/Source/Plugins.cpp nsis-2.34-src-64bit-fixes/Source/Plugi
          for (unsigned long j = 0; j < FIX_ENDIAN_INT32(exports->NumberOfNames); j++)
          {
            const string name = string((char*)exports + FIX_ENDIAN_INT32(names[j]) - ExportDirVA);
-diff -ur nsis-2.34-src/Source/ResourceEditor.cpp nsis-2.34-src-64bit-fixes/Source/ResourceEditor.cpp
---- nsis-2.34-src/Source/ResourceEditor.cpp    2007-12-22 10:41:57.000000000 +0100
-+++ nsis-2.34-src-64bit-fixes/Source/ResourceEditor.cpp        2008-01-13 19:40:29.000000000 +0100
+--- ./Source/ResourceEditor.cpp.lfarkas        2009-01-14 17:04:08.000000000 +0100
++++ ./Source/ResourceEditor.cpp        2009-01-14 17:07:47.000000000 +0100
 @@ -665,7 +665,7 @@
      rdDir.NumberOfIdEntries = ConvertEndianness(rdDir.NumberOfIdEntries);
  
@@ -160,9 +83,39 @@ diff -ur nsis-2.34-src/Source/ResourceEditor.cpp nsis-2.34-src-64bit-fixes/Sourc
    }
    else {
      m_bHasName = true;
-diff -ur nsis-2.34-src/Source/util.cpp nsis-2.34-src-64bit-fixes/Source/util.cpp
---- nsis-2.34-src/Source/util.cpp      2007-12-22 10:41:57.000000000 +0100
-+++ nsis-2.34-src-64bit-fixes/Source/util.cpp  2008-01-13 19:01:59.000000000 +0100
+--- ./Source/DialogTemplate.cpp.lfarkas        2009-01-14 16:56:31.000000000 +0100
++++ ./Source/DialogTemplate.cpp        2009-01-14 17:01:14.000000000 +0100
+@@ -74,7 +74,7 @@
+     if (IS_INTRESOURCE(x)) { \
+       *(WORD*)seeker = 0xFFFF; \
+       seeker += sizeof(WORD); \
+-      *(WORD*)seeker = ConvertEndianness(WORD(DWORD(x))); \
++      *(WORD*)seeker = ConvertEndianness(WORD(long(x))); \
+       seeker += sizeof(WORD); \
+     } \
+     else { \
+@@ -622,7 +622,7 @@
+     }
+   }
+-  assert((DWORD) seeker - (DWORD) pbDlg == dwSize);
++  assert((long) seeker - (long) pbDlg == dwSize);
+   // DONE!
+   return pbDlg;
+--- ./Source/mmap.cpp.lfarkas  2009-01-14 17:00:12.000000000 +0100
++++ ./Source/mmap.cpp  2009-01-14 17:01:36.000000000 +0100
+@@ -322,7 +322,7 @@
+   if (!pView)
+     return;
+-  unsigned int alignment = ((unsigned int)pView) % m_iAllocationGranularity;
++  unsigned int alignment = ((unsigned long)pView) % m_iAllocationGranularity;
+   pView = (char *)pView - alignment;
+   size += alignment;
+ #ifdef _WIN32
+--- ./Source/util.cpp.lfarkas  2009-01-14 17:07:59.000000000 +0100
++++ ./Source/util.cpp  2009-01-14 17:09:25.000000000 +0100
 @@ -75,9 +75,9 @@
    }
  
@@ -191,3 +144,43 @@ diff -ur nsis-2.34-src/Source/util.cpp nsis-2.34-src-64bit-fixes/Source/util.cpp
        fclose(f);
        return -3;
      }
+--- ./Source/Platform.h.lfarkas        2009-01-14 17:01:43.000000000 +0100
++++ ./Source/Platform.h        2009-01-14 17:03:03.000000000 +0100
+@@ -165,7 +165,7 @@
+ #    define MAKEINTRESOURCE MAKEINTRESOURCEA
+ #  endif
+ #  ifndef IMAGE_FIRST_SECTION
+-#    define IMAGE_FIRST_SECTION(h) ( PIMAGE_SECTION_HEADER( (DWORD) h + \
++#    define IMAGE_FIRST_SECTION(h) ( PIMAGE_SECTION_HEADER( (long) h + \
+                                      FIELD_OFFSET(IMAGE_NT_HEADERS, OptionalHeader) + \
+                                      FIX_ENDIAN_INT16(PIMAGE_NT_HEADERS(h)->FileHeader.SizeOfOptionalHeader) ) )
+ #  endif
+@@ -197,7 +197,7 @@
+ #endif
+ #ifndef ULONG_PTR
+-#  define ULONG_PTR DWORD
++#  define ULONG_PTR ULONG
+ #endif
+ #ifndef IDC_HAND
+@@ -702,7 +702,7 @@
+   WORD e_oemid;
+   WORD e_oeminfo;
+   WORD e_res2[10];
+-  LONG e_lfanew;
++  DWORD e_lfanew;
+ } IMAGE_DOS_HEADER,*PIMAGE_DOS_HEADER;
+ #  pragma pack()
+ #  pragma pack(4)
+--- ./SCons/Config/gnu.lfarkas 2009-01-14 16:55:33.000000000 +0100
++++ ./SCons/Config/gnu 2009-01-14 16:56:21.000000000 +0100
+@@ -90,8 +90,6 @@
+ makensis_env.Append(CXXFLAGS = ['-Wno-non-virtual-dtor']) # ignore virtual dtor warnings
+ conf = FlagsConfigure(makensis_env)
+-conf.CheckCompileFlag('-m32')                     #
+-conf.CheckLinkFlag('-m32')                        #
+ conf.CheckLinkFlag('$MAP_FLAG')                   # generate map file
+ if not defenv['DEBUG'] and defenv['STRIP'] and defenv['STRIP_CP']:
+       TestStrip(conf)                                 # strip
diff --git a/nsis/nsis-2.43-debian-debug-opt.patch b/nsis/nsis-2.43-debian-debug-opt.patch
new file mode 100644 (file)
index 0000000..ca31827
--- /dev/null
@@ -0,0 +1,116 @@
+diff -up ./SCons/Config/gnu.debug ./SCons/Config/gnu
+--- ./SCons/Config/gnu.debug   2009-02-13 12:41:42.000000000 +0100
++++ ./SCons/Config/gnu 2009-02-13 12:42:37.000000000 +0100
+@@ -68,13 +68,16 @@ cross_env(stub_env)
+ stub_env.Append(CPPPATH = ['#$BUILD_CONFIG'])
+-if not defenv['DEBUG']:
+-      stub_env.Append(CCFLAGS = ['-Os'])                # optimize for size
++if defenv['DEBUG_SYMBOLS']:
++      stub_env.Append(LINKFLAGS = '-g')           # debugging
++      stub_env.Append(CCFLAGS = '-g')             # debugging
++if not defenv['DEBUG'] and defenv['OPT']:
++      stub_env.Append(CCFLAGS = ['-O2'])          # optimize
+ stub_env.Append(CCFLAGS = ['-Wall'])                # all warnings
+ stub_env.Append(CCFLAGS = ['-xc'])                  # force compile as c
+ stub_env.Append(CCFLAGS = ['-fno-strict-aliasing']) # not safe for strict aliasing
+-if not defenv['DEBUG'] and defenv['STRIP'] and defenv['STRIP_W32']:
++if not defenv['DEBUG'] and not defenv['DEBUG_SYMBOLS'] and defenv['STRIP'] and defenv['STRIP_W32']:
+       stub_env.Append(LINKFLAGS = ['-s'])               # strip
+ stub_env.Append(LINKFLAGS = ['-mwindows'])          # build windows executables
+ stub_env.Append(LINKFLAGS = ['$NODEFLIBS_FLAG'])    # no standard libraries
+@@ -88,15 +91,18 @@ makensis_env = defenv.Clone()
+ makensis_env.Append(CPPPATH = ['#$BUILD_CONFIG'])
+-if not defenv['DEBUG']:
+-      makensis_env.Append(CCFLAGS = ['-O2'])                  # optimize
++if defenv['DEBUG_SYMBOLS']:
++      makensis_env.Append(LINKFLAGS = '-g')             # debugging
++      makensis_env.Append(CCFLAGS = '-g')               # debugging
++if not defenv['DEBUG'] and defenv['OPT']:
++      makensis_env.Append(CCFLAGS = ['-O2'])            # optimize
+ makensis_env.Append(CFLAGS = ['-Wall'])                   # all warnings
+ makensis_env.Append(CXXFLAGS = ['-Wno-non-virtual-dtor']) # ignore virtual dtor warnings
+ makensis_env.Append(CXXFLAGS = ['-Wall'])                 # all warnings
+ conf = FlagsConfigure(makensis_env)
+ conf.CheckLinkFlag('$MAP_FLAG')                   # generate map file
+-if not defenv['DEBUG'] and defenv['STRIP'] and defenv['STRIP_CP']:
++if not defenv['DEBUG'] and not defenv['DEBUG_SYMBOLS'] and defenv['STRIP'] and defenv['STRIP_CP']:
+       TestStrip(conf)                                 # strip
+ conf.Finish()
+@@ -105,12 +111,15 @@ conf.Finish()
+ plugin_env = defenv.Clone()
+ cross_env(plugin_env)
+-if not defenv['DEBUG']:
+-      plugin_env.Append(CCFLAGS = ['-Os'])              # optimize for size
++if defenv['DEBUG_SYMBOLS']:
++      plugin_env.Append(LINKFLAGS = '-g')         # debugging
++      plugin_env.Append(CCFLAGS = '-g')           # debugging
++if not defenv['DEBUG'] and defenv['OPT']:
++      plugin_env.Append(CCFLAGS = ['-O2'])        # optimize
+ plugin_env.Append(CCFLAGS = ['-Wall'])              # level 3 warnings
+ plugin_env.Append(CCFLAGS = ['-fno-strict-aliasing']) # not safe for strict aliasing
+-if not defenv['DEBUG'] and defenv['STRIP'] and defenv['STRIP_W32']:
++if not defenv['DEBUG'] and not defenv['DEBUG_SYMBOLS'] and defenv['STRIP'] and defenv['STRIP_W32']:
+       plugin_env.Append(LINKFLAGS = ['-s'])             # strip
+ plugin_env.Append(LINKFLAGS = ['-mwindows'])        # build windows executables
+ plugin_env.Append(LINKFLAGS = ['$ALIGN_FLAG'])      # 512 bytes align
+@@ -122,7 +131,10 @@ cp_util_env = defenv.Clone()
+ cp_util_env.Append(CPPPATH = ['#$BUILD_CONFIG'])
+-if not defenv['DEBUG']:
++if defenv['DEBUG_SYMBOLS']:
++      cp_util_env.Append(LINKFLAGS = '-g')        # debugging
++      cp_util_env.Append(CCFLAGS = '-g')          # debugging
++if not defenv['DEBUG'] and defenv['OPT']:
+       cp_util_env.Append(CCFLAGS = ['-O2'])             # optimize
+ cp_util_env.Append(CCFLAGS = ['-Wall'])             # all warnings
+ cp_util_env.Append(CCFLAGS = ['-fno-strict-aliasing']) # not safe for strict aliasing
+@@ -140,7 +152,7 @@ util_env.Append(LINKFLAGS = ['-mwindows'
+ util_env.Append(LINKFLAGS = ['$ALIGN_FLAG'])        # 512 bytes align
+ conf = FlagsConfigure(util_env)
+-if not defenv['DEBUG'] and defenv['STRIP'] and defenv['STRIP_W32']:
++if not defenv['DEBUG'] and not defenv['DEBUG_SYMBOLS'] and defenv['STRIP'] and defenv['STRIP_W32']:
+       util_env.Append(LINKFLAGS = ['-s'])                   # strip
+ conf.Finish()
+@@ -149,7 +161,7 @@ conf.Finish()
+ conf = FlagsConfigure(cp_util_env)
+ conf.CheckCompileFlag('-m32')
+ conf.CheckLinkFlag('-m32')
+-if not defenv['DEBUG'] and defenv['STRIP'] and defenv['STRIP_CP']:
++if not defenv['DEBUG'] and not defenv['DEBUG_SYMBOLS'] and defenv['STRIP'] and defenv['STRIP_CP']:
+       TestStrip(conf)                                 # strip
+ conf.Finish()
+@@ -157,6 +169,9 @@ conf.Finish()
+ test_env = defenv.Clone()
+ test_env.Append(CPPPATH = ['#$BUILD_CONFIG'])
++if defenv['DEBUG_SYMBOLS']:
++      test_env.Append(LINKFLAGS = '-g')           # debugging
++      test_env.Append(CCFLAGS = '-g')             # debugging
+ conf = FlagsConfigure(test_env)
+ conf.CheckCompileFlag('-m32')
+ conf.CheckLinkFlag('-m32')
+diff -up ./SConstruct.debug ./SConstruct
+--- ./SConstruct.debug 2009-02-04 15:05:48.000000000 +0100
++++ ./SConstruct       2009-02-13 12:41:42.000000000 +0100
+@@ -157,6 +157,8 @@ opts.Add(('APPEND_CCFLAGS', 'Additional 
+ opts.Add(('APPEND_LINKFLAGS', 'Additional linker flags'))
+ # build options
+ opts.Add(BoolVariable('DEBUG', 'Build executables with debugging information', 'no'))
++opts.Add(BoolOption('DEBUG_SYMBOLS', 'Build with debugging information, but none of the side effects of DEBUG', 'no'))
++opts.Add(BoolOption('OPT', 'Build with optimization', 'yes'))
+ opts.Add(PathVariable('CODESIGNER', 'A program used to sign executables', None))
+ opts.Add(BoolVariable('STRIP', 'Strips executables of any unrequired data such as symbols', 'yes'))
+ opts.Add(BoolVariable('STRIP_CP', 'Strips cross-platform executables of any unrequired data such as symbols', 'yes'))