Gentoo Archives: gentoo-commits

From: "Alon Bar-Lev (alonbl)" <alonbl@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-util/nsis: nsis-2.46-r1.ebuild ChangeLog
Date: Sun, 02 Jun 2013 00:55:07
Message-Id: 20130602005501.743C12171D@flycatcher.gentoo.org
1 alonbl 13/06/02 00:55:01
2
3 Modified: ChangeLog
4 Added: nsis-2.46-r1.ebuild
5 Log:
6 support building on 64bit platform, bug#425030
7
8 (Portage version: 2.2.0_alpha177/cvs/Linux x86_64, signed Manifest commit with key BF20DC51)
9
10 Revision Changes Path
11 1.41 dev-util/nsis/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/nsis/ChangeLog?rev=1.41&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/nsis/ChangeLog?rev=1.41&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/nsis/ChangeLog?r1=1.40&r2=1.41
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-util/nsis/ChangeLog,v
20 retrieving revision 1.40
21 retrieving revision 1.41
22 diff -u -r1.40 -r1.41
23 --- ChangeLog 1 Jun 2013 12:14:40 -0000 1.40
24 +++ ChangeLog 2 Jun 2013 00:55:01 -0000 1.41
25 @@ -1,6 +1,12 @@
26 # ChangeLog for dev-util/nsis
27 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/dev-util/nsis/ChangeLog,v 1.40 2013/06/01 12:14:40 pacho Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-util/nsis/ChangeLog,v 1.41 2013/06/02 00:55:01 alonbl Exp $
30 +
31 +*nsis-2.46-r1 (02 Jun 2013)
32 +
33 + 02 Jun 2013; Alon Bar-Lev <alonbl@g.o> +nsis-2.46-r1.ebuild,
34 + nsis-2.46.ebuild:
35 + support building on 64bit platform, bug#425030
36
37 01 Jun 2013; Pacho Ramos <pacho@g.o> metadata.xml:
38 Cleanup due bug #151880
39
40
41
42 1.1 dev-util/nsis/nsis-2.46-r1.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/nsis/nsis-2.46-r1.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/nsis/nsis-2.46-r1.ebuild?rev=1.1&content-type=text/plain
46
47 Index: nsis-2.46-r1.ebuild
48 ===================================================================
49 # Copyright 1999-2013 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/dev-util/nsis/nsis-2.46-r1.ebuild,v 1.1 2013/06/02 00:55:01 alonbl Exp $
52
53 EAPI="5"
54 mingw32_variants=$(echo {,i{6,5,4,3}86-{,pc-,w32-,w64-}}mingw32)
55
56 inherit eutils
57
58 DESCRIPTION="Nullsoft Scriptable Install System"
59 HOMEPAGE="http://nsis.sourceforge.net/"
60 SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.bz2
61 http://f0rt.users.sourceforge.net/makensis_64bit.patch
62 http://f0rt.users.sourceforge.net/nsis_w64-mingw.patch"
63
64 LICENSE="ZLIB BZIP2 CPL-1.0"
65 SLOT="0"
66 KEYWORDS="~amd64 ~ppc ~x86"
67 IUSE="bzip2 config-log doc zlib"
68 RESTRICT="strip"
69
70 # NSIS Menu uses wxwindows but it's all broken, so disable for now
71 # wxwindows? ( x11-libs/wxGTK )
72 RDEPEND="bzip2? ( app-arch/bzip2 )
73 zlib? ( sys-libs/zlib )"
74 DEPEND="${RDEPEND}
75 >=dev-util/scons-0.98"
76
77 S="${WORKDIR}"/${P}-src
78
79 mingw_CTARGET() {
80 local i
81 for i in ${mingw32_variants} ; do
82 type -P ${i}-g++ > /dev/null && echo ${i} && return
83 done
84 }
85
86 pkg_pretend() {
87 [[ -n $(mingw_CTARGET) ]] && return 0
88
89 eerror "Before you could emerge nsis, you need to install mingw"
90 eerror "Run the following commands:"
91 eerror " emerge crossdev"
92 eerror " USE='cxx -hardened' crossdev --stable --libc '[latest] -t i686-w64-mingw32"
93 die "mingw is needed"
94 }
95
96 src_prepare() {
97 epatch "${FILESDIR}"/${P}-gcc47.patch
98 epatch "${DISTDIR}/makensis_64bit.patch"
99 epatch "${DISTDIR}/nsis_w64-mingw.patch"
100
101 # a dirty but effective way of killing generated docs
102 use doc || echo > Docs/src/SConscript
103 }
104
105 get_additional_options() {
106 echo \
107 PREFIX=/usr \
108 PREFIX_CONF=/etc \
109 PREFIX_DOC=/usr/share/doc/${PF} \
110 PREFIX_DEST=\"${D}\" \
111 VERSION=${PV} \
112 DEBUG=no \
113 STRIP=no
114 echo \
115 SKIPSTUBS=\"$(use zlib || echo zlib) $(use bzip2 || echo bzip2)\" \
116 SKIPUTILS=\"NSIS Menu\"
117 use config-log && echo NSIS_CONFIG_LOG=yes
118
119 local tcpfx=$($(mingw_CTARGET)-gcc -print-file-name=libshell32.a)
120 tcpfx=${tcpfx%/lib/libshell32.a}
121 echo \
122 PREFIX_PLUGINAPI_INC=${tcpfx}/include \
123 PREFIX_PLUGINAPI_LIB=${tcpfx}/lib
124 echo CROSS_W32=$(mingw_CTARGET)-
125 }
126
127 do_scons() {
128 local cmd=$1
129 eval set -- $(get_additional_options)
130 echo scons $(get_additional_options) ${cmd}
131 scons "$@" ${cmd}
132 }
133
134 src_compile() {
135 do_scons || die "scons failed"
136 }
137
138 src_install() {
139 do_scons install || die "scons failed"
140 use doc || rm -rf "${D}"/usr/share/doc/${PF}/{Docs,Examples}
141
142 fperms -R go-w,a-x,a+X /usr/share/${PN}/ /usr/share/doc/${PF}/ /etc/nsisconf.nsh
143
144 env -uRESTRICT prepstrip "${D}/usr/bin"
145 src_strip_win32
146 }
147
148 src_strip_win32() {
149 # need to strip win32 binaries ourselves ... should fold this
150 # back in to prepstrip at some point
151 local STRIP_PROG=$(mingw_CTARGET)-strip
152 local STRIP_FLAGS="--strip-unneeded"
153
154 echo
155 echo "strip: ${STRIP_PROG} ${STRIP_FLAGS}"
156 local FILE
157 for FILE in $(find "${D}" -iregex '.*\.\(dll\|exe\|a\)$') ; do
158 echo " /${FILE#${D}}"
159 ${STRIP_PROG} ${STRIP_FLAGS} "${FILE}"
160 done
161 }