Package: scamp / 2.0.4+dfsg-1

Replace-aclient_cgi-call-by-curl.patch Patch series | download
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
From: Ole Streicher <olebole@debian.org>
Date: Mon, 25 Sep 2017 13:11:08 +0200
Subject: Replace aclient_cgi call by curl

aclient_cgi is a script file that is distributed with cdsclient, which
is not packaged for Debian.
---
 configure.ac    | 17 -----------------
 src/astrefcat.c | 12 ++++++------
 src/preflist.h  |  2 +-
 3 files changed, 7 insertions(+), 24 deletions(-)

diff --git a/configure.ac b/configure.ac
index d72cd91..5617ac1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -163,11 +163,6 @@ AC_ARG_WITH(mkl-dir,
         [AS_HELP_STRING([--with-mkl-dir=<MKL path>],
         [Provide an alternative path to the MKL library])])
 
-# Provide a special option for CDSClient
-AC_ARG_WITH(cdsclient-dir,
-	[AS_HELP_STRING([--with-cdsclient-dir=<aclient execution path>],
-	[Alternative default to the aclient execution path])])
-
 # Provide a special option for the default XSLT URL
 with_xsl_url="file://"$(URBI_RESOLVE_DIR([$datadir]))"/$PACKAGE_NAME/$PACKAGE_NAME.xsl"
 AC_ARG_WITH(xsl_url,
@@ -263,18 +258,6 @@ AM_CONDITIONAL(USE_PLPLOT, test "$use_plplot" = "yes")
 
 
 ################# handle the CDSclient package (CDS queries) #################
-ACX_CDSCLIENT($with_cdsclient_dir,
-	if test "$with_cdsclient_dir" = ""; then
-	  cdsclient="aclient_cgi"
-	else
-	  cdsclient="$with_cdsclient_dir/aclient_cgi"
-	fi,
-	AC_MSG_ERROR([$cdsclient not found. exiting.]
-	["aclient_cgi" from the CDSclient package is required to use SCAMP:]
-	[1. Install the CDSclient package: http://cdsweb.u-strasbg.fr/doc/cdsclient.html]
-	[2. Use the --with-cdsclient-dir=<aclient_path> configure option
-	if aclient_cgi is not in your execution PATH.]))
-AC_DEFINE_UNQUOTED(CDSCLIENT, "$cdsclient", [CDSclient executable])
 
 # Compile with profiling option
 if test "$enable_profiling" = "yes"; then
diff --git a/src/astrefcat.c b/src/astrefcat.c
index a34b4b4..782e225 100644
--- a/src/astrefcat.c
+++ b/src/astrefcat.c
@@ -156,7 +156,7 @@ fieldstruct	*get_astreffield(astrefenum refcat, double *wcspos,
   if (prefs.ref_port[0]==80 || prefs.ref_port[0]==0)
     sprintf(sport,"");
   else
-    sprintf(sport, " %d", prefs.ref_port[0]);
+    sprintf(sport, ":%d", prefs.ref_port[0]);
 
 /* If these are not angular coordinates, file mode becomes mandatory */
   if (lng == lat && refcat!=ASTREFCAT_FILE)
@@ -223,17 +223,17 @@ fieldstruct	*get_astreffield(astrefenum refcat, double *wcspos,
 
 /* Prepare mag limit section of the command line */
   if (prefs.astref_maglim[0]>-99.0 || prefs.astref_maglim[1]<99.0)
-    sprintf(maglimcmd, "-lm%s %f,%f -m 10000000",
+    sprintf(maglimcmd, "-lm%s&%f,%f&-m&10000000",
 	cdsbandname, prefs.astref_maglim[0],prefs.astref_maglim[1]);
   else
-    strcpy(maglimcmd, "-m 10000000");
+    strcpy(maglimcmd, "-m&10000000");
 
-  sprintf(cmdline, "%s %s%s %s -c %f12%+f12 -r %16g %s",
-	prefs.cdsclient_path,
+  sprintf(cmdline, "%s \"http://%s%s/viz-bin/aserver.cgi?%s&-c&%f%s%f&-r&%g&%s\"",
+	"curl",
 	prefs.ref_server[0],
 	sport,
 	astrefcat[(int)refcat].cdsname,
-	wcspos[lng], wcspos[lat],
+	wcspos[lng], wcspos[lat] >= 0 ? "%2b" : "", wcspos[lat],
 	maxradius*DEG/ARCMIN,
 	maglimcmd);
 
diff --git a/src/preflist.h b/src/preflist.h
index 808cc46..6d1dc50 100644
--- a/src/preflist.h
+++ b/src/preflist.h
@@ -225,7 +225,7 @@ char *default_prefs[] =
 " ",
 "REF_SERVER         cocat1.u-strasbg.fr # Internet addresses of catalog servers",
 "*REF_PORT               80              # Ports to connect to catalog servers",
-"*CDSCLIENT_EXEC         " CDSCLIENT "         # CDSclient executable",
+"*CDSCLIENT_EXEC         curl           # CDSclient executable",
 "ASTREF_CATALOG          2MASS          # NONE, FILE, USNO-A1,USNO-A2,USNO-B1,",
 "                                       # GSC-1.3,GSC-2.2,GSC-2.3,",
 "                                       # TYCHO-2, UCAC-1,UCAC-2,UCAC-3,UCAC-4,",