diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-util/nsis/nsis-2.46-r1.ebuild | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.xz |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-util/nsis/nsis-2.46-r1.ebuild')
-rw-r--r-- | dev-util/nsis/nsis-2.46-r1.ebuild | 115 |
1 files changed, 115 insertions, 0 deletions
diff --git a/dev-util/nsis/nsis-2.46-r1.ebuild b/dev-util/nsis/nsis-2.46-r1.ebuild new file mode 100644 index 00000000000..0276d6a664e --- /dev/null +++ b/dev-util/nsis/nsis-2.46-r1.ebuild @@ -0,0 +1,115 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +mingw32_variants=$(echo {,i{6,5,4,3}86-{,pc-,w32-,w64-}}mingw32) + +inherit eutils + +DESCRIPTION="Nullsoft Scriptable Install System" +HOMEPAGE="http://nsis.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.bz2 + http://f0rt.users.sourceforge.net/makensis_64bit.patch + http://f0rt.users.sourceforge.net/nsis_w64-mingw.patch" + +LICENSE="ZLIB BZIP2 CPL-1.0" +SLOT="0" +KEYWORDS="amd64 ~ppc x86" +IUSE="bzip2 config-log doc zlib" +RESTRICT="strip" + +# NSIS Menu uses wxwindows but it's all broken, so disable for now +# wxwindows? ( x11-libs/wxGTK ) +RDEPEND="bzip2? ( app-arch/bzip2 ) + zlib? ( sys-libs/zlib )" +DEPEND="${RDEPEND} + >=dev-util/scons-0.98" + +S="${WORKDIR}"/${P}-src + +mingw_CTARGET() { + local i + for i in ${mingw32_variants} ; do + type -P ${i}-g++ > /dev/null && echo ${i} && return + done +} + +pkg_pretend() { + [[ -n $(mingw_CTARGET) ]] && return 0 + + eerror "Before you could emerge nsis, you need to install mingw with C++ support" + eerror "Run the following commands:" + eerror " emerge crossdev" + eerror " USE='cxx' crossdev --stable --libc '[latest]' -t i686-w64-mingw32" + die "mingw is needed" +} + +src_prepare() { + epatch "${FILESDIR}"/${P}-gcc47.patch + epatch "${DISTDIR}/makensis_64bit.patch" + epatch "${DISTDIR}/nsis_w64-mingw.patch" + + sed -i 's/SetDefault/Append/' "${S}/Source/exehead/SConscript" || die #505996 + + # a dirty but effective way of killing generated docs + use doc || echo > Docs/src/SConscript +} + +get_additional_options() { + echo \ + PREFIX=/usr \ + PREFIX_CONF=/etc \ + PREFIX_DOC=/usr/share/doc/${PF} \ + PREFIX_DEST=\"${D}\" \ + VERSION=${PV} \ + DEBUG=no \ + STRIP=no + echo \ + SKIPSTUBS=\"$(use zlib || echo zlib) $(use bzip2 || echo bzip2)\" \ + SKIPUTILS=\"NSIS Menu\" + use config-log && echo NSIS_CONFIG_LOG=yes + + local tcpfx=$($(mingw_CTARGET)-gcc -print-file-name=libshell32.a) + tcpfx=${tcpfx%/lib/libshell32.a} + echo \ + PREFIX_PLUGINAPI_INC=${tcpfx}/include \ + PREFIX_PLUGINAPI_LIB=${tcpfx}/lib + echo CROSS_W32=$(mingw_CTARGET)- +} + +do_scons() { + local cmd=$1 + eval set -- $(get_additional_options) + echo scons $(get_additional_options) ${cmd} + scons "$@" ${cmd} +} + +src_compile() { + do_scons || die "scons failed" +} + +src_install() { + do_scons install || die "scons failed" + use doc || rm -rf "${D}"/usr/share/doc/${PF}/{Docs,Examples} + + fperms -R go-w,a-x,a+X /usr/share/${PN}/ /usr/share/doc/${PF}/ /etc/nsisconf.nsh + + env -uRESTRICT prepstrip "${D}/usr/bin" + src_strip_win32 +} + +src_strip_win32() { + # need to strip win32 binaries ourselves ... should fold this + # back in to prepstrip at some point + local STRIP_PROG=$(mingw_CTARGET)-strip + local STRIP_FLAGS="--strip-unneeded" + + echo + echo "strip: ${STRIP_PROG} ${STRIP_FLAGS}" + local FILE + for FILE in $(find "${D}" -iregex '.*\.\(dll\|exe\|a\)$') ; do + echo " /${FILE#${D}}" + ${STRIP_PROG} ${STRIP_FLAGS} "${FILE}" + done +} |