Gentoo Archives: gentoo-commits

From: Dion Moult <moult@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/betagarden:master commit in: media-gfx/draftsight-bin/files/, media-gfx/draftsight-bin/
Date: Wed, 05 Feb 2014 22:58:25
Message-Id: 1391640724.4a398df4fbefc3f3fc63a741ca6cf38f1f011090.moult@gentoo
1 commit: 4a398df4fbefc3f3fc63a741ca6cf38f1f011090
2 Author: Dion Moult <moult <AT> gentoo <DOT> org>
3 AuthorDate: Wed Feb 5 22:52:04 2014 +0000
4 Commit: Dion Moult <moult <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 5 22:52:04 2014 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/betagarden.git;a=commit;h=4a398df4
7
8 Bump version to 1.5.0_beta
9
10 ---
11 media-gfx/draftsight-bin/ChangeLog | 10 ++
12 .../draftsight-bin-1.5.0_beta.ebuild | 187 +++++++++++++++++++++
13 media-gfx/draftsight-bin/files/draftsight | 4 +-
14 3 files changed, 199 insertions(+), 2 deletions(-)
15
16 diff --git a/media-gfx/draftsight-bin/ChangeLog b/media-gfx/draftsight-bin/ChangeLog
17 new file mode 100644
18 index 0000000..9880e85
19 --- /dev/null
20 +++ b/media-gfx/draftsight-bin/ChangeLog
21 @@ -0,0 +1,10 @@
22 +# ChangeLog for media-gfx/draftsight-bin
23 +# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
24 +# $Header: $
25 +
26 +*draftsight-bin-1.5.0_beta (05 Feb 2014)
27 +
28 + 05 Feb 2014; Dion Moult <moult@g.o> +draftsight-bin-1.5.0_beta.ebuild,
29 + files/draftsight:
30 + Bumped version to 1.5.0_beta
31 +
32
33 diff --git a/media-gfx/draftsight-bin/draftsight-bin-1.5.0_beta.ebuild b/media-gfx/draftsight-bin/draftsight-bin-1.5.0_beta.ebuild
34 new file mode 100644
35 index 0000000..179d94f
36 --- /dev/null
37 +++ b/media-gfx/draftsight-bin/draftsight-bin-1.5.0_beta.ebuild
38 @@ -0,0 +1,187 @@
39 +# Copyright 1999-2014 Gentoo Foundation
40 +# Distributed under the terms of the GNU General Public License v2
41 +# $Header: $
42 +
43 +EAPI=5
44 +
45 +inherit fdo-mime udev unpacker
46 +
47 +MY_PN="draftsight"
48 +MY_P="${MY_PN}-${PV}"
49 +DESCRIPTION="Professional 2D CAD application, supporting DWT, DXF and DWG."
50 +HOMEPAGE="http://www.3ds.com/products/draftsight/free-cad-software/"
51 +# The libaudio requirement is due to ABI_X86 not being stable enough yet.
52 +# See bug #463942 for the initial reason this was inserted.
53 +SRC_URI="${MY_P}.deb
54 +amd64? ( http://dev.gentoo.org/~moult/draftsight/libaudio.tar.gz )"
55 +
56 +LICENSE="${MY_PN}"
57 +SLOT="0"
58 +KEYWORDS="~amd64 ~x86"
59 +IUSE=""
60 +S="${WORKDIR}"
61 +
62 +QA_PRESTRIPPED="opt/dassault-systemes/${MY_PN}/bin/DWGConverter
63 + amd64? ( opt/dassault-systemes/${MY_PN}/lib/libaudio.so.2 )"
64 +QA_TEXTRELS="opt/dassault-systemes/${MY_PN}/lib/libDDKERNEL.so.1"
65 +QA_EXECSTACK="opt/dassault-systemes/${MY_PN}/bin/FxCrashRptApp
66 +opt/dassault-systemes/${MY_PN}/lib/libDDKERNEL.so.1"
67 +
68 +RESTRICT="fetch"
69 +DEPEND=""
70 +RDEPEND="amd64? (
71 + app-emulation/emul-linux-x86-baselibs
72 + app-emulation/emul-linux-x86-opengl
73 + app-emulation/emul-linux-x86-qtlibs
74 + app-emulation/emul-linux-x86-soundlibs
75 + app-emulation/emul-linux-x86-xlibs
76 + )
77 + !amd64? (
78 + sys-libs/zlib
79 + net-print/cups
80 + dev-libs/expat
81 + dev-libs/glib:2
82 + media-libs/glu
83 + media-libs/phonon
84 + dev-qt/qtcore:4
85 + dev-qt/qtdbus:4
86 + dev-qt/qtgui:4
87 + dev-qt/qtopengl:4
88 + dev-qt/qtsql:4
89 + dev-qt/qtwebkit:4
90 + dev-qt/qtsvg:4
91 + media-libs/alsa-lib
92 + media-libs/fontconfig
93 + media-libs/freetype
94 + x11-libs/libICE
95 + x11-libs/libSM
96 + x11-libs/libX11
97 + x11-libs/libXext
98 + x11-libs/libXrender
99 + x11-libs/libXt
100 + media-libs/nas
101 + )"
102 +
103 +pkg_nofetch() {
104 + einfo "Upstream has a mandatory EULA agreement to download this file."
105 + einfo "Please navigate your browser to:"
106 + einfo "http://www.3ds.com/products/draftsight/download-draftsight/"
107 + einfo "Click \"Download DraftSight for Ubuntu (Beta V1R5.0)\""
108 + einfo "Download the deb file and move it to ${DISTDIR}/${MY_P}.deb"
109 + if use amd64 ; then
110 + einfo "Then download http://dev.gentoo.org/~moult/draftsight/libaudio.tar.gz"
111 + einfo "And move the file to ${DISTDIR}/"
112 + fi
113 +}
114 +
115 +src_install() {
116 + cp -R "${WORKDIR}/opt" "${D}"
117 + exeinto /usr/bin
118 + doexe "${FILESDIR}/${MY_PN}"
119 +
120 + if use amd64 ; then
121 + insinto /opt/dassault-systemes/DraftSight/Libraries/
122 + doins libaudio.so.2
123 + fi
124 +}
125 +
126 +pkg_postinst() {
127 + elog "To use DraftSight as your default viewer for DWG, DXF, and DWT"
128 + elog "Please run the following commands respectively as your normal user:"
129 + elog "xdg-mime default \"dassault-systemes\"_\"draftsight.desktop\" \"application/vnd.dassault-systemes.draftsight-dwg\""
130 + elog "xdg-mime default \"dassault-systemes\"_\"draftsight.desktop\" \"application/vnd.dassault-systemes.draftsight-dxf\""
131 + elog "xdg-mime default \"dassault-systemes\"_\"draftsight.desktop\" \"application/vnd.dassault-systemes.draftsight-dwt\""
132 +
133 + local ICON_SIZES="16 32 48 64 128"
134 +
135 + fdo-mime_desktop_database_update
136 + fdo-mime_mime_database_update
137 + for size in ${ICON_SIZES} ; do
138 + xdg-icon-resource install --noupdate --novendor --context mimetypes \
139 + --mode system --size ${size} \
140 + "${ROOT}/opt/dassault-systemes/DraftSight/Resources/pixmaps/${size}x${size}/program.png" \
141 + "application-vnd.dassault-systemes.draftsight-dwg" \
142 + || die "icon resource installation failed"
143 + xdg-icon-resource install --noupdate --novendor --theme gnome --context \
144 + mimetypes --mode system --size ${size} \
145 + "${ROOT}/opt/dassault-systemes/DraftSight/Resources/pixmaps/${size}x${size}/program.png" \
146 + "application-vnd.dassault-systemes.draftsight-dwg" \
147 + || die "icon resource installation failed"
148 + xdg-icon-resource install --noupdate --novendor --context mimetypes \
149 + --mode system --size ${size} \
150 + "${ROOT}/opt/dassault-systemes/DraftSight/Resources/pixmaps/${size}x${size}/file-dwg.png" \
151 + "application-vnd.dassault-systemes.draftsight-dwg" \
152 + || die "icon resource installation failed"
153 + xdg-icon-resource install --noupdate --novendor --theme gnome --context \
154 + mimetypes --mode system --size ${size} \
155 + "${ROOT}/opt/dassault-systemes/DraftSight/Resources/pixmaps/${size}x${size}/file-dwg.png" \
156 + "application-vnd.dassault-systemes.draftsight-dwg" \
157 + || die "icon resource installation failed"
158 + xdg-icon-resource install --noupdate --novendor --context mimetypes \
159 + --mode system --size ${size} \
160 + "${ROOT}/opt/dassault-systemes/DraftSight/Resources/pixmaps/${size}x${size}/file-dxf.png" \
161 + "application-vnd.dassault-systemes.draftsight-dxf" \
162 + || die "icon resource installation failed"
163 + xdg-icon-resource install --noupdate --novendor --theme gnome --context \
164 + mimetypes --mode system --size ${size} \
165 + "${ROOT}/opt/dassault-systemes/DraftSight/Resources/pixmaps/${size}x${size}/file-dxf.png" \
166 + "application-vnd.dassault-systemes.draftsight-dxf" \
167 + || die "icon resource installation failed"
168 + xdg-icon-resource install --noupdate --novendor --context mimetypes \
169 + --mode system --size ${size} \
170 + "${ROOT}/opt/dassault-systemes/DraftSight/Resources/pixmaps/${size}x${size}/file-dwt.png" \
171 + "application-vnd.dassault-systemes.draftsight-dwt" \
172 + || die "icon resource installation failed"
173 + xdg-icon-resource install --noupdate --novendor --theme gnome --context \
174 + mimetypes --mode system --size ${size} \
175 + "${ROOT}/opt/dassault-systemes/DraftSight/Resources/pixmaps/${size}x${size}/file-dwt.png" \
176 + "application-vnd.dassault-systemes.draftsight-dwt" \
177 + || die "icon resource installation failed"
178 + done
179 + xdg-icon-resource forceupdate
180 +
181 + # prepare for dongle
182 + udev_dorules "${FILESDIR}"/10-ft-rockey.rules
183 +}
184 +
185 +pkg_prerm() {
186 + local ICON_SIZES="16 32 48 64 128"
187 +
188 + fdo-mime_desktop_database_update
189 + fdo-mime_mime_database_update
190 + for size in ${ICON_SIZES} ; do
191 + xdg-icon-resource uninstall --noupdate --context apps --mode system \
192 + --size ${size} "dassault-systemes.draftsight" \
193 + || ewarn "icon uninstall failed"
194 + xdg-icon-resource uninstall --noupdate --context apps --theme gnome \
195 + --mode system --size ${size} "dassault-systemes.draftsight" \
196 + || ewarn "icon uninstall failed"
197 + xdg-icon-resource uninstall --noupdate --context mimetypes --mode system \
198 + --size ${size} "application-vnd.dassault-systemes.draftsight-dwg" \
199 + || ewarn "icon uninstall failed"
200 + xdg-icon-resource uninstall --noupdate --context mimetypes --theme gnome \
201 + --mode system --size ${size} \
202 + "application-vnd.dassault-systemes.draftsight-dwg" \
203 + || ewarn "icon uninstall failed"
204 + xdg-icon-resource uninstall --noupdate --context mimetypes --mode system \
205 + --size ${size} "application-vnd.dassault-systemes.draftsight-dxf" \
206 + || ewarn "icon uninstall failed"
207 + xdg-icon-resource uninstall --noupdate --context mimetypes --theme gnome \
208 + --mode system --size ${size} \
209 + "application-vnd.dassault-systemes.draftsight-dxf" \
210 + || ewarn "icon uninstall failed"
211 + xdg-icon-resource uninstall --noupdate --context mimetypes --mode system \
212 + --size ${size} "application-vnd.dassault-systemes.draftsight-dwt" \
213 + || ewarn "icon uninstall failed"
214 + xdg-icon-resource uninstall --noupdate --context mimetypes --theme gnome \
215 + --mode system --size ${size} \
216 + "application-vnd.dassault-systemes.draftsight-dwt" \
217 + || ewarn "icon uninstall failed"
218 + done
219 + xdg-icon-resource forceupdate
220 +
221 + # remove dongle preparing
222 + if [ "${ROOT}/etc/udev/rules.d/" ]; then
223 + rm -f "${ROOT}/etc/udev/rules.d/10-ft-rockey.rules"
224 + fi
225 +}
226
227 diff --git a/media-gfx/draftsight-bin/files/draftsight b/media-gfx/draftsight-bin/files/draftsight
228 index a879269..8fe6141 100644
229 --- a/media-gfx/draftsight-bin/files/draftsight
230 +++ b/media-gfx/draftsight-bin/files/draftsight
231 @@ -1,9 +1,9 @@
232 #! /bin/bash
233 -BASEDIR="/opt/dassault-systemes/draftsight/bin"
234 +BASEDIR="/opt/dassault-systemes/DraftSight/Linux"
235
236 export LD_LIBRARY_PATH="${BASEDIR}${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}"
237
238 # work around DT_RPATH (.) security issue by chdir'ing into expected $LD_LIBRARY_PATH
239 cd "${BASEDIR}"
240
241 -exec "${BASEDIR}/draftsight.bin" $*
242 +exec "${BASEDIR}/DraftSight" $*