Skip to content

Commit

Permalink
devel/rubygem-p4ruby: Update version 2017.1.1599185=>2023.1.2544327
Browse files Browse the repository at this point in the history
- Fix build with ruby32
- Adopt port

Changelog: https://github.com/perforce/p4ruby/releases/tag/2023.1

PR:		276466
  • Loading branch information
5u623l20 committed Jan 21, 2024
1 parent b38be4e commit 2c2da76
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 74 deletions.
13 changes: 9 additions & 4 deletions devel/rubygem-p4ruby/Makefile
@@ -1,12 +1,11 @@
PORTNAME= p4ruby
PORTVERSION= 2017.1.1599185
PORTREVISION= 1
PORTVERSION= 2023.1.2544327
CATEGORIES= devel rubygems
MASTER_SITES= RG

MAINTAINER= ports@FreeBSD.org
MAINTAINER= bofh@FreeBSD.org
COMMENT= Ruby bindings for the Perforce API
WWW= http://www.perforce.com/perforce/loadsupp.html
WWW= https://github.com/perforce/p4ruby

LICENSE= BSD2CLAUSE

Expand All @@ -18,4 +17,10 @@ USES= gem

CONFIGURE_ARGS= --with-p4api-dir=${LOCALBASE} --with-p4api-lib=${LOCALBASE}/lib/perforce

post-patch:
@${REINPLACE_CMD} 's|#include \"p4/|#include \"perforce/|g; s|#include <p4/|#include <perforce/|g' \
${WRKSRC}/ext/P4/clientprogressruby.cpp \
${WRKSRC}/ext/P4/clientuserruby.cpp \
${WRKSRC}/ext/P4/p4clientapi.cpp

.include <bsd.port.mk>
6 changes: 3 additions & 3 deletions devel/rubygem-p4ruby/distinfo
@@ -1,3 +1,3 @@
TIMESTAMP = 1514155086
SHA256 (rubygem/p4ruby-2017.1.1599185.gem) = 98a5bc92ee8693134fd1b0d949e196b02ece2f4f2002707d1bf5e49c62eb3be2
SIZE (rubygem/p4ruby-2017.1.1599185.gem) = 57856
TIMESTAMP = 1705833034
SHA256 (rubygem/p4ruby-2023.1.2544327.gem) = fa8d73fb464e351582ac2dd766921bbe9ddb1a1495da1c2d322b9bd2d5380519
SIZE (rubygem/p4ruby-2023.1.2544327.gem) = 56832
@@ -1,6 +1,6 @@
--- ext/P4/extconf.rb.orig 2016-03-25 23:50:09.485520000 +0000
+++ ext/P4/extconf.rb 2016-03-25 23:52:32.288698000 +0000
@@ -354,22 +354,8 @@
--- ext/P4/extconf.rb.orig 2024-01-21 10:40:57 UTC
+++ ext/P4/extconf.rb
@@ -384,23 +384,8 @@ def resolve_p4api_dir

# When running rake compile, use this instead of other options, I'm not sure how
# gem/bundler options are passed through via rake
Expand All @@ -10,7 +10,7 @@
- end
-
- if !p4api_dir && !with_config('p4api-dir') && enable_config('p4api-download', true)
- download_api_via_ftp
- download_api_via_https
- unzip_file
- p4api_dir = downloaded_p4api_dir
- dir_config('p4api', "#{p4api_dir}/include", "#{p4api_dir}/lib")
Expand All @@ -20,25 +20,33 @@
- elsif !p4api_dir
- raise '--with-p4api-dir option has not been specified, and --disable-p4api-download is in effect'
- end
-
+ p4api_dir = with_config('p4api-dir')
+ dir_config('supp', "#{p4api_dir}/include/perforce", "#{p4api_dir}/lib/perforce")

p4api_dir
end
@@ -569,7 +555,8 @@

@@ -455,12 +440,12 @@ def p4_platform_label
raise 'Automatic fetching of p4api from perforce FTP is not supported on Windows'
when /darwin19|darwin[2-9][0-9]/
"macosx1015#{p4_cpu(:darwin)}"
- when /darwin/
+ when /darwin/
"darwin90#{p4_cpu(:darwin)}"
when /solaris/
"solaris10#{p4_cpu(:solaris)}"
when /linux/
- "linux26#{p4_cpu(:linux)}"
+ "linux26#{p4_cpu(:linux)}"
end
end

@@ -586,7 +571,7 @@ puts "$libs #{$libs}"
puts "$libs #{$libs}"

# Parse the Version file into a ruby structure
-version_info = P4ApiVersion.load(p4api_dir)
+#version_info = P4ApiVersion.load(p4api_dir)
+version_info = P4ApiVersion.load("#{p4api_dir}/share/examples/p4api")
create_p4rubyconf_header(version_info, $libs)

# This will generate a standard extconf.h based on what we discover locally.
@@ -577,4 +564,4 @@
# don't believe we need to rely on actually.
create_header

-create_makefile('P4')
\ No newline at end of file
+create_makefile('P4')
13 changes: 0 additions & 13 deletions devel/rubygem-p4ruby/files/patch-ext__P4__clientprogressruby.cpp

This file was deleted.

17 changes: 0 additions & 17 deletions devel/rubygem-p4ruby/files/patch-ext__P4__clientuserruby.cpp

This file was deleted.

23 changes: 0 additions & 23 deletions devel/rubygem-p4ruby/files/patch-ext__P4__p4clientapi.cpp

This file was deleted.

0 comments on commit 2c2da76

Please sign in to comment.