@@ -8,46 +8,25 @@ 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
- # GAP's "make install" is work in progress; we use bits and pieces of it
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 gen/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 gen 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"
23
+ sdh_make_install
24
+ # sdh_make install-headers install-libgap
25
+ # The 'packagemanager' package expects this https://github.com/gap-packages/PackageManager/issues/105
26
+ mkdir -p "$SAGE_LOCAL/lib/gap/bin"
48
27
49
28
# Install only the minimal packages GAP needs to run
50
- sdh_install pkg/GAPDoc-* pkg/primgrp-* pkg/SmallGrp-* pkg/transgrp "$GAP_ROOT"/pkg
29
+ sdh_install pkg/gapdoc pkg/primgrp pkg/smallgrp pkg/transgrp "$GAP_ROOT"/pkg
51
30
52
31
# Install additional packages that are not strictly required, but that are
53
32
# typically "expected" to be loaded: These are the default packages that are
@@ -58,50 +37,25 @@ sdh_install pkg/GAPDoc-* pkg/primgrp-* pkg/SmallGrp-* pkg/transgrp "$GAP_ROOT"/p
58
37
# Also include atlasrep which is a dependency of tomlib
59
38
sdh_install \
60
39
pkg/atlasrep \
61
- pkg/autpgrp-* \
62
- pkg/alnuth-* \
63
- pkg/crisp-* \
64
- pkg/ctbllib-* \
65
- pkg/FactInt-* \
40
+ pkg/autodoc \
41
+ pkg/autpgrp \
42
+ pkg/alnuth \
43
+ pkg/crisp \
44
+ pkg/ctbllib \
45
+ pkg/factint \
66
46
pkg/fga \
67
- pkg/irredsol-* \
68
- pkg/laguna-* \
69
- pkg/PackageManager-* \
70
- pkg/polenta-* \
71
- pkg/polycyclic-* \
72
- pkg/resclasses-* \
73
- pkg/sophus-* \
74
- pkg/tomlib-* \
47
+ pkg/irredsol \
48
+ pkg/laguna \
49
+ pkg/packagemanager \
50
+ pkg/polenta \
51
+ pkg/polycyclic \
52
+ pkg/radiroot \
53
+ pkg/resclasses \
54
+ pkg/sophus \
55
+ pkg/tomlib \
56
+ pkg/utils \
75
57
"$GAP_ROOT"/pkg
76
58
77
- # Install the GAP startup script; ensure it is executable
78
- sdh_install -T ../gap "$SAGE_BIN/gap"
79
- chmod +x "$SAGE_DESTDIR$SAGE_BIN/gap"
80
-
81
- # Create symlinks under $GAP_ROOT for these executables, as they are expected
82
- # (especially when building kernel packages) to exist
83
- ln -sf "../../bin/gap-bin" "$DESTDIR_GAP_ROOT/gap"
84
- ln -sf "../../bin/gac" "$DESTDIR_GAP_ROOT/gac"
85
-
86
- # Fix the $GAP_ROOT/bin/<arch>/src symlink to be relative (otherwise it links
87
- # to the actual path of the sources GAP was compiled from)
88
- for srclink in "$DESTDIR_GAP_ROOT"/bin/*/src; do
89
- rm -f "$srclink"
90
- ln -s "../../src" "$srclink"
91
- done
92
-
93
- # Additional fixups for some files after they have been copied into their
94
- # destination directory. gac and sysinfo.gap are generated files that contain
95
- # in them hard-coded references to the GAP build directory, which will soon
96
- # be going away. This breaks the build toolchain for some compiled GAP
97
- # packages. We need to replace these paths with the final GAP_ROOT path. The
98
- # below will work so long as neither of these paths contain '|', and if they do
99
- # then god help you. https://github.com/sagemath/sage/issues/27218
100
- sed -i -e "s|$GAP_BUILD_ROOT|$GAP_ROOT|g" \
101
- "$SAGE_DESTDIR$SAGE_BIN/gac" "$DESTDIR_GAP_ROOT/sysinfo.gap" \
102
- "$DESTDIR_GAP_ROOT/bin/gap.sh" "$DESTDIR_GAP_ROOT/doc/make_doc" || \
103
- sdh_die "Failed to fix up hard-coded paths in GAP build tools."
104
-
105
59
# TODO: This seems unnecessary--we are already installing all of doc/ to
106
60
# GAP_ROOT, which is necessary for some functionality in GAP to work. Do
107
61
# we need this? Maybe doc/gap could just be a symlink to gap/doc??
0 commit comments