File: inject-ntl-5.4.2

package info (click to toggle)
gf2x 1.1-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 2,612 kB
  • ctags: 725
  • sloc: sh: 11,112; ansic: 7,549; cpp: 1,369; makefile: 490; perl: 151
file content (22 lines) | stat: -rwxr-xr-x 614 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash

# patches an ntl-5.4.2 tree for use with gf2x

# Note that you must have completed compilation of gf2x first.

# Usage: inject-ntl <path-to-ntl-toplevel>


here=`dirname "$0"`
inject_name=$(sh -c 'cd "$here" ; basename "`pwd`"')

ntl_path="$1"
if [ ! -d "$ntl_path/include/NTL" ] ; then
    echo "No ntl found at path $ntl_path" >&2
    exit 1
fi

rsync -av --delete "$here/" "$ntl_path/include/$inject_name/"
sed -e "s/@@gf2x_inject@@/$inject_name/g" < "$here/patch-wrt-ntl-5.4.2" | \
    patch -p1 -d "$ntl_path"
sed -e "s#^NTL_INCLUDE.*\$#& -I../include/$inject_name#g" -i "$ntl_path/src/makefile"