1 |
commit: 7911079d4e3a5d8f1c18ac258508766ad148a2a7 |
2 |
Author: Patrick Taylor <patrick.joseph.taylor <AT> gmail <DOT> com> |
3 |
AuthorDate: Thu Sep 8 19:41:15 2022 +0000 |
4 |
Commit: Ronny Gutbrod <gentoo <AT> tastytea <DOT> de> |
5 |
CommitDate: Thu Sep 8 19:41:54 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=7911079d |
7 |
|
8 |
sci-chemistry/xcrysden: new package, add 1.6.2 |
9 |
|
10 |
Signed-off-by: Patrick Taylor <patrick.joseph.taylor <AT> gmail.com> |
11 |
|
12 |
sci-chemistry/xcrysden/Manifest | 1 + |
13 |
sci-chemistry/xcrysden/files/icons/xcrysden.png | Bin 0 -> 11920 bytes |
14 |
.../xcrysden/files/xcrysden-1.6.2-Togl_lib.patch | 14 +++++ |
15 |
.../files/xcrysden-1.6.2-ext-bwidget.patch | 14 +++++ |
16 |
.../xcrysden/files/xcrysden-1.6.2-gcc_flags.patch | 14 +++++ |
17 |
.../files/xcrysden-1.6.2-wrapper_paths.patch | 16 +++++ |
18 |
sci-chemistry/xcrysden/files/xcrysden.desktop | 8 +++ |
19 |
sci-chemistry/xcrysden/xcrysden-1.6.2.ebuild | 67 +++++++++++++++++++++ |
20 |
8 files changed, 134 insertions(+) |
21 |
|
22 |
diff --git a/sci-chemistry/xcrysden/Manifest b/sci-chemistry/xcrysden/Manifest |
23 |
new file mode 100644 |
24 |
index 000000000..a5d3d6532 |
25 |
--- /dev/null |
26 |
+++ b/sci-chemistry/xcrysden/Manifest |
27 |
@@ -0,0 +1 @@ |
28 |
+DIST xcrysden-1.6.2.tar.gz 2460277 BLAKE2B f0b7c2c5aeff51db97b29c8052273ed44bb9c183e0df62c406eee327c4c5d86d141d8adfd05df70b97661a8cbddbf052c233c288f1f30b308e4c877539c06a84 SHA512 9ed1b7fc11674509a3f2bf6604aa11e087fd77a971afb93039ca542cb9abb62b2553c7f386b845f004df5d3d340bdf1fe673552319788f006fd031efb6a4ad67 |
29 |
|
30 |
diff --git a/sci-chemistry/xcrysden/files/icons/xcrysden.png b/sci-chemistry/xcrysden/files/icons/xcrysden.png |
31 |
new file mode 100644 |
32 |
index 000000000..f41eddceb |
33 |
Binary files /dev/null and b/sci-chemistry/xcrysden/files/icons/xcrysden.png differ |
34 |
|
35 |
diff --git a/sci-chemistry/xcrysden/files/xcrysden-1.6.2-Togl_lib.patch b/sci-chemistry/xcrysden/files/xcrysden-1.6.2-Togl_lib.patch |
36 |
new file mode 100644 |
37 |
index 000000000..533c50650 |
38 |
--- /dev/null |
39 |
+++ b/sci-chemistry/xcrysden/files/xcrysden-1.6.2-Togl_lib.patch |
40 |
@@ -0,0 +1,14 @@ |
41 |
+Ensures that Togl is linked properly. |
42 |
+diff --git a/system/Make.sys-shared b/system/Make.sys-shared |
43 |
+index 51891e7..ba478fa 100644 |
44 |
+--- a/system/Make.sys-shared |
45 |
++++ b/system/Make.sys-shared |
46 |
+@@ -48,7 +48,7 @@ X_INCDIR = |
47 |
+ |
48 |
+ TCL_LIB = -ltcl$(TCL_VER2) |
49 |
+ TK_LIB = -ltk$(TCL_VER2) |
50 |
+-TOGL_LIB = -lTogl |
51 |
++TOGL_LIB = -Wl,-rpath,"/usr/lib64/Togl2.0" -L/usr/lib64/Togl2.0 -lTogl2.0 |
52 |
+ GLU_LIB = -lGLU |
53 |
+ GL_LIB = -lGL |
54 |
+ FFTW3_LIB = -lfftw3 |
55 |
|
56 |
diff --git a/sci-chemistry/xcrysden/files/xcrysden-1.6.2-ext-bwidget.patch b/sci-chemistry/xcrysden/files/xcrysden-1.6.2-ext-bwidget.patch |
57 |
new file mode 100644 |
58 |
index 000000000..0ca1f69b6 |
59 |
--- /dev/null |
60 |
+++ b/sci-chemistry/xcrysden/files/xcrysden-1.6.2-ext-bwidget.patch |
61 |
@@ -0,0 +1,14 @@ |
62 |
+Prevents bwidget from being automatically downloaded when it is already required as a build/run-time dependency. |
63 |
+diff --git a/Makefile b/Makefile |
64 |
+index cfdc14a..d0f7e6c 100644 |
65 |
+--- a/Makefile |
66 |
++++ b/Makefile |
67 |
+@@ -18,7 +18,7 @@ what: |
68 |
+ |
69 |
+ all: tcl tk mesa togl fftw xcrysden |
70 |
+ # meschach |
71 |
+-xcrysden: usage bwidget bindir src-C src-F src-Tcl |
72 |
++xcrysden: usage bindir src-C src-F src-Tcl |
73 |
+ |
74 |
+ usage: $(TOPDIR)/docs/xcrysden.1 |
75 |
+ 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 |
76 |
|
77 |
diff --git a/sci-chemistry/xcrysden/files/xcrysden-1.6.2-gcc_flags.patch b/sci-chemistry/xcrysden/files/xcrysden-1.6.2-gcc_flags.patch |
78 |
new file mode 100644 |
79 |
index 000000000..ef231827e |
80 |
--- /dev/null |
81 |
+++ b/sci-chemistry/xcrysden/files/xcrysden-1.6.2-gcc_flags.patch |
82 |
@@ -0,0 +1,14 @@ |
83 |
+Adds -fcommon to CFLAGS to allow compilation on more recent GCC. |
84 |
+diff --git a/system/Make.sys-shared b/system/Make.sys-shared |
85 |
+index 51891e7..f89f876 100644 |
86 |
+--- a/system/Make.sys-shared |
87 |
++++ b/system/Make.sys-shared |
88 |
+@@ -19,7 +19,7 @@ MAKE = make |
89 |
+ # C-preprocessor flags |
90 |
+ CPPFLAGS ?= |
91 |
+ # C-compiler flags |
92 |
+-CFLAGS += -ffast-math -funroll-loops -fPIC -pedantic -Wall |
93 |
++CFLAGS += -ffast-math -funroll-loops -fPIC -pedantic -Wall -fcommon |
94 |
+ |
95 |
+ CC = gcc |
96 |
+ #LDLIB = -ldl |
97 |
|
98 |
diff --git a/sci-chemistry/xcrysden/files/xcrysden-1.6.2-wrapper_paths.patch b/sci-chemistry/xcrysden/files/xcrysden-1.6.2-wrapper_paths.patch |
99 |
new file mode 100644 |
100 |
index 000000000..8cc8b247a |
101 |
--- /dev/null |
102 |
+++ b/sci-chemistry/xcrysden/files/xcrysden-1.6.2-wrapper_paths.patch |
103 |
@@ -0,0 +1,16 @@ |
104 |
+Ensures that wrapper scripts account for live filesystem merge. |
105 |
+diff --git a/sys_utils/wrappers.sh b/sys_utils/wrappers.sh |
106 |
+index 1fa3cc6..e078b22 100755 |
107 |
+--- a/sys_utils/wrappers.sh |
108 |
++++ b/sys_utils/wrappers.sh |
109 |
+@@ -5,8 +5,8 @@ do |
110 |
+ #!/bin/sh -f |
111 |
+ |
112 |
+ # simple wrapper to run $cmd |
113 |
+-XCRYSDEN_TOPDIR="$prefix/share/$xcrysden" |
114 |
+-XCRYSDEN_LIB_BINDIR="$prefix/lib/$xcrysden" |
115 |
++XCRYSDEN_TOPDIR="/usr/share/$xcrysden" |
116 |
++XCRYSDEN_LIB_BINDIR="/usr/lib/$xcrysden" |
117 |
+ export XCRYSDEN_TOPDIR |
118 |
+ export XCRYSDEN_LIB_BINDIR |
119 |
+ |
120 |
|
121 |
diff --git a/sci-chemistry/xcrysden/files/xcrysden.desktop b/sci-chemistry/xcrysden/files/xcrysden.desktop |
122 |
new file mode 100644 |
123 |
index 000000000..1f0128280 |
124 |
--- /dev/null |
125 |
+++ b/sci-chemistry/xcrysden/files/xcrysden.desktop |
126 |
@@ -0,0 +1,8 @@ |
127 |
+[Desktop Entry] |
128 |
+Name=XCrySDen |
129 |
+Type=Application |
130 |
+Comment=For the visualisation of molecular and crystal structures. |
131 |
+Exec=xcrysden |
132 |
+TryExec=xcrysden |
133 |
+Icon=/usr/share/icons/hicolor/96x96/apps/xcrysden.png |
134 |
+Categories=Science; |
135 |
|
136 |
diff --git a/sci-chemistry/xcrysden/xcrysden-1.6.2.ebuild b/sci-chemistry/xcrysden/xcrysden-1.6.2.ebuild |
137 |
new file mode 100644 |
138 |
index 000000000..4d9e97a87 |
139 |
--- /dev/null |
140 |
+++ b/sci-chemistry/xcrysden/xcrysden-1.6.2.ebuild |
141 |
@@ -0,0 +1,67 @@ |
142 |
+# Copyright 1999-2022 Gentoo Authors |
143 |
+# Distributed under the terms of the GNU General Public License v2 |
144 |
+ |
145 |
+EAPI=8 |
146 |
+ |
147 |
+inherit desktop |
148 |
+inherit xdg-utils |
149 |
+ |
150 |
+DESCRIPTION="For the visualisation of molecular and crystal structures." |
151 |
+ |
152 |
+HOMEPAGE="http://www.xcrysden.org/" |
153 |
+ |
154 |
+SRC_URI="http://www.xcrysden.org/download/${P}.tar.gz" |
155 |
+ |
156 |
+LICENSE="GPL-2+" |
157 |
+ |
158 |
+SLOT="0" |
159 |
+ |
160 |
+KEYWORDS="~amd64" |
161 |
+ |
162 |
+RDEPEND=">=dev-lang/tcl-8.6.12 |
163 |
+ >=dev-lang/tk-8.6.12 |
164 |
+ >=dev-tcltk/togl-2.0-r3 |
165 |
+ >=dev-tcltk/bwidget-1.9.14 |
166 |
+ >=media-libs/mesa-22.1.3 |
167 |
+ >=sci-libs/fftw-3.3.10" |
168 |
+ |
169 |
+BDEPEND="${RDEPEND}" |
170 |
+ |
171 |
+PATCHES=( |
172 |
+ "${FILESDIR}/${P}-ext-bwidget.patch" |
173 |
+ "${FILESDIR}/${P}-gcc_flags.patch" |
174 |
+ "${FILESDIR}/${P}-Togl_lib.patch" |
175 |
+ "${FILESDIR}/${P}-wrapper_paths.patch" |
176 |
+) |
177 |
+ |
178 |
+src_prepare() { |
179 |
+ default |
180 |
+ cp "${S}/system/Make.sys-shared" "${S}/Make.sys" || die 'Copying Make.sys to build dir failed.' |
181 |
+} |
182 |
+ |
183 |
+src_compile() { |
184 |
+ emake xcrysden |
185 |
+} |
186 |
+ |
187 |
+src_install() { |
188 |
+ emake \ |
189 |
+ prefix="${D}"/usr \ |
190 |
+ install |
191 |
+ |
192 |
+ domenu "${FILESDIR}/${PN}.desktop" |
193 |
+ doicon -s 32x32 "${FILESDIR}/icons/${PN}.png" |
194 |
+ docompress -x /usr/share/doc/${P}/examples/GAUSSIAN_files/ \ |
195 |
+ /usr/share/doc/${P}/examples/Orca_files/ \ |
196 |
+ /usr/share/doc/${P}/examples/XSF_Files/ \ |
197 |
+ /usr/share/doc/${P}/examples/Scripting/ \ |
198 |
+ /usr/share/doc/${P}/examples/FermiSurface \ |
199 |
+ /usr/share/man/ |
200 |
+} |
201 |
+ |
202 |
+pkg_postinst() { |
203 |
+ xdg_icon_cache_update |
204 |
+} |
205 |
+ |
206 |
+pkg_postrm() { |
207 |
+ xdg_icon_cache_update |
208 |
+} |