summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Timo Gurr <tgurr@exherbo.org> 2018-09-05 17:08:16 +0200
committerAvatar Timo Gurr <tgurr@exherbo.org> 2018-09-05 17:08:16 +0200
commit5586d8d022f71355d21e23b0f9c0670e3f147693 (patch)
treea9c83c133aeb27e64143c53557561a67175ceea6
parent4ca6bcfb1aa9f3a26e5568a53326bf13738cd3a9 (diff)
downloadmarv-5586d8d022f71355d21e23b0f9c0670e3f147693.tar.gz
marv-5586d8d022f71355d21e23b0f9c0670e3f147693.tar.xz
wings: version bump to 2.1.7
-rw-r--r--packages/media-gfx/wings/wings-1.5.3.exheres-049
-rw-r--r--packages/media-gfx/wings/wings-2.1.7.exheres-0106
2 files changed, 106 insertions, 49 deletions
diff --git a/packages/media-gfx/wings/wings-1.5.3.exheres-0 b/packages/media-gfx/wings/wings-1.5.3.exheres-0
deleted file mode 100644
index d548f8a..0000000
--- a/packages/media-gfx/wings/wings-1.5.3.exheres-0
+++ /dev/null
@@ -1,49 +0,0 @@
-# Copyright 2015 Marvin Schmidt <marv@exherbo.org>
-# Distributed under the terms of the GNU General Public License v2
-
-MY_PV=v${PV}
-require github [ user=dgud ]
-
-SUMMARY="Wings 3D is an advanced subdivision modeler that is both powerful and easy to use"
-HOMEPAGE="http://www.wings3d.com"
-
-LICENCES="BSD-3"
-SLOT="0"
-PLATFORMS="~amd64"
-MYOPTIONS=""
-
-DEPENDENCIES="
- build+run:
- dev-erlang/erlang-cl
- dev-erlang/esdl[>=1.0.1]
- dev-lang/erlang[>=16.01][wxwidgets(-)]
- media-libs/SDL:0
-"
-
-#WORK="${WORKBASE}"/${PNV}
-
-src_compile() {
- ERL_PATH=$(/usr/bin/erl -noshell -eval 'io:format("~s", [code:lib_dir(esdl)]), halt().')
-
- emake ESDL_PATH=${ERL_PATH} unix
-}
-
-src_install() {
- WINGS_PATH=/usr/$(exhost --target)/lib/erlang/lib/${PNV}
-
- insinto ${WINGS_PATH}
- for subdir in ebin fonts textures shaders ; do
- doins -r ${subdir}
- done
-
- insinto ${WINGS_PATH}/plugins/default
- doins -r plugins/*
-
- insinto ${WINGS_PATH}/ebin
- doins intl_tools/tools.beam
-
- newbin "${FILES}"/wings.sh wings
-
- emagicdocs
-}
-
diff --git a/packages/media-gfx/wings/wings-2.1.7.exheres-0 b/packages/media-gfx/wings/wings-2.1.7.exheres-0
new file mode 100644
index 0000000..1ab6278
--- /dev/null
+++ b/packages/media-gfx/wings/wings-2.1.7.exheres-0
@@ -0,0 +1,106 @@
+# Copyright 2015 Marvin Schmidt <marv@exherbo.org>
+# Distributed under the terms of the GNU General Public License v2
+
+require github [ user=dgud tag=v${PV} ] \
+ freedesktop-desktop \
+ gtk-icon-cache
+
+SUMMARY="Wings 3D is an advanced subdivision modeler that is both powerful and easy to use"
+HOMEPAGE+=" http://www.wings3d.com"
+
+LICENCES="BSD-3"
+SLOT="0"
+PLATFORMS="~amd64"
+MYOPTIONS="
+ ( providers: graphicsmagick imagemagick ) [[
+ number-selected = at-least-one
+ ]]
+"
+
+DEPENDENCIES="
+ build:
+ providers:graphicsmagick? ( media-gfx/GraphicsMagick[imagemagick] )
+ providers:imagemagick? ( media-gfx/ImageMagick )
+ build+run:
+ dev-erlang/erlang-cl
+ dev-erlang/esdl[>=1.0.1]
+ dev-lang/erlang[>=20.2][wxwidgets(-)]
+ media-libs/SDL:0
+"
+
+src_prepare() {
+ default
+
+ # fix includes
+ edo sed \
+ -e '/include_lib/s|"wings/|"../|' \
+ -i $(edo find . -name '*'.erl)
+
+ # build flags
+ edo sed \
+ -e 's|-O3||g' \
+ -e 's|-Werror||g' \
+ -e 's|CFLAGS = |CFLAGS += |g' \
+ -i $(edo find . -name Makefile)
+
+ # fix version string
+ edo sed \
+ -e "s:v1.2.x.y.WINGS:${PV}:g" \
+ -i WINGS-VERSION-GEN
+
+ # create desktop icon
+ edo convert win32/${PN}.ico win32/${PN}.png
+}
+
+src_compile() {
+ ERL_PATH=$(/usr/bin/erl -noshell -eval 'io:format("~s", [code:lib_dir(esdl)]), halt().')
+
+ emake ESDL_PATH=${ERL_PATH} unix
+}
+
+src_install() {
+ WINGS_PATH=/usr/$(exhost --target)/lib/erlang/lib/${PNV}
+
+ insinto ${WINGS_PATH}
+ for subdir in ebin textures shaders ; do
+ doins -r ${subdir}
+ done
+
+ insinto ${WINGS_PATH}/plugins/default
+ doins -r plugins/*
+
+ insinto ${WINGS_PATH}/ebin
+ doins intl_tools/tools.beam
+
+ newbin "${FILES}"/wings.sh wings
+
+ insinto /usr/share/icons/hicolor/256x256/apps
+ newins win32/${PN}-3.png ${PN}.png
+
+ insinto /usr/share/applications
+ hereins ${PN}.desktop <<EOF
+[Desktop Entry]
+Name=Wings 3D
+Version=1.1
+Exec=${PN}
+Comment=A Polygon Modeler
+Icon=${PN}
+Type=Application
+Terminal=false
+StartupNotify=true
+Categories=Graphics;3DGraphics;
+EOF
+
+ emagicdocs
+}
+
+pkg_postinst() {
+ freedesktop-desktop_pkg_postinst
+ gtk-icon-cache_pkg_postinst
+}
+
+pkg_postrm() {
+ freedesktop-desktop_pkg_postrm
+ gtk-icon-cache_pkg_postrm
+}
+