aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMuhammad Moinur Rahman <bofh@FreeBSD.org>2024-01-21 10:55:44 +0000
committerMuhammad Moinur Rahman <bofh@FreeBSD.org>2024-01-21 12:51:15 +0000
commit2c2da76dd90366799ab5ee9dfa3748e14b2eb344 (patch)
treee3b69ba0971a2a05d197d7e84fb256a1f5921c86
parentb38be4e54875596bc8d932d80eeb235305896305 (diff)
downloadports-2c2da76dd90366799ab5ee9dfa3748e14b2eb344.tar.gz
ports-2c2da76dd90366799ab5ee9dfa3748e14b2eb344.zip
devel/rubygem-p4ruby: Update version 2017.1.1599185=>2023.1.2544327
- Fix build with ruby32 - Adopt port Changelog: https://github.com/perforce/p4ruby/releases/tag/2023.1 PR: 276466
-rw-r--r--devel/rubygem-p4ruby/Makefile13
-rw-r--r--devel/rubygem-p4ruby/distinfo6
-rw-r--r--devel/rubygem-p4ruby/files/patch-ext_P4_extconf.rb (renamed from devel/rubygem-p4ruby/files/patch-ext__P4__extconf.rb)36
-rw-r--r--devel/rubygem-p4ruby/files/patch-ext__P4__clientprogressruby.cpp13
-rw-r--r--devel/rubygem-p4ruby/files/patch-ext__P4__clientuserruby.cpp17
-rw-r--r--devel/rubygem-p4ruby/files/patch-ext__P4__p4clientapi.cpp23
6 files changed, 34 insertions, 74 deletions
diff --git a/devel/rubygem-p4ruby/Makefile b/devel/rubygem-p4ruby/Makefile
index 4f16122d5a48..98622bdcae12 100644
--- a/devel/rubygem-p4ruby/Makefile
+++ b/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
@@ -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>
diff --git a/devel/rubygem-p4ruby/distinfo b/devel/rubygem-p4ruby/distinfo
index 939acc56eeda..60596af748f4 100644
--- a/devel/rubygem-p4ruby/distinfo
+++ b/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
diff --git a/devel/rubygem-p4ruby/files/patch-ext__P4__extconf.rb b/devel/rubygem-p4ruby/files/patch-ext_P4_extconf.rb
index 60fd8e0d0bd7..65ed4911dbd5 100644
--- a/devel/rubygem-p4ruby/files/patch-ext__P4__extconf.rb
+++ b/devel/rubygem-p4ruby/files/patch-ext_P4_extconf.rb
@@ -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
@@ -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")
@@ -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')
diff --git a/devel/rubygem-p4ruby/files/patch-ext__P4__clientprogressruby.cpp b/devel/rubygem-p4ruby/files/patch-ext__P4__clientprogressruby.cpp
deleted file mode 100644
index e6432730805e..000000000000
--- a/devel/rubygem-p4ruby/files/patch-ext__P4__clientprogressruby.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
---- ./ext/P4/clientprogressruby.cpp.orig 2015-02-11 21:56:41.253726893 +0000
-+++ ./ext/P4/clientprogressruby.cpp 2015-02-11 21:57:19.286226444 +0000
-@@ -39,8 +39,8 @@
- #include "gc_hack.h"
- #include "extconf.h"
- #include "p4utils.h"
--#include "p4/clientapi.h"
--#include "p4/clientprog.h"
-+#include "perforce/clientapi.h"
-+#include "perforce/clientprog.h"
- #include "clientprogressruby.h"
-
- extern VALUE eP4;
diff --git a/devel/rubygem-p4ruby/files/patch-ext__P4__clientuserruby.cpp b/devel/rubygem-p4ruby/files/patch-ext__P4__clientuserruby.cpp
deleted file mode 100644
index 98e44005b68e..000000000000
--- a/devel/rubygem-p4ruby/files/patch-ext__P4__clientuserruby.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
---- ./ext/P4/clientuserruby.cpp.orig 2015-02-11 21:56:41.253726893 +0000
-+++ ./ext/P4/clientuserruby.cpp 2015-02-11 21:57:33.343960720 +0000
-@@ -37,10 +37,10 @@
- #include <ctype.h>
- #include <ruby.h>
- #include "undefdups.h"
--#include <p4/clientapi.h>
--#include <p4/clientprog.h>
--#include <p4/spec.h>
--#include <p4/diff.h>
-+#include <perforce/clientapi.h>
-+#include <perforce/clientprog.h>
-+#include <perforce/spec.h>
-+#include <perforce/diff.h>
- #include "p4rubyconf.h"
- #include "gc_hack.h"
- #include "p4result.h"
diff --git a/devel/rubygem-p4ruby/files/patch-ext__P4__p4clientapi.cpp b/devel/rubygem-p4ruby/files/patch-ext__P4__p4clientapi.cpp
deleted file mode 100644
index 54dfb983d2aa..000000000000
--- a/devel/rubygem-p4ruby/files/patch-ext__P4__p4clientapi.cpp
+++ /dev/null
@@ -1,23 +0,0 @@
---- ./ext/P4/p4clientapi.cpp.orig 2015-02-11 21:56:41.253726893 +0000
-+++ ./ext/P4/p4clientapi.cpp 2015-02-11 21:57:42.902119989 +0000
-@@ -36,13 +36,13 @@
- ******************************************************************************/
- #include <ruby.h>
- #include "undefdups.h"
--#include <p4/clientapi.h>
--#include <p4/i18napi.h>
--#include <p4/enviro.h>
--#include <p4/hostenv.h>
--#include <p4/spec.h>
--#include <p4/ignore.h>
--#include <p4/debug.h>
-+#include <perforce/clientapi.h>
-+#include <perforce/i18napi.h>
-+#include <perforce/enviro.h>
-+#include <perforce/hostenv.h>
-+#include <perforce/spec.h>
-+#include <perforce/ignore.h>
-+#include <perforce/debug.h>
- #include "p4result.h"
- #include "p4rubydebug.h"
- #include "clientuserruby.h"