[MacPorts] #47801: Proposal for adding more recent rpcgen (from FreeBSD2007)
MacPorts
noreply at macports.org
Thu May 21 15:39:45 PDT 2015
#47801: Proposal for adding more recent rpcgen (from FreeBSD2007)
-------------------------+--------------------------------
Reporter: pmusumeci@… | Owner: macports-tickets@…
Type: request | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.3.3
Keywords: rpcgen | Port:
-------------------------+--------------------------------
Hi,
I have been helping the maintainer of the Octave package for Instrument
Control get his software building on OS-X. The major issue was that rpcgen
in OS-X is an older version that does not support the '-M' thread-safe
code generation option. I found that a relatively recent (but not the most
recent) copy of the FreeBSD sources for Sun Microsystems' rpcgen will
build as-is so I would like to ask if we can have this rpcgen available as
a MacPort. Could the more recent rpcgen be added to MacPorts?
Below is a small script that downloads and builds rpcgen from a 2007 era
FreeBSD-current. To show the difference in use options, I have also
included the help message from both rpcgen - the first is for OS-X rpcgen
which mentions that it is has a SunOS 4.1 compatibility mode and the
second is the more recent FreeBSD version which has the new '-M' switch
and mentions FreeBSD 4.X compatibility.
Thanks,
Phillip Musumeci
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#
# Simply download FreeBSD-current rpcgen sources and build for OS-X
# - Some octave packages require a more modern version of rpcgen. The
# Sun Microsystems version of rpcgen as found in FreeBSD in 2007 will
# build as-is, so we use it to replace a much earlier OS-X version.
#
# p.musumeci at ieee.org 21-May-2015
#
SRV=http://mirror.ancl.hawaii.edu/pub/FreeBSD/FreeBSD-
current/src/usr.bin/rpcgen
SRC="Makefile rpc_clntout.c rpc_cout.c rpc_hout.c rpc_main.c rpc_parse.c
rpc_parse.h rpc_sample.c rpc_scan.c rpc_scan.h rpc_svcout.c rpc_tblout.c
rpc_util.c rpc_util.h rpcgen.1"
mkdir -p sun_rpcgen
cd sun_rpcgen
for x in $SRC ; do
echo "Downloading $x"
fetch -m $SRV/$x
done
########################################
mv Makefile Makefile.sun
echo '# Simple build of rpcgen
all:
cc -O -o rpcgen *.c
' > Makefile
########################################
echo 'These files for Sun Microsystems rpcgen were downloaded from
http://mirror.ancl.hawaii.edu/pub/FreeBSD/FreeBSD-
current/src/usr.bin/rpcgen
and used as-is to build an rpcgen on OS-X.' > README.txt
########################################
ls -l
echo 'Build command: cc -O -o rpcgen *.c'
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Current OS-X
giotto $ /usr/bin/rpcgen
usage:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/rpcgen
infile
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/rpcgen
[-a][-b][-C][-Dname[=value]] -i size [-I [-K seconds]] [-A][-L][-M
toolkit][-N][-T] infile
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/rpcgen
[-c | -h | -l | -m | -t | -Sc | -Ss] [-o outfile] [infile]
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/rpcgen
[-s nettype]* [-o outfile] [infile]
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/rpcgen
[-n netid]* [-o outfile] [infile]
options:
-A generate svc_caller() function
-a generate all files, including samples
-b backward compatibility mode (generates code for SunOS 4.1)
-c generate XDR routines
-C ANSI C mode
-Dname[=value] define a symbol (same as #define)
-h generate header file
-i size size at which to start generating inline code
-I generate code for inetd support in server (for SunOS 4.1)
-K seconds server exits after K seconds of inactivity
-l generate client side stubs
-L server errors will be printed to syslog
-m generate server side stubs
-n netid generate server code that supports named netid
-N supports multiple arguments and call-by-value
-o outfile name of the output file
-s nettype generate server code that supports named nettype
-Sc generate sample client code that uses remote procedures
-Ss generate sample server code that defines remote procedures
-t generate RPC dispatch table
-T generate code to support RPC dispatch tables
-Y path directory name to find C preprocessor (cpp)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FreeBSD from around 2007
giotto $ rpcgen
usage: rpcgen infile
rpcgen [-abCLNTM] [-Dname[=value]] [-i size][-I -P [-K seconds]]
[-Y path] infile
rpcgen [-c | -h | -l | -m | -t | -Sc | -Ss | -Sm][-o outfile]
[infile]
rpcgen [-s nettype]* [-o outfile] [infile]
rpcgen [-n netid]* [-o outfile] [infile]
options:
-a generate all files, including samples
-b backward compatibility mode (generates code for FreeBSD
4.X)
-c generate XDR routines
-C ANSI C mode
-Dname[=value] define a symbol (same as #define)
-h generate header file
-i size size at which to start generatinginline code
-I generate code for inetd support in server
-K seconds server exits after K seconds ofinactivity
-l generate client side stubs
-L server errors will be printed to syslog
-m generate server side stubs
-M generate MT-safe code
-n netid generate server code that supportsnamed netid
-N supports multiple arguments andcall-by-value
-o outfile name of the output file
-P generate code for port monitoring support in server
-s nettype generate server code that supports namednettype
-Sc generate sample client code that uses remoteprocedures
-Ss generate sample server code that definesremote procedures
-Sm generate makefile template
-t generate RPC dispatch table
-T generate code to support RPC dispatch tables
-Y path path where cpp is found
--
Ticket URL: <https://trac.macports.org/ticket/47801>
MacPorts <https://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list