gentoo-ebuilds/sci-chemistry/molmol/files/molmol-2k_p2-transform-makefiles.patch
NHOrus 48960a5001
sci-chemistry/molmol: Consolidate patches, remove seds, pin C to gnu17
This uses C polymorphism with function pointers without signature.
Fixing that without major re-engineering would be problematic.
Five sed expressions are consolidated into patch, re-engineeded when
needed, eg. for CC and MCFLAGS.
Where possible, patches are moved from eapply inside src_prepare to
PATCHES variable, order of preparations is changed for better understanding.

Closes: https://bugs.gentoo.org/944200
Signed-off-by: NHOrus <jy6x2b32pie9@yahoo.com>
Closes: https://github.com/gentoo/gentoo/pull/40620
Signed-off-by: Sam James <sam@gentoo.org>
2025-02-19 18:04:09 +00:00

40 lines
966 B
Diff

Transformed multiple seds to this patch. `MOLMOLHOME` is the runtime variable
that depends on knowledge of paths that I didn't think of how to correctly
pass beyond editing it with sed. For everything else, it is here and changed
to work correctly with build system.
Rolled up sed transformations were to made build system non-parallel,
fix environmental variables, remove sleep and add use right shell and
build dependencies in startup script.
--- a/makedef.lnx
+++ b/makedef.lnx
@@ -11,12 +11,12 @@
XINCL = -I/usr/X11R6/include
-CC=gcc
+CC ?= gcc
MCPPFLAGS =
-MCFLAGS =-pipe -O3 -ffast-math -march=i686 -mcpu=i686
+MCFLAGS := $(CFLAGS)
RANLIB = /bin/true
-WAIT = sleep 2
+WAIT = sleep 0
SHELL = /bin/sh
CPP = /lib/cpp
--- a/molmol
+++ b/molmol
@@ -1,9 +1,10 @@
-#!/bin/ksh
+#!/bin/sh
#
# startup script for MOLMOL
#
-MOLMOLHOME=/opt/group/MOLMOL
+MOLMOLHOME=/;
+MOLMOLDEV="Motif/OpenGL"
export MOLMOLHOME
export MOLMOLDEV