[mingw-nsis: 4/27] Merge my changes from 2.39-6: Wed Feb 25 2009 Kevin Kofler <Kevin at tigcc.ticalc.org> - 2.43-4 - Updat
Kalev Lember
kalev at fedoraproject.org
Wed Mar 7 16:04:37 UTC 2012
commit 06a7c9a60f82840be52060561b8a723a97b27ca6
Author: Kevin Kofler <kkofler at fedoraproject.org>
Date: Wed Feb 25 07:22:15 2009 +0000
Merge my changes from 2.39-6:
Wed Feb 25 2009 Kevin Kofler <Kevin at tigcc.ticalc.org> - 2.43-4
- Updated 64bit-fixes patch (remove some more -m32 use).
- Drop ExclusiveArch, not needed with the above.
- Obsoletes/Provides nsis and nsis-data for migration path from CalcForge.
- Disable NSIS Menu (does not work on *nix, see specfile comment for
details).
- Drop BR wxGTK-devel.
mingw32-nsis.spec | 35 +++-
...4bit-fixes.patch => nsis-2.43-64bit-fixes.patch | 199 +++++++++++---------
2 files changed, 141 insertions(+), 93 deletions(-)
---
diff --git a/mingw32-nsis.spec b/mingw32-nsis.spec
index 99f11ba..678b01e 100644
--- a/mingw32-nsis.spec
+++ b/mingw32-nsis.spec
@@ -1,9 +1,9 @@
-%define sconsopts VERSION=%{version} PREFIX=%{_prefix} PREFIX_CONF=%{_sysconfdir} SKIPPLUGINS=System DEBUG_SYMBOLS=1 OPTS=1
+%define sconsopts VERSION=%{version} PREFIX=%{_prefix} PREFIX_CONF=%{_sysconfdir} SKIPPLUGINS=System SKIPUTILS='NSIS Menu' DEBUG_SYMBOLS=1 OPTS=1
%define _default_patch_fuzz 2
Name: mingw32-nsis
Version: 2.43
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Nullsoft Scriptable Install System
License: zlib and CPL
@@ -12,8 +12,10 @@ URL: http://nsis.sourceforge.net/
Source0: http://dl.sourceforge.net/sourceforge/nsis/nsis-%{version}-src.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+# This patch fixes NSIS to actually build 64-bit versions.
+# Originally from Debian, updated by Kevin Kofler.
+Patch0: nsis-2.43-64bit-fixes.patch
# Patches from Debian (mainly by Paul Wise).
-Patch0: nsis-2.42-debian-64bit-fixes.patch
Patch1: nsis-2.43-debian-debug-opt.patch
BuildRequires: mingw32-filesystem >= 40
@@ -23,9 +25,23 @@ BuildRequires: mingw32-binutils
BuildRequires: python
BuildRequires: scons
-# since nsis a 32 bit only apps
-ExclusiveArch: %{ix86} ppc
-BuildRequires: wxGTK-devel
+# Don't build NSIS Menu as it doesn't actually work on POSIX systems: 1. it
+# doesn't find its index.html file without patching, 2. it has various links to
+# .exe files such as the makensisw.exe W32 GUI which are not available in the
+# POSIX version at all and 3. the documentation links have backslashes in the
+# URLs and the relative paths are wrong. Almost none of the links worked when I
+# tested it (after patching problem 1.).
+# Also removes unnecessary wxGTK dependency for this otherwise GUI-less package.
+# (Does it really make sense to drag in wxGTK just to display a HTML file?)
+# If you really want to reenable this, it needs a lot of fixing.
+# -- Kevin Kofler
+# BuildRequires: wxGTK-devel
+
+# upgrade path for CalcForge users
+Obsoletes: nsis < %{version}-%{release}
+Provides: nsis = %{version}-%{release}
+Obsoletes: nsis-data < %{version}-%{release}
+Provides: nsis-data = %{version}-%{release}
%description
@@ -72,6 +88,13 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Wed Feb 25 2009 Kevin Kofler <Kevin at tigcc.ticalc.org> - 2.43-4
+- Updated 64bit-fixes patch (remove some more -m32 use).
+- Drop ExclusiveArch, not needed with the above.
+- Obsoletes/Provides nsis and nsis-data for migration path from CalcForge.
+- Disable NSIS Menu (does not work on *nix, see specfile comment for details).
+- Drop BR wxGTK-devel.
+
* Sat Feb 21 2009 Richard W.M. Jones <rjones at redhat.com> - 2.43-3
- Restore ExclusiveArch line (Levente Farkas).
diff --git a/nsis-2.42-debian-64bit-fixes.patch b/nsis-2.43-64bit-fixes.patch
similarity index 67%
rename from nsis-2.42-debian-64bit-fixes.patch
rename to nsis-2.43-64bit-fixes.patch
index b46f7e8..342396d 100644
--- a/nsis-2.42-debian-64bit-fixes.patch
+++ b/nsis-2.43-64bit-fixes.patch
@@ -1,5 +1,99 @@
---- ./Source/Plugins.cpp.lfarkas 2009-01-14 17:03:11.000000000 +0100
-+++ ./Source/Plugins.cpp 2009-01-14 17:03:58.000000000 +0100
+diff -ur nsis-2.43-src/SCons/Config/gnu nsis-2.43-src-64bit-fixes/SCons/Config/gnu
+--- nsis-2.43-src/SCons/Config/gnu 2009-02-05 01:52:28.000000000 +0100
++++ nsis-2.43-src-64bit-fixes/SCons/Config/gnu 2009-02-25 07:59:44.000000000 +0100
+@@ -95,8 +95,6 @@
+ makensis_env.Append(CXXFLAGS = ['-Wall']) # all 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
+@@ -149,8 +147,6 @@
+ ### cross-platform util environment adjustments
+
+ conf = FlagsConfigure(cp_util_env)
+-conf.CheckCompileFlag('-m32')
+-conf.CheckLinkFlag('-m32')
+ if not defenv['DEBUG'] and defenv['STRIP'] and defenv['STRIP_CP']:
+ TestStrip(conf) # strip
+ conf.Finish()
+@@ -160,8 +156,6 @@
+ test_env = defenv.Clone()
+ test_env.Append(CPPPATH = ['#$BUILD_CONFIG'])
+ conf = FlagsConfigure(test_env)
+-conf.CheckCompileFlag('-m32')
+-conf.CheckLinkFlag('-m32')
+ conf.Finish()
+
+ ### weird GCC requirements
+diff -ur nsis-2.43-src/Source/DialogTemplate.cpp nsis-2.43-src-64bit-fixes/Source/DialogTemplate.cpp
+--- nsis-2.43-src/Source/DialogTemplate.cpp 2007-11-30 10:54:13.000000000 +0100
++++ nsis-2.43-src-64bit-fixes/Source/DialogTemplate.cpp 2009-02-25 07:59:44.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.43-src/Source/mmap.cpp nsis-2.43-src-64bit-fixes/Source/mmap.cpp
+--- nsis-2.43-src/Source/mmap.cpp 2009-02-01 15:44:30.000000000 +0100
++++ nsis-2.43-src-64bit-fixes/Source/mmap.cpp 2009-02-25 07:59:44.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
+diff -ur nsis-2.43-src/Source/Platform.h nsis-2.43-src-64bit-fixes/Source/Platform.h
+--- nsis-2.43-src/Source/Platform.h 2009-02-01 15:44:30.000000000 +0100
++++ nsis-2.43-src-64bit-fixes/Source/Platform.h 2009-02-25 07:59:44.000000000 +0100
+@@ -166,7 +166,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
+@@ -198,7 +198,7 @@
+ #endif
+
+ #ifndef ULONG_PTR
+-# define ULONG_PTR DWORD
++# define ULONG_PTR ULONG
+ #endif
+
+ #ifndef IDC_HAND
+@@ -703,7 +703,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.43-src/Source/Plugins.cpp nsis-2.43-src-64bit-fixes/Source/Plugins.cpp
+--- nsis-2.43-src/Source/Plugins.cpp 2009-02-01 15:44:30.000000000 +0100
++++ nsis-2.43-src-64bit-fixes/Source/Plugins.cpp 2009-02-25 07:59:44.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);
@@ -9,9 +103,10 @@
for (unsigned long j = 0; j < FIX_ENDIAN_INT32(exports->NumberOfNames); j++)
{
const string name = string((char*)exports + FIX_ENDIAN_INT32(names[j]) - ExportDirVA);
---- ./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 @@
+diff -ur nsis-2.43-src/Source/ResourceEditor.cpp nsis-2.43-src-64bit-fixes/Source/ResourceEditor.cpp
+--- nsis-2.43-src/Source/ResourceEditor.cpp 2009-02-05 01:50:12.000000000 +0100
++++ nsis-2.43-src-64bit-fixes/Source/ResourceEditor.cpp 2009-02-25 07:59:44.000000000 +0100
+@@ -684,7 +684,7 @@
rdDir.NumberOfIdEntries = ConvertEndianness(rdDir.NumberOfIdEntries);
CopyMemory(seeker, &rdDir, sizeof(IMAGE_RESOURCE_DIRECTORY));
@@ -20,7 +115,7 @@
seeker += sizeof(IMAGE_RESOURCE_DIRECTORY);
for (int i = 0; i < crd->CountEntries(); i++) {
-@@ -686,7 +686,7 @@
+@@ -705,7 +705,7 @@
rDirE.UName.NameString.NameIsString = (crd->GetEntry(i)->HasName()) ? 1 : 0;
CopyMemory(seeker, &rDirE, sizeof(MY_IMAGE_RESOURCE_DIRECTORY_ENTRY));
@@ -29,7 +124,7 @@
seeker += sizeof(MY_IMAGE_RESOURCE_DIRECTORY_ENTRY);
}
qDirs.pop();
-@@ -702,7 +702,7 @@
+@@ -721,7 +721,7 @@
rDataE.Size = ConvertEndianness(cRDataE->GetSize());
CopyMemory(seeker, &rDataE, sizeof(IMAGE_RESOURCE_DATA_ENTRY));
@@ -38,7 +133,7 @@
seeker += sizeof(IMAGE_RESOURCE_DATA_ENTRY);
qDataEntries.pop();
-@@ -714,7 +714,7 @@
+@@ -733,7 +733,7 @@
while (!qStrings.empty()) {
CResourceDirectoryEntry* cRDirE = qStrings.front();
@@ -47,7 +142,7 @@
WCHAR* szName = cRDirE->GetName();
WORD iLen = winchar_strlen(szName) + 1;
-@@ -745,7 +745,7 @@
+@@ -764,7 +764,7 @@
/*
* Set all of the directory entries offsets.
*/
@@ -56,7 +151,7 @@
}
// Sets the offsets in directory entries
-@@ -868,7 +868,7 @@
+@@ -887,7 +887,7 @@
// Returns -1 if can not be found
int CResourceDirectory::Find(WCHAR* szName) {
if (IS_INTRESOURCE(szName))
@@ -65,7 +160,7 @@
else
if (szName[0] == '#')
return Find(WORD(winchar_stoi(szName + 1)));
-@@ -946,7 +946,7 @@
+@@ -965,7 +965,7 @@
if (IS_INTRESOURCE(szName)) {
m_bHasName = false;
m_szName = 0;
@@ -74,7 +169,7 @@
}
else {
m_bHasName = true;
-@@ -960,7 +960,7 @@
+@@ -979,7 +979,7 @@
if (IS_INTRESOURCE(szName)) {
m_bHasName = false;
m_szName = 0;
@@ -83,40 +178,10 @@
}
else {
m_bHasName = true;
---- ./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 @@
+diff -ur nsis-2.43-src/Source/util.cpp nsis-2.43-src-64bit-fixes/Source/util.cpp
+--- nsis-2.43-src/Source/util.cpp 2009-02-01 15:44:30.000000000 +0100
++++ nsis-2.43-src-64bit-fixes/Source/util.cpp 2009-02-25 07:59:44.000000000 +0100
+@@ -77,9 +77,9 @@
}
if (width != 0) {
@@ -128,7 +193,7 @@
FIX_ENDIAN_INT32_INPLACE(biWidth);
if (width != biWidth) {
fclose(f);
-@@ -86,12 +86,12 @@
+@@ -88,12 +88,12 @@
}
if (height != 0) {
@@ -144,43 +209,3 @@
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
More information about the scm-commits
mailing list