math/octave-forge-rtree: Fix build issues.

1.  Requires autoreconf:build to build in clean environment.
2.  Failed in poudriere, because certain environment variables weren't
    set in patch phase.

PR:		276802
Reported by:	Lorenzo Salvadore <salvadore@freebsd.org>,
		pkg-fallout@
This commit is contained in:
Stephen Montgomery-Smith 2024-02-05 14:24:42 -06:00
parent 3a8517f685
commit 1832da1106

View file

@ -7,9 +7,9 @@ COMMENT= Octave-forge package ${OCTAVE_PKGNAME}
WWW= https://packages.octave.org/
LICENSE= GPLv3
LICENSE_FILE= ${EXTRACT_DIR}/COPYING
LICENSE_FILE= ${WRKSRC}/COPYING
USES= octave
USES= octave autoreconf:build
BUILD_DEPENDS+= gtar:archivers/gtar
LIB_DEPENDS+= libjansson.so:devel/jansson
@ -21,16 +21,23 @@ GL_COMMIT= 6456b2ebb38528ea6861019b4b85699796ba91fa
CFLAGS+= -I${PREFIX}/include -L${PREFIX}/lib
OCTAVE_SRC= ${OCTAVE_PKGNAME}-${DISTVERSION}
EXTRACT_DIR= ${WRKDIR}/${GL_PROJECT}-${GL_COMMIT}
OCTAVE_SRC= ${GL_PROJECT}-${GL_COMMIT}
WRKSRC= ${WRKDIR}/${OCTAVE_SRC}
post-patch:
${REINPLACE_CMD} s/^tar/gtar/ ${EXTRACT_DIR}/src/pkg/bin/pkg-build
cd ${EXTRACT_DIR} && ${SETENV} ${CONFIGURE_ENV} CFLAGS="${CFLAGS}" ./configure
cd ${EXTRACT_DIR} && ${SETENV} ${MAKE_ENV} ${GMAKE} package
cd ${EXTRACT_DIR} && ${SETENV} ${MAKE_ENV} ${GMAKE} spotless
${TAR} xvf ${EXTRACT_DIR}/src/pkg/versions/${OCTAVE_SRC}.tar.gz -C ${WRKDIR}
${REINPLACE_CMD} s/^tar/gtar/ ${WRKSRC}/src/pkg/bin/pkg-build
GNU_CONFIGURE= yes
do-build:
cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} CFLAGS="${CFLAGS}" ./configure
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} package
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} spotless
${TAR} xvf ${WRKSRC}/src/pkg/versions/${OCTAVE_DISTNAME}.tar.gz -C ${WRKSRC}
cd ${WRKSRC}/${OCTAVE_DISTNAME}/src && \
${SETENV} ${CONFIGURE_ENV} CFLAGS="${CFLAGS}" ./configure && \
${SETENV} ${MAKE_ENV} CLAGS="${CFLAGS}" ${GMAKE}
pre-install:
${RM} ${WRKSRC}/${OCTAVE_DISTNAME}/src/Makefile ${WRKSRC}/${OCTAVE_DISTNAME}/src/configure
cd ${WRKSRC} && ${TAR} cfz ${WRKDIR}/${OCTAVE_DISTNAME}.tar.gz ${OCTAVE_DISTNAME}
.include <bsd.port.mk>