This software is in bad shape. After polishing the Makefile a bit, I
tried testing it but both textsuggest and textsuggest-server immediately
dumped core.
$ textsuggest-server &
$ textsuggest --selection # crashes server every other run
textsuggest-server(22619) in free(): chunk canary corrupted
0x1bf201fcc160 0x18@0x18
$ textsuggest-server &
$ textsuggest --auto-selection
terminating with uncaught exception of type
cxxopts::missing_argument_exception: Option ‘auto-selection’ is missing an
argument
Abort trap (core dumped)
I'll give it a new try tomorrow.
For now, here's a Makefile diff against your latest tarball that
- remove unneeded/default SEPARATE_BUILD and CONFIGURE_STYLE
- moves pre-configure to post-patch
- appends CXXFLAGS and LDFLAGS so default values incl. DEBUG stay
- uses LINK.cc
- introduces PROCESSOR for consistent use in both places
- installs missing directories before installing files
- uses WRKBUILD not WRKSRC (same with SEPARATE_BUILD=no but still)
- whitespace nits
Feel free to pick or leave any of those bits.
--- Makefile.orig Tue Mar 12 20:59:40 2019
+++ Makefile Tue Mar 12 23:09:38 2019
@@ -23,46 +23,41 @@
RUN_DEPENDS = x11/xdotool
LIB_DEPENDS = x11/libdbus-c++
-CXXFLAGS = -std=c++11 \
- -I${X11BASE}/include \
+CXXFLAGS += -I${X11BASE}/include \
-I${LOCALBASE}/include/dbus-c++-1
-LDFLAGS = -L${X11BASE}/lib -L${PREFIX}/lib -lxcb -ldbus-c++-1
+LDFLAGS += -L${X11BASE}/lib -lxcb \
+ -L${PREFIX}/lib -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
+TEXTSUGGEST_SERVER_SRC =textsuggest-server.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
- cd ${WRKBUILD}/ui && ${SETENV} ${MAKE_ENV} \
+ cd ${WRKBUILD}/ui && env -i ${MAKE_ENV} ${MODQT_QMAKE} -makefile
+ cd ${WRKBUILD}/ui && env -i ${MAKE_ENV} \
${MAKE_PROGRAM} ${MAKE_FLAGS} -f ${MAKE_FILE} ${ALL_TARGET}
- cd ${WRKBUILD}/server && ${SETENV} ${MAKE_ENV} \
- ${CXX} ${CFLAGS} ${CXXFLAGS} ${LDFLAGS} \
- ${TEXTSUGGEST_SERVER_SRC} -o textsuggest-server
-.for processor in command math_expression
- cd ${WRKBUILD}/textsuggest/processors/ && \
- ${SETENV} ${MAKE_ENV} \
- ${CXX} ${CFLAGS} ${CXXFLAGS} ${LDFLAGS} \
- ${processor}.cpp -o ${processor}
+ cd ${WRKBUILD}/server && env -i ${MAKE_ENV} \
+ ${LINK.cc} -o textsuggest-server ${TEXTSUGGEST_SERVER_SRC}
+.for processor in ${PROCESSORS}
+ cd ${WRKBUILD}/textsuggest/processors/ && env -i ${MAKE_ENV} \
+ ${LINK.cc} -o ${processor} ${processor}.cpp
.endfor
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/ui/textsuggest ${PREFIX}/bin
- ${INSTALL_PROGRAM} ${WRKSRC}/server/textsuggest-server ${PREFIX}/bin
- ${INSTALL_PROGRAM_DIR} ${PREFIX}/libexec/textsuggest
-.for processor in command math_expression
- ${INSTALL_PROGRAM} ${WRKSRC}/textsuggest/processors/${processor} \
- ${PREFIX}/libexec/textsuggest/${processor}
+ ${INSTALL_PROGRAM} ${WRKBUILD}/server/textsuggest-server ${PREFIX}/bin/
+ ${INSTALL_PROGRAM} ${WRKBUILD}/ui/textsuggest ${PREFIX}/bin/
+ ${INSTALL_PROGRAM_DIR} ${PREFIX}/libexec/textsuggest/
+.for processor in ${PROCESSORS}
+ ${INSTALL_PROGRAM} ${WRKBUILD}/textsuggest/processors/${processor} \
+ ${PREFIX}/libexec/textsuggest/
.endfor
- ${INSTALL_DATA_DIR} ${PREFIX}/share/textsuggest
${INSTALL_DATA_DIR} ${PREFIX}/share/textsuggest/dictionaries
ln -s /usr/share/dict/words \
${PREFIX}/share/textsuggest/dictionaries/English.txt