Building_vms_pcsi_kit
authorJohn Malmberg <wb8tyw@qsl.net>
Wed, 7 Aug 2013 04:10:40 +0000 (23:10 -0500)
committerYang Tse <yangsita@gmail.com>
Wed, 7 Aug 2013 10:16:08 +0000 (12:16 +0200)
These are the files needed to build VMS distribution packages known as
PCSI kits.

Also minor update to the existing files, mainly to the documentation and
file clean up code.

15 files changed:
packages/vms/backup_gnv_curl_src.com [new file with mode: 0644]
packages/vms/build_curl-config_script.com [new file with mode: 0644]
packages/vms/build_gnv_curl.com [new file with mode: 0644]
packages/vms/build_gnv_curl_pcsi_desc.com [new file with mode: 0644]
packages/vms/build_gnv_curl_pcsi_text.com [new file with mode: 0644]
packages/vms/build_gnv_curl_release_notes.com [new file with mode: 0644]
packages/vms/build_libcurl_pc.com [new file with mode: 0644]
packages/vms/compare_curl_source.com [new file with mode: 0644]
packages/vms/curl_release_note_start.txt [new file with mode: 0644]
packages/vms/curl_startup.com [new file with mode: 0644]
packages/vms/make_pcsi_curl_kit_name.com [new file with mode: 0644]
packages/vms/pcsi_gnv_curl_file_list.txt [new file with mode: 0644]
packages/vms/pcsi_product_gnv_curl.com [new file with mode: 0644]
packages/vms/stage_curl_install.com [new file with mode: 0644]
packages/vms/vms_eco_level.h [new file with mode: 0644]

diff --git a/packages/vms/backup_gnv_curl_src.com b/packages/vms/backup_gnv_curl_src.com
new file mode 100644 (file)
index 0000000..9a7905b
--- /dev/null
@@ -0,0 +1,132 @@
+$! File: Backup_gnv_curl_src.com
+$!
+$! $Id$
+$!
+$! Procedure to create backup save sets for installing in a PCSI kit.
+$!
+$! To comply with most Open Source licenses, the source used for building
+$! a kit will be packaged with the distribution kit for the binary.
+$!
+$! Backup save sets are the only storage format that I can expect a
+$! VMS system to be able to extract ODS-5 filenames and directories.
+$!
+$! The make_pcsi_kit_name.com needs to be run before this procedure to
+$! properly name the files that will be created.
+$!
+$! This file is created from a template file for the purpose of making it
+$! easier to port Unix code, particularly open source code to VMS.
+$! Therefore permission is freely granted for any use.
+$!
+$! Copyright 2009, John Malmberg
+$!
+$! Permission to use, copy, modify, and/or distribute this software for any
+$! purpose with or without fee is hereby granted, provided that the above
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$! 13-Jun-2009 J. Malmberg
+$!
+$!===========================================================================
+$!
+$! Save default
+$ default_dir = f$environment("DEFAULT")
+$!
+$ arch_type = f$getsyi("ARCH_NAME")
+$ arch_code = f$extract(0, 1, arch_type)
+$!
+$ if arch_code .nes. "V"
+$ then
+$   set proc/parse=extended
+$ endif
+$!
+$ ss_abort = 44
+$ status = ss_abort
+$!
+$ kit_name = f$trnlnm("GNV_PCSI_KITNAME")
+$ if kit_name .eqs. ""
+$ then
+$   write sys$output "@MAKE_PCSI_BASH_KIT_NAME.COM has not been run."
+$   goto all_exit
+$ endif
+$ producer = f$trnlnm("GNV_PCSI_PRODUCER")
+$ if producer .eqs. ""
+$ then
+$   write sys$output "@MAKE_PCSI_BASH_KIT_NAME.COM has not been run."
+$   goto all_exit
+$ endif
+$ filename_base = f$trnlnm("GNV_PCSI_FILENAME_BASE")
+$ if filename_base .eqs. ""
+$ then
+$   write sys$output "@MAKE_PCSI_BASH_KIT_NAME.COM has not been run."
+$   goto all_exit
+$ endif
+$!
+$ node_swvers = f$getsyi("NODE_SWVERS")
+$ node_swvers_type = f$extract(0, 1, node_swvers)
+$ node_swvers_vers = f$extract(1, f$length(node_swvers), node_swvers)
+$ swvers_maj = f$element(0, ".", node_swvers_vers)
+$ node_swvers_min_update = f$element(1, ".", node_swvers_vers)
+$ swvers_min = f$element(0, "-", node_swvers_min_update)
+$ swvers_update = f$element(1, "-", node_swvers_min_update)
+$!
+$ if swvers_update .eqs. "-" then swvers_update = ""
+$!
+$ vms_vers = f$fao("!2ZB!2ZB!AS", 'swvers_maj', 'swvers_min', swvers_update)
+$!
+$!
+$!
+$! If available make an interchange save set
+$!-------------------------------------------
+$ interchange = ""
+$ if arch_code .eqs. "V"
+$ then
+$   interchange = "/interchange"
+$ endif
+$ if (swvers_maj .ges. "8") .and. (swvers_min .ges. 4)
+$ then
+$   interchange = "/interchange/noconvert"
+$ endif
+$!
+$!
+$! Move to the base directories
+$ set def [--]
+$!
+$! Put things back on error.
+$ on warning then goto all_exit
+$!
+$ current_default = f$environment("DEFAULT")
+$ my_dir = f$parse(current_default,,,"DIRECTORY") - "[" - "<" - ">" - "]"
+$!
+$ src_root = "src_root:"
+$ if f$trnlnm("src_root1") .nes. "" then src_root = "src_root1:"
+$ backup'interchange' 'src_root'[curl...]*.*;0 -
+           'filename_base'_original_src.bck/sav
+$ status = $status
+$!
+$! There may be a VMS specific source kit
+$!-----------------------------------------
+$ vms_root = "vms_root:"
+$ if f$trnlnm("vms_root1") .nes. "" then vms_root = "vms_root1:"
+$ files_found = 0
+$ define/user sys$error nl:
+$ define/user sys$output nl:
+$ directory 'vms_root'[...]*.*;*/exc=*.dir
+$ if '$severity' .eq. 1 then files_found = 1
+$!
+$ if files_found .eq. 1
+$ then
+$   backup'interchange' 'vms_root'[curl...]*.*;0 -
+            'filename_base'_vms_src.bck/sav
+$   status = $status
+$ endif
+$!
+$all_exit:
+$ set def 'default_dir'
+$ exit
diff --git a/packages/vms/build_curl-config_script.com b/packages/vms/build_curl-config_script.com
new file mode 100644 (file)
index 0000000..ae9d181
--- /dev/null
@@ -0,0 +1,288 @@
+$! File: build_libcurl_pc.com
+$!
+$! $Id:$
+$!
+$! Build the curl-config file from the config_curl.in file
+$!
+$! Copyright 2013, John Malmberg
+$!
+$! Permission to use, copy, modify, and/or distribute this software for any
+$! purpose with or without fee is hereby granted, provided that the above
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$!
+$! 15-Jun-2013  J. Malmberg
+$!
+$!===========================================================================
+$!
+$! Skip this if the curl-config. already exists.
+$ if f$search("[--]curl-config.") .nes. "" then goto all_exit
+$!
+$! Need to know the kit type.
+$ kit_name = f$trnlnm("GNV_PCSI_KITNAME")
+$ if kit_name .eqs. ""
+$ then
+$   write sys$output "@MAKE_PCSI_CURL_KIT_NAME.COM has not been run."
+$   goto all_exit
+$ endif
+$!
+$!
+$! Parse the kit name into components.
+$!---------------------------------------
+$ producer = f$element(0, "-", kit_name)
+$ base = f$element(1, "-", kit_name)
+$ product = f$element(2, "-", kit_name)
+$ mmversion = f$element(3, "-", kit_name)
+$ majorver = f$extract(0, 3, mmversion)
+$ minorver = f$extract(3, 2, mmversion)
+$ updatepatch = f$element(4, "-", kit_name)
+$ if updatepatch .eqs. "-" then updatepatch = ""
+$!
+$! kit type of "D" means a daily build
+$ kit_type = f$edit(f$extract(0, 1, majorver), "upcase")
+$!
+$ cfg_file_in = "[--]curl-config.in"
+$!
+$ if f$search(cfg_file_in) .eqs. ""
+$ then
+$    write sys$output "Can not find curl-config.in."
+$    goto all_exit
+$ endif
+$!
+$ if (f$getsyi("HW_MODEL") .lt. 1024)
+$ then
+$    arch_name = "VAX"
+$ else
+$    arch_name = ""
+$    arch_name = arch_name + f$edit(f$getsyi("ARCH_NAME"), "UPCASE")
+$    if (arch_name .eqs. "") then arch_name = "UNK"
+$ endif
+$!
+$!
+$ curl_version = "0.0.0"
+$ open/read vf [--.include.curl]curlver.h
+$version_loop:
+$   read vf/end=version_loop_end line_in
+$   if line_in .eqs. "" then goto version_loop
+$   key = f$element(0, " ", line_in)
+$   if key .nes. "#define" then goto version_loop
+$   name = f$element(1, " ", line_in)
+$   if name .eqs. "LIBCURL_VERSION"
+$   then
+$       curl_version = f$element(2, " ", line_in) - """" - """"
+$       goto version_loop
+$   endif
+$   if name .eqs. "LIBCURL_VERSION_NUM"
+$   then
+$       version_num_hex = f$element(2, " ", line_in)
+$       version_num = version_num_hex - "0x"
+$       goto version_loop
+$   endif
+$version_loop_end:
+$ close vf
+$!
+$!
+$ create [--]curl-config.
+$ open/append pco [--]curl-config.
+$ open/read pci 'cfg_file_in'
+$cfg_file_loop:
+$ read pci/end=cfg_file_loop_end line_in
+$!
+$! blank lines
+$ if line_in .eqs. ""
+$ then
+$   write pco ""
+$   goto cfg_file_loop
+$ endif
+$!
+$! comment lines
+$ key = f$extract(0, 1, line_in)
+$ if key .eqs. "#"
+$ then
+$   write pco line_in
+$   goto cfg_file_loop
+$ endif
+$!
+$! No substitution line
+$ line_in_len = f$length(line_in)
+$ if f$locate("@", line_in) .ge. line_in_len
+$ then
+$   write pco line_in
+$   goto cfg_file_loop
+$ endif
+$!
+$ if f$locate("@prefix@", line_in) .lt line_in_len
+$ then
+$    if kit_type .nes. "D"
+$    then
+$        write pco "prefix=/usr"
+$    else
+$        write pco "prefix=/beta"
+$    endif
+$    goto cfg_file_loop
+$ endif
+$ if f$locate("@exec_prefix@", line_in) .lt line_in_len
+$ then
+$    if kit_type .nes. "D"
+$    then
+$        write pco "exec_prefix=/usr"
+$    else
+$        write pco "exec_prefix=/beta"
+$    endif
+$    goto cfg_file_loop
+$ endif
+$ if f$locate("=@includedir@", line_in) .lt line_in_len
+$ then
+$    write pco "includedir=$(prefix}/include"
+$    goto cfg_file_loop
+$ endif
+$ if f$locate("X@includedir@", line_in) .lt line_in_len
+$ then
+$    write pco "        if test ""X$(prefix}/include""; then"
+$    goto cfg_file_loop
+$ endif
+$ if f$locate("I@includedir@", line_in) .lt line_in_len
+$ then
+$    write pco "          echo "${CPPFLAG_CURL_STATICLIB}-I$(prefix}/include"
+$    goto cfg_file_loop
+$ endif
+$ if f$locate("@CPPFLAG_CURL_STATICLIB@", line_in) .lt line_in_len
+$ then
+$    write pco "cppflag_curl_staticlib=-DCURL_STATICLIB"
+$    goto cfg_file_loop
+$ endif
+$ if f$locate("@ENABLE_SHARED@", line_in) .lt line_in_len
+$ then
+$    write pco "        echo no"
+$    goto cfg_file_loop
+$ endif
+$ if f$locate("@CURL_CA_BUNDLE@", line_in) .lt line_in_len
+$ then
+$    write pco "        echo """""
+$    goto cfg_file_loop
+$ endif
+$ if f$locate("@CC@", line_in) .lt line_in_len
+$ then
+$    write pco "        echo ""cc"""
+$    goto cfg_file_loop
+$ endif
+$ if f$locate("@SUPPORT_FEATURES@", line_in) .lt line_in_len
+$ then
+$    if arch_name .eqs. "VAX"
+$    then
+$        write pco "        for feature in SSL libz NTLM ""; do"
+$    else
+$        write pco "        for feature in SSL IPv6 libz NTLM ""; do"
+$    endif
+$    goto cfg_file_loop
+$ endif
+$ if f$locate("@SUPPORT_PROTOCOLS@", line_in) .lt line_in_len
+$ then
+$    proto1 = "DICT FILE FTP FTPS GOPHER HTTP HTTPS IMAP IMAPS"
+$    proto2 = " LDAP LDAPS POP3 POP3S RTSP SMTP SMTPS TELNET TFTP"
+$    proto = proto1 + proto2
+$    write pco "        for protocol in " + proto + "; do"
+$    goto cfg_file_loop
+$ endif
+$ if f$locate("libcurl @CURLVERSION@", line_in) .lt line_in_len
+$ then
+$    write pco "        echo libcurl ''curl_version'"
+$    goto cfg_file_loop
+$ endif
+$ if f$locate("existing @CURLVERSION@", line_in) .lt line_in_len
+$ then
+$    line_start = -
+  "          echo ""requested version $checkfor is newer than existing"
+$    write pco "''line_start' ''curl_version'"""
+$    goto cfg_file_loop
+$ endif
+$ if f$locate("`echo @versionnum@", line_in) .lt line_in_len
+$ then
+$    write pco "        numuppercase=`echo ''version_num' | tr 'a-f' 'A-F'`"
+$    goto cfg_file_loop
+$ endif
+$ if f$locate(" echo @versionnum@", line_in) .lt line_in_len
+$ then
+$    write pco "        echo ''version_num'"
+$    goto cfg_file_loop
+$ endif
+$ if f$locate("X@libdir@", line_in) .lt line_in_len
+$ then
+$    part1 = "        if test ""$(exec_prefix}/lib"" != ""X/usr/lib"""
+$    part2 = "-a ""X$(exec_prefix}/lib"" != ""X/usr/lib64""; then"
+$    write pco part1,part2
+$    goto cfg_file_loop
+$ endif
+$ if f$locate("L@libdir@", line_in) .lt line_in_len
+$ then
+$    write pco "           CURLLIBDIR=""$(exec_prefix}/lib """
+$    goto cfg_file_loop
+$ endif
+$ if f$locate("@REQUIRE_LIB_DEPS@", line_in) .lt line_in_len
+$ then
+$    write pco "        if test "Xyes" = "Xyes"; then"
+$    goto cfg_file_loop
+$ endif
+$ if f$locate("@LIBCURL_LIBS@", line_in) .lt line_in_len
+$ then
+$    if arch_name .eqs. "VAX"
+$    then
+$        write pco "          echo ${CURLLIBDIR}-lssl -lcrypto -lz"
+$    else
+$        write pco "          echo ${CURLLIBDIR}-lssl -lcrypto -lgssapi -lz"
+$    endif
+$    goto cfg_file_loop
+$ endif
+$ if f$locate("@ENABLE_STATIC@", line_in) .lt line_in_len
+$ then
+$    write pco "        if test "Xyes" != "Xno" ; then"
+$    goto cfg_file_loop
+$ endif
+$ if f$locate("@LIBCURL_LIBS@", line_in) .lt line_in_len
+$ then
+$    part1 = "          echo ${exec_prefix}/lib/libcurl.a"
+$    part2 = "-L/usr/lib -L/SSL_LIB"
+$    if arch_name .eqs. "VAX"
+$    then
+$        write pco "''part1' ''part2' -lssl -lcrypto -lz"
+$    else
+$        write pco "''part1' ''part2' -lssl -lcrypto -lgssapi -lz"
+$    endif
+$    goto cfg_file_loop
+$ endif
+$ if f$locate("@CONFIGURE_OPTIONS@", line_in) .lt line_in_len
+$ then
+$    if kit_type .nes. "D"
+$    then
+$        part1 = "        echo "" '--prefix=/usr' '--exec-prefix=/usr' "
+$    else
+$        part1 = "        echo "" '--prefix=/beta' '--exec_prefix=/beta' "
+$    endif
+$    if arch_name .eqs. "VAX"
+$    then
+$        part3 = ""
+$    else
+$        part3 = "'--with-gssapi' "
+$    endif
+$    part2 = "'--disable-dependency-tracking' '--disable-libtool-lock' "
+$    part4 = "'--disable-ntlm-wb' '--with-ca-path=gnv$curl_ca_path'"""
+$!
+$    write pco part1,part2,part3,part4
+$!
+$    goto cfg_file_loop
+$ endif
+$!
+$pc_file_loop_end:
+$ close pco
+$ close pci
+$!
+$all_exit:
+$ exit
diff --git a/packages/vms/build_gnv_curl.com b/packages/vms/build_gnv_curl.com
new file mode 100644 (file)
index 0000000..1eaa7d5
--- /dev/null
@@ -0,0 +1,38 @@
+$! File: build_gnv_curl.com
+$!
+$! $Id$
+$!
+$! All in one build procedure
+$!
+$! Copyright 2009, John Malmberg
+$!
+$! Permission to use, copy, modify, and/or distribute this software for any
+$! purpose with or without fee is hereby granted, provided that the above
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$!
+$! 11-Jun-2009 J. Malmberg
+$!-----------------------------------------------------------------------
+$!
+$ @setup_gnv_curl_build.com
+$!
+$ bash gnv_curl_configure.sh
+$!
+$ @clean_gnv_curl.com
+$!
+$ bash make_gnv_curl_install.sh
+$!
+$ @gnv_link_curl.com
+$!
+$ purge new_gnu:[*...]/log
+$!
+$!
+$exit
diff --git a/packages/vms/build_gnv_curl_pcsi_desc.com b/packages/vms/build_gnv_curl_pcsi_desc.com
new file mode 100644 (file)
index 0000000..572b9b8
--- /dev/null
@@ -0,0 +1,488 @@
+$! File: Build_GNV_CURL_PCSI_DESC.COM
+$!
+$! $Id$
+$!
+$! Build the *.pcsi$text file in the following sections:
+$!   Required software dependencies.
+$!   install/upgrade/postinstall steps.
+$!      1. Duplicate filenames need an alias procedure. (N/A for curl)
+$!      2. ODS-5 filenames need an alias procedure. (N/A for curl)
+$!      3. Special alias links for executables (curl. -> curl.exe)
+$!         if a lot, then an alias procedure is needed.
+$!      4. Rename the files to lowercase.
+$!   Move Release Notes to destination
+$!   Source kit option
+$!   Create directory lines
+$!   Add file lines for curl.
+$!   Add Link alias procedure file (N/A for curl)
+$!   Add [.SYS$STARTUP]curl_startup file
+$!   Add Release notes file.
+$!
+$! The file PCSI_GNV_CURL_FILE_LIST.TXT is read in to get the files other
+$! than the release notes file and the source backup file.
+$!
+$! The PCSI system can really only handle ODS-2 format filenames and
+$! assumes that there is only one source directory.  It also assumes that
+$! all destination files with the same name come from the same source file.
+$! Fortunately CURL does not trip most of these issues, so those steps
+$! above are marked N/A.
+$!
+$! A rename action section is needed to make sure that the files are
+$! created in the GNV$GNU: in the correct case, and to create the alias
+$! link [usr.bin]curl. for [usr.bin]curl.exe.
+$!
+$! Copyright 2009, John Malmberg
+$!
+$! Permission to use, copy, modify, and/or distribute this software for any
+$! purpose with or without fee is hereby granted, provided that the above
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$!
+$! 15-Jun-2009  J. Malmberg
+$!
+$!===========================================================================
+$!
+$ kit_name = f$trnlnm("GNV_PCSI_KITNAME")
+$ if kit_name .eqs. ""
+$ then
+$   write sys$output "@MAKE_PCSI_CURL_KIT_NAME.COM has not been run."
+$   goto all_exit
+$ endif
+$ producer = f$trnlnm("GNV_PCSI_PRODUCER")
+$ if producer .eqs. ""
+$ then
+$   write sys$output "@MAKE_PCSI_CURL_KIT_NAME.COM has not been run."
+$   goto all_exit
+$ endif
+$ filename_base = f$trnlnm("GNV_PCSI_FILENAME_BASE")
+$ if filename_base .eqs. ""
+$ then
+$   write sys$output "@MAKE_PCSI_CURL_KIT_NAME.COM has not been run."
+$   goto all_exit
+$ endif
+$!
+$!
+$! Parse the kit name into components.
+$!---------------------------------------
+$ producer = f$element(0, "-", kit_name)
+$ base = f$element(1, "-", kit_name)
+$ product = f$element(2, "-", kit_name)
+$ mmversion = f$element(3, "-", kit_name)
+$ majorver = f$extract(0, 3, mmversion)
+$ minorver = f$extract(3, 2, mmversion)
+$ updatepatch = f$element(4, "-", kit_name)
+$ if updatepatch .eqs. "-" then updatepatch = ""
+$!
+$! kit type of "D" means a daily build
+$ kit_type = f$edit(f$extract(0, 1, majorver), "upcase")
+$!
+$!
+$ product_line = "product ''producer' ''base' ''product'"
+$ if updatepatch .eqs. ""
+$ then
+$     product_name = " ''majorver'.''minorver'"
+$ else
+$     product_name = " ''majorver'.''minorver'-''updatepatch'"
+$ endif
+$ product_line = product_line + " ''product_name' full;"
+$!write sys$output product_line
+$!
+$!
+$!
+$! Create the file as a VMS text file.
+$!----------------------------------------
+$ base_file = kit_name
+$ create 'base_file'.pcsi$desc
+$!
+$!
+$! Start building file.
+$!----------------------
+$ open/append pdsc 'base_file'.pcsi$desc
+$!
+$ write pdsc product_line
+$!
+$! Required product dependencies.
+$!----------------------------------
+$ vmsprd = "DEC"
+$ if base .eqs. "I64VMS" then vmsprd = "HP"
+$!
+$ write pdsc "   software ''vmsprd' ''base' VMS ;"
+$ arch_type = f$getsyi("ARCH_NAME")
+$ node_swvers = f$getsyi("node_swvers")
+$ vernum = f$extract(1, f$length(node_swvers), node_swvers)
+$ majver = f$element(0, ".", vernum)
+$ minverdash = f$element(1, ".", vernum)
+$ minver = f$element(0, "-", minverdash)
+$ dashver = f$element(1, "-", minverdash)
+$ if dashver .eqs. "-" then dashver = ""
+$ vmstag = majver + minver + dashver
+$ code = f$extract(0, 1, arch_type)
+$ arch_code = f$extract(0, 1, arch_type)
+$ write pdsc -
+ "   if (not <software ''vmsprd' ''base' VMS version minimum ''node_swvers'>) ;"
+$ write pdsc "      error NEED_VMS''vmstag';"
+$ write pdsc "   end if;"
+$!
+$write pdsc "   software VMSPORTS ''base' ZLIB ;"
+$write pdsc -
+    "   if (not <software VMSPORTS ''base' ZLIB version minimum V1.2-8>) ;"
+$write pdsc "      error NEED_ZLIB;"
+$write pdsc "   end if;"
+$!
+$!
+$!
+$! install/upgrade/postinstall steps.
+$!-----------------------------------
+$!      1. Duplicate filenames need an alias procedure. (N/A for curl)
+$!      2. ODS-5 filenames need an alias procedure. (N/A for curl)
+$!      3. Special alias links for executables (curl. -> curl.exe)
+$!         if a lot, then an alias procedure is needed.
+$!      4. Rename the files to lowercase.
+$!
+$!
+$!   Alias links needed.
+$!-------------------------
+$ add_alias_lines = ""
+$ rem_alias_lines = ""
+$ line_out = ""
+$!
+$!   Read through the file list to set up aliases and rename commands.
+$!---------------------------------------------------------------------
+$ open/read flst pcsi_gnv_curl_file_list.txt
+$!
+$inst_alias_loop:
+$   read/end=inst_alias_loop_end flst line_in
+$   line_in = f$edit(line_in,"compress,trim,uncomment")
+$   if line_in .eqs. "" then goto inst_alias_loop
+$   pathname = f$element(0, " ", line_in)
+$   linkflag = f$element(1, " ", line_in)
+
+$   if linkflag .nes. "->" then goto inst_alias_write
+$!
+$   linktarget = f$element(2, " ", line_in)
+$   if kit_type .eqs. "D"
+$   then
+$       old_start = f$locate("[gnv.usr", pathname)
+$       if old_start .lt. f$length(pathname)
+$       then
+$           pathname = "[gnv.beta" + pathname - "[gnv.usr"
+$           linktarget = "[gnv.beta" + linktarget - "[gnv.usr"
+$       endif
+$   endif
+$   nlink = "pcsi$destination:" + pathname
+$   ntarg = "pcsi$destination:" + linktarget
+$   new_add_alias_line = -
+  """if f$search(""""''nlink'"""") .eqs. """""""" then" + -
+  " set file/enter=''nlink' ''ntarg'"""
+$   if add_alias_lines .nes. ""
+$   then
+$       add_alias_lines = add_alias_lines + "," + new_add_alias_line
+$   else
+$       add_alias_lines = new_add_alias_line
+$   endif
+$!
+$   new_rem_alias_line = -
+  """if f$search(""""''nlink'"""") .nes. """""""" then" + -
+  " set file/remove ''nlink';"""
+$   if rem_alias_lines .nes. ""
+$   then
+$      rem_alias_lines = rem_alias_lines + "," + new_rem_alias_line
+$   else
+$      rem_alias_lines = new_rem_alias_line
+$   endif
+$!
+$   goto inst_alias_loop
+$!
+$inst_alias_write:
+$!
+$!  execute install / remove
+$   write pdsc "   execute install ("
+$! add aliases
+$   i = 0
+$ex_ins_loop:
+$       line = f$element(i, ",", add_alias_lines)
+$       i = i + 1
+$       if line .eqs. "" then goto ex_ins_loop
+$       if line .eqs. "," then goto ex_ins_loop_end
+$       if line_out .nes. "" then write pdsc line_out,","
+$       line_out = line
+$       goto ex_ins_loop
+$ex_ins_loop_end:
+$   write pdsc line_out
+$   line_out = ""
+$   write pdsc "      )"
+$   write pdsc "   remove ("
+$! remove aliases
+$   i = 0
+$ex_rem_loop:
+$       line = f$element(i, ",", rem_alias_lines)
+$       i = i + 1
+$       if line .eqs. "" then goto ex_rem_loop
+$       if line .eqs. "," then goto ex_rem_loop_end
+$       if line_out .nes. "" then write pdsc line_out,","
+$       line_out = line
+$       goto ex_rem_loop
+$ex_rem_loop_end:
+$   write pdsc line_out
+$   line_out = ""
+$   write pdsc "      ) ;"
+$!
+$!  execute upgrade
+$   write pdsc "   execute upgrade ("
+$   i = 0
+$ex_upg_loop:
+$       line = f$element(i, ",", rem_alias_lines)
+$       i = i + 1
+$       if line .eqs. "" then goto ex_upg_loop
+$       if line .eqs. "," then goto ex_upg_loop_end
+$       if line_out .nes. "" then write pdsc line_out,","
+$       line_out = line
+$       goto ex_upg_loop
+$ex_upg_loop_end:
+$   write pdsc line_out
+$   line_out = ""
+$! remove aliases
+$   write pdsc "      ) ;"
+$!
+$!  execute postinstall
+$   write pdsc "   execute postinstall ("
+$   if arch_code .nes. "V"
+$   then
+$       line_out = "   ""set process/parse=extended"""
+$   endif
+$   i = 0
+$ex_pins_loop:
+$       line = f$element(i, ",", add_alias_lines)
+$       i = i + 1
+$       if line .eqs. "" then goto ex_pins_loop
+$       if line .eqs. "," then goto ex_pins_loop_end
+$       if line_out .nes. "" then write pdsc line_out,","
+$       line_out = line
+$       goto ex_pins_loop
+$ex_pins_loop_end:
+$   if line_out .eqs. "" then line_out = "   ""continue"""
+$!   write pdsc line_out
+$!   line_out = ""
+$! add aliases and follow with renames.
+$!
+$goto inst_dir
+$!
+$inst_dir_loop:
+$   read/end=inst_alias_loop_end flst line_in
+$   line_in = f$edit(line_in,"compress,trim,uncomment")
+$   if line_in .eqs. "" then goto inst_dir_loop
+$inst_dir:
+$   pathname = f$element(0, " ", line_in)
+$   if kit_type .eqs. "D"
+$   then
+$       if pathname .eqs. "[gnv]usr.dir"
+$       then
+$           pathname = "[gnv]beta.dir"
+$       else
+$           old_start = f$locate("[gnv.usr", pathname)
+$           if old_start .lt. f$length(pathname)
+$           then
+$               pathname = "[gnv.beta" + pathname - "[gnv.usr"
+$           endif
+$       endif
+$   endif
+$!
+$!  Ignore the directory entries for now.
+$!-----------------------------------------
+$   filedir = f$parse(pathname,,,"DIRECTORY")
+$   if pathname .eqs. filedir then goto inst_dir_loop
+$!
+$!  process .dir extensions for rename
+$!  If this is not a directory then start processing files.
+$!-------------------------
+$   filetype = f$parse(pathname,,,"TYPE")
+$   filetype_u = f$edit(filetype, "upcase")
+$   filename = f$parse(pathname,,,"NAME")
+$   if filetype_u .nes. ".DIR" then goto inst_file
+$!
+$!  process directory lines for rename.
+$!--------------------------------------
+$   if line_out .nes. ""
+$   then
+$       write pdsc line_out,","
+$       line_out = ""
+$   endif
+$   if arch_code .nes. "V"
+$   then
+$       if line_out .nes. "" then write pdsc line_out,","
+$       line_out = "   ""rename pcsi$destination:''pathname' ''filename'.DIR"""
+$   else
+$       if line_out .nes. "" then write pdsc line_out
+$       line_out = ""
+$   endif
+$   goto inst_dir_loop
+$!
+$!
+$!   process file lines for rename
+$!---------------------------------
+$inst_file_loop:
+$   read/end=inst_alias_loop_end flst line_in
+$   line_in = f$edit(line_in,"compress,trim,uncomment")
+$   if line_in .eqs. "" then goto inst_dir_loop
+$   pathname = f$element(0, " ", line_in)
+$   if kit_type .eqs. "D"
+$   then
+$       if pathname .eqs. "[gnv]usr.dir"
+$       then
+$           pathname = "[gnv]beta.dir"
+$       else
+$           old_start = f$locate("[gnv.usr", pathname)
+$           if old_start .lt. f$length(pathname)
+$           then
+$               pathname = "[gnv.beta" + pathname - "[gnv.usr"
+$           endif
+$       endif
+$   endif
+$!
+$!  Filenames with $ in them are VMS special and do not need to be lowercased.
+$!  --------------------------------------------------------------------------
+$   if f$locate("$", pathname) .lt. f$length(pathname) then goto inst_file_loop
+$!
+$   filetype = f$parse(pathname,,,"TYPE")
+$   filename = f$parse(pathname,,,"NAME") + filetype
+$inst_file:
+$   if arch_code .nes. "V"
+$   then
+$       if line_out .nes. "" then write pdsc line_out,","
+$       filetype = f$parse(pathname,,,"TYPE")
+$       filename = f$parse(pathname,,,"NAME") + filetype
+$       line_out = "   ""rename pcsi$destination:''pathname' ''filename'"""
+$   else
+$       if line_out .nes. "" then write pdsc line_out
+$       line_out = ""
+$   endif
+$   goto inst_file_loop
+$!
+$inst_alias_loop_end:
+$!
+$write pdsc line_out
+$write pdsc "        ) ;"
+$close flst
+$!
+$!   Move Release Notes to destination
+$!-------------------------------------
+$write pdsc "   information RELEASE_NOTES phase after ;"
+$!
+$!   Source kit option
+$!---------------------
+$write pdsc "   option SOURCE default 0;"
+$write pdsc "   directory ""[gnv.common_src]"" PROTECTION PUBLIC ;"
+$write pdsc -
+    "        file ""[gnv.common_src]''filename_base'_original_src.bck"""
+$write pdsc -
+    "          source [common_src]''filename_base'_original_src.bck ;"
+$if f$search("gnv$gnu:[vms_src]''filename_base'_vms_src.bck") .nes. ""
+$then
+$    write pdsc "   directory ""[gnv.vms_src]"" PROTECTION PUBLIC ;"
+$    write pdsc "        file ""[gnv.vms_src]''filename_base'_vms_src.bck"""
+$    write pdsc "          source [vms_src]''filename_base'_vms_src.bck ;"
+$endif
+$write pdsc "   end option;"
+$!
+$!
+$! Read through the file list again.
+$!----------------------------------
+$open/read flst pcsi_gnv_curl_file_list.txt
+$!
+$!
+$!   Create directory lines
+$!-------------------------
+$flst_dir_loop:
+$   read/end=flst_loop_end flst line_in
+$   line_in = f$edit(line_in,"compress,trim,uncomment")
+$   if line_in .eqs. "" then goto flst_dir_loop
+$!
+$   filename = f$element(0, " ", line_in)
+$   linkflag = f$element(1, " ", line_in)
+$   if linkflag .eqs. "->" then goto flst_dir_loop
+$!
+$!  Ignore .dir extensions
+$!-------------------------
+$   filetype = f$edit(f$parse(filename,,,"TYPE"), "upcase")
+$   if filetype .eqs. ".DIR" then goto flst_dir_loop
+$!
+$   destname = filename
+$   if kit_type .eqs. "D"
+$   then
+$       old_start = f$locate("[gnv.usr", destname)
+$       if old_start .lt. f$length(destname)
+$       then
+$           destname = "[gnv.beta" + destname - "[gnv.usr"
+$       endif
+$   endif
+$!
+$!  It should be just a directory then.
+$!-------------------------------------
+$   filedir = f$edit(f$parse(filename,,,"DIRECTORY"), "lowercase")
+$!  If this is not a directory then start processing files.
+$!---------------------------------------------------------
+$   if filename .nes. filedir then goto flst_file
+$!
+$   write pdsc "   directory ""''destname'"" PROTECTION PUBLIC ;"
+$   goto flst_dir_loop
+$!
+$!
+$!   Add file lines for curl.
+$!---------------------------
+$flst_file_loop:
+$   read/end=flst_loop_end flst line_in
+$   line_in = f$edit(line_in,"compress,trim,uncomment")
+$   if line_in .eqs. "" then goto inst_file_loop
+$   filename = f$element(0, " ", line_in)
+$   destname = filename
+$   if kit_type .eqs. "D"
+$   then
+$       old_start = f$locate("[gnv.usr", destname)
+$       if old_start .lt. f$length(destname)
+$       then
+$           destname = "[gnv.beta" + destname - "[gnv.usr"
+$       endif
+$   endif
+$flst_file:
+$   srcfile = filename - "gnv."
+$   write pdsc "   file ""''destname'"" "
+$   write pdsc "     source ""''srcfile'"" ;"
+$   goto flst_file_loop
+$!
+$flst_loop_end:
+$ close flst
+$!
+$!   Add Link alias procedure file (N/A for curl)
+$!------------------------------------------------
+$!
+$!   Add [.SYS$STARTUP]curl_startup file
+$!---------------------------------------
+$ if kit_type .eqs. "D"
+$ then
+$   write pdsc "   file ""[sys$startup]curl_daily_startup.com"""
+$ else
+$   write pdsc "   file ""[sys$startup]curl_startup.com"""
+$ endif
+$ write pdsc "     source [usr.lib]curl_startup.com ;"
+$!
+$!   Add Release notes file.
+$!------------------------------
+$ write pdsc -
+    "   file ""[SYSHLP]''filename_base'.release_notes"" release notes ;"
+$!
+$! Close the product file
+$!------------------------
+$ write pdsc "end product;"
+$!
+$close pdsc
+$!
+$all_exit:
+$ exit
diff --git a/packages/vms/build_gnv_curl_pcsi_text.com b/packages/vms/build_gnv_curl_pcsi_text.com
new file mode 100644 (file)
index 0000000..df98f63
--- /dev/null
@@ -0,0 +1,198 @@
+$! File: Build_GNV_curl_pcsi_text.com
+$!
+$! $Id$
+$!
+$! Build the *.pcsi$text file from the four components:
+$!    1. Generated =product header section
+$!    2. [--]readme. file from the Curl distribution, modified to fit
+$!       a pcsi$text file format.
+$!    3. [--]copying file from the Curl distribution, modified to fit
+$!       a pcsi$text file format.
+$!    4. Generated Producer section.
+$!
+$! Set the name of the release notes from the GNV_PCSI_FILENAME_BASE
+$!
+$! Copyright 2009, John Malmberg
+$!
+$! Permission to use, copy, modify, and/or distribute this software for any
+$! purpose with or without fee is hereby granted, provided that the above
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$!
+$! 15-Jun-2009  J. Malmberg
+$!
+$!===========================================================================
+$!
+$ kit_name = f$trnlnm("GNV_PCSI_KITNAME")
+$ if kit_name .eqs. ""
+$ then
+$   write sys$output "@MAKE_PCSI_CURL_KIT_NAME.COM has not been run."
+$   goto all_exit
+$ endif
+$ producer = f$trnlnm("GNV_PCSI_PRODUCER")
+$ if producer .eqs. ""
+$ then
+$   write sys$output "@MAKE_PCSI_CURL_KIT_NAME.COM has not been run."
+$   goto all_exit
+$ endif
+$ producer_full_name = f$trnlnm("GNV_PCSI_PRODUCER_FULL_NAME")
+$ if producer_full_name .eqs. ""
+$ then
+$   write sys$output "@MAKE_PCSI_CURL_KIT_NAME.COM has not been run."
+$   goto all_exit
+$ endif
+$!
+$!
+$! Parse the kit name into components.
+$!---------------------------------------
+$ producer = f$element(0, "-", kit_name)
+$ base = f$element(1, "-", kit_name)
+$ product = f$element(2, "-", kit_name)
+$ mmversion = f$element(3, "-", kit_name)
+$ majorver = f$extract(0, 3, mmversion)
+$ minorver = f$extract(3, 2, mmversion)
+$ updatepatch = f$element(4, "-", kit_name)
+$ if updatepatch .eqs. "-" then updatepatch = ""
+$!
+$!
+$ product_line = "=product ''producer' ''base' ''product'"
+$ if updatepatch .eqs. ""
+$ then
+$     product_name = " ''majorver'.''minorver'"
+$ else
+$     product_name = " ''majorver'.''minorver'-''updatepatch'"
+$ endif
+$ product_line = product_line + " ''product_name' full"
+$!
+$!
+$! If this is VAX and the file is on NFS, the names may be mangled.
+$!-----------------------------------------------------------------
+$ readme_file = ""
+$ if f$search("[--]readme.") .nes. ""
+$ then
+$   readme_file = "[--]readme."
+$ else
+$   if f$search("[--]$README.") .nes. ""
+$   then
+$       readme_file = "[--]$README."
+$   else
+$       write sys$output "Can not find readme file."
+$       goto all_exit
+$   endif
+$ endif
+$ copying_file = ""
+$ if f$search("[--]copying.") .nes. ""
+$ then
+$   copying_file = "[--]copying."
+$ else
+$   if f$search("[--]$COPYING.") .nes. ""
+$   then
+$       copying_file = "[--]$COPYING."
+$   else
+$       write sys$output "Can not find copying file."
+$       goto all_exit
+$   endif
+$ endif
+$!
+$! Create the file as a VMS text file.
+$!----------------------------------------
+$ base_file = kit_name
+$ create 'base_file'.pcsi$text
+$!
+$!
+$! Start building file.
+$!----------------------
+$ open/append ptxt 'base_file'.pcsi$text
+$ write ptxt product_line
+$!
+$!
+$! First insert the Readme file.
+$!
+$ open/read rf 'readme_file'
+$!
+$ write ptxt "1 'PRODUCT"
+$ write ptxt "=prompt ''producter' ''product' for OpenVMS"
+$!
+$rf_loop:
+$   read/end=rf_loop_end rf line_in
+$   if line_in .nes. ""
+$   then
+$!    PCSI files use the first character in for their purposes.
+$!--------------------------------------------------------------
+$     first_char = f$extract(0, 1, line_in)
+$     if first_char .nes. " " then line_in = " " + line_in
+$   endif
+$   write ptxt line_in
+$   goto rf_loop
+$rf_loop_end:
+$ close rf
+$!
+$!
+$! Now add in the copying file
+$!--------------------------------
+$ write ptxt ""
+$ write ptxt "1 'NOTICE"
+$ write ptxt ""
+$!
+$ open/read cf 'copying_file'
+$!
+$cf_loop:
+$   read/end=cf_loop_end cf line_in
+$   if line_in .nes. ""
+$   then
+$!    PCSI files use the first character in for their purposes.
+$!--------------------------------------------------------------
+$     first_char = f$extract(0, 1, line_in)
+$     if first_char .nes. " " then line_in = " " + line_in
+$   endif
+$   write ptxt line_in
+$   goto cf_loop
+$cf_loop_end:
+$ close cf
+$!
+$! Now we need the rest of the boiler plate.
+$!--------------------------------------------
+$ write ptxt ""
+$ write ptxt "1 'PRODUCER"
+$ write ptxt "=prompt ''producer_full_name'"
+$ write ptxt -
+ "This software product is provided by ''producer_full_name' with no warranty."
+$!
+$ arch_type = f$getsyi("ARCH_NAME")
+$ node_swvers = f$getsyi("node_swvers")
+$ vernum = f$extract(1, f$length(node_swvers), node_swvers)
+$ majver = f$element(0, ".", vernum)
+$ minverdash = f$element(1, ".", vernum)
+$ minver = f$element(0, "-", minverdash)
+$ dashver = f$element(1, "-", minverdash)
+$ if dashver .eqs. "-" then dashver = ""
+$ vmstag = majver + minver + dashver
+$ code = f$extract(0, 1, arch_type)
+$!
+$ write ptxt "1 NEED_VMS''vmstag'"
+$ write ptxt -
+   "=prompt OpenVMS ''vernum' or later is not installed on your system."
+$ write ptxt "This product requires OpenVMS ''vernum' or later to function."
+$ write ptxt "1 NEED_ZLIB"
+$ write ptxt "=prompt ZLIB 1.2-8 or later is not installed on your system."
+$ write ptxt "This product requires ZLIB 1.2-8 or later to function."
+$ write ptxt "1 SOURCE"
+$ write ptxt "=prompt Source modules for ''product'"
+$ write ptxt "The Source modules for ''product' will be installed."
+$ write ptxt "1 RELEASE_NOTES"
+$ write ptxt "=prompt Release notes are available in the [SYSHLP] directory."
+$!
+$ close ptxt
+$!
+$!
+$!
+$all_exit:
+$ exit
diff --git a/packages/vms/build_gnv_curl_release_notes.com b/packages/vms/build_gnv_curl_release_notes.com
new file mode 100644 (file)
index 0000000..dbe43d9
--- /dev/null
@@ -0,0 +1,90 @@
+$! File: Build_GNV_curl_release_notes.com
+$!
+$! $Id$
+$!
+$! Build the release note file from the four components:
+$!    1. The curl_release_note_start.txt
+$!    2. The hp_ssl_release_info.txt
+$!    3. [--]readme. file from the Curl distribution.
+$!    4. The Curl_gnv-build_steps.txt.
+$!
+$! Set the name of the release notes from the GNV_PCSI_FILENAME_BASE
+$! logical name.
+$!
+$! Copyright 2009, John Malmberg
+$!
+$! Permission to use, copy, modify, and/or distribute this software for any
+$! purpose with or without fee is hereby granted, provided that the above
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$! 14-Jun-2009  J. Malmberg
+$!
+$!===========================================================================
+$!
+$ base_file = f$trnlnm("GNV_PCSI_FILENAME_BASE")
+$ if base_file .eqs. ""
+$ then
+$   write sys$output "@MAKE_PCSI_CURL_KIT_NAME.COM has not been run."
+$   goto all_exit
+$ endif
+$!
+$!
+$ curl_readme = f$search("sys$disk:[--]readme.")
+$ if curl_readme .eqs. ""
+$ then
+$   curl_readme = f$search("sys$disk:[--]$README.")
+$ endif
+$ if curl_readme .eqs. ""
+$ then
+$    write sys$output "Can not find Curl readme file."
+$    goto all_exit
+$ endif
+$!
+$ curl_copying = f$search("sys$disk:[--]copying.")
+$ if curl_copying .eqs. ""
+$ then
+$   curl_copying = f$search("sys$disk:[--]$COPYING.")
+$ endif
+$ if curl_copying .eqs. ""
+$ then
+$    write sys$output "Can not find Curl copying file."
+$    goto all_exit
+$ endif
+$!
+$ vms_readme = f$search("sys$disk:[]readme.")
+$ if vms_readme .eqs. ""
+$ then
+$   vms_readme = f$search("sys$disk:[]$README.")
+$ endif
+$ if vms_readme .eqs. ""
+$ then
+$   write sys$output "Can not find VMS specific Curl readme file."
+$   goto all_exit
+$ endif
+$!
+$ if f$search("sys$disk:[]hp_ssl_release_info.txt") .eqs. ""
+$ then
+$   write sys$output "GNV_LINK_CURL.COM has not been run!"
+$   goto all_exit
+$ endif
+$!
+$ type/noheader 'curl_readme', 'vms_readme', -
+                sys$disk:[]curl_release_note_start.txt, -
+                sys$disk:[]hp_ssl_release_info.txt, -
+                'curl_copying', -
+                sys$disk:[]curl_gnv_build_steps.txt -
+                /out='base_file'.release_notes
+$!
+$ purge 'base_file'.release_notes
+$ rename 'base_file.release_notes ;1
+$!
+$all_exit:
+$ exit
diff --git a/packages/vms/build_libcurl_pc.com b/packages/vms/build_libcurl_pc.com
new file mode 100644 (file)
index 0000000..251b345
--- /dev/null
@@ -0,0 +1,205 @@
+$! File: build_libcurl_pc.com
+$!
+$! $Id:$
+$!
+$! Build the libcurl.pc file from the libcurl.pc.in file
+$!
+$! Copyright 2013, John Malmberg
+$!
+$! Permission to use, copy, modify, and/or distribute this software for any
+$! purpose with or without fee is hereby granted, provided that the above
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$!
+$! 15-Jun-2013  J. Malmberg
+$!
+$!===========================================================================
+$!
+$! Skip this if the libcurl.pc already exists.
+$ if f$search("[--]libcurl.pc") .nes. "" then goto all_exit
+$!
+$! Need to know the kit type.
+$ kit_name = f$trnlnm("GNV_PCSI_KITNAME")
+$ if kit_name .eqs. ""
+$ then
+$   write sys$output "@MAKE_PCSI_CURL_KIT_NAME.COM has not been run."
+$   goto all_exit
+$ endif
+$!
+$!
+$! Parse the kit name into components.
+$!---------------------------------------
+$ producer = f$element(0, "-", kit_name)
+$ base = f$element(1, "-", kit_name)
+$ product = f$element(2, "-", kit_name)
+$ mmversion = f$element(3, "-", kit_name)
+$ majorver = f$extract(0, 3, mmversion)
+$ minorver = f$extract(3, 2, mmversion)
+$ updatepatch = f$element(4, "-", kit_name)
+$ if updatepatch .eqs. "-" then updatepatch = ""
+$!
+$! kit type of "D" means a daily build
+$ kit_type = f$edit(f$extract(0, 1, majorver), "upcase")
+$!
+$ pc_file_in = "[--]libcurl^.pc.in"
+$!
+$ if f$search(pc_file_in) .eqs. ""
+$ then
+$    pc_file_in = "[--]libcurl.pc$5nin"
+$    if f$search(pc_file_in) .eqs. ""
+$    then
+$        pc_file_in = "[--]libcurl.pc_in"
+$        if f$search(pc_file_in) .eqs. ""
+$        then
+$            write sys$output "Can not find libcurl.pc.in."
+$            goto all_exit
+$        endif
+$    endif
+$ endif
+$!
+$ if (f$getsyi("HW_MODEL") .lt. 1024)
+$ then
+$    arch_name = "VAX"
+$ else
+$    arch_name = ""
+$    arch_name = arch_name + f$edit(f$getsyi("ARCH_NAME"), "UPCASE")
+$    if (arch_name .eqs. "") then arch_name = "UNK"
+$ endif
+$!
+$!
+$ curl_version = "0.0.0"
+$ open/read vf [--.src]version.h
+$version_loop:
+$   read vf/end=version_loop_end line_in
+$   if line_in .eqs. "" then goto version_loop
+$   key = f$element(0, " ", line_in)
+$   if key .nes. "#define" then goto version_loop
+$   name = f$element(1, " ", line_in)
+$   if name .eqs. "VERSION"
+$   then
+$       curl_version = f$element(2, " ", line_in) - """" - """"
+$   else
+$       goto version_loop
+$   endif
+$version_loop_end:
+$ close vf
+$!
+$!
+$ create [--]libcurl.pc
+$ open/append pco [--]libcurl.pc
+$ open/read pci 'pc_file_in'
+$pc_file_loop:
+$ read pci/end=pc_file_loop_end line_in
+$!
+$! blank lines
+$ if line_in .eqs. ""
+$ then
+$   write pco ""
+$   goto pc_file_loop
+$ endif
+$!
+$! comment lines
+$ key = f$extract(0, 1, line_in)
+$ if key .eqs. "#"
+$ then
+$   write pco line_in
+$   goto pc_file_loop
+$ endif
+$!
+$! Special handling for libs.
+$ if f$locate("Libs:", line_in) .eq. 0
+$ then
+$   write pco "#",line_in
+$   goto pc_file_loop
+$ endif
+$! No substitution line
+$ line_in_len = f$length(line_in)
+$ if f$locate("@", line_in) .ge. line_in_len
+$ then
+$   write pco line_in
+$   goto pc_file_loop
+$ endif
+$!
+$ if f$locate("@prefix@", line_in) .lt line_in_len
+$ then
+$    if kit_type .nes. "D"
+$    then
+$        write pco "prefix=/usr"
+$    else
+$        write pco "prefix=/beta"
+$    endif
+$    goto pc_file_loop
+$ endif
+$ if f$locate("@exec_prefix@", line_in) .lt line_in_len
+$ then
+$    if kit_type .nes. "D"
+$    then
+$        write pco "exec_prefix=/usr"
+$    else
+$        write pco "exec_prefix=/beta"
+$    endif
+$    goto pc_file_loop
+$ endif
+$ if f$locate("@libdir@", line_in) .lt line_in_len
+$ then
+$    write pco "libdir=$(exec_prefix}/lib"
+$    goto pc_file_loop
+$ endif
+$ if f$locate("@includedir@", line_in) .lt line_in_len
+$ then
+$    write pco "includedir=$(prefix}/include"
+$    goto pc_file_loop
+$ endif
+$ if f$locate("@SUPPORT_PROTOCOLS@", line_in) .lt line_in_len
+$ then
+$    proto1 = "DICT FILE FTP FTPS GOPHER HTTP HTTPS IMAP IMAPS"
+$    proto2 = " LDAP LDAPS POP3 POP3S RTSP SMTP SMTPS TELNET TFTP"
+$    proto = proto1 + proto2
+$    write pco "supported_protocols=""" + proto + """"
+$    goto pc_file_loop
+$ endif
+$ if f$locate("@SUPPORT_FEATURES@", line_in) .lt line_in_len
+$ then
+$    if arch_name .eqs. "VAX"
+$    then
+$        write pco "supported_features=""SSL libz NTLM"""
+$    else
+$        write pco "supported_features=""SSL IPv6 libz NTLM"""
+$    endif
+$    goto pc_file_loop
+$ endif
+$ if f$locate("@CURLVERSION@", line_in) .lt line_in_len
+$ then
+$    write pco "Version: ''curl_version'"
+$    goto pc_file_loop
+$ endif
+$ if f$locate("@LIBCURL_LIBS@", line_in) .lt line_in_len
+$ then
+$    if arch_name .eqs. "VAX"
+$    then
+$        write pco "Libs.private: -lssl -lcrypto -lz"
+$    else
+$        write pco "Libs.private: -lssl -lcrypto -lgssapi -lz"
+$    endif
+$    goto pc_file_loop
+$ endif
+$ if f$locate("@CPPFLAG_CURL_STATICLIB@", line_in) .lt line_in_len
+$ then
+$    write pco "Cflags: -I${includedir} -DCURL_STATICLIB"
+$    goto pc_file_loop
+$ endif
+$!
+$pc_file_loop_end:
+$ close pco
+$ close pci
+$!
+$all_exit:
+$ exit
diff --git a/packages/vms/compare_curl_source.com b/packages/vms/compare_curl_source.com
new file mode 100644 (file)
index 0000000..7df4bed
--- /dev/null
@@ -0,0 +1,379 @@
+$! Compare_curl_source.com
+$!
+$! $Id$
+$!
+$! This procedure compares the files in two directories and reports the
+$! differences.  It is customized for the vmsports repository layout.
+$!
+$! It needs to be customized to the local site directories.
+$!
+$! This is used by me for these purposes:
+$!     1. Compare the original source of a project with an existing
+$!        VMS port.
+$!     2. Compare the checked out repository of a project with the
+$!        the local working copy to make sure they are in sync.
+$!     3. Keep a copy directory up to date.  The third is needed by
+$!        me because VMS Backup can create a saveset of files from a
+$!        NFS mounted volume.
+$!
+$! First the files in the original source directory which is assumed to be
+$! under source codde control are compared with the copy directory.
+$!
+$! Then the files are are only in the copy directory are listed.
+$!
+$! The result will five diagnostics about of files:
+$!    1. Files that are not generation 1.
+$!    2. Files missing in the copy directory.
+$!    3. Files in the copy directory not in the source directory.
+$!    4. Files different from the source directory.
+$!    5. Files that VMS DIFF can not process.
+$!
+$! This needs to be run on an ODS-5 volume.
+$!
+$! If UPDATE is given as a second parameter, files missing or different in the
+$! copy directory will be updated.
+$!
+$! By default:
+$!    The directory src_root:[project_name] will be translated to something like
+$!    DISK:[dir.dir.reference.project_name] and this will be used
+$!    to calculate DISK:[dir.dir.vms_source.project_name] for the VMS specific
+$!    source directory.
+$!
+$!    The copy directory is vms_root:[project_name]
+$!    The UPDATE parameter is ignored.
+$!
+$!    This setting is used to make sure that the working vms directory
+$!    and the CVS checkout directory have the same contents.
+$!
+$! If P1 is "SRCBCK" then this
+$!     The source directory tree is: src_root:[project_name]
+$!     The copy directory is src_root1:[project_name]
+$!
+$!   src_root1:[project_name] is used by me to work around that VMS backup will
+$!   not use NFS as a source directory so I need to make a copy.
+$!
+$!   This is to make sure that the backup save set for the unmodified
+$!   source is up to date.
+$!
+$!   If your CVS checkout is not on an NFS mounted volume, you do not
+$!   need to use this option or have the logical name src_root1 defined.
+$!
+$! If P1 is "VMSBCK" then this changes the two directories:
+$!    The source directory is vms_root:[project_name]
+$!    The copy directory is vms_root1:[project_name]
+$!
+$!   vms_root:[project_name] is where I do the VMS specific edits.
+$!   vms_root1:[project_name] is used by me to work around that VMS backup will
+$!   not use NFS as a source directory so I need to make a copy.
+$!
+$!   This is to make sure that the backup save set for the unmodified
+$!   source is up to date.
+$!
+$! Copyright 2011, John Malmberg
+$!
+$! Permission to use, copy, modify, and/or distribute this software for any
+$! purpose with or without fee is hereby granted, provided that the above
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$! 18-Aug-2011  J. Malmberg
+$!==========================================================================
+$!
+$! Update missing/changed files.
+$ update_file = 0
+$ if (p2 .eqs. "UPDATE")
+$ then
+$   update_file = 1
+$ endif
+$!
+$ myproc = f$environment("PROCEDURE")
+$ myprocdir = f$parse(myproc,,,"DIRECTORY") - "[" - "]" - "<" - ">"
+$ myprocdir = f$edit(myprocdir, "LOWERCASE")
+$ mydefault = f$environment("DEFAULT")
+$ mydir = f$parse(mydefault,,,"DIRECTORY")
+$ mydir = f$edit(mydir, "LOWERCASE")
+$ odelim = f$extract(0, 1, mydir)
+$ mydir = mydir - "[" - "]" - "<" - ">"
+$ mydev = f$parse(mydefault,,,"DEVICE")
+$!
+$ ref = ""
+$ if P1 .eqs. ""
+$ then
+$   ref_base_dir = myprocdir
+$   wrk_base_dir = mydir
+$   update_file = 0
+$   resultd = f$parse("src_root:",,,,"NO_CONCEAL")
+$   resultd = f$edit(resultd, "LOWERCASE")
+$   resultd = resultd - "][" - "><" - ".;" - ".."
+$   resultd_len = f$length(resultd) - 1
+$   delim = f$extract(resultd_len, 1, resultd)
+$   ref_root_base = mydir + delim
+$   resultd = resultd - ref_root_base - "reference." + "vms_source."
+$   ref = resultd + ref_base_dir
+$   wrk = "VMS_ROOT:" + odelim + wrk_base_dir
+$   resultd_len = f$length(resultd) - 1
+$   resultd = f$extract(0, resultd_len, resultd) + delim
+$   ref_root_dir = f$parse(resultd,,,"DIRECTORY")
+$   ref_root_dir = f$edit(ref_root_dir, "LOWERCASE")
+$   ref_root_dir = ref_root_dir - "[" - "]"
+$   ref_base_dir = ref_root_dir + "." + ref_base_dir
+$ endif
+$!
+$ if p1 .eqs. "SRCBCK"
+$ then
+$   ref_base_dir = "curl"
+$   wrk_base_dir = "curl"
+$   ref = "src_root:[" + ref_base_dir
+$   wrk = "src_root1:[" + wrk_base_dir
+$   if update_file
+$   then
+$       if f$search("src_root1:[000000]curl.dir") .eqs. ""
+$       then
+$           create/dir/prot=o:rwed src_root1:[curl]
+$       endif
+$   endif
+$ endif
+$!
+$!
+$ if p1 .eqs. "VMSBCK"
+$ then
+$   ref_base_dir = "curl"
+$   wrk_base_dir = "curl"
+$   ref = "vms_root:[" + ref_base_dir
+$   wrk = "vms_root1:[" + wrk_base_dir
+$   if update_file
+$   then
+$       if f$search("vms_root1:[000000]curl.dir") .eqs. ""
+$       then
+$           create/dir/prot=o:rwed vms_root1:[curl]
+$       endif
+$   endif
+$ endif
+$!
+$!
+$ if ref .eqs. ""
+$ then
+$   write sys$output "Unknown compare type specified!"
+$   exit 44
+$ endif
+$!
+$!
+$! Future - check the device types involved for the
+$! the syntax to check.
+$ ODS2_SYNTAX = 0
+$ NFS_MANGLE = 0
+$ PWRK_MANGLE = 0
+$!
+$ vax = f$getsyi("HW_MODEL") .lt. 1024
+$ if vax
+$ then
+$   ODS2_SYNTAX = 1
+$ endif
+$!
+$ report_missing = 1
+$!
+$ if .not. ODS2_SYNTAX
+$ then
+$   set proc/parse=extended
+$ endif
+$!
+$loop:
+$   ref_spec = f$search("''ref'...]*.*;",1)
+$   if ref_spec .eqs. "" then goto loop_end
+$!
+$   ref_dev = f$parse(ref_spec,,,"DEVICE")
+$   ref_dir = f$parse(ref_spec,,,"DIRECTORY")
+$   ref_dir = f$edit(ref_dir, "LOWERCASE")
+$   ref_name = f$parse(ref_spec,,,"NAME")
+$   ref_type = f$parse(ref_spec,,,"TYPE")
+$!
+$!
+$   if f$locate(".CVS]", ref_dir) .lt. f$length(ref_dir) then goto loop
+$
+$   rel_path = ref_dir - "[" - ref_base_dir
+$!  rel_path_len = f$length(rel_path) - 1
+$!  delim = f$extract(rel_path_len, 1, rel_path)
+$!  rel_path = rel_path - ".]" - ".>" - "]" - ">"
+$!  rel_path = rel_path + delim
+$!
+$   if ODS2_SYNTAX
+$   then
+$!       if rel_path .eqs. ".examples.scripts^.noah]"
+$!       then
+$!           rel_path = ".examples.scripts_noah]"
+$!       endif
+$!       if rel_path .eqs. ".examples.scripts^.v2]"
+$!       then
+$!           rel_path = ".examples.scripts_v2]"
+$!       endif
+$   endif
+$!
+$   wrk_path = wrk + rel_path
+$!
+$   ref_name_type = ref_name + ref_type
+$!
+$   if ODS2_SYNTAX
+$   then
+$   endif
+$!
+$   wrk_spec = wrk_path + ref_name_type
+$!
+$!
+$   wrk_chk = f$search(wrk_spec, 0)
+$   if wrk_chk .eqs. ""
+$   then
+$       if report_missing
+$       then
+$           write sys$output "''wrk_spec' is missing"
+$        endif
+$        if update_file
+$        then
+$            copy/log 'ref_spec' 'wrk_spec'
+$        endif
+$        goto loop
+$   endif
+$!
+$   wrk_name = f$parse(wrk_spec,,,"NAME")
+$   wrk_type = f$parse(wrk_spec,,,"TYPE")
+$   wrk_fname = wrk_name + wrk_type"
+$   ref_fname = ref_name + ref_type
+$!
+$   if ref_fname .nes. wrk_fname
+$   then
+$       write sys$output "''wrk_spc' wrong name, should be ""''ref_fname'"""
+$   endif
+$!
+$   ref_type = f$edit(ref_type, "UPCASE")
+$   if ref_type .eqs. ".DIR" then goto loop
+$!
+$   if ODS2_SYNTAX
+$   then
+$       ref_fname = f$edit(ref_fname, "LOWERCASE")
+$   endif
+$!
+$!  These files are in the wrong format for VMS diff, and we don't change them.
+$   ref_skip = 0
+$   if ref_type .eqs. ".PDF" then ref_skip = 1
+$   if ref_type .eqs. ".HTML" then ref_skip = 1
+$   if ref_type .eqs. ".HQX" then ref_skip = 1
+$   if ref_type .eqs. ".P12" then ref_skip = 1
+$   if ref_type .eqs. "."
+$   then
+$       if f$locate("test", ref_fname) .eq. 0 then ref_skip = 1
+$       if ref_fname .eqs. "configure." then ref_skip = 1
+$   endif
+$   if ref_fname .eqs. "MACINSTALL.TXT" then ref_skip = 1
+$   if ref_fname .eqs. "$macinstall.txt" then ref_skip = 1
+$   if ref_fname .eqs. "curl.mcp$5nxml$5nsit$5nhqx" then ref_skip = 1
+$   if ref_fname .eqs. "curl_GUSIConfig.cpp" then ref_skip = 1
+$   if ref_fname .eqs. "curl_$gusic$onfig.cpp" then ref_skip = 1
+$   if ref_fname .eqs. "macos_main.cpp" then ref_skip = 1
+$!
+$!
+$   if ref_skip .ne. 0
+$   then
+$      if report_missing
+$      then
+$          write sys$output "Skipping diff of ''ref_fname'"
+$      endif
+$      goto loop
+$   endif
+$!
+$!
+$   wrk_ver = f$parse(wrk_chk,,,"VERSION")
+$   if wrk_ver .nes. ";1"
+$   then
+$       write sys$output "Version for ''wrk_spec' is not 1"
+$   endif
+$   set noon
+$   diff/out=nl: 'wrk_spec' 'ref_spec'
+$   if $severity .nes. "1"
+$   then
+$       write sys$output "''wrk_spec' is different from ''ref_spec'"
+$       if update_file
+$       then
+$           delete 'wrk_spec';*
+$           copy/log 'ref_spec' 'wrk_spec'
+$       endif
+$   endif
+$   set on
+$
+$!
+$   goto loop
+$loop_end:
+$!
+$!
+$missing_loop:
+$!  For missing loop, check the latest generation.
+$   ref_spec = f$search("''wrk'...]*.*;")
+$   if ref_spec .eqs. "" then goto missing_loop_end
+$!
+$   ref_dev = f$parse(ref_spec,,,"DEVICE")
+$   ref_dir = f$parse(ref_spec,,,"DIRECTORY")
+$   ref_dir = f$edit(ref_dir, "LOWERCASE")
+$   ref_name = f$parse(ref_spec,,,"NAME")
+$   ref_type = f$parse(ref_spec,,,"TYPE")
+$   ref_name_type = ref_name + ref_type
+$!
+$   rel_path = ref_dir - "[" - wrk_base_dir
+$!
+$!
+$   wrk_path = ref + rel_path
+$   wrk_spec = wrk_path + ref_name + ref_type
+$   wrk_name = f$parse(wrk_spec,,,"NAME")
+$   wrk_type = f$parse(wrk_spec,,,"TYPE")
+$!
+$   wrk_fname = wrk_name + wrk_type"
+$   ref_fname = ref_name + ref_type
+$!
+$   wrk_skip = 0
+$   ref_utype = f$edit(ref_type,"UPCASE")
+$   ref_ufname = f$edit(ref_fname,"UPCASE")
+$   if ref_ufname .eqs. "CVS.DIR" then wrk_skip = 1
+$   if ref_fname .eqs. ".cvsignore" then wrk_skip = 1
+$   if ref_fname .eqs. "Entries." then wrk_skip = 1
+$   if ref_fname .eqs. "Repository." then wrk_skip = 1
+$   if ref_fname .eqs. "Root." then wrk_skip = 1
+$!
+$!
+$   if wrk_skip .eq. 0
+$   then
+$       wrk_chk = f$search(wrk_spec, 0)
+$       if wrk_chk .eqs. ""
+$       then
+$           if report_missing
+$           then
+$               write sys$output "''wrk_spec' is missing"
+$           endif
+$           goto missing_loop
+$       endif
+$   else
+$       goto missing_loop
+$   endif
+$!
+$   if ref_fname .nes. wrk_fname
+$   then
+$       write sys$output "''wrk_spc' wrong name, should be ""''ref_fname'"""
+$   endif
+$!
+$   if ref_utype .eqs. ".DIR" then goto missing_loop
+$!
+$   wrk_ver = f$parse(wrk_chk,,,"VERSION")
+$   if wrk_ver .nes. ";1"
+$   then
+$      write sys$output "Version for ''wrk_spec' is not 1"
+$   endif
+$!
+$   goto missing_loop
+$!
+$!
+$missing_loop_end:
+$!
+$exit
diff --git a/packages/vms/curl_release_note_start.txt b/packages/vms/curl_release_note_start.txt
new file mode 100644 (file)
index 0000000..977dce1
--- /dev/null
@@ -0,0 +1,77 @@
+From file: CURL_RELEASE_NOTE_START.TXT
+
+Note: These kits are produced by a hobbyist and are providing any support
+or any commitment to supply bug fixes or future releases.  This code is
+as-is with no warrantees.
+
+The testing of this build of curl was minimal and involved building some of
+the sample and test programs, accessing a public HTTPS: website, doing a
+form post of some VMS test files, and FTP upload of some text files.
+
+Due to the way that PCSI identifies packages, if you install a package from
+one producer and then want to upgrade it from another producer, you will
+probably need to uninstall the previous package first.
+
+OpenVMS specific building and kitting instructions are after the standard
+curl readme file.
+
+This product may be available for your platform in a PCSI kit.  The source kit
+contains files for building CURL using GNV or with a DCL procedure.
+
+The GNV based build creates a libcurl share imaged which is supplied in the
+PCSI kit.
+
+This version of CURL will return VMS compatible status codes when run from
+DCL and Unix compatible exit codes and messages when run with the SHELL
+environment variable set.
+
+This port of Curl uses the OpenSSL, Ldap, and Kerberos V5 that are bundled
+with OpenVMS or supplied as updates by HP.  Ldap and Kerberos are not available
+on the VAX platform.  See section below for a special note about HP OpenSSL
+on Alpha and IA64.
+
+The supplied CURL_STARTUP.COM procedure that is installed in
+[VMS$COMMON.SYS$STARTUP] can be put in your VMS startup procedure to install
+the GNV$LIBCURL shared image and create logical names GNV$LIBCURL to reference
+it.  It will create the GNV$CURL_INCLUDE logical name for build procedures
+to access the header files.
+
+Normally to use curl from DCL, just create a foreign command as:
+   curl :== $gnv$gnu:[usr.bin]gnv$curl.exe
+
+If you need to work around having the older HP SSL kit installed, then
+for DCL create this command procedure:
+
+ $ create/dir gnv$gnu:[vms_bin]/prot=w:re
+ $ create gnv$gnu:[vms_bin]curl.com
+ $ curl := $gnv$gnu:[usr.bin]gnv$curl.exe
+ $ define/user ssl$libcrypto_shr32 gnv$curl_ssl_libcryptoshr32
+ $ curl "''p1'" "''p2'" "''p3'" "''p4'" "''p5'" "''p6'" "''p7'" "''p8'"
+ ^Z
+
+Then you can use: curl :== @gnv$gnu:[vms_bin]curl.com to run curl.
+
+For the HP SSL work around to work for GNV do the following:
+ $ create/dir gnv$gnu:[usr.local.bin]/prot=w:re
+ $ create gnv$gnu:[usr.local.bin]curl.
+ #! /bin/sh
+ dcl @gnv\$gnu:[vms_bin]curl.com $*
+ ^Z
+
+Similar work arounds will be needed for any program linked with GNV$LIBCURL
+until the HP OpenSSL is upgraded to the current 1.4 version or later.
+
+If you are installing a "daily" build instead of a release build of Curl, some
+things have been changed so that it can be installed at the same time as
+a production build with out conflicts.
+
+   The CURL_DAILY_STARTUP.COM will be supplied instead of CURL_STARTUP.COM.
+   This file is actually not used with the daily package and is provided as
+   a preview of what the next CURL_STARTUP.COM will be for the next release.
+   Do not run it.
+
+   The files that are normally installed in [VMS$COMMON.GNV.usr], for the
+   daily build are installed in [VMS$COMMON.GNV.beta] directory.
+
+   To use the daily GNV$LIBCURL image, you will need to define the logical
+   name GNV$LIBCURL to the image.
diff --git a/packages/vms/curl_startup.com b/packages/vms/curl_startup.com
new file mode 100644 (file)
index 0000000..84760a0
--- /dev/null
@@ -0,0 +1,100 @@
+$! File: curl_Startup.com
+$!
+$! $Id$
+$!
+$! Procedure to setup the CURL libraries for use by programs from the
+$! VMS SYSTARTUP*.COM procedure.
+$!
+$! Copyright 2009, John Malmberg
+$!
+$! Permission to use, copy, modify, and/or distribute this software for any
+$! purpose with or without fee is hereby granted, provided that the above
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$! 15-Jun-2009 J. Malmberg
+$! 30-Jul-2013 J. Malmberg  Update for Curl 7.32
+$!========================================================================
+$!
+$!
+$! GNV$GNU if needed.
+$ if f$trnlnm("GNV$GNU") .eqs. ""
+$ then
+$   x = f$trnlnm("GNU","LNM$SYSTEM_TABLE")
+$   if x .eqs. ""
+$   then
+$       write sys$output "GNV must be started up before this procedure.
+$       exit 44
+$   endif
+$   define/system/exec/trans=conc GNV$GNU 'x'
+$ endif
+$!
+$!
+$ myproc = f$environment("procedure")
+$!
+$! ZLIB needed.
+$ if f$trnlnm("GNV$LIBZSHR32") .eqs. ""
+$ then
+$   zlib_startup = f$parse("gnv$zlib_startup.com;0", myproc,,,)
+$   if f$search(zlib_startup) .nes. ""
+$   then
+$       @'zlib_startup
+$   else
+$       write sys$output "ZLIB package not found and is required."
+$       exit 44
+$   endif
+$ endif
+$!
+$!
+$ curl_ssl_libcrypto32 = ""
+$ curl_ssl_libssl32 = ""
+$ gnv_ssl_libcrypto32 = "gnv$gnu:[lib]ssl$libcrypto_shr32.exe"
+$ gnv_ssl_libssl32 = "gnv$gnu:[lib]ssl$libssl_shr32.exe"
+$ if f$search(gnv_ssl_libcrypto32) .nes. ""
+$ then
+$   curl_ssl_libcrypto32 = gnv_ssl_libcrypto32
+$   curl_ssl_libssl32 = gnv_ssl_libssl32
+$ else
+$   hp_ssl_libcrypto32 = "sys$share:ssl$libcrypto_shr32.exe"
+$   hp_ssl_libssl32 = "sys$share:ssl$libssl_shr32.exe"
+$   if f$search(hp_ssl_libcrypto32) .nes. ""
+$   then
+$       curl_ssl_libcrypto32 = hp_ssl_libcrypto32
+$       curl_ssl_libssl32 = hp_ssl_libssl32
+$   else
+$       write sys$output "HP SSL package not found and is required."
+$   endif
+$ endif
+$!
+$ define/system/exec gnv$curl_ssl_libcryptoshr32 'curl_ssl_libcrypto32'
+$ define/system/exec gnv$curl_ssl_libsslshr32 'curl_ssl_libssl32'
+$!
+$!
+$! CURL setup
+$ define/system/exec gnv$libcurl gnv$gnu:[usr.lib]GNV$LIBCURL.EXE
+$ define/system/exec gnv$curl_include gnv$gnu:[usr.include.curl]
+$ if .not. f$file_attributes("gnv$libcurl", "known")
+$ then
+$   install ADD gnv$libcurl/OPEN/SHARE/HEADER
+$ else
+$   install REPLACE gnv$libcurl/OPEN/SHARE/HEADER
+$ endif
+$!
+$!
+$ curl_exe = "gnv$gnu:[usr.bin]gnv$curl.exe"
+$ if .not. f$file_attributes(curl_exe, "known")
+$ then
+$   install ADD 'curl_exe'/OPEN/SHARE/HEADER
+$ else
+$   install REPLACE 'curl_exe'/OPEN/SHARE/HEADER
+$ endif
+$!
+$all_exit:
+$ exit
diff --git a/packages/vms/make_pcsi_curl_kit_name.com b/packages/vms/make_pcsi_curl_kit_name.com
new file mode 100644 (file)
index 0000000..d896da2
--- /dev/null
@@ -0,0 +1,190 @@
+$! File: MAKE_PCSI_CURL_KIT_NAME.COM
+$!
+$! $Id$
+$!
+$! Calculates the PCSI kit name for use in building an installation kit.
+$! PCSI is HP's PolyCenter Software Installation Utility.
+$!
+$! The results are stored in as logical names so that other procedures
+$! can use them.
+$!
+$! Copyright 2009, John Malmberg
+$!
+$! Permission to use, copy, modify, and/or distribute this software for any
+$! purpose with or without fee is hereby granted, provided that the above
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$! 11-Jun-2009 J. Malmberg
+$!
+$!========================================================================
+$!
+$! Save default
+$ default_dir = f$environment("DEFAULT")
+$!
+$! Move to the base directories
+$ set def [--]
+$!
+$! Put things back on error.
+$ on warning then goto all_exit
+$!
+$! The producer is the name or common abbreviation for the entity that is
+$! making the kit.  It must be set as a logical name before running this
+$! procedure.
+$!
+$! HP documents the producer as the legal owner of the software, but for
+$! open source work, it should document who is creating the package for
+$! distribution.
+$!
+$ producer = f$trnlnm("GNV_PCSI_PRODUCER")
+$ if producer .eqs. ""
+$ then
+$   write sys$output "The logical name GNV_PCSI_PRODUCER needs to be defined."
+$   write sys$output "This should be set to the common abbreviation or name of"
+$   write sys$output "the entity creating this kit.  If you are an individual"
+$   write sys$output "then use your initials."
+$   goto all_exit
+$ endif
+$ producer_full_name = f$trnlnm("GNV_PCSI_PRODUCER_FULL_NAME")
+$ if producer_full_name .eqs. ""
+$ then
+$   write sys$output "The logical name GNV_PCSI_PRODUCER_FULL_NAME needs to"
+$   write sys$output "be defined.  This should be set to the full name of"
+$   write sys$output "the entity creating this kit.  If you are an individual"
+$   write sys$output "then use your name."
+$   write sys$output "EX: DEFINE GNV_PCSI_PRODUCER_FULL_NAME ""First M. Last"""
+$   goto all_exit
+$ endif
+$!
+$ write sys$output "*****"
+$ write sys$output "***** Producer = ''producer'"
+$ write sys$output "*****"
+$!
+$!
+$! Base is one of 'VMS', 'AXPVMS', 'I64VMS', 'VAXVMS' and indicates what
+$! binaries are in the kit.  A kit with just 'VMS' can be installed on all
+$! architectures.
+$!
+$ base = "VMS"
+$ arch_type = f$getsyi("ARCH_NAME")
+$ code = f$extract(0, 1, arch_type)
+$ if (code .eqs. "I") then base = "I64VMS"
+$ if (code .eqs. "V") then base = "VAXVMS"
+$ if (code .eqs. "A") then base = "AXPVMS"
+$!
+$!
+$ product = "curl"
+$!
+$!
+$! We need to get the version from curlver_h.  It will have a line like
+$! #define LIBCURL_VERSION "7.31.0"
+$!   or
+$! #define LIBCURL_VERSION "7.32.0-20130731".
+$!
+$! The dash indicates that this is a daily pre-release.
+$!
+$!
+$ open/read/error=version_loop_end vhf [.include.curl]curlver.h
+$ version_loop:
+$   read vhf line_in
+$   if line_in .eqs. "" then goto version_loop
+$   if f$locate("#define LIBCURL_VERSION ", line_in) .ne. 0
+$   then
+$       goto version_loop
+$   endif
+$   raw_version = f$element(2," ", line_in) - """" - """"
+$ version_loop_end:
+$ close vhf
+$!
+$!
+$ eco_level = ""
+$ if f$search("''default_dir'vms_eco_level.h") .nes. ""
+$ then
+$   open/read ef 'default_dir'vms_eco_level.h
+$ecolevel_loop:
+$       read/end=ecolevel_loop_end ef line_in
+$       prefix = f$element(0, " ", line_in)
+$       if prefix .nes. "#define" then goto ecolevel_loop
+$       key = f$element(1, " ", line_in)
+$       value = f$element(2, " ", line_in) - """" - """"
+$       if key .eqs. "VMS_ECO_LEVEL"
+$       then
+$           eco_level = "''value'"
+$           if eco_level .eqs. "0"
+$           then
+$               eco_level = ""
+$           else
+$               eco_level = "E" + eco_level
+$           endif
+$           goto ecolevel_loop_end
+$       endif
+$       goto ecolevel_loop
+$ecolevel_loop_end:
+$   close ef
+$ endif
+$!
+$!
+$! This translates to V0732-0 or D0732-0
+$! We encode the snapshot date into the version as an ECO since a daily
+$! can never have an ECO.
+$!
+$! version_type = 'V' for a production release, and 'D' for a build from a
+$! daiy CVS snapshot.
+$ majorver = f$element(0, ".", raw_version)
+$ minorver = f$element(1, ".", raw_version)
+$ raw_update = f$element(2, ".", raw_version)
+$ update = f$element(0, "-", raw_update)
+$ if update .eqs. "0" then update = ""
+$ daily_tag = f$element(1, "-", raw_update)
+$ vtype = "V"
+$ patch = ""
+$ if daily_tag .nes. "-"
+$ then
+$   vtype = "D"
+$   daily_tag_len = f$length(daily_tag)
+$   daily_tag = f$extract(4, daily_tag_len - 4, daily_tag)
+$   patch = vtype + daily_tag
+$   product = product + "_d"
+$ else
+$   daily_tag = ""
+$   if eco_level .nes. "" then patch = eco_level
+$ endif
+$!
+$!
+$ version_fao = "!2ZB!2ZB"
+$ mmversion = f$fao(version_fao, 'majorver', 'minorver')
+$ version = vtype + "''mmversion'"
+$ if update .nes. "" .or. patch .nes. ""
+$ then
+$!  The presence of a patch implies an update
+$   if update .eqs. "" .and. patch .nes. "" then update = "0"
+$   version = version + "-" + update + patch
+$   fversion = version
+$ else
+$   fversion = version
+$   version = version + "-"
+$ endif
+$!
+$! Kit type 1 is complete kit, the only type that this procedure will make.
+$ kittype = 1
+$!
+$! Write out a logical name for the resulting base kit name.
+$ name = "''producer'-''base'-''product'-''version'-''kittype'"
+$ define GNV_PCSI_KITNAME "''name'"
+$ fname = "''product'-''fversion'"
+$ define GNV_PCSI_FILENAME_BASE "''fname'"
+$ write sys$output "*****"
+$ write sys$output "***** GNV_PCSI_KITNAME = ''name'."
+$ write sys$output "***** GNV_PCSI_FILENAME_BASE = ''fname'."
+$ write sys$output "*****"
+$!
+$all_exit:
+$ set def 'default_dir'
+$ exit '$status'
diff --git a/packages/vms/pcsi_gnv_curl_file_list.txt b/packages/vms/pcsi_gnv_curl_file_list.txt
new file mode 100644 (file)
index 0000000..ab5b633
--- /dev/null
@@ -0,0 +1,127 @@
+! File: PCSI_GNV_CURL_FILE_LIST.TXT
+!
+! $Id$
+!
+! File list for building a PCSI kit.
+! Very simple format so that the parsing logic can be simple.
+! links first, directory second, and files third.
+!
+! link -> file tells procedure to create/remove a link on install/uninstall
+! If more than one link, consider using an alias file.
+!
+! [xxx.yyy]foo.dir is a directory file for the rename phase.
+! [xxx.yyy.foo] is a directory file for the create phase.
+! Each subdirectory needs to be on its own pair of lines.
+!
+! [xxx.yyy]file.ext is a file for the rename and add phases.
+!
+! Copyright 2009, John Malmberg
+!
+! Permission to use, copy, modify, and/or distribute this software for any
+! purpose with or without fee is hereby granted, provided that the above
+! copyright notice and this permission notice appear in all copies.
+!
+! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+!
+! 15-Jun-2009  J. Malmberg
+!============================================================================
+[gnv.usr.bin]curl. -> [gnv.usr.bin]gnv$curl.exe
+[gnv.usr.bin]curl.exe -> [gnv.usr.bin]gnv$curl.exe
+[gnv]
+[000000]gnv.dir
+[gnv.usr]
+[gnv]usr.dir
+[gnv.usr]bin.dir
+[gnv.usr.bin]
+[gnv.usr]include.dir
+[gnv.usr.include]
+[gnv.usr.include]curl.dir
+[gnv.usr.include.curl]
+[gnv.usr]lib.dir
+[gnv.usr.lib]
+[gnv.usr.lib]pkgconfig.dir
+[gnv.usr.lib.pkgconfig]
+[gnv.usr]share.dir
+[gnv.usr.share]
+[gnv.usr.share]man.dir
+[gnv.usr.share.man]
+[gnv.usr.share.man]man1.dir
+[gnv.usr.share.man.man1]
+[gnv.usr.share.man]man3.dir
+[gnv.usr.share.man.man3]
+[gnv.usr.bin]curl-config.
+[gnv.usr.bin]gnv$curl.exe
+[gnv.usr.include.curl]curl.h
+[gnv.usr.include.curl]curlbuild.h
+[gnv.usr.include.curl]curlrules.h
+[gnv.usr.include.curl]curlver.h
+[gnv.usr.include.curl]easy.h
+[gnv.usr.include.curl]mprintf.h
+[gnv.usr.include.curl]multi.h
+[gnv.usr.include.curl]stdcheaders.h
+[gnv.usr.include.curl]typecheck-gcc.h
+[gnv.usr.lib]gnv$libcurl.exe
+[gnv.usr.lib]gnv$curlmsg.exe
+[gnv.usr.lib.pkgconfig]libcurl.pc
+[gnv.usr.share.man.man1]curl-config.1
+[gnv.usr.share.man.man1]curl.1
+[gnv.usr.share.man.man3]curl_easy_cleanup.3
+[gnv.usr.share.man.man3]curl_easy_duphandle.3
+[gnv.usr.share.man.man3]curl_easy_escape.3
+[gnv.usr.share.man.man3]curl_easy_getinfo.3
+[gnv.usr.share.man.man3]curl_easy_init.3
+[gnv.usr.share.man.man3]curl_easy_pause.3
+[gnv.usr.share.man.man3]curl_easy_perform.3
+[gnv.usr.share.man.man3]curl_easy_recv.3
+[gnv.usr.share.man.man3]curl_easy_reset.3
+[gnv.usr.share.man.man3]curl_easy_send.3
+[gnv.usr.share.man.man3]curl_easy_setopt.3
+[gnv.usr.share.man.man3]curl_easy_strerror.3
+[gnv.usr.share.man.man3]curl_easy_unescape.3
+[gnv.usr.share.man.man3]curl_escape.3
+[gnv.usr.share.man.man3]curl_formadd.3
+[gnv.usr.share.man.man3]curl_formfree.3
+[gnv.usr.share.man.man3]curl_formget.3
+[gnv.usr.share.man.man3]curl_free.3
+[gnv.usr.share.man.man3]curl_getdate.3
+[gnv.usr.share.man.man3]curl_getenv.3
+[gnv.usr.share.man.man3]curl_global_cleanup.3
+[gnv.usr.share.man.man3]curl_global_init.3
+[gnv.usr.share.man.man3]curl_global_init_mem.3
+[gnv.usr.share.man.man3]curl_mprintf.3
+[gnv.usr.share.man.man3]curl_multi_add_handle.3
+[gnv.usr.share.man.man3]curl_multi_assign.3
+[gnv.usr.share.man.man3]curl_multi_cleanup.3
+[gnv.usr.share.man.man3]curl_multi_fdset.3
+[gnv.usr.share.man.man3]curl_multi_info_read.3
+[gnv.usr.share.man.man3]curl_multi_init.3
+[gnv.usr.share.man.man3]curl_multi_perform.3
+[gnv.usr.share.man.man3]curl_multi_remove_handle.3
+[gnv.usr.share.man.man3]curl_multi_setopt.3
+[gnv.usr.share.man.man3]curl_multi_socket.3
+[gnv.usr.share.man.man3]curl_multi_socket_action.3
+[gnv.usr.share.man.man3]curl_multi_strerror.3
+[gnv.usr.share.man.man3]curl_multi_timeout.3
+[gnv.usr.share.man.man3]curl_multi_wait.3
+[gnv.usr.share.man.man3]curl_share_cleanup.3
+[gnv.usr.share.man.man3]curl_share_init.3
+[gnv.usr.share.man.man3]curl_share_setopt.3
+[gnv.usr.share.man.man3]curl_share_strerror.3
+[gnv.usr.share.man.man3]curl_slist_append.3
+[gnv.usr.share.man.man3]curl_slist_free_all.3
+[gnv.usr.share.man.man3]curl_strequal.3
+[gnv.usr.share.man.man3]curl_unescape.3
+[gnv.usr.share.man.man3]curl_version.3
+[gnv.usr.share.man.man3]curl_version_info.3
+[gnv.usr.share.man.man3]libcurl-easy.3
+[gnv.usr.share.man.man3]libcurl-errors.3
+[gnv.usr.share.man.man3]libcurl-multi.3
+[gnv.usr.share.man.man3]libcurl-share.3
+[gnv.usr.share.man.man3]libcurl-tutorial.3
+[gnv.usr.share.man.man3]libcurl.3
diff --git a/packages/vms/pcsi_product_gnv_curl.com b/packages/vms/pcsi_product_gnv_curl.com
new file mode 100644 (file)
index 0000000..38a1a99
--- /dev/null
@@ -0,0 +1,171 @@
+$! File: PCSI_PRODUCT_GNV_CURL.COM
+$!
+$! $Id$
+$!
+$! This command file packages up the product CURL into a sequential
+$! format kit
+$!
+$! Copyright 2009, John Malmberg
+$!
+$! Permission to use, copy, modify, and/or distribute this software for any
+$! purpose with or without fee is hereby granted, provided that the above
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$! 16-Jun-2009  J.Malmberg
+$!
+$!=========================================================================
+$!
+$! Save default
+$ default_dir = f$environment("DEFAULT")
+$!
+$! Put things back on error.
+$ on warning then goto all_exit
+$!
+$!
+$ can_build = 1
+$ producer = f$trnlnm("GNV_PCSI_PRODUCER")
+$ if producer .eqs. ""
+$ then
+$   write sys$output "GNV_PCSI_PRODUCER logical name has not been set."
+$   can_build = 0
+$ endif
+$ producer_full_name = f$trnlnm("GNV_PCSI_PRODUCER_FULL_NAME")
+$ if producer_full_name .eqs. ""
+$ then
+$   write sys$output -
+        "GNV_PCSI_PRODUCER_FULL_NAME logical name has not been set."
+$   can_build = 0
+$ endif
+$ stage_root_name = f$trnlnm("STAGE_ROOT")
+$ if stage_root_name .eqs. ""
+$ then
+$   write sys$output "STAGE_ROOT logical name has not been set."
+$   can_build = 0
+$ endif
+$!
+$ if (can_build .eq. 0)
+$ then
+$    write sys$output "Not able to build a kit."
+$    goto all_exit
+$ endif
+$!
+$! Make sure that the kit name is up to date for this build
+$!----------------------------------------------------------
+$ @MAKE_PCSI_CURL_KIT_NAME.COM
+$!
+$! Make sure that the release note file name is up to date
+$!---------------------------------------------------------
+$ @BUILD_GNV_CURL_RELEASE_NOTES.COM
+$!
+$!
+$! Make sure that the source has been backed up.
+$!----------------------------------------------
+$ arch_type = f$getsyi("ARCH_NAME")
+$ arch_code = f$extract(0, 1, arch_type)
+$ @backup_gnv_curl_src.com
+$!
+$! Regenerate the PCSI description file.
+$!--------------------------------------
+$ @BUILD_GNV_CURL_PCSI_DESC.COM
+$!
+$! Regenerate the PCSI Text file.
+$!---------------------------------
+$ @BUILD_GNV_CURL_PCSI_TEXT.COM
+$!
+$!
+$! Parse the kit name into components.
+$!---------------------------------------
+$ kit_name = f$trnlnm("GNV_PCSI_KITNAME")
+$ if kit_name .eqs. ""
+$ then
+$   write sys$output "@MAKE_PCSI_CURL_KIT_NAME.COM has not been run."
+$   goto all_exit
+$ endif
+$ producer = f$element(0, "-", kit_name)
+$ base = f$element(1, "-", kit_name)
+$ product_name = f$element(2, "-", kit_name)
+$ mmversion = f$element(3, "-", kit_name)
+$ majorver = f$extract(0, 3, mmversion)
+$ minorver = f$extract(3, 2, mmversion)
+$ updatepatch = f$element(4, "-", kit_name)
+$ if updatepatch .eqs. "" then updatepatch = ""
+$!
+$ version_fao = "!AS.!AS"
+$ mmversion = f$fao(version_fao, "''majorver'", "''minorver'")
+$ if updatepatch .nes. ""
+$ then
+$   version = "''mmversion'" + "-" + updatepatch
+$ else
+$   version = "''mmversion'"
+$ endif
+$!
+$!
+$! Move to the base directories
+$ set def [--]
+$ current_default = f$environment("DEFAULT")
+$ my_dir = f$parse(current_default,,,"DIRECTORY") - "[" - "<" - ">" - "]"
+$!
+$!
+$ source = "''default_dir'"
+$ src1 = "new_gnu:[usr.bin],"
+$ src2 = "new_gnu:[usr.include.curl],"
+$ src3 = "new_gnu:[usr.lib],"
+$ src4 = "new_gnu:[usr.lib.pkgconfig],"
+$ src5 = "new_gnu:[usr.share.man.man1],"
+$ src6 = "new_gnu:[usr.share.man.man3],"
+$ src7 = "new_gnu:[vms_src],"
+$ src8 = "new_gnu:[common_src],"
+$ src9 = "prj_root:[''my_dir'],prj_root:[''my_dir'.src]"
+$ gnu_src = src1 + src2 + src3 + src4 + src5 + src6 + src7 + src8 + src9
+$!
+$!
+$ base = ""
+$ arch_name = f$edit(f$getsyi("arch_name"),"UPCASE")
+$ if arch_name .eqs. "ALPHA" then base = "AXPVMS"
+$ if arch_name .eqs. "IA64" then base = "I64VMS"
+$ if arch_name .eqs. "VAX" then base = "VAXVMS"
+$!
+$ if base .eqs. "" then exit 44
+$!
+$ pcsi_option = "/option=noconfirm"
+$ if arch_code .eqs. "V"
+$ then
+$   pcsi_option = ""
+$ endif
+$!
+$!
+$product package 'product_name' -
+ /base='base' -
+ /producer='producer' -
+ /source='source' -
+ /destination=STAGE_ROOT:[KIT] -
+ /material=('gnu_src','source') -
+ /format=sequential 'pcsi_option'
+$!
+$!
+$! VAX can not do a compressed kit.
+$! ZIP -9 "-V" does a better job, so no reason to normally build a compressed
+$! kit.
+$!----------------------------------
+$if p1 .eqs. "COMPRESSED"
+$then
+$   if arch_code .nes. "V"
+$   then
+$       product copy /options=(novalidate, noconfirm) /format=compressed -
+        'product_name' -
+        /source=stage_root:[kit]/dest=stage_root:[kit] -
+        /version='version'/base='base'
+$   endif
+$endif
+$!
+$all_exit:
+$ set def 'default_dir'
+$ exit
diff --git a/packages/vms/stage_curl_install.com b/packages/vms/stage_curl_install.com
new file mode 100644 (file)
index 0000000..0dccdd6
--- /dev/null
@@ -0,0 +1,177 @@
+$! File: stage_curl_install.com
+$!
+$! $Id$
+$!
+$! This updates or removes the GNV$CURL.EXE and related files for the
+$! new_gnu:[*...] directory tree for running the self tests.
+$!
+$! The files installed/removed are:
+$!     [usr.bin]gnv$curl.exe
+$!     [usr.bin]curl-config.
+$!     [usr.lib]gnv$libcurl.exe
+$!     [usr.bin]curl. hard link for [usr.bin]gnv$curl.exe
+$!     [usr.include.curl]curl.h
+$!     [usr.include.curl]curlbuild.h
+$!     [usr.include.curl]curlrules.h
+$!     [usr.include.curl]curlver.h
+$!     [usr.include.curl]easy.h
+$!     [usr.include.curl]mprintf.h
+$!     [usr.include.curl]multi.h
+$!     [usr.include.curl]stdcheaders.h
+$!     [usr.include.curl]typecheck-gcc.h
+$!     [usr.lib.pkgconfig]libcurl.pc
+$!     [usr.share.man.man1]curl-config.1
+$!     [usr.share.man.man1]curl.1
+$!     [usr.share.man.man3]curl*.3
+$!     [usr.share.man.man3]libcurl*.3
+$! Future: A symbolic link to the release notes?
+$!
+$! Copyright 2012, John Malmberg
+$!
+$! Permission to use, copy, modify, and/or distribute this software for any
+$! purpose with or without fee is hereby granted, provided that the above
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$!
+$! 20-Aug-2012  J. Malmberg
+$!
+$!===========================================================================
+$!
+$ arch_type = f$getsyi("ARCH_NAME")
+$ arch_code = f$extract(0, 1, arch_type)
+$!
+$ if arch_code .nes. "V"
+$ then
+$   set proc/parse=extended
+$ endif
+$!
+$!
+$! If the first parameter begins with "r" or "R" then this is to
+$! remove the files instead of installing them.
+$ remove_filesq = f$edit(p1, "upcase,trim")
+$ remove_filesq = f$extract(0, 1, remove_filesq)
+$ remove_files = 0
+$ if remove_filesq .eqs. "R" then remove_files = 1
+$!
+$!
+$! If we are staging files, make sure that the libcurl.pc and curl-config
+$! files are present.
+$ if remove_files .eq. 0
+$ then
+$   if f$search("[--]libcurl.pc") .eqs. ""
+$   then
+$       @build_libcurl_pc.com
+$   endif
+$   if f$search("[--]curl-config") .eqs. ""
+$   then
+$       @build_curl-config_script.com
+$   endif
+$ endif
+$!
+$!
+$! Dest dirs
+$!------------------
+$ dest_dirs1 = "[usr],[usr.bin],[usr.include],[usr.include.curl]"
+$ dest_dirs2 = ",[usr.bin],[usr.lib.pkgconfig],[usr.share]"
+$ dest_dirs3 = ",[usr.share.man],[usr.share.man.man1],[usr.share.man.man3]"
+$ dest_dirs = dest_dirs1 + dest_dirs2 + dest_dirs3
+$!
+$!
+$!   Alias links needed.
+$!-------------------------
+$ source_curl = "gnv$curl.exe"
+$ dest_curl = "[bin]gnv$curl.exe"
+$ curl_links = "[bin]curl."
+$ new_gnu = "new_gnu:"
+$!
+$!
+$! Create the directories if they do not exist
+$!---------------------------------------------
+$ i = 0
+$curl_dir_loop:
+$   this_dir = f$element(i, ",", dest_dirs)
+$   i = i + 1
+$   if this_dir .eqs. "" then goto curl_dir_loop
+$   if this_dir .eqs. "," then goto curl_dir_loop_end
+$!  Just create the directories, do not delete them.
+$!  --------------------------------------------------
+$   if remove_files .eq. 0
+$   then
+$       create/dir 'new_gnu''this_dir'/prot=(o:rwed)
+$   endif
+$   goto curl_dir_loop
+$curl_dir_loop_end:
+$!
+$!
+$! Need to add in the executable file
+$!-----------------------------------
+$ if remove_files .eq. 0
+$ then
+$   copy [--.src]curl.exe 'new_gnu'[usr.bin]gnv$curl.exe/prot=w:re
+$   copy [--]curl-config. 'new_gnu'[usr.bin]curl-config./prot=w:re
+$   copy sys$disk:[]gnv$libcurl.exe 'new_gnu'[usr.lib]gnv$libcurl.exe/prot=w:re
+$ endif
+$!
+$ if remove_files .eq. 0
+$ then
+$   set file/enter='new_gnu'[bin]curl. 'new_gnu'[usr.bin]gnv$curl.exe
+$ else
+$   file = "''new_gnu'[bin]curl."
+$   if f$search(file) .nes. "" then set file/remove 'file';*
+$ endif
+$!
+$!
+$ if remove_files .eq. 0
+$ then
+$   copy [--.include.curl]curl.h 'new_gnu'[usr.include.curl]curl.h
+$   copy [--.include.curl]curlbuild.h -
+         'new_gnu'[usr.include.curl]curlbuild.h
+$   copy [--.include.curl]curlrules.h -
+         'new_gnu'[usr.include.curl]curlrules.h
+$   copy [--.include.curl]curlver.h -
+         'new_gnu'[usr.include.curl]curlver.h
+$   copy [--.include.curl]easy.h -
+         'new_gnu'[usr.include.curl]easy.h
+$   copy [--.include.curl]mprintf.h -
+         'new_gnu'[usr.include.curl]mprintf.h
+$   copy [--.include.curl]multi.h -
+         'new_gnu'[usr.include.curl]multi.h
+$   copy [--.include.curl]stdcheaders.h -
+         'new_gnu'[usr.include.curl]stdcheaders.h
+$   copy [--.include.curl]typecheck-gcc.h -
+         'new_gnu'[usr.include.curl]typecheck-gcc.h
+$   copy [--]libcurl.pc 'new_gnu'[usr.lib.pkgconfig]libcurl.pc
+$!
+$   copy [--.docs]curl-config.1 'new_gnu'[usr.share.man.man1]curl-config.1
+$   copy [--.docs]curl.1 'new_gnu'[usr.share.man.man1]curl.1
+$!
+$   copy [--.docs.libcurl]*.3 -
+         'new_gnu'[usr.share.man.man3]*.3
+$!
+$ else
+$   file = "''new_gnu'[usr.bin]curl-config."
+$   if f$search(file) .nes. "" then delete 'file';*
+$   file = "''new_gnu'[usr.bin]gnv$curl.exe"
+$   if f$search(file) .nes. "" then delete 'file';*
+$   file = "''new_gnu'[usr.lib]gnv$libcurl.exe"
+$   if f$search(file) .nes. "" then delete 'file';*
+$   file = "''new_gnu'[usr.include.curl]*.h"
+$   if f$search(file) .nes. "" then delete 'file';*
+$   file = "''new_gnu'[usr.share.man.man1]curl-config.1"
+$   if f$search(file) .nes. "" then delete 'file';*
+$   file = "''new_gnu'[usr.share.man.man1]curl.1"
+$   if f$search(file) .nes. "" then delete 'file';*
+$   file = "''new_gnu'[usr.share.man.man3]curl*.3"
+$   if f$search(file) .nes. "" then delete 'file';*
+$   file = "''new_gnu'[usr.share.man.man3]libcurl*.3"
+$   if f$search(file) .nes. "" then delete 'file';*
+$ endif
+$!
diff --git a/packages/vms/vms_eco_level.h b/packages/vms/vms_eco_level.h
new file mode 100644 (file)
index 0000000..4353407
--- /dev/null
@@ -0,0 +1,30 @@
+/* File: vms_eco_level.h
+ *
+ * $Id$
+ *
+ * Copyright 2012, John Malmberg
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+ */
+
+/* This file should be incremented for each ECO that is kit */
+/* for a specific cURL x.y-z release. */
+/* When any part of x.y-z is incremented, the ECO should be set back to 0 */
+
+#ifndef _VMS_ECO_LEVEL_H
+#define _VMS_ECO_LEVEL_H
+
+#define VMS_ECO_LEVEL "0"
+
+#endif