Skip to content

Commit

Permalink
Fix use of sed on BSD.
Browse files Browse the repository at this point in the history
Closes eclipse#1614. Thanks to Christoph Krey.
  • Loading branch information
ralight authored and FranciscoKnebel committed Jul 30, 2020
1 parent 1e69172 commit bb8559d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions ChangeLog.txt
@@ -1,5 +1,6 @@
Build:
- Various fixes for building with <C99 support. Closes #1622.
- Fix use of sed on BSD. Closes #1614.


1.6.9 - 20200227
Expand Down
2 changes: 2 additions & 0 deletions config.mk
Expand Up @@ -158,8 +158,10 @@ PASSWD_LDADD:=

ifneq ($(or $(findstring $(UNAME),FreeBSD), $(findstring $(UNAME),OpenBSD), $(findstring $(UNAME),NetBSD)),)
BROKER_LDADD:=$(BROKER_LDADD) -lm
SEDINPLACE:=-i ""
else
BROKER_LDADD:=$(BROKER_LDADD) -ldl -lm
SEDINPLACE:=-i
endif

ifeq ($(UNAME),Linux)
Expand Down
2 changes: 1 addition & 1 deletion lib/Makefile
Expand Up @@ -74,7 +74,7 @@ endif
$(INSTALL) mqtt_protocol.h "${DESTDIR}${incdir}/mqtt_protocol.h"
$(INSTALL) -d "${DESTDIR}${libdir}/pkgconfig"
$(INSTALL) -m644 ../libmosquitto.pc.in "${DESTDIR}${libdir}/pkgconfig/libmosquitto.pc"
sed -i -e "s#@CMAKE_INSTALL_PREFIX@#${prefix}#" -e "s#@VERSION@#${VERSION}#" "${DESTDIR}${libdir}/pkgconfig/libmosquitto.pc"
sed ${SEDINPLACE} -e "s#@CMAKE_INSTALL_PREFIX@#${prefix}#" -e "s#@VERSION@#${VERSION}#" "${DESTDIR}${libdir}/pkgconfig/libmosquitto.pc"
ifeq ($(WITH_SHARED_LIBRARIES),yes)
$(MAKE) -C cpp install
endif
Expand Down
2 changes: 1 addition & 1 deletion lib/cpp/Makefile
Expand Up @@ -26,7 +26,7 @@ endif
$(INSTALL) mosquittopp.h "${DESTDIR}${incdir}/mosquittopp.h"
$(INSTALL) -d "${DESTDIR}${libdir}/pkgconfig/"
$(INSTALL) -m644 ../../libmosquittopp.pc.in "${DESTDIR}${libdir}/pkgconfig/libmosquittopp.pc"
sed -i -e "s#@CMAKE_INSTALL_PREFIX@#${prefix}#" -e "s#@VERSION@#${VERSION}#" "${DESTDIR}${libdir}/pkgconfig/libmosquittopp.pc"
sed ${SEDINPLACE} -e "s#@CMAKE_INSTALL_PREFIX@#${prefix}#" -e "s#@VERSION@#${VERSION}#" "${DESTDIR}${libdir}/pkgconfig/libmosquittopp.pc"

uninstall :
-rm -f "${DESTDIR}${libdir}/libmosquittopp.so.${SOVERSION}"
Expand Down

0 comments on commit bb8559d

Please sign in to comment.