Archive-Unzip-Burst

 view release on metacpan or  search on metacpan

unzip-6.0/vms/build_unzip.com  view on Meta::CPAN

$!     - select BZIP2 support: "USEBZ2"
$!       This option is a shortcut for "IZ_BZIP2=SYS$DISK:[.bzip2]", and
$!       runs the DCL build procedure there,
$!     - select BZIP2 support: "IZ_BZIP2=dev:[dir]", where "dev:[dir]"
$!       (or a suitable logical name) tells where to find "bzlib.h".
$!       The BZIP2 object library (LIBBZ2_NS.OLB) is expected to be in
$!       a "[.dest]" directory under that one ("dev:[dir.ALPHAL]", for
$!       example), or in that directory itself.
$!       By default, the SFX programs are built without BZIP2 support.
$!       Add "BZIP2_SFX=1" to the LOCAL_UNZIP C macros to enable it.
$!       (See LOCAL_UNZIP, below.)
$!     - use ZLIB compression library: "IZ_ZLIB=dev:[dir]", where
$!       "dev:[dir]" (or a suitable logical name) tells where to find
$!       "zlib.h".  The ZLIB object library (LIBZ.OLB) is expected to be
$!       in a "[.dest]" directory under that one ("dev:[dir.ALPHAL]",
$!       for example), or in that directory itself.
$!     - select large-file support: "LARGE"
$!     - select compiler listings: "LIST"  Note that the whole argument
$!       is added to the compiler command, so more elaborate options
$!       like "LIST/SHOW=ALL" (quoted or space-free) may be specified.
$!     - supply additional compiler options: "CCOPTS=xxx"  Allows the
$!       user to add compiler command options like /ARCHITECTURE or
$!       /[NO]OPTIMIZE.  For example, CCOPTS=/ARCH=HOST/OPTI=TUNE=HOST
$!       or CCOPTS=/DEBUG/NOOPTI.  These options must be quoted or
$!       space-free.
$!     - supply additional linker options: "LINKOPTS=xxx"  Allows the
$!       user to add linker command options like /DEBUG or /MAP.  For
$!       example: LINKOPTS=/DEBUG or LINKOPTS=/MAP/CROSS.  These options
$!       must be quoted or space-free.  Default is
$!       LINKOPTS=/NOTRACEBACK, but if the user specifies a LINKOPTS
$!       string, /NOTRACEBACK will not be included unless specified by
$!       the user.
$!     - select installation of CLI interface version of UnZip:
$!       "VMSCLI" or "CLI"
$!     - force installation of UNIX interface version of UnZip
$!       (override LOCAL_UNZIP environment): "NOVMSCLI" or "NOCLI"
$!
$!     To specify additional options, define the symbol LOCAL_UNZIP
$!     as a comma-separated list of the C macros to be defined, and
$!     then run BUILD_UNZIP.COM.  For example:
$!
$!             $ LOCAL_UNZIP = "RETURN_CODES"
$!             $ @ [.VMS]BUILD_UNZIP.COM
$!
$!     VMS-specific options include VMSWILD and RETURN_CODES.  See the
$!     INSTALL file for other options (for example, CHECK_VERSIONS).
$!
$!     If you edit this procedure to set LOCAL_UNZIP here, be sure to
$!     use only one "=", to avoid affecting other procedures.
$!
$!     Note: This command procedure always generates both the "default"
$!     UnZip having the UNIX style command interface and the "VMSCLI"
$!     UnZip having the CLI compatible command interface.  There is no
$!     need to add "VMSCLI" to the LOCAL_UNZIP symbol.  (The only effect
$!     of "VMSCLI" now is the selection of the CLI style UnZip
$!     executable in the foreign command definition.)
$!
$!
$ on error then goto error
$ on control_y then goto error
$ OLD_VERIFY = f$verify( 0)
$!
$ edit := edit                  ! override customized edit commands
$ say := write sys$output
$!
$!##################### Read settings from environment ########################
$!
$ if (f$type( LOCAL_UNZIP) .eqs. "")
$ then
$     LOCAL_UNZIP = ""
$ else  ! Trim blanks and append comma if missing
$     LOCAL_UNZIP = f$edit( LOCAL_UNZIP, "TRIM")
$     if (f$extract( (f$length( LOCAL_UNZIP)- 1), 1, LOCAL_UNZIP) .nes. ",")
$     then
$         LOCAL_UNZIP = LOCAL_UNZIP + ", "
$     endif
$ endif
$!
$! Check for the presence of "VMSCLI" in LOCAL_UNZIP.  If yes, we will
$! define the foreign command for "unzip" to use the executable
$! containing the CLI interface.
$!
$ pos_cli = f$locate( "VMSCLI", LOCAL_UNZIP)
$ len_local_unzip = f$length( LOCAL_UNZIP)
$ if (pos_cli .ne. len_local_unzip)
$ then
$     CLI_IS_DEFAULT = 1
$     ! Remove "VMSCLI" macro from LOCAL_UNZIP. The UnZip executable
$     ! including the CLI interface is now created unconditionally.
$     LOCAL_UNZIP = f$extract( 0, pos_cli, LOCAL_UNZIP)+ -
       f$extract( pos_cli+7, len_local_unzip- (pos_cli+ 7), LOCAL_UNZIP)
$ else
$     CLI_IS_DEFAULT = 0
$ endif
$ delete /symbol /local pos_cli
$ delete /symbol /local len_local_unzip
$!
$!##################### Customizing section #############################
$!
$ unzx_unx = "UNZIP"
$ unzx_cli = "UNZIP_CLI"
$ unzsfx_unx = "UNZIPSFX"
$ unzsfx_cli = "UNZIPSFX_CLI"
$!
$ CCOPTS = ""
$ IZ_BZIP2 = ""
$ BUILD_BZIP2 = 0
$ IZ_ZLIB = ""
$ LINKOPTS = "/notraceback"
$ LINK_ONLY = 0
$ LISTING = " /nolist"
$ LARGE_FILE = 0
$ MAKE_HELP = 1
$ MAKE_MSG = 1
$ MAY_USE_DECC = 1
$ MAY_USE_GNUC = 0
$!
$! Process command line parameters requesting optional features.
$!
$ arg_cnt = 1
$ argloop:

unzip-6.0/vms/build_unzip.com  view on Meta::CPAN

       (f$extract( 4, 1, L) .nes. "="))
$     then
$         LISTING = " /LIST = [.''dest']"+ f$extract( 5, 1000, LISTING)
$     endif
$!
$! Define compiler command.
$!
$     cc = cc+ " /include = (''cc_incl')"+ LISTING+ CCOPTS
$!
$ endif
$!
$! Define linker command.
$!
$ link = "link ''LINKOPTS'"
$!
$! Make a VAXCRTL options file for GNU C or VAC C, if needed.
$!
$ if ((opts .nes. "") .and. -
   (f$locate( "VAXCSHR", f$edit( opts, "UPCASE")) .lt. f$length( opts)) .and. -
   (f$search( "[.''dest']VAXCSHR.OPT") .eqs. ""))
$ then
$     open /write opt_file_ln [.'dest']VAXCSHR.OPT
$     write opt_file_ln "SYS$SHARE:VAXCRTL.EXE /SHARE"
$     close opt_file_ln
$ endif
$!
$! Show interesting facts.
$!
$ say "   architecture = ''arch' (destination = [.''dest'])"
$ if (IZ_BZIP2 .nes. "")
$ then
$     if (.not. LINK_ONLY)
$     then
$         say "   BZIP2 include dir: ''f$trnlnm( "incl_bzip2")'"
$     endif
$     say "   BZIP2 library dir: ''f$trnlnm( "lib_bzip2")'"
$ endif
$ if (IZ_ZLIB .nes. "")
$ then
$     if (.not. LINK_ONLY)
$     then
$         say "   ZLIB include dir:  ''f$trnlnm( "incl_zlib")'"
$     endif
$     say "   ZLIB library dir:  ''f$trnlnm( "lib_zlib")'"
$ endif
$ if (.not. LINK_ONLY)
$ then
$     say "   cc = ''cc'"
$ endif
$ say "   link = ''link'"
$ if (.not. MAKE_HELP)
$ then
$     say "   Not making new help files."
$ endif
$ if (.not. MAKE_MSG)
$ then
$     say "   Not making new message files."
$ endif
$ say ""
$!
$ tmp = f$verify( 1)    ! Turn echo on to see what's happening.
$!
$!------------------------------- UnZip section ------------------------------
$!
$ if (.not. LINK_ONLY)
$ then
$!
$! Process the help file, if desired.
$!
$     if (MAKE_HELP)
$     then
$         runoff /out = UNZIP.HLP [.VMS]UNZIP_DEF.RNH
$     endif
$!
$! Process the message file, if desired.
$!
$     if (MAKE_MSG)
$     then
$         message /object = [.'dest']UNZIP_MSG.OBJ /nosymbols -
           [.VMS]UNZIP_MSG.MSG
$         link /shareable = [.'dest']UNZIP_MSG.EXE [.'dest']UNZIP_MSG.OBJ
$     endif
$!
$! Compile the sources.
$!
$     cc 'DEF_UNX' /object = [.'dest']UNZIP.OBJ UNZIP.C
$     cc 'DEF_UNX' /object = [.'dest']CRC32.OBJ CRC32.C
$     cc 'DEF_UNX' /object = [.'dest']CRYPT.OBJ CRYPT.C
$     cc 'DEF_UNX' /object = [.'dest']ENVARGS.OBJ ENVARGS.C
$     cc 'DEF_UNX' /object = [.'dest']EXPLODE.OBJ EXPLODE.C
$     cc 'DEF_UNX' /object = [.'dest']EXTRACT.OBJ EXTRACT.C
$     cc 'DEF_UNX' /object = [.'dest']FILEIO.OBJ FILEIO.C
$     cc 'DEF_UNX' /object = [.'dest']GLOBALS.OBJ GLOBALS.C
$     cc 'DEF_UNX' /object = [.'dest']INFLATE.OBJ INFLATE.C
$     cc 'DEF_UNX' /object = [.'dest']LIST.OBJ LIST.C
$     cc 'DEF_UNX' /object = [.'dest']MATCH.OBJ MATCH.C
$     cc 'DEF_UNX' /object = [.'dest']PROCESS.OBJ PROCESS.C
$     cc 'DEF_UNX' /object = [.'dest']TTYIO.OBJ TTYIO.C
$     cc 'DEF_UNX' /object = [.'dest']UBZ2ERR.OBJ UBZ2ERR.C
$     cc 'DEF_UNX' /object = [.'dest']UNREDUCE.OBJ UNREDUCE.C
$     cc 'DEF_UNX' /object = [.'dest']UNSHRINK.OBJ UNSHRINK.C
$     cc 'DEF_UNX' /object = [.'dest']ZIPINFO.OBJ ZIPINFO.C
$     cc 'DEF_UNX' /object = [.'dest']VMS.OBJ [.VMS]VMS.C
$!
$! Create the object library.
$!
$     if (f$search( "[.''dest']UNZIP.OLB") .eqs. "") then -
       libr /object /create [.'dest']UNZIP.OLB
$!
$     libr /object /replace [.'dest']UNZIP.OLB -
       [.'dest']CRC32.OBJ, -
       [.'dest']CRYPT.OBJ, -
       [.'dest']ENVARGS.OBJ, -
       [.'dest']EXPLODE.OBJ, -
       [.'dest']EXTRACT.OBJ, -
       [.'dest']FILEIO.OBJ, -
       [.'dest']GLOBALS.OBJ, -
       [.'dest']INFLATE.OBJ, -
       [.'dest']LIST.OBJ, -
       [.'dest']MATCH.OBJ, -
       [.'dest']PROCESS.OBJ, -

unzip-6.0/vms/build_unzip.com  view on Meta::CPAN

       [.'dest']VMS_.OBJ
$!
$ endif
$!
$! Link the SFX executable.
$!
$ link /executable = [.'dest']'unzsfx_unx'.EXE -
   SYS$DISK:[.'dest']UNZIPSFX.OBJ, -
   SYS$DISK:[.'dest']UNZIPSFX.OLB /library, -
   'lib_bzip2_opts' -
   SYS$DISK:[.'dest']UNZIPSFX.OLB /library, -
   'lib_zlib_opts' -
   'opts' -
   SYS$DISK:[.VMS]UNZIPSFX.OPT /options
$!
$!--------------------- UnZipSFX (CLI interface) section ---------------------
$!
$ if (.not. LINK_ONLY)
$ then
$!
$! Compile the SFX CLI sources.
$!
$     cc 'DEF_SXCLI' /object = [.'dest']UNZSXCLI.OBJ UNZIP.C
$     cc 'DEF_SXCLI' /object = [.'dest']CMDLINE_.OBJ -
       [.VMS]CMDLINE.C
$!
$! Create the SFX CLI object library.
$!
$     if (f$search( "[.''dest']UNZSXCLI.OLB") .eqs. "") then -
       libr /object /create [.'dest']UNZSXCLI.OLB
$!
$     libr /object /replace [.'dest']UNZSXCLI.OLB -
       [.'dest']CMDLINE_.OBJ, -
       [.'dest']UNZ_CLI.OBJ
$!
$ endif
$!
$! Link the SFX CLI executable.
$!
$ link /executable = [.'dest']'unzsfx_cli'.EXE -
   SYS$DISK:[.'dest']UNZSXCLI.OBJ, -
   SYS$DISK:[.'dest']UNZSXCLI.OLB /library, -
   SYS$DISK:[.'dest']UNZIPSFX.OLB /library, -
   'lib_bzip2_opts' -
   SYS$DISK:[.'dest']UNZIPSFX.OLB /library, -
   'lib_zlib_opts' -
   'opts' -
   SYS$DISK:[.VMS]UNZIPSFX.OPT /options
$!
$!----------------------------- Symbols section ------------------------------
$!
$ there = here- "]"+ ".''dest']"
$!
$! Define the foreign command symbols.  Similar commands may be useful
$! in SYS$MANAGER:SYLOGIN.COM and/or users' LOGIN.COM.
$!
$ unzip   == "$''there'''unzexec'.EXE"
$ zipinfo == "$''there'''unzexec'.EXE ""-Z"""
$!
$! Deassign the temporary process logical names, restore the original
$! default directory, and restore the DCL verify status.
$!
$ error:
$!
$ if (IZ_BZIP2 .nes. "")
$ then
$     if (f$trnlnm( "incl_bzip2", "LNM$PROCESS_TABLE") .nes. "")
$     then
$         deassign incl_bzip2
$     endif
$     if (f$trnlnm( "lib_bzip2", "LNM$PROCESS_TABLE") .nes. "")
$     then
$         deassign lib_bzip2
$     endif
$ endif
$!
$ if (IZ_ZLIB .nes. "")
$ then
$     if (f$trnlnm( "incl_zlib", "LNM$PROCESS_TABLE") .nes. "")
$     then
$         deassign incl_zlib
$     endif
$     if (f$trnlnm( "incl_zlib_contrib_infback9", -
       "LNM$PROCESS_TABLE") .nes. "")
$     then
$         deassign incl_zlib_contrib_infback9
$     endif
$     if (f$trnlnm( "lib_zlib", "LNM$PROCESS_TABLE") .nes. "")
$     then
$         deassign lib_zlib
$     endif
$ endif
$!
$ if (f$type( here) .nes. "")
$ then
$     if (here .nes. "")
$     then
$         set default 'here'
$     endif
$ endif
$!
$ if (f$type( OLD_VERIFY) .nes. "")
$ then
$     tmp = f$verify( OLD_VERIFY)
$ endif
$!
$ exit
$!



( run in 2.380 seconds using v1.01-cache-2.11-cpan-5b529ec07f3 )