naddy d159f8d1ad Make use of "find -exec {} +" (which is POSIX) and "find -delete"
(which is not) throughout the ports Makefiles.

* Replace find|xargs with find -exec {} +
* Replace -exec {} \; with -exec {} + if applicable.
* Use the -delete operator to remove files and empty directories.
* Combine and tweak some find(1) invocations while here.

ok kn@ rsadowski@ espie@
2020-03-20 16:44:21 +00:00

49 lines
1.3 KiB
Makefile

# $OpenBSD: Makefile,v 1.17 2020/03/20 16:44:28 naddy Exp $
COMMENT= little and fast Web crawler
DISTNAME= larbin-2.6.3
REVISION= 3
CATEGORIES= www
HOMEPAGE= http://larbin.sourceforge.net/index-eng.html
# GPL
PERMIT_PACKAGE= Yes
WANTLIB += adns>=1 c m pthread ${COMPILER_LIBCXX}
COMPILER = base-clang ports-gcc base-gcc
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=larbin/}
LIB_DEPENDS= net/adns
CONFIGURE_STYLE= simple
CONFIGURE_ENV= CC="${CC}" MAKE=${MAKE_PROGRAM}
MAKE_ENV= CC="${CC}" CXX="${CXX}" CXXFLAGS="${CXXFLAGS}"
NO_TEST= Yes
# uses makedepend
USE_X11 = Yes
pre-configure:
${SUBST_CMD} ${WRKSRC}/src/global.cc
# Now fixup some C++ constructs not supported by clang
find ${WRKSRC}/src \( -name '*.cc' -o -name '*.h' \) -exec \
sed -i -e 's|<iostream.h>|<iostream>| ; \
s|<string.h>|<cstring>| ; \
s|\([[:blank:]]\)cerr|\1std::cerr|g ; \
s|\([[:blank:]]\)cout|\1std::cout|g ; \
s|\([[:blank:]]\)endl|\1std::endl|g' {} +
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/larbin ${PREFIX}/bin
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/larbin
${INSTALL_DATA} ${WRKSRC}/larbin.conf \
${PREFIX}/share/examples/larbin/larbin.conf.sample
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/larbin
${INSTALL_DATA} ${WRKSRC}/doc/* ${PREFIX}/share/doc/larbin
.include <bsd.port.mk>