pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/lang/perl5



Module Name:    pkgsrc
Committed By:   taca
Date:           Mon Oct 15 03:01:37 UTC 2018

Modified Files:
        pkgsrc/lang/perl5: Makefile distinfo
        pkgsrc/lang/perl5/patches: patch-caretx.c

Log Message:
lang/perl5: $^X fallback work when platform-specific technique fails

Apply 03b94aa47e981af3c7b0118bfb11facda2b95251 from upstream make $^X
fallback work when platform-specific technique fails.

Bump PKGREVISION.


To generate a diff of this commit:
cvs rdiff -u -r1.248 -r1.249 pkgsrc/lang/perl5/Makefile
cvs rdiff -u -r1.153 -r1.154 pkgsrc/lang/perl5/distinfo
cvs rdiff -u -r1.1 -r1.2 pkgsrc/lang/perl5/patches/patch-caretx.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/lang/perl5/Makefile
diff -u pkgsrc/lang/perl5/Makefile:1.248 pkgsrc/lang/perl5/Makefile:1.249
--- pkgsrc/lang/perl5/Makefile:1.248    Wed Sep 19 13:52:33 2018
+++ pkgsrc/lang/perl5/Makefile  Mon Oct 15 03:01:37 2018
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.248 2018/09/19 13:52:33 gson Exp $
+# $NetBSD: Makefile,v 1.249 2018/10/15 03:01:37 taca Exp $
 
 .include "license.mk"
 .include "Makefile.common"
 
-PKGREVISION=   1
+PKGREVISION=   2
 COMMENT=       Practical Extraction and Report Language
 
 CONFLICTS+=    perl-base-[0-9]* perl-thread-[0-9]*

Index: pkgsrc/lang/perl5/distinfo
diff -u pkgsrc/lang/perl5/distinfo:1.153 pkgsrc/lang/perl5/distinfo:1.154
--- pkgsrc/lang/perl5/distinfo:1.153    Wed Sep 19 13:52:33 2018
+++ pkgsrc/lang/perl5/distinfo  Mon Oct 15 03:01:37 2018
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.153 2018/09/19 13:52:33 gson Exp $
+$NetBSD: distinfo,v 1.154 2018/10/15 03:01:37 taca Exp $
 
 SHA1 (perl-5.28.0.tar.xz) = c0e9e7a0dea97ec9816687d865fd461a99ef185c
 RMD160 (perl-5.28.0.tar.xz) = 34c9ad0560a2eed134e09282696bfae307cbeb6a
@@ -9,7 +9,7 @@ SHA1 (patch-Makefile.SH) = febb87d876a44
 SHA1 (patch-aa) = 3a2b39c9eb903e68ef7d03ae448c51c147c19aa1
 SHA1 (patch-ab) = 0ad5988b7cadfb13d9646a59a57f6cf884a6238a
 SHA1 (patch-ac) = 4baa8f80695687abb53d4f4e1830cf86db5b2bf7
-SHA1 (patch-caretx.c) = 9f53a9133f8dd2f962b448d7288b5b20454c86fb
+SHA1 (patch-caretx.c) = cbe55cdb897c02805a51582f6a7e413ca313b630
 SHA1 (patch-cflags.SH) = 7ad64e5a17b876bff4bbe238abc4a57354acf4fe
 SHA1 (patch-dist_Storable_Makefile.PL) = fd8964cf3c94ba811caaf71be21650b29e4c8e50
 SHA1 (patch-doio.c) = 684563a5416604a61632bd9cf70f4f225cce81e5

Index: pkgsrc/lang/perl5/patches/patch-caretx.c
diff -u pkgsrc/lang/perl5/patches/patch-caretx.c:1.1 pkgsrc/lang/perl5/patches/patch-caretx.c:1.2
--- pkgsrc/lang/perl5/patches/patch-caretx.c:1.1        Wed Jun  8 17:39:30 2016
+++ pkgsrc/lang/perl5/patches/patch-caretx.c    Mon Oct 15 03:01:37 2018
@@ -1,10 +1,51 @@
-$NetBSD: patch-caretx.c,v 1.1 2016/06/08 17:39:30 he Exp $
+$NetBSD: patch-caretx.c,v 1.2 2018/10/15 03:01:37 taca Exp $
 
-NetBSD's implementation sometimes returns "/"; reject that too.
+* NetBSD's implementation sometimes returns "/"; reject that too.
+* Apply 03b94aa47e981af3c7b0118bfb11facda2b95251 from upstream make
+  $^X fallback work when platform-specific technique fails.
 
---- caretx.c.orig      2016-03-01 12:33:01.000000000 +0000
+--- caretx.c.orig      2018-05-21 12:29:23.000000000 +0000
 +++ caretx.c
-@@ -121,8 +121,10 @@ Perl_set_caret_X(pTHX) {
+@@ -56,7 +56,19 @@ Perl_set_caret_X(pTHX) {
+     SV *const caret_x = GvSV(tmpgv);
+ #if defined(OS2)
+     sv_setpv(caret_x, os2_execname(aTHX));
+-#elif defined(USE_KERN_PROC_PATHNAME)
++    return;
++#elif defined(WIN32)
++    char *ansi;
++    WCHAR widename[MAX_PATH];
++    GetModuleFileNameW(NULL, widename, sizeof(widename)/sizeof(WCHAR));
++    ansi = win32_ansipath(widename);
++    sv_setpv(caret_x, ansi);
++    win32_free(ansi);
++    return;
++#else
++    /* We can try a platform-specific one if possible; if it fails, or we
++     * aren't running on a suitable platform, we'll fall back to argv[0]. */
++# ifdef USE_KERN_PROC_PATHNAME
+     size_t size = 0;
+     int mib[4];
+     mib[0] = CTL_KERN;
+@@ -76,7 +88,7 @@ Perl_set_caret_X(pTHX) {
+             return;
+         }
+     }
+-#elif defined(USE_NSGETEXECUTABLEPATH)
++# elif defined(USE_NSGETEXECUTABLEPATH)
+     char buf[1];
+     uint32_t size = sizeof(buf);
+ 
+@@ -95,7 +107,7 @@ Perl_set_caret_X(pTHX) {
+             return;
+         }
+     }
+-#elif defined(HAS_PROCSELFEXE)
++# elif defined(HAS_PROCSELFEXE)
+     char buf[MAXPATHLEN];
+     SSize_t len = readlink(PROCSELFEXE_PATH, buf, sizeof(buf) - 1);
+     /* NOTE: if the length returned by readlink() is sizeof(buf) - 1,
+@@ -120,20 +132,14 @@ Perl_set_caret_X(pTHX) {
         to the executable (or returning an error from the readlink). Any
         valid path has a '/' in it somewhere, so use that to validate the
         result. See http://www.freebsd.org/cgi/query-pr.cgi?pr=35703
@@ -16,3 +57,16 @@ NetBSD's implementation sometimes return
          sv_setpvn(caret_x, buf, len);
          return;
      }
+-#elif defined(WIN32)
+-    char *ansi;
+-    WCHAR widename[MAX_PATH];
+-    GetModuleFileNameW(NULL, widename, sizeof(widename)/sizeof(WCHAR));
+-    ansi = win32_ansipath(widename);
+-    sv_setpv(caret_x, ansi);
+-    win32_free(ansi);
+-    return;
+-#else
++# endif
+     /* Fallback to this:  */
+     sv_setpv(caret_x, PL_origargv[0]);
+ #endif



Home | Main Index | Thread Index | Old Index