@@ -8,43 +8,22 @@ export CFLAGS=$CFLAGS_NON_NATIVE
8
8
export CXXFLAGS=$CXXFLAGS_NON_NATIVE
9
9
10
10
GAP_BUILD_ROOT="$(pwd)"
11
- GAP_ROOT="$SAGE_LOCAL/share/gap"
12
- DESTDIR_GAP_ROOT="$SAGE_DESTDIR$GAP_ROOT"
11
+ GAP_ROOT="$SAGE_LOCAL/lib/gap"
13
12
14
13
# Enable debug info if requested.
15
14
# Note that -g3 allows you to use preprocessor macros in gdb which are widely used
16
15
if [ "$SAGE_DEBUG" = yes ] ; then
17
16
export CFLAGS="-O0 -g3 -DDEBUG_MASTERPOINTERS -DDEBUG_GLOBAL_BAGS -DDEBUG_FUNCTIONS_BAGS $CFLAGS"
18
17
fi
19
18
20
- sdh_configure $SAGE_CONFIGURE_GMP
21
- sdh_make -j1
19
+ # LDFLAGS hack below needed by Semigroups package
20
+ sdh_configure $SAGE_CONFIGURE_GMP LDFLAGS="-pthread" --prefix=$SAGE_LOCAL
21
+ sdh_make
22
22
23
23
# GAP's "make install" is work in progress; we use bits and pieces of it
24
24
# but we install many things manually.
25
- sdh_make install-headers install-libgap
26
-
27
- # Install config.h, which is not currently handled by `make install-headers`
28
- sdh_install build/config.h "$SAGE_LOCAL/include/gap"
29
-
30
- # Now install the gap executable as "gap-bin"; it will be called normally
31
- # through our wrapper script that sets the appropriate GAP_ROOT
32
- SAGE_BIN="$SAGE_LOCAL/bin"
33
- mkdir -p "$SAGE_DESTDIR$SAGE_BIN" || sdh_die "Failed to create the directory $SAGE_BIN"
34
-
35
- ./libtool --mode=install install gap "$SAGE_DESTDIR$SAGE_BIN/gap-bin" || \
36
- sdh_die "Failed to install gap-bin to $SAGE_BIN"
37
-
38
- ./libtool --mode=install install gac "$SAGE_DESTDIR$SAGE_BIN/gac" || \
39
- sdh_die "Failed to install gac to $SAGE_BIN"
40
-
41
- # Now copy additional files GAP needs to run (and a few optional bits) into
42
- # GAP_ROOT; we don't need everything from the source tree
43
- sdh_install bin doc grp lib src tst sysinfo.gap "$GAP_ROOT"
44
-
45
- # GAP's copy of libtool is also used by the toolchain for build GAP packages
46
- # (i.e. by gac)
47
- sdh_install libtool "$GAP_ROOT"
25
+ sdh_make install
26
+ # sdh_make install-headers install-libgap
48
27
49
28
# Install only the minimal packages GAP needs to run
50
29
sdh_install pkg/gapdoc pkg/primgrp pkg/smallgrp pkg/transgrp "$GAP_ROOT"/pkg
@@ -77,34 +56,6 @@ sdh_install \
77
56
pkg/utils \
78
57
"$GAP_ROOT"/pkg
79
58
80
- # Install the GAP startup script; ensure it is executable
81
- sdh_install -T ../gap "$SAGE_BIN/gap"
82
- chmod +x "$SAGE_DESTDIR$SAGE_BIN/gap"
83
-
84
- # Create symlinks under $GAP_ROOT for these executables, as they are expected
85
- # (especially when building kernel packages) to exist
86
- ln -sf "../../bin/gap-bin" "$DESTDIR_GAP_ROOT/gap"
87
- ln -sf "../../bin/gac" "$DESTDIR_GAP_ROOT/gac"
88
-
89
- # Fix the $GAP_ROOT/bin/<arch>/src symlink to be relative (otherwise it links
90
- # to the actual path of the sources GAP was compiled from)
91
- for srclink in "$DESTDIR_GAP_ROOT"/bin/*/src; do
92
- rm -f "$srclink"
93
- ln -s "../../src" "$srclink"
94
- done
95
-
96
- # Additional fixups for some files after they have been copied into their
97
- # destination directory. gac and sysinfo.gap are generated files that contain
98
- # in them hard-coded references to the GAP build directory, which will soon
99
- # be going away. This breaks the build toolchain for some compiled GAP
100
- # packages. We need to replace these paths with the final GAP_ROOT path. The
101
- # below will work so long as neither of these paths contain '|', and if they do
102
- # then god help you. https://github.com/sagemath/sage/issues/27218
103
- sed -i -e "s|$GAP_BUILD_ROOT|$GAP_ROOT|g" \
104
- "$SAGE_DESTDIR$SAGE_BIN/gac" "$DESTDIR_GAP_ROOT/sysinfo.gap" \
105
- "$DESTDIR_GAP_ROOT/bin/gap.sh" "$DESTDIR_GAP_ROOT/doc/make_doc" || \
106
- sdh_die "Failed to fix up hard-coded paths in GAP build tools."
107
-
108
59
# TODO: This seems unnecessary--we are already installing all of doc/ to
109
60
# GAP_ROOT, which is necessary for some functionality in GAP to work. Do
110
61
# we need this? Maybe doc/gap could just be a symlink to gap/doc??
0 commit comments