Date: Fri, 24 Apr 2015 20:21:23 +0000 (UTC) From: Adam Weinberger <adamw@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r384683 - in head/devel/p5-B-C: . files Message-ID: <201504242021.t3OKLN6t098204@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adamw Date: Fri Apr 24 20:21:23 2015 New Revision: 384683 URL: https://svnweb.freebsd.org/changeset/ports/384683 Log: The patch introduced in r383995 to fix the build on perl-5.21.6+ broke building against other perl versions. byterun.c:1886:3: warning: implicit declaration of function 'PadnamelistMAXNAMED' is invalid in C99 [-Wimplicit-function-declaration] BSET_padl_name(bstate->bs_sv, arg); ^ ./bytecode.h:798:5: note: expanded from macro 'BSET_padl_name' PadnamelistMAXNAMED((PAD*)pad) = AvFILL((AV*)pad) ^ byterun.c:1886:3: error: expression is not assignable BSET_padl_name(bstate->bs_sv, arg); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./bytecode.h:798:36: note: expanded from macro 'BSET_padl_name' PadnamelistMAXNAMED((PAD*)pad) = AvFILL((AV*)pad) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ 1 warning and 1 error generated. I'm not clear exactly why it's failing, but only applying the patch against affected perl versions should fix the issue. Added: head/devel/p5-B-C/files/extra-patch-ByteLoader_bytecode.h - copied unchanged from r384672, head/devel/p5-B-C/files/patch-ByteLoader_bytecode.h Deleted: head/devel/p5-B-C/files/patch-ByteLoader_bytecode.h Modified: head/devel/p5-B-C/Makefile Modified: head/devel/p5-B-C/Makefile ============================================================================== --- head/devel/p5-B-C/Makefile Fri Apr 24 20:09:57 2015 (r384682) +++ head/devel/p5-B-C/Makefile Fri Apr 24 20:21:23 2015 (r384683) @@ -26,15 +26,19 @@ PERL_INC_STAGE= ${STAGEDIR}${PREFIX}/lib MAKE_ENV+= PERL_INC_STAGE=${PERL_INC_STAGE} PLIST_SUB+= PERL_ARCH=${PERL_ARCH} +.include <bsd.port.pre.mk> + +.if ${PERL_LEVEL} >= 502106 +EXTRA_PATCHES= ${FILESDIR}/extra-patch-ByteLoader_bytecode.h +.endif + post-patch: ${REINPLACE_CMD} -e "s|PERL_INC|PERL_INC_STAGE|g" ${WRKSRC}/Makefile.PL ${MKDIR} ${PERL_INC_STAGE} -#pre-install: test - post-install: ${STRIP_CMD} ${STAGEDIR}${PREFIX}/${SITE_ARCH_REL}/auto/B/C/C.so ${STRIP_CMD} ${STAGEDIR}${PREFIX}/${SITE_ARCH_REL}/auto/B/Stash/Stash.so ${STRIP_CMD} ${STAGEDIR}${PREFIX}/${SITE_ARCH_REL}/auto/ByteLoader/ByteLoader.so -.include <bsd.port.mk> +.include <bsd.port.post.mk> Copied: head/devel/p5-B-C/files/extra-patch-ByteLoader_bytecode.h (from r384672, head/devel/p5-B-C/files/patch-ByteLoader_bytecode.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/p5-B-C/files/extra-patch-ByteLoader_bytecode.h Fri Apr 24 20:21:23 2015 (r384683, copy of r384672, head/devel/p5-B-C/files/patch-ByteLoader_bytecode.h) @@ -0,0 +1,25 @@ +--- ByteLoader/bytecode.h.orig 2014-08-21 22:13:08 UTC ++++ ByteLoader/bytecode.h +@@ -785,13 +785,21 @@ static int bget_swab = 0; + padl = (SV*)pad_new(arg); \ + BSET_OBJ_STOREX(padl); \ + } STMT_END +-#if (PERL_VERSION >= 19) || ( PERL_VERSION == 19 && PERL_SUBVERSION > 3) ++/* PADNAMELIST now a valid lvalue: v5.21.6-197-g0f94cb1 */ ++#if (PERL_VERSION >= 22) || ( PERL_VERSION == 21 && PERL_SUBVERSION > 5) ++#define BSET_padl_name(padl, pad) \ ++ PadlistARRAY((PADLIST*)padl)[0] = (PAD*)pad; \ ++ PadnamelistMAXNAMED((PADNAMELIST*)pad) = AvFILL((AV*)pad) ++#else ++/* extra PADNAMELIST: v5.17.3-49-g36c300b */ ++#if (PERL_VERSION >= 18) || ( PERL_VERSION == 17 && PERL_SUBVERSION > 3) + #define BSET_padl_name(padl, pad) \ + PadlistARRAY((PADLIST*)padl)[0] = (PAD*)pad; \ + PadnamelistMAXNAMED((PAD*)pad) = AvFILL((AV*)pad) + #else + #define BSET_padl_name(padl, pad) PadlistARRAY((PADLIST*)padl)[0] = (PAD*)pad + #endif ++#endif + #define BSET_padl_sym(padl, pad) PadlistARRAY((PADLIST*)padl)[1] = (PAD*)pad + #define BSET_xcv_name_hek(cv, arg) \ + STMT_START { \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504242021.t3OKLN6t098204>