File: debianization-surf.patch

package info (click to toggle)
singular 1:4.1.1-p2+ds-3
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 35,860 kB
  • sloc: cpp: 288,280; ansic: 17,387; lisp: 4,242; yacc: 1,654; python: 1,608; makefile: 1,424; lex: 1,387; perl: 632; sh: 567; xml: 182
file content (46 lines) | stat: -rw-r--r-- 2,117 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
Description: debianization: surf[-alggeo]
 Address the Debian specific naming scheme set up for the surf[-alggeo]
 software package in the surf-allgeo Debian package.
Origin: vendor, Debian
Forwarded: not-needed
Author: Jerome Benoit <calculus@rezozer.net>
Last-Update: 2015-10-15

--- a/Singular/singularsurf
+++ b/Singular/singularsurf
@@ -1,11 +1,14 @@
 #!/bin/sh
-echo "width=400;" >$1.pic
-echo "height=400;" >>$1.pic
-cat $1 >>$1.pic
-echo "color_file_format = jpg;">>$1.pic
-echo "filename = \"/tmp/surf.jpg\";">>$1.pic
-echo "save_color_image;">>$1.pic
-surf $1.pic
-command rm $1.pic
-display /tmp/surf.jpg
-command rm /tmp/surf.jpg
+[ -f ${1} ] || exit 1
+SINGULARSURFALLGEOPIC=$(mktemp --tmpdir singular-surf-alggeo-XXXXXXX.pic)
+SINGULARSURFALLGEOJPG=${SINGULARSURFALLGEOPIC%.pic}.jpg
+echo "width=400;" > ${SINGULARSURFALLGEOPIC}
+echo "height=400;" >> ${SINGULARSURFALLGEOPIC}
+cat ${1} >> ${SINGULARSURFALLGEOPIC}
+echo "color_file_format = jpg;" >> ${SINGULARSURFALLGEOPIC}
+echo "filename = \"${SINGULARSURFALLGEOJPG}\";" >> ${SINGULARSURFALLGEOPIC}
+echo "save_color_image;" >> ${SINGULARSURFALLGEOPIC}
+surf-alggeo --quiet ${SINGULARSURFALLGEOPIC}
+display ${SINGULARSURFALLGEOJPG}
+rm -f ${SINGULARSURFALLGEOPIC} ${SINGULARSURFALLGEOJPG}
+## eos
--- a/m4/flags.m4
+++ b/m4/flags.m4
@@ -122,7 +122,7 @@
  ## for clang: -Wunneeded-internal-declaration
 
  if test "x${ENABLE_OPTIMIZATION}" != xno; then
-  OPTFLAGS="-g0 -O3 -Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -fno-enforce-eh-specs -fconserve-space -funroll-loops -fno-delete-null-pointer-checks"
+  OPTFLAGS="-g -O3 -Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -fno-enforce-eh-specs -fconserve-space -funroll-loops -fno-delete-null-pointer-checks"
   #  -O3 - crashes gcc???!!!
   # -fpermissive
   AC_LANG_PUSH([C])