summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlin Năstac <mrness@gentoo.org>2007-05-25 11:04:13 +0000
committerAlin Năstac <mrness@gentoo.org>2007-05-25 11:04:13 +0000
commit68128b16e5ee827016238250202892f1f432eadc (patch)
treeeabecb18173f6507f2ec624ecfb4102f2617f20a /dev-util/nsis/nsis-2.27.ebuild
parentalpha/ia64 stable wrt #179583 (diff)
downloadgentoo-2-68128b16e5ee827016238250202892f1f432eadc.tar.gz
gentoo-2-68128b16e5ee827016238250202892f1f432eadc.tar.bz2
gentoo-2-68128b16e5ee827016238250202892f1f432eadc.zip
Search for all mingw32 variants. Force -m32 on amd64 (some code is broken on amd64). Version bump.
(Portage version: 2.1.2.7)
Diffstat (limited to 'dev-util/nsis/nsis-2.27.ebuild')
-rw-r--r--dev-util/nsis/nsis-2.27.ebuild77
1 files changed, 77 insertions, 0 deletions
diff --git a/dev-util/nsis/nsis-2.27.ebuild b/dev-util/nsis/nsis-2.27.ebuild
new file mode 100644
index 000000000000..f9801938aa2a
--- /dev/null
+++ b/dev-util/nsis/nsis-2.27.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-util/nsis/nsis-2.27.ebuild,v 1.1 2007/05/25 11:04:13 mrness Exp $
+
+DESCRIPTION="Nullsoft Scriptable Install System"
+HOMEPAGE="http://nsis.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.bz2"
+
+LICENSE="as-is"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=">=dev-util/scons-0.96.93"
+
+S="${WORKDIR}"/${P}-src
+
+pkg_setup() {
+ local mingw32_variants="mingw32 i686-mingw32 i586-mingw32 i486-mingw32 i386-mingw32"
+ local i
+ for i in ${mingw32_variants} ; do
+ type -p ${i}-gcc && return 0
+ done
+
+ eerror "Before you could emerge nsis, you need to install mingw32."
+ eerror "Run the following command:"
+ eerror " emerge crossdev"
+ eerror "then run _one_ of the following commands:"
+ for i in ${mingw32_variants} ; do
+ eerror " crossdev ${i}"
+ done
+ die "mingw32 is needed"
+}
+
+get_arch_options() {
+ if use amd64; then
+ # Some part of the code cannot be compiled on 64-bit arches
+ echo APPEND_CCFLAGS=-m32 APPEND_LINKFLAGS=-m32
+ fi
+}
+
+src_compile() {
+ # Try next version without SKIPUTILS
+ scons PREFIX=/usr PREFIX_CONF=/etc PREFIX_DOC="/usr/share/doc/${P}" PREFIX_DEST="${D}" \
+ SKIPPLUGINS=System SKIPUTILS="NSIS Menu" VERSION=${PV} DEBUG=no STRIP=no \
+ $(get_arch_options) || die "scons failed"
+}
+
+src_install() {
+ # Try next version without SKIPUTILS
+ scons PREFIX=/usr PREFIX_CONF=/etc PREFIX_DOC="/usr/share/doc/${P}" PREFIX_DEST="${D}" \
+ SKIPPLUGINS=System SKIPUTILS="NSIS Menu" VERSION=${PV} DEBUG=no STRIP=no \
+ $(get_arch_options) install || die "scons install failed"
+
+ fperms -R go-w,a-x,a+X /usr/share/${PN}/ /usr/share/doc/${P}/ /etc/nsisconf.nsh
+
+ # Always strip Windows binaries; no point in having Windows debug info
+ local mingw32_variants="mingw32 i686-mingw32 i586-mingw32 i486-mingw32 i386-mingw32"
+ local STRIP_PROG
+ local STRIP_FLAGS="--strip-unneeded"
+ for i in ${mingw32_variants} ; do
+ if type -p ${i}-strip ; then
+ STRIP_PROG=${i}-strip
+ break;
+ fi
+ done
+
+ echo
+ echo "strip: ${STRIP_PROG} ${STRIP_FLAGS}"
+
+ cd "${D}"
+ local FILE
+ for FILE in $(find -iregex '.*\.\(dll\|exe\)$' | sed 's:^\./::') ; do
+ echo " ${FILE}"
+ ${STRIP_PROG} ${STRIP_FLAGS} "${FILE}"
+ done
+}