summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim A. Misbakh-Soloviov <git@mva.name>2016-10-21 18:51:03 +0700
committerVadim A. Misbakh-Soloviov <git@mva.name>2016-10-21 18:51:03 +0700
commit468f4ceed620fe9253cbc1161b13799af75989b4 (patch)
tree8159cb57b97b125f9e305c55d22cda608f9ac1f3
parentfixed gentoo#585136 (diff)
downloadactivehome-468f4ceed620fe9253cbc1161b13799af75989b4.tar.gz
activehome-468f4ceed620fe9253cbc1161b13799af75989b4.tar.bz2
activehome-468f4ceed620fe9253cbc1161b13799af75989b4.zip
SweetHome3d: fix to use system java (it also fixes many rendering issues)
-rw-r--r--.gitignore2
-rw-r--r--media-gfx/sweethome3d-bin/sweethome3d-bin-5.2-r1.ebuild55
-rw-r--r--media-gfx/sweethome3d-bin/sweethome3d-bin-5.2.ebuild31
-rw-r--r--profiles/use.local.desc0
4 files changed, 57 insertions, 31 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..71ba2af
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+/metadata/*cache
+/profiles/use.local.desc
diff --git a/media-gfx/sweethome3d-bin/sweethome3d-bin-5.2-r1.ebuild b/media-gfx/sweethome3d-bin/sweethome3d-bin-5.2-r1.ebuild
new file mode 100644
index 0000000..dcdc384
--- /dev/null
+++ b/media-gfx/sweethome3d-bin/sweethome3d-bin-5.2-r1.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+# This ebuild is a modified version of ebuild from java overlay.
+
+EAPI="6"
+inherit eutils
+
+MY_PN="SweetHome3D"
+
+DESCRIPTION="Sweet Home 3D is a free interior design application."
+HOMEPAGE="http://sweethome3d.com/"
+SRC_URI="
+ amd64? ( mirror://sourceforge/sweethome3d/${MY_PN}-${PV}-linux-x64.tgz )
+ x86? ( mirror://sourceforge/sweethome3d/${MY_PN}-${PV}-linux-x86.tgz )
+"
+LICENSE="GPL-3"
+IUSE="+system-java"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="
+ system-java? ( app-eselect/eselect-java )
+"
+
+RDEPEND="
+ system-java? ( virtual/jre:* )
+"
+
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+pkg_setup() {
+ if use system-java && [ ! -f "$JAVA_HOME"/bin/java]; then
+ die 'Your Java VM installation is broken. Please, select proper system vm through eselect.'
+ fi
+}
+
+src_prepare() {
+ rm THIRDPARTY-LICENSE-* LICENSE.TXT COPYING.TXT
+ if use system-java; then
+ rm -rf jre*
+ sed -r \
+ -e 's@^(exec.*/bin/java)@exec "$JAVA_HOME"/bin/java@' \
+ -e 's@:"\$PROGRAM_DIR"/[^/]*/(lib/javaws.jar) @:"$JAVA_HOME"/jre/\1:"$JAVA_HOME"/\1 @' \
+ -i SweetHome3D
+ fi
+ default
+}
+
+src_install() {
+ dodir /usr/share/sweethome3d
+ cp -r "${S}"/* "${D}"/usr/share/sweethome3d/
+ dosym /usr/share/sweethome3d/"${MY_PN}" /usr/bin/"${MY_PN}"
+ make_desktop_entry "${MY_PN}" "${MY_PN}"
+}
diff --git a/media-gfx/sweethome3d-bin/sweethome3d-bin-5.2.ebuild b/media-gfx/sweethome3d-bin/sweethome3d-bin-5.2.ebuild
deleted file mode 100644
index 64bf53f..0000000
--- a/media-gfx/sweethome3d-bin/sweethome3d-bin-5.2.ebuild
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-# This ebuild is a modified version of ebuild from java overlay.
-
-EAPI="6"
-inherit eutils
-
-MY_PN="SweetHome3D"
-
-DESCRIPTION="Sweet Home 3D is a free interior design application."
-HOMEPAGE="http://sweethome3d.sourceforge.net/"
-SRC_URI="amd64? ( mirror://sourceforge/sweethome3d/${MY_PN}-${PV}-linux-x64.tgz )
- x86? ( mirror://sourceforge/sweethome3d/${MY_PN}-${PV}-linux-x86.tgz )"
-LICENSE="GPL-3"
-IUSE=""
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-
-DEPEND=""
-
-RDEPEND=""
-
-S="${WORKDIR}/${MY_PN}-${PV}"
-src_install() {
- dodir /usr/share/sweethome3d
- cp -r ${S}/* ${D}/usr/share/sweethome3d/
- dosym /usr/share/sweethome3d/${MY_PN} /usr/bin/${MY_PN}
- make_desktop_entry ${MY_PN} "${MY_PN}"
-}
-
diff --git a/profiles/use.local.desc b/profiles/use.local.desc
deleted file mode 100644
index e69de29..0000000
--- a/profiles/use.local.desc
+++ /dev/null