freebsd-ports/devel/p5-B-C/Makefile
Adam Weinberger cfeceae6d1 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.
2015-04-24 20:21:23 +00:00

44 lines
1.2 KiB
Makefile

# Created by: Sergei Vyshenski <svysh.fbsd@gmail.com>
# $FreeBSD$
PORTNAME= B-C
PORTVERSION= 1.52
PORTREVISION= 1
CATEGORIES= devel perl5
MASTER_SITES= CPAN
MASTER_SITE_SUBDIR= CPAN:RURBAN
PKGNAMEPREFIX= p5-
MAINTAINER= svysh.fbsd@gmail.com
COMMENT= Perl compiler's C backend
LICENSE= ART10 GPLv1
LICENSE_COMB= dual
BUILD_DEPENDS= p5-B-Flags>=0:${PORTSDIR}/devel/p5-B-Flags \
p5-Opcodes>=0:${PORTSDIR}/devel/p5-Opcodes \
p5-IPC-Run>=0:${PORTSDIR}/devel/p5-IPC-Run
RUN_DEPENDS:= ${BUILD_DEPENDS}
USES= perl5
USE_PERL5= configure
PERL_INC_STAGE= ${STAGEDIR}${PREFIX}/lib/perl5/${PERL_VER}/${PERL_ARCH}/CORE
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}
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.post.mk>