[gentoo-commits] repo/proj/guru:master commit in: sci-chemistry/xcrysden/, sci-chemistry/xcrysden/files/

2022-09-13 Thread Ronny Gutbrod
commit: f97bb147c9e7d1ae7a0cafae40ab2d891b970dc8
Author: Patrick J Taylor  gmail  com>
AuthorDate: Tue Sep 13 18:25:51 2022 +
Commit: Ronny Gutbrod  tastytea  de>
CommitDate: Tue Sep 13 18:27:24 2022 +
URL:https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=f97bb147

sci-chemistry/xcrysden: edit Makefiles to respect LDFLAGS

Closes: https://bugs.gentoo.org/869947
Signed-off-by: Patrick J Taylor  gmail.com>

 .../xcrysden/files/xcrysden-1.6.2-LDFLAGS.patch| 171 +
 sci-chemistry/xcrysden/xcrysden-1.6.2.ebuild   |   1 +
 2 files changed, 172 insertions(+)

diff --git a/sci-chemistry/xcrysden/files/xcrysden-1.6.2-LDFLAGS.patch 
b/sci-chemistry/xcrysden/files/xcrysden-1.6.2-LDFLAGS.patch
new file mode 100644
index 0..1ae39ae5e
--- /dev/null
+++ b/sci-chemistry/xcrysden/files/xcrysden-1.6.2-LDFLAGS.patch
@@ -0,0 +1,171 @@
+diff --git a/C/Makefile b/C/Makefile
+index 2aa0307..452e0f1 100644
+--- a/C/Makefile
 b/C/Makefile
+@@ -12,7 +12,7 @@ include make-objects
+ 
+ .SUFFIXES: .o .c
+ .c.o:
+-  $(CC) $(CFLAGS) $(CPPFLAGS) $(INCS) -c $<
++  $(CC) $(LDFLAGS) $(CFLAGS) $(CPPFLAGS) $(INCS) -c $<
+ 
+ objects = $(XC_OBJS) $(EXTERNAL_OBJS)
+ 
+@@ -24,18 +24,18 @@ compile:
+ #objects: $(objects)
+ #
+ #$(objects): %.o: %.c
+-# $(CC) $(CFLAGS) $(CPPFLAGS) $(INCS) -c $<
++# $(CC) $(LDFLAGS) $(CFLAGS) $(CPPFLAGS) $(INCS) -c $<
+ 
+ xcrys: $(XC_OBJS) $(EXTERNAL_OBJS)
+-  $(CC)  $(CFLAGS) $(XC_OBJS) $(EXTERNAL_OBJS) \
++  $(CC) $(LDFLAGS)  $(CFLAGS) $(XC_OBJS) $(EXTERNAL_OBJS) \
+   -o xcrys $(FFTW3_LIB) $(MESCHACH_LIB) $(TK_LIB) $(TCL_LIB) $(TOGL_LIB) 
$(GLU_LIB) $(GL_LIB) $(X_LIB) $(MATH) $(LDLIB) $(EXT_LIB)
+ 
+ xctclsh: xcTclsh.o
+-  $(CC) $(CFLAGS) xcTclsh.o -o xctclsh $(TCL_LIB) $(MATH) $(LDLIB)
++  $(CC) $(LDFLAGS) $(CFLAGS) xcTclsh.o -o xctclsh $(TCL_LIB) $(MATH) 
$(LDLIB)
+ 
+ XFS_OBJS = xsf2xsf.o
+ xsf2xsf: $(XFS_OBJS) 
+-  $(CC) $(CFLAGS) $(XFS_OBJS) -o xsf2xsf $(MATH) $(LDLIB)
++  $(CC) $(LDFLAGS) $(CFLAGS) $(XFS_OBJS) -o xsf2xsf $(MATH) $(LDLIB)
+ 
+ 
+ install:
+diff --git a/F/Makefile b/F/Makefile
+index 3f8270e..92f17d1 100644
+--- a/F/Makefile
 b/F/Makefile
+@@ -4,10 +4,10 @@ include ../Make.sys
+ .SUFFIXES : .o .f .f90
+ 
+ .f90.o:
+-  $(FC) $(FFLAGS) -c $<
++  $(FC) $(LDFLAGS) $(FFLAGS) -c $<
+ 
+ .f.o:
+-  $(FC) $(FFLAGS) -c $<
++  $(FC) $(LDFLAGS) $(FFLAGS) -c $<
+ 
+ OBJ =   gengeom.o \
+   multhexa.o \
+@@ -73,70 +73,70 @@ spaghetti:
+   cd SRC_spaghetti; $(MAKE)
+ 
+ gengeom: $(OBJ)
+-  $(FC) $(FFLAGS) -o gengeom $(OBJ)
++  $(FC) $(LDFLAGS) $(FFLAGS) -o gengeom $(OBJ)
+ 
+ calplane: $(OBJ2)
+-  $(FC) $(FFLAGS) -o calplane $(OBJ2)
++  $(FC) $(LDFLAGS) $(FFLAGS) -o calplane $(OBJ2)
+ 
+ atomlab: $(OBJ3)
+-  $(FC) $(FFLAGS) -o atomlab $(OBJ3)
++  $(FC) $(LDFLAGS) $(FFLAGS) -o atomlab $(OBJ3)
+ 
+ recvec: recvec.o auxil.o
+-  $(FC) $(FFLAGS) -o recvec recvec.o auxil.o 
++  $(FC) $(LDFLAGS) $(FFLAGS) -o recvec recvec.o auxil.o 
+ 
+ str2xcr: $(OBJ5)
+-  $(FC) $(FFLAGS) -o str2xcr $(OBJ5)
++  $(FC) $(LDFLAGS) $(FFLAGS) -o str2xcr $(OBJ5)
+ 
+ fracCoor: fracCoor.o auxil.o  readf1.o
+-  $(FC) $(FFLAGS) -o fracCoor fracCoor.o auxil.o  readf1.o
++  $(FC) $(LDFLAGS) $(FFLAGS) -o fracCoor fracCoor.o auxil.o  readf1.o
+ 
+ multislab: $(OBJ6)
+-  $(FC) $(FFLAGS) -o multislab $(OBJ6)
++  $(FC) $(LDFLAGS) $(FFLAGS) -o multislab $(OBJ6)
+ 
+ savestruct: $(OBJ7)
+-  $(FC) $(FFLAGS) -o savestruct $(OBJ7)
++  $(FC) $(LDFLAGS) $(FFLAGS) -o savestruct $(OBJ7)
+ 
+ ftnunit: ftnunit.o
+-  $(FC) $(FFLAGS) -o ftnunit ftnunit.o
++  $(FC) $(LDFLAGS) $(FFLAGS) -o ftnunit ftnunit.o
+ 
+ kPath: $(OBJ8)
+-  $(FC) $(FFLAGS) -o kPath $(OBJ8)
++  $(FC) $(LDFLAGS) $(FFLAGS) -o kPath $(OBJ8)
+ 
+ pwKPath: $(OBJ88)
+-  $(FC) $(FFLAGS) -o pwKPath $(OBJ88)
++  $(FC) $(LDFLAGS) $(FFLAGS) -o pwKPath $(OBJ88)
+ 
+ fhi_inpini2ftn34: fhi_inpini2ftn34.o
+-  $(FC) $(FFLAGS) -o fhi_inpini2ftn34 fhi_inpini2ftn34.o
++  $(FC) $(LDFLAGS) $(FFLAGS) -o fhi_inpini2ftn34 fhi_inpini2ftn34.o
+ 
+ fhi_coord2xcr: fhi_coord2xcr.o
+-  $(FC) $(FFLAGS) -o fhi_coord2xcr fhi_coord2xcr.o
++  $(FC) $(LDFLAGS) $(FFLAGS) -o fhi_coord2xcr fhi_coord2xcr.o
+ 
+ wn_readbands: $(OBJ9)
+-  $(FC) $(FFLAGS) -o wn_readbands $(OBJ9)  $(OBJ10)
++  $(FC) $(LDFLAGS) $(FFLAGS) -o wn_readbands $(OBJ9)  $(OBJ10)
+ 
+ wn_readbakgen: wn_readbakgen.o
+-  $(FC) $(FFLAGS) -o wn_readbakgen wn_readbakgen.o
++  $(FC) $(LDFLAGS) $(FFLAGS) -o wn_readbakgen wn_readbakgen.o
+ 
+ pw: pwi2xsf pwi2xsf_old pwo_xsf2xsf
+ 
+ 
+ pwi2xsf_old: $(OBJ11) 
+-  $(FC) $(FFLAGS) -o pwi2xsf_old $(OBJ11)
++  $(FC) $(LDFLAGS) $(FFLAGS) -o pwi2xsf_old $(OBJ11)
+ 
+ pwi2xsf: $(OBJ111)
+-  $(FC) $(FFLAGS) -o pwi2xsf $(OBJ111)
++  $(FC) $(LDFLAGS) $(FFLAGS) -o pwi2xsf $(OBJ111)
+ 
+ pwo_xsf2xsf: $(OBJ13)
+-  $(FC) $(FFLAGS) -o pwo_xsf2xsf 

[gentoo-commits] repo/proj/guru:master commit in: sci-chemistry/xcrysden/files/, sci-chemistry/xcrysden/

2022-09-12 Thread Florian Schmaus
commit: ae3ffad2c35d356a7f5b05daf3eb1799e1000d56
Author: Patrick J Taylor  gmail  com>
AuthorDate: Sat Sep 10 20:17:37 2022 +
Commit: Florian Schmaus  gentoo  org>
CommitDate: Sat Sep 10 20:19:04 2022 +
URL:https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=ae3ffad2

sci-chemistry/xcrysden: replace patch with flag-o-matic to set -fcommon

Signed-off-by: Patrick J Taylor  gmail.com>

 .../xcrysden/files/xcrysden-1.6.2-gcc_flags.patch  | 14 --
 sci-chemistry/xcrysden/xcrysden-1.6.2.ebuild   |  4 ++--
 2 files changed, 2 insertions(+), 16 deletions(-)

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
deleted file mode 100644
index ef231827e..0
--- a/sci-chemistry/xcrysden/files/xcrysden-1.6.2-gcc_flags.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-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

diff --git a/sci-chemistry/xcrysden/xcrysden-1.6.2.ebuild 
b/sci-chemistry/xcrysden/xcrysden-1.6.2.ebuild
index c6ecb73d0..b243f1a06 100644
--- a/sci-chemistry/xcrysden/xcrysden-1.6.2.ebuild
+++ b/sci-chemistry/xcrysden/xcrysden-1.6.2.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-inherit desktop xdg
+inherit desktop flag-o-matic xdg
 
 DESCRIPTION="For the visualisation of molecular and crystal structures."
 
@@ -28,7 +28,6 @@ BDEPEND="${RDEPEND}"
 
 PATCHES=(
"${FILESDIR}/${P}-ext-bwidget.patch"
-   "${FILESDIR}/${P}-gcc_flags.patch"
"${FILESDIR}/${P}-Togl_lib.patch"
"${FILESDIR}/${P}-wrapper_paths.patch"
 )
@@ -39,6 +38,7 @@ src_prepare() {
 }
 
 src_compile() {
+   append-cflags "-fcommon"
emake xcrysden
 }
 



[gentoo-commits] repo/proj/guru:master commit in: sci-chemistry/xcrysden/

2022-09-12 Thread Florian Schmaus
commit: 4dcefd003b68a8e91ff7febad71989613f4c2858
Author: Patrick J Taylor  gmail  com>
AuthorDate: Sat Sep 10 23:26:39 2022 +
Commit: Florian Schmaus  gentoo  org>
CommitDate: Sat Sep 10 23:26:39 2022 +
URL:https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=4dcefd00

sci-chemistry/xcrysden: add missing dependencies

Signed-off-by: Patrick J Taylor  gmail.com>

 sci-chemistry/xcrysden/xcrysden-1.6.2.ebuild | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sci-chemistry/xcrysden/xcrysden-1.6.2.ebuild 
b/sci-chemistry/xcrysden/xcrysden-1.6.2.ebuild
index f8b459ae2..b76f8a0a1 100644
--- a/sci-chemistry/xcrysden/xcrysden-1.6.2.ebuild
+++ b/sci-chemistry/xcrysden/xcrysden-1.6.2.ebuild
@@ -17,7 +17,9 @@ SLOT="0"
 
 KEYWORDS="~amd64"
 
-RDEPEND=">=dev-lang/tcl-8.6.12
+RDEPEND=">=x11-base/xorg-server-21.1.4
+   >=virtual/glu-9.0-r2
+   >=dev-lang/tcl-8.6.12
>=dev-lang/tk-8.6.12
>=dev-tcltk/togl-2.0-r3
>=dev-tcltk/bwidget-1.9.14



[gentoo-commits] repo/proj/guru:master commit in: sci-chemistry/xcrysden/

2022-09-12 Thread Florian Schmaus
commit: cba32fbe5315194e22ea3919f3831e7fa98ad2c6
Author: Patrick J Taylor  gmail  com>
AuthorDate: Sat Sep 10 21:11:29 2022 +
Commit: Florian Schmaus  gentoo  org>
CommitDate: Sat Sep 10 21:11:29 2022 +
URL:https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=cba32fbe

sci-chemistry/xcrysden: BDEPEND->DEPEND

Signed-off-by: Patrick J Taylor  gmail.com>

 sci-chemistry/xcrysden/xcrysden-1.6.2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sci-chemistry/xcrysden/xcrysden-1.6.2.ebuild 
b/sci-chemistry/xcrysden/xcrysden-1.6.2.ebuild
index 99ad16333..f8b459ae2 100644
--- a/sci-chemistry/xcrysden/xcrysden-1.6.2.ebuild
+++ b/sci-chemistry/xcrysden/xcrysden-1.6.2.ebuild
@@ -24,7 +24,7 @@ RDEPEND=">=dev-lang/tcl-8.6.12
>=media-libs/mesa-22.1.3
>=sci-libs/fftw-3.3.10"
 
-BDEPEND="${RDEPEND}"
+DEPEND="${RDEPEND}"
 
 PATCHES=(
"${FILESDIR}/${P}-ext-bwidget.patch"



[gentoo-commits] repo/proj/guru:master commit in: sci-chemistry/xcrysden/, sci-chemistry/xcrysden/files/

2022-09-12 Thread Florian Schmaus
commit: c6a2a87c15be29578d3ce20dc49f0e324b797782
Author: Patrick J Taylor  gmail  com>
AuthorDate: Sat Sep 10 20:18:37 2022 +
Commit: Florian Schmaus  gentoo  org>
CommitDate: Sat Sep 10 20:19:04 2022 +
URL:https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=c6a2a87c

sci-chemistry/xcrysden: rename patches to match established convention

Signed-off-by: Patrick J Taylor  gmail.com>

 .../{xcrysden-1.6.2-Togl_lib.patch => xcrysden-1.6.2-Togl-lib.patch}  | 0
 ...n-1.6.2-wrapper_paths.patch => xcrysden-1.6.2-wrapper-paths.patch} | 0
 sci-chemistry/xcrysden/xcrysden-1.6.2.ebuild  | 4 ++--
 3 files changed, 2 insertions(+), 2 deletions(-)

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
similarity index 100%
rename from sci-chemistry/xcrysden/files/xcrysden-1.6.2-Togl_lib.patch
rename to sci-chemistry/xcrysden/files/xcrysden-1.6.2-Togl-lib.patch

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
similarity index 100%
rename from sci-chemistry/xcrysden/files/xcrysden-1.6.2-wrapper_paths.patch
rename to sci-chemistry/xcrysden/files/xcrysden-1.6.2-wrapper-paths.patch

diff --git a/sci-chemistry/xcrysden/xcrysden-1.6.2.ebuild 
b/sci-chemistry/xcrysden/xcrysden-1.6.2.ebuild
index b243f1a06..99ad16333 100644
--- a/sci-chemistry/xcrysden/xcrysden-1.6.2.ebuild
+++ b/sci-chemistry/xcrysden/xcrysden-1.6.2.ebuild
@@ -28,8 +28,8 @@ BDEPEND="${RDEPEND}"
 
 PATCHES=(
"${FILESDIR}/${P}-ext-bwidget.patch"
-   "${FILESDIR}/${P}-Togl_lib.patch"
-   "${FILESDIR}/${P}-wrapper_paths.patch"
+   "${FILESDIR}/${P}-Togl-lib.patch"
+   "${FILESDIR}/${P}-wrapper-paths.patch"
 )
 
 src_prepare() {



[gentoo-commits] repo/proj/guru:master commit in: sci-chemistry/xcrysden/

2022-09-09 Thread Ronny Gutbrod
commit: 6ec032dc40cd80668fc874aea01f61da09a29bcf
Author: Patrick J Taylor  gmail  com>
AuthorDate: Fri Sep  9 22:23:09 2022 +
Commit: Ronny Gutbrod  tastytea  de>
CommitDate: Fri Sep  9 22:23:42 2022 +
URL:https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=6ec032dc

sci-chemistry/xcrysden: fix missing metadata

Signed-off-by: Patrick J Taylor  gmail.com>

 sci-chemistry/xcrysden/metadata.xml | 8 
 1 file changed, 8 insertions(+)

diff --git a/sci-chemistry/xcrysden/metadata.xml 
b/sci-chemistry/xcrysden/metadata.xml
new file mode 100644
index 0..50dcf2837
--- /dev/null
+++ b/sci-chemistry/xcrysden/metadata.xml
@@ -0,0 +1,8 @@
+
+https://www.gentoo.org/dtd/metadata.dtd'>
+
+   
+   patrick.joseph.tay...@gmail.com
+   Patrick J Taylor
+   
+



[gentoo-commits] repo/proj/guru:master commit in: sci-chemistry/xcrysden/

2022-09-09 Thread Ronny Gutbrod
commit: fef1b3cef4e78333e8a2627ad33a6d9431725a89
Author: Patrick J Taylor  gmail  com>
AuthorDate: Fri Sep  9 22:22:28 2022 +
Commit: Ronny Gutbrod  tastytea  de>
CommitDate: Fri Sep  9 22:23:41 2022 +
URL:https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=fef1b3ce

sci-chemistry/xcrysden: use xdg over xdg-utils

Signed-off-by: Patrick J Taylor  gmail.com>

 sci-chemistry/xcrysden/xcrysden-1.6.2.ebuild | 11 +--
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/sci-chemistry/xcrysden/xcrysden-1.6.2.ebuild 
b/sci-chemistry/xcrysden/xcrysden-1.6.2.ebuild
index 4d9e97a87..c6ecb73d0 100644
--- a/sci-chemistry/xcrysden/xcrysden-1.6.2.ebuild
+++ b/sci-chemistry/xcrysden/xcrysden-1.6.2.ebuild
@@ -3,8 +3,7 @@
 
 EAPI=8
 
-inherit desktop
-inherit xdg-utils
+inherit desktop xdg
 
 DESCRIPTION="For the visualisation of molecular and crystal structures."
 
@@ -57,11 +56,3 @@ src_install() {
/usr/share/doc/${P}/examples/FermiSurface \
/usr/share/man/
 }
-
-pkg_postinst() {
-   xdg_icon_cache_update
-}
-
-pkg_postrm() {
-   xdg_icon_cache_update
-}



[gentoo-commits] repo/proj/guru:master commit in: sci-chemistry/xcrysden/files/

2022-09-09 Thread Ronny Gutbrod
commit: 49f61b1d314069b7b6dca1ad29cf40729559b576
Author: Patrick J Taylor  gmail  com>
AuthorDate: Thu Sep  8 22:09:03 2022 +
Commit: Ronny Gutbrod  tastytea  de>
CommitDate: Thu Sep  8 22:09:03 2022 +
URL:https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=49f61b1d

sci-chemistry/xcrysden: fixed path to icon in desktop file

Signed-off-by: Patrick J Taylor  gmail.com>

 sci-chemistry/xcrysden/files/xcrysden.desktop | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sci-chemistry/xcrysden/files/xcrysden.desktop 
b/sci-chemistry/xcrysden/files/xcrysden.desktop
index 1f0128280..6880af143 100644
--- a/sci-chemistry/xcrysden/files/xcrysden.desktop
+++ b/sci-chemistry/xcrysden/files/xcrysden.desktop
@@ -4,5 +4,5 @@ Type=Application
 Comment=For the visualisation of molecular and crystal structures.
 Exec=xcrysden
 TryExec=xcrysden
-Icon=/usr/share/icons/hicolor/96x96/apps/xcrysden.png
+Icon=/usr/share/icons/hicolor/32x32/apps/xcrysden.png
 Categories=Science;



[gentoo-commits] repo/proj/guru:master commit in: sci-chemistry/xcrysden/files/, sci-chemistry/xcrysden/files/icons/, ...

2022-09-09 Thread Ronny Gutbrod
commit: 7911079d4e3a5d8f1c18ac258508766ad148a2a7
Author: Patrick Taylor  gmail  com>
AuthorDate: Thu Sep  8 19:41:15 2022 +
Commit: Ronny Gutbrod  tastytea  de>
CommitDate: Thu Sep  8 19:41:54 2022 +
URL:https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=7911079d

sci-chemistry/xcrysden: new package, add 1.6.2

Signed-off-by: Patrick Taylor  gmail.com>

 sci-chemistry/xcrysden/Manifest|   1 +
 sci-chemistry/xcrysden/files/icons/xcrysden.png| Bin 0 -> 11920 bytes
 .../xcrysden/files/xcrysden-1.6.2-Togl_lib.patch   |  14 +
 .../files/xcrysden-1.6.2-ext-bwidget.patch |  14 +
 .../xcrysden/files/xcrysden-1.6.2-gcc_flags.patch  |  14 +
 .../files/xcrysden-1.6.2-wrapper_paths.patch   |  16 +
 sci-chemistry/xcrysden/files/xcrysden.desktop  |   8 +++
 sci-chemistry/xcrysden/xcrysden-1.6.2.ebuild   |  67 +
 8 files changed, 134 insertions(+)

diff --git a/sci-chemistry/xcrysden/Manifest b/sci-chemistry/xcrysden/Manifest
new file mode 100644
index 0..a5d3d6532
--- /dev/null
+++ b/sci-chemistry/xcrysden/Manifest
@@ -0,0 +1 @@
+DIST xcrysden-1.6.2.tar.gz 2460277 BLAKE2B 
f0b7c2c5aeff51db97b29c8052273ed44bb9c183e0df62c406eee327c4c5d86d141d8adfd05df70b97661a8cbddbf052c233c288f1f30b308e4c877539c06a84
 SHA512 
9ed1b7fc11674509a3f2bf6604aa11e087fd77a971afb93039ca542cb9abb62b2553c7f386b845f004df5d3d340bdf1fe673552319788f006fd031efb6a4ad67

diff --git a/sci-chemistry/xcrysden/files/icons/xcrysden.png 
b/sci-chemistry/xcrysden/files/icons/xcrysden.png
new file mode 100644
index 0..f41eddceb
Binary files /dev/null and b/sci-chemistry/xcrysden/files/icons/xcrysden.png 
differ

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
new file mode 100644
index 0..533c50650
--- /dev/null
+++ b/sci-chemistry/xcrysden/files/xcrysden-1.6.2-Togl_lib.patch
@@ -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

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
new file mode 100644
index 0..0ca1f69b6
--- /dev/null
+++ b/sci-chemistry/xcrysden/files/xcrysden-1.6.2-ext-bwidget.patch
@@ -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

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
new file mode 100644
index 0..ef231827e
--- /dev/null
+++ b/sci-chemistry/xcrysden/files/xcrysden-1.6.2-gcc_flags.patch
@@ -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

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
new file mode 100644
index 0..8cc8b247a
--- /dev/null
+++ b/sci-chemistry/xcrysden/files/xcrysden-1.6.2-wrapper_paths.patch
@@ -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
+ 

diff --git