master
1$! File: build_libcurl_pc.com
2$!
3$! Build the libcurl.pc file from the libcurl.pc.in file
4$!
5$! Copyright (C) John Malmberg
6$!
7$! Permission to use, copy, modify, and/or distribute this software for any
8$! purpose with or without fee is hereby granted, provided that the above
9$! copyright notice and this permission notice appear in all copies.
10$!
11$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
17$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18$!
19$! SPDX-License-Identifier: ISC
20$!
21$!===========================================================================
22$!
23$! Skip this if the libcurl.pc already exists.
24$ if f$search("[--]libcurl.pc") .nes. "" then goto all_exit
25$!
26$! Need to know the kit type.
27$ kit_name = f$trnlnm("GNV_PCSI_KITNAME")
28$ if kit_name .eqs. ""
29$ then
30$ write sys$output "@MAKE_PCSI_CURL_KIT_NAME.COM has not been run."
31$ goto all_exit
32$ endif
33$!
34$!
35$! Parse the kit name into components.
36$!---------------------------------------
37$ producer = f$element(0, "-", kit_name)
38$ base = f$element(1, "-", kit_name)
39$ product = f$element(2, "-", kit_name)
40$ mmversion = f$element(3, "-", kit_name)
41$ majorver = f$extract(0, 3, mmversion)
42$ minorver = f$extract(3, 2, mmversion)
43$ updatepatch = f$element(4, "-", kit_name)
44$ if updatepatch .eqs. "-" then updatepatch = ""
45$!
46$! kit type of "D" means a daily build
47$ kit_type = f$edit(f$extract(0, 1, majorver), "upcase")
48$!
49$ pc_file_in = "[--]libcurl^.pc.in"
50$!
51$ if f$search(pc_file_in) .eqs. ""
52$ then
53$ pc_file_in = "[--]libcurl.pc$5nin"
54$ if f$search(pc_file_in) .eqs. ""
55$ then
56$ pc_file_in = "[--]libcurl.pc_in"
57$ if f$search(pc_file_in) .eqs. ""
58$ then
59$ write sys$output "Can not find libcurl.pc.in."
60$ goto all_exit
61$ endif
62$ endif
63$ endif
64$!
65$ if (f$getsyi("HW_MODEL") .lt. 1024)
66$ then
67$ arch_name = "VAX"
68$ else
69$ arch_name = ""
70$ arch_name = arch_name + f$edit(f$getsyi("ARCH_NAME"), "UPCASE")
71$ if (arch_name .eqs. "") then arch_name = "UNK"
72$ endif
73$!
74$!
75$ curl_version = "0.0.0"
76$ open/read vf [--.src]tool_version.h
77$version_loop:
78$ read vf/end=version_loop_end line_in
79$ if line_in .eqs. "" then goto version_loop
80$ key = f$element(0, " ", line_in)
81$ if key .nes. "#define" then goto version_loop
82$ name = f$element(1, " ", line_in)
83$ if name .eqs. "VERSION"
84$ then
85$ curl_version = f$element(2, " ", line_in) - """" - """"
86$ else
87$ goto version_loop
88$ endif
89$version_loop_end:
90$ close vf
91$!
92$!
93$ create [--]libcurl.pc
94$ open/append pco [--]libcurl.pc
95$ open/read pci 'pc_file_in'
96$pc_file_loop:
97$ read pci/end=pc_file_loop_end line_in
98$!
99$! blank lines
100$ if line_in .eqs. ""
101$ then
102$ write pco ""
103$ goto pc_file_loop
104$ endif
105$!
106$! comment lines
107$ key = f$extract(0, 1, line_in)
108$ if key .eqs. "#"
109$ then
110$ write pco line_in
111$ goto pc_file_loop
112$ endif
113$!
114$! Special handling for libs.
115$ if f$locate("Libs:", line_in) .eq. 0
116$ then
117$ write pco "#",line_in
118$ goto pc_file_loop
119$ endif
120$! No substitution line
121$ line_in_len = f$length(line_in)
122$ if f$locate("@", line_in) .ge. line_in_len
123$ then
124$ write pco line_in
125$ goto pc_file_loop
126$ endif
127$!
128$ if f$locate("@prefix@", line_in) .lt line_in_len
129$ then
130$ if kit_type .nes. "D"
131$ then
132$ write pco "prefix=/usr"
133$ else
134$ write pco "prefix=/beta"
135$ endif
136$ goto pc_file_loop
137$ endif
138$ if f$locate("@exec_prefix@", line_in) .lt line_in_len
139$ then
140$ if kit_type .nes. "D"
141$ then
142$ write pco "exec_prefix=/usr"
143$ else
144$ write pco "exec_prefix=/beta"
145$ endif
146$ goto pc_file_loop
147$ endif
148$ if f$locate("@libdir@", line_in) .lt line_in_len
149$ then
150$ write pco "libdir=$(exec_prefix}/lib"
151$ goto pc_file_loop
152$ endif
153$ if f$locate("@includedir@", line_in) .lt line_in_len
154$ then
155$ write pco "includedir=$(prefix}/include"
156$ goto pc_file_loop
157$ endif
158$ if f$locate("@SUPPORT_PROTOCOLS@", line_in) .lt line_in_len
159$ then
160$ proto1 = "DICT FILE FTP FTPS GOPHER HTTP HTTPS IMAP IMAPS"
161$ proto2 = " LDAP LDAPS POP3 POP3S RTSP SMTP SMTPS TELNET TFTP"
162$ proto = proto1 + proto2
163$ write pco "supported_protocols=""" + proto + """"
164$ goto pc_file_loop
165$ endif
166$ if f$locate("@SUPPORT_FEATURES@", line_in) .lt line_in_len
167$ then
168$ if arch_name .eqs. "VAX"
169$ then
170$ write pco "supported_features=""SSL libz"""
171$ else
172$ write pco "supported_features=""SSL IPv6 libz"""
173$ endif
174$ goto pc_file_loop
175$ endif
176$ if f$locate("@CURLVERSION@", line_in) .lt line_in_len
177$ then
178$ write pco "Version: ''curl_version'"
179$ goto pc_file_loop
180$ endif
181$ if f$locate("@LIBCURL_PC_LIBS_PRIVATE@", line_in) .lt line_in_len
182$ then
183$ if arch_name .eqs. "VAX"
184$ then
185$ write pco "Libs.private: -lssl -lcrypto -lz"
186$ else
187$ write pco "Libs.private: -lssl -lcrypto -lgssapi -lz"
188$ endif
189$ goto pc_file_loop
190$ endif
191$ if f$locate("@LIBCURL_PC_CFLAGS@", line_in) .lt line_in_len
192$ then
193$ write pco "Cflags: -I${includedir} -DCURL_STATICLIB"
194$ goto pc_file_loop
195$ endif
196$!
197$pc_file_loop_end:
198$ close pco
199$ close pci
200$!
201$all_exit:
202$ exit
Diagnostics4 git calls · 29 ms
CallStatusSizeTime029 ms
discover200152 B2 ms
git.upload-pack discover http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=3 git.response.bytes=152 git.server.agent=gitty/1.0 git.server.object_format=sha1 git.server.caps=agent ls-refs fetch object-format git.server.fetch=shallow filter sideband-all git.protocol.version=2 git.pkt.frames=8 git.pkt.data=6 git.pkt.flush=2 git.pkt.delim=0 git.pkt.bytes=152 git.pkt.payload.max=34
ls-refs200149 B · hit2 ms
git.upload-pack ls-refs http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=ls-refs git.upstream.dur_ms=2 git.response.bytes=149 git.response.cache=HIT git.response.duration_ms=2 git.protocol.version=2 git.pkt.frames=3 git.pkt.data=2 git.pkt.flush=1 git.pkt.delim=0 git.pkt.bytes=149 git.pkt.payload.max=78 git.ls_refs.count=2 git.ls_refs.head=refs/heads/master
fetchblob:none · deepen 10200287 KiB · hit3 ms
git.upload-pack fetch http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=24 git.response.bytes=293470 git.response.cache=HIT git.response.duration_ms=3 git.fetch.filter=blob:none git.fetch.filter.requested=tree:0 git.fetch.filter.fallback=blob:none git.fetch.filter.learned=false git.fetch.wants=31c911efe5652725e930f4d2e60c9060e5f6646d git.fetch.haves.count=0 git.fetch.deepen=10 git.fetch.thin_pack=false git.fetch.ofs_delta=true git.protocol.version=2 git.pkt.frames=10 git.pkt.data=8 git.pkt.flush=1 git.pkt.delim=1 git.pkt.bytes=293470 git.pkt.payload.max=65516 git.sideband.band1.bytes=293354 git.sideband.band2.bytes=0 git.sideband.band3.bytes=0 git.pack.objects=87 git.pack.bytes=293354 git.pack.ofs_delta=0 git.pack.ref_delta=1 git.pack.chain.max=1 git.pack.trailer=6a646bcda6740bab42e321b51998b52ea15146c0 git.pack.full=86Open pack map
fetch2001.8 KiB · hit24 ms
git.upload-pack fetch http.response.status_code=200 git.response.bytes=1877 git.response.cache=HIT git.response.duration_ms=24 git.fetch.wants=1daa1ac8f8ffe8fb17c37a5ae4dac85e7b22f8ad git.fetch.haves.count=0 git.fetch.deepen=0 git.fetch.thin_pack=false git.fetch.ofs_delta=true git.protocol.version=2 git.pkt.frames=3 git.pkt.data=2 git.pkt.flush=1 git.pkt.delim=0 git.pkt.bytes=1877 git.pkt.payload.max=1856 git.sideband.band1.bytes=1855 git.sideband.band2.bytes=0 git.sideband.band3.bytes=0
Each row is one HTTP round trip ply made to the git server for this page, on one timeline. discover asks what the server speaks, ls-refs lists branch tips, fetch brings objects by id. A hit was served by Workers Cache. Tap a row for its wire details.
- Remote
- https://5ad2236b39de4c8bd8f6270ea63f3ea9.artifacts.cloudflare.net/git/public-v0/curl.git
- Ref
- refs/heads/master
- Commit
- 31c911efe5652725e930f4d2e60c9060e5f6646d
- cf-ray
- a5e2db706f78c125
- Request
- c745940f…
- Protocol
- v2 · sha1
- Agent
- gitty/1.0
- Filter
- advertised
- Fetch
- shallow filter sideband-all
- Capabilities
- agent ls-refs fetch object-format