mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-04-07 03:10:15 -04:00
sci-chemistry/xcrysden: new package, add 1.6.2
Signed-off-by: Patrick Taylor <patrick.joseph.taylor@gmail.com>
This commit is contained in:
1
sci-chemistry/xcrysden/Manifest
Normal file
1
sci-chemistry/xcrysden/Manifest
Normal file
@@ -0,0 +1 @@
|
||||
DIST xcrysden-1.6.2.tar.gz 2460277 BLAKE2B f0b7c2c5aeff51db97b29c8052273ed44bb9c183e0df62c406eee327c4c5d86d141d8adfd05df70b97661a8cbddbf052c233c288f1f30b308e4c877539c06a84 SHA512 9ed1b7fc11674509a3f2bf6604aa11e087fd77a971afb93039ca542cb9abb62b2553c7f386b845f004df5d3d340bdf1fe673552319788f006fd031efb6a4ad67
|
||||
BIN
sci-chemistry/xcrysden/files/icons/xcrysden.png
Normal file
BIN
sci-chemistry/xcrysden/files/icons/xcrysden.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
14
sci-chemistry/xcrysden/files/xcrysden-1.6.2-Togl_lib.patch
Normal file
14
sci-chemistry/xcrysden/files/xcrysden-1.6.2-Togl_lib.patch
Normal file
@@ -0,0 +1,14 @@
|
||||
Ensures that Togl is linked properly.
|
||||
diff --git a/system/Make.sys-shared b/system/Make.sys-shared
|
||||
index 51891e7..ba478fa 100644
|
||||
--- a/system/Make.sys-shared
|
||||
+++ b/system/Make.sys-shared
|
||||
@@ -48,7 +48,7 @@ X_INCDIR =
|
||||
|
||||
TCL_LIB = -ltcl$(TCL_VER2)
|
||||
TK_LIB = -ltk$(TCL_VER2)
|
||||
-TOGL_LIB = -lTogl
|
||||
+TOGL_LIB = -Wl,-rpath,"/usr/lib64/Togl2.0" -L/usr/lib64/Togl2.0 -lTogl2.0
|
||||
GLU_LIB = -lGLU
|
||||
GL_LIB = -lGL
|
||||
FFTW3_LIB = -lfftw3
|
||||
@@ -0,0 +1,14 @@
|
||||
Prevents bwidget from being automatically downloaded when it is already required as a build/run-time dependency.
|
||||
diff --git a/Makefile b/Makefile
|
||||
index cfdc14a..d0f7e6c 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -18,7 +18,7 @@ what:
|
||||
|
||||
all: tcl tk mesa togl fftw xcrysden
|
||||
# meschach
|
||||
-xcrysden: usage bwidget bindir src-C src-F src-Tcl
|
||||
+xcrysden: usage bindir src-C src-F src-Tcl
|
||||
|
||||
usage: $(TOPDIR)/docs/xcrysden.1
|
||||
man $(TOPDIR)/docs/xcrysden.1 | awk 'BEGIN {lprint=0; print "## do not edit changes will be lost (file automatically generated)\n"; } /SYNOPSIS/ { lprint=1; } /SEE ALSO/ { lprint=0; } /a*/ { if (lprint) print; }' > usage
|
||||
14
sci-chemistry/xcrysden/files/xcrysden-1.6.2-gcc_flags.patch
Normal file
14
sci-chemistry/xcrysden/files/xcrysden-1.6.2-gcc_flags.patch
Normal file
@@ -0,0 +1,14 @@
|
||||
Adds -fcommon to CFLAGS to allow compilation on more recent GCC.
|
||||
diff --git a/system/Make.sys-shared b/system/Make.sys-shared
|
||||
index 51891e7..f89f876 100644
|
||||
--- a/system/Make.sys-shared
|
||||
+++ b/system/Make.sys-shared
|
||||
@@ -19,7 +19,7 @@ MAKE = make
|
||||
# C-preprocessor flags
|
||||
CPPFLAGS ?=
|
||||
# C-compiler flags
|
||||
-CFLAGS += -ffast-math -funroll-loops -fPIC -pedantic -Wall
|
||||
+CFLAGS += -ffast-math -funroll-loops -fPIC -pedantic -Wall -fcommon
|
||||
|
||||
CC = gcc
|
||||
#LDLIB = -ldl
|
||||
@@ -0,0 +1,16 @@
|
||||
Ensures that wrapper scripts account for live filesystem merge.
|
||||
diff --git a/sys_utils/wrappers.sh b/sys_utils/wrappers.sh
|
||||
index 1fa3cc6..e078b22 100755
|
||||
--- a/sys_utils/wrappers.sh
|
||||
+++ b/sys_utils/wrappers.sh
|
||||
@@ -5,8 +5,8 @@ do
|
||||
#!/bin/sh -f
|
||||
|
||||
# simple wrapper to run $cmd
|
||||
-XCRYSDEN_TOPDIR="$prefix/share/$xcrysden"
|
||||
-XCRYSDEN_LIB_BINDIR="$prefix/lib/$xcrysden"
|
||||
+XCRYSDEN_TOPDIR="/usr/share/$xcrysden"
|
||||
+XCRYSDEN_LIB_BINDIR="/usr/lib/$xcrysden"
|
||||
export XCRYSDEN_TOPDIR
|
||||
export XCRYSDEN_LIB_BINDIR
|
||||
|
||||
8
sci-chemistry/xcrysden/files/xcrysden.desktop
Normal file
8
sci-chemistry/xcrysden/files/xcrysden.desktop
Normal file
@@ -0,0 +1,8 @@
|
||||
[Desktop Entry]
|
||||
Name=XCrySDen
|
||||
Type=Application
|
||||
Comment=For the visualisation of molecular and crystal structures.
|
||||
Exec=xcrysden
|
||||
TryExec=xcrysden
|
||||
Icon=/usr/share/icons/hicolor/96x96/apps/xcrysden.png
|
||||
Categories=Science;
|
||||
67
sci-chemistry/xcrysden/xcrysden-1.6.2.ebuild
Normal file
67
sci-chemistry/xcrysden/xcrysden-1.6.2.ebuild
Normal file
@@ -0,0 +1,67 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit desktop
|
||||
inherit xdg-utils
|
||||
|
||||
DESCRIPTION="For the visualisation of molecular and crystal structures."
|
||||
|
||||
HOMEPAGE="http://www.xcrysden.org/"
|
||||
|
||||
SRC_URI="http://www.xcrysden.org/download/${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2+"
|
||||
|
||||
SLOT="0"
|
||||
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
RDEPEND=">=dev-lang/tcl-8.6.12
|
||||
>=dev-lang/tk-8.6.12
|
||||
>=dev-tcltk/togl-2.0-r3
|
||||
>=dev-tcltk/bwidget-1.9.14
|
||||
>=media-libs/mesa-22.1.3
|
||||
>=sci-libs/fftw-3.3.10"
|
||||
|
||||
BDEPEND="${RDEPEND}"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${P}-ext-bwidget.patch"
|
||||
"${FILESDIR}/${P}-gcc_flags.patch"
|
||||
"${FILESDIR}/${P}-Togl_lib.patch"
|
||||
"${FILESDIR}/${P}-wrapper_paths.patch"
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
cp "${S}/system/Make.sys-shared" "${S}/Make.sys" || die 'Copying Make.sys to build dir failed.'
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake xcrysden
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake \
|
||||
prefix="${D}"/usr \
|
||||
install
|
||||
|
||||
domenu "${FILESDIR}/${PN}.desktop"
|
||||
doicon -s 32x32 "${FILESDIR}/icons/${PN}.png"
|
||||
docompress -x /usr/share/doc/${P}/examples/GAUSSIAN_files/ \
|
||||
/usr/share/doc/${P}/examples/Orca_files/ \
|
||||
/usr/share/doc/${P}/examples/XSF_Files/ \
|
||||
/usr/share/doc/${P}/examples/Scripting/ \
|
||||
/usr/share/doc/${P}/examples/FermiSurface \
|
||||
/usr/share/man/
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
xdg_icon_cache_update
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
xdg_icon_cache_update
|
||||
}
|
||||
Reference in New Issue
Block a user