Drop defaults, install from WRKBUILD, introduce PROCESSORS

CONFIGURE_STYLE and SEPARATE_BUILD are set to default, so drop them.
Consequently, as there's no configure target, substitute variables in
post-patch not pre-configure.

With SEPARATE_BUILD=no WRKSRC and WRKBUILD are identical, but install built
files still from the latter to be consistent.

Move the hardcoded list of processors into PROCESSORS.

OK stsp
This commit is contained in:
kn 2019-03-17 11:26:38 +00:00
parent 14a59be622
commit 2368663945

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.1.1.1 2019/03/14 14:47:07 stsp Exp $
# $OpenBSD: Makefile,v 1.2 2019/03/17 11:26:38 kn Exp $
COMMENT = auto-complete and text expansion in X11
@ -28,17 +28,17 @@ CXXFLAGS = -std=c++11 \
-I${LOCALBASE}/include/dbus-c++-1
LDFLAGS = -L${X11BASE}/lib -L${PREFIX}/lib -lxcb -ldbus-c++-1
SEPARATE_BUILD = No
CONFIGURE_STYLE = none
pre-configure:
post-patch:
${SUBST_CMD} ${WRKSRC}/server/Files.hpp
# Unfortunately, Makefiles shipped by upstream are useless for us.
TEXTSUGGEST_SERVER_SRC = textsuggest-server.cpp \
../lib/clip/clip.cpp \
../lib/clip/image.cpp \
../lib/clip/clip_x11.cpp
../lib/clip/clip.cpp \
../lib/clip/image.cpp \
../lib/clip/clip_x11.cpp
PROCESSORS = command \
math_expression
do-build:
cd ${WRKBUILD}/ui && ${SETENV} ${MAKE_ENV} ${MODQT_QMAKE} -makefile
@ -47,7 +47,7 @@ do-build:
cd ${WRKBUILD}/server && ${SETENV} ${MAKE_ENV} \
${CXX} ${CFLAGS} ${CXXFLAGS} ${LDFLAGS} \
${TEXTSUGGEST_SERVER_SRC} -o textsuggest-server
.for processor in command math_expression
.for processor in ${PROCESSORS}
cd ${WRKBUILD}/textsuggest/processors/ && \
${SETENV} ${MAKE_ENV} \
${CXX} ${CFLAGS} ${CXXFLAGS} ${LDFLAGS} \
@ -55,11 +55,11 @@ do-build:
.endfor
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/ui/textsuggest ${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKSRC}/server/textsuggest-server ${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKBUILD}/ui/textsuggest ${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKBUILD}/server/textsuggest-server ${PREFIX}/bin
${INSTALL_PROGRAM_DIR} ${PREFIX}/libexec/textsuggest
.for processor in command math_expression
${INSTALL_PROGRAM} ${WRKSRC}/textsuggest/processors/${processor} \
.for processor in ${PROCESSORS}
${INSTALL_PROGRAM} ${WRKBUILD}/textsuggest/processors/${processor} \
${PREFIX}/libexec/textsuggest/${processor}
.endfor
${INSTALL_DATA_DIR} ${PREFIX}/share/textsuggest