Skip to content

Commit

Permalink
lang/librep: Optionize INFO
Browse files Browse the repository at this point in the history
- Pet portclippy
  • Loading branch information
5u623l20 committed Oct 22, 2023
1 parent 98c47a3 commit af35500
Showing 1 changed file with 24 additions and 9 deletions.
33 changes: 24 additions & 9 deletions lang/librep/Makefile
Expand Up @@ -16,27 +16,42 @@ LIB_DEPENDS= libgdbm.so:databases/gdbm \
libgmp.so:math/gmp
RUN_DEPENDS= gtar:archivers/gtar

USES= autoreconf gettext gmake libtool localbase:ldflags \
pathfix pkgconfig readline shebangfix tar:xz
USE_CSTD= gnu89
USE_LDCONFIG= yes

USES= autoreconf gettext gmake libtool makeinfo pathfix pkgconfig readline \
shebangfix tar:xz
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-aclocaldir=${PREFIX}/share/aclocal \
--with-stack-direction=-1
SHEBANG_FILES= ${WRKSRC}/src/rep-xgettext.jl
SHEBANG_LANG= rep
rep_OLD_CMD= /usr/bin/rep
rep_CMD?= ${PREFIX}/bin/rep
USE_LDCONFIG= yes

CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib -pthread
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-aclocaldir=${PREFIX}/share/aclocal \
--with-stack-direction=-1

LDFLAGS+= -pthread

OPTION_DEFINE= INFO
OPTION_DEFAULT= INFO

INFO= librep
INFO_USES= makeinfo
INFO_INFO= librep

post-patch:
@${REINPLACE_CMD} -e 's|share/man|man|' ${WRKSRC}/man/Makefile.in
@${REINPLACE_CMD} -E 's|(INSTALL_PROGRAM\))( [^-])|\1 -m 755\2|' \
${WRKSRC}/src/Makefile.in
@${REINPLACE_CMD} -e '/SUBDIRS/s|man||' ${WRKSRC}/Makefile.in

post-build-INFO-on:
cd ${WRKSRC}/man && \
makeinfo --no-split -I . librep.texi -o librep.info

post-install:
${INSTALL_MAN} ${WRKSRC}/man/*.1 ${STAGEDIR}${MAN1PREFIX}/man/man1

post-install-INFO-on:
${INSTALL_DATA} ${WRKSRC}/docs/librep.info ${STAGEDIR}${PREFIX}/${INFO_PATH}

.include <bsd.port.mk>

0 comments on commit af35500

Please sign in to comment.