mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04:00
Add P4::Client, a Perl extension for the Perforce API.
This commit is contained in:
parent
861d1d47ce
commit
1b7ccf694e
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=88329
7 changed files with 120 additions and 0 deletions
|
@ -676,6 +676,7 @@
|
||||||
SUBDIR += p5-OLE-Storage_Lite
|
SUBDIR += p5-OLE-Storage_Lite
|
||||||
SUBDIR += p5-ORBit
|
SUBDIR += p5-ORBit
|
||||||
SUBDIR += p5-Object-Realize-Later
|
SUBDIR += p5-Object-Realize-Later
|
||||||
|
SUBDIR += p5-P4-Client
|
||||||
SUBDIR += p5-PAR
|
SUBDIR += p5-PAR
|
||||||
SUBDIR += p5-PAR-Dist
|
SUBDIR += p5-PAR-Dist
|
||||||
SUBDIR += p5-POE
|
SUBDIR += p5-POE
|
||||||
|
|
28
devel/p5-P4-Client/Makefile
Normal file
28
devel/p5-P4-Client/Makefile
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
# New ports collection makefile for: devel/p5-P4-Client
|
||||||
|
# Date created: 02 Sep 2003
|
||||||
|
# Whom: Anton Berezin <tobez@FreeBSD.org>
|
||||||
|
#
|
||||||
|
# $FreeBSD$
|
||||||
|
#
|
||||||
|
|
||||||
|
PORTNAME= P4-Client
|
||||||
|
PORTVERSION= 2.2596
|
||||||
|
CATEGORIES= devel perl5
|
||||||
|
MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
|
||||||
|
MASTER_SITE_SUBDIR= P4
|
||||||
|
PKGNAMEPREFIX= p5-
|
||||||
|
|
||||||
|
MAINTAINER= tobez@FreeBSD.org
|
||||||
|
COMMENT= P4::Client - Perl extension for the Perforce API
|
||||||
|
|
||||||
|
BUILD_DEPENDS= ${LOCALBASE}/lib/perforce/libclient.a:${PORTSDIR}/devel/p4api
|
||||||
|
|
||||||
|
PERL_CONFIGURE= yes
|
||||||
|
CC= ${CXX}
|
||||||
|
|
||||||
|
MAN3= P4::Client.3 P4::UI.3
|
||||||
|
|
||||||
|
post-patch:
|
||||||
|
${PERL} -pi -e 's|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/Makefile.PL
|
||||||
|
|
||||||
|
.include <bsd.port.mk>
|
1
devel/p5-P4-Client/distinfo
Normal file
1
devel/p5-P4-Client/distinfo
Normal file
|
@ -0,0 +1 @@
|
||||||
|
MD5 (P4-Client-2.2596.tar.gz) = b13d457f140363fa31b05cde8c22ddbe
|
11
devel/p5-P4-Client/files/patch-Client.xs
Normal file
11
devel/p5-P4-Client/files/patch-Client.xs
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
--- ../P4-Client-2.2596/Client.xs Tue Oct 15 16:22:15 2002
|
||||||
|
+++ Client.xs Tue Sep 2 09:45:09 2003
|
||||||
|
@@ -131,7 +131,7 @@ static int GetFlag( const char *flag, SV
|
||||||
|
warn( "Can't dereference object!!!" );
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
- tmp = hv_fetch( (HV *)SvRV(obj), flag, strlen( flag ), 0 );
|
||||||
|
+ tmp = hv_fetch( (HV *)SvRV(obj), (char *)flag, strlen( flag ), 0 );
|
||||||
|
if ( ! tmp ) return 0;
|
||||||
|
return SvIV( *tmp );
|
||||||
|
}
|
55
devel/p5-P4-Client/files/patch-Makefile.PL
Normal file
55
devel/p5-P4-Client/files/patch-Makefile.PL
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
--- ../P4-Client-2.2596/Makefile.PL Wed Apr 24 17:56:37 2002
|
||||||
|
+++ Makefile.PL Tue Sep 2 10:17:51 2003
|
||||||
|
@@ -68,14 +68,16 @@ before continuing.
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Get the path to the Perforce API
|
||||||
|
- my $apipath = "";
|
||||||
|
- print( "Where is the Perforce API to be found: " );
|
||||||
|
- $apipath = <STDIN>;
|
||||||
|
- $apipath =~ s/\n//;
|
||||||
|
-
|
||||||
|
- # Filthy support for ~/ type paths ( NOT ~user/ though! )
|
||||||
|
- $apipath =~ s#\~/#$ENV{HOME}/#;
|
||||||
|
- $apipath = abs_path( $apipath );
|
||||||
|
+ my $apiinc = "%%LOCALBASE%%/include/perforce";
|
||||||
|
+ my $apilib = "%%LOCALBASE%%/lib/perforce";
|
||||||
|
+ # my $apipath = "";
|
||||||
|
+ # print( "Where is the Perforce API to be found: " );
|
||||||
|
+ # $apipath = <STDIN>;
|
||||||
|
+ # $apipath =~ s/\n//;
|
||||||
|
+
|
||||||
|
+ # # Filthy support for ~/ type paths ( NOT ~user/ though! )
|
||||||
|
+ # $apipath =~ s#\~/#$ENV{HOME}/#;
|
||||||
|
+ # $apipath = abs_path( $apipath );
|
||||||
|
|
||||||
|
# These two aren't in the hints file because some variant of them is
|
||||||
|
# needed on every OS so it's better to have it visible.
|
||||||
|
@@ -86,15 +88,15 @@ EOF
|
||||||
|
foreach my $libset (@$libs )
|
||||||
|
{
|
||||||
|
push( @{$flags->{LIBS}},
|
||||||
|
- "-L$apipath -lclient -lrpc -lsupp $libset" );
|
||||||
|
+ "-L$apilib -lclient -lrpc -lsupp $libset" );
|
||||||
|
print("Added P4 libs to $libset\n" );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
- push( @{$flags->{LIBS}}, "-L$apipath -lclient -lrpc -lsupp" );
|
||||||
|
+ push( @{$flags->{LIBS}}, "-L$apilib -lclient -lrpc -lsupp" );
|
||||||
|
}
|
||||||
|
- $flags->{ 'INC' } = "-I$apipath -Ilib";
|
||||||
|
+ $flags->{ 'INC' } = "-I$apiinc -Ilib";
|
||||||
|
|
||||||
|
|
||||||
|
# Last thing to do is to get the address of their perforce
|
||||||
|
@@ -107,7 +109,7 @@ the tests
|
||||||
|
|
||||||
|
EOF
|
||||||
|
print( "Enter the address of your Perforce server: [localhost:1666]: ");
|
||||||
|
- my $p4port = <STDIN>;
|
||||||
|
+ my $p4port = ""; #<STDIN>;
|
||||||
|
$p4port =~ s/\n//;
|
||||||
|
$p4port = "localhost:1666" if ( $p4port =~ /^$/ );
|
||||||
|
|
14
devel/p5-P4-Client/pkg-descr
Normal file
14
devel/p5-P4-Client/pkg-descr
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
This module provides a Perl interface to the Perforce API allowing you
|
||||||
|
to write Perl scripts which communicate directly with a Perforce server.
|
||||||
|
|
||||||
|
P4::Client is the main interface through which all commands are issued.
|
||||||
|
The Perforce API is callback based though, and all interaction with the
|
||||||
|
user interface takes place through callbacks to methods of the P4::UI
|
||||||
|
object passed to the Run() method.
|
||||||
|
|
||||||
|
To customise the behaviour of the Perforce client, you should derive
|
||||||
|
your own class from P4::UI and override the relevant methods therein.
|
||||||
|
|
||||||
|
WWW: http://public.perforce.com//guest/tony_smith/perforce/API/Perl/index.html
|
||||||
|
|
||||||
|
\Anton
|
10
devel/p5-P4-Client/pkg-plist
Normal file
10
devel/p5-P4-Client/pkg-plist
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
%%SITE_PERL%%/%%PERL_ARCH%%/P4/Client.pm
|
||||||
|
%%SITE_PERL%%/%%PERL_ARCH%%/P4/UI.pm
|
||||||
|
%%SITE_PERL%%/%%PERL_ARCH%%/P4/example.pl
|
||||||
|
%%SITE_PERL%%/%%PERL_ARCH%%/auto/P4/Client/.packlist
|
||||||
|
%%SITE_PERL%%/%%PERL_ARCH%%/auto/P4/Client/Client.bs
|
||||||
|
%%SITE_PERL%%/%%PERL_ARCH%%/auto/P4/Client/Client.so
|
||||||
|
%%SITE_PERL%%/%%PERL_ARCH%%/auto/P4/Client/autosplit.ix
|
||||||
|
@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/P4/Client
|
||||||
|
@unexec rmdir %%SITE_PERL%%/%%PERL_ARCH%%/auto/P4 2>/dev/null || true
|
||||||
|
@unexec rmdir %%SITE_PERL%%/%%PERL_ARCH%%/P4 2>/dev/null || true
|
Loading…
Add table
Reference in a new issue