pjproject: use preferred standard C++ lib
authorSebastian Kemper <sebastian_ml@gmx.net>
Tue, 13 Mar 2018 11:03:47 +0000 (12:03 +0100)
committerSebastian Kemper <sebastian_ml@gmx.net>
Tue, 13 Mar 2018 11:04:38 +0000 (12:04 +0100)
Currently libstdc++ is hardcoded. Change that and use whatever standard
C++ lib has preference.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
libs/pjproject/Makefile
libs/pjproject/patches/160-remove-hardcoded-lstdc++.patch [new file with mode: 0644]

index bdf7efcc6bd038f8d0a9ed51602cc51a6f94c633..2f35d721847c1438296eb8ac3cf5e4b28cf32060 100644 (file)
@@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pjproject
 PKG_VERSION:=2.7.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=pjproject-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://www.pjsip.org/release/$(PKG_VERSION)
@@ -27,6 +27,7 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
 
 PKG_CONFIG_DEPENDS:=CONFIG_SOFT_FLOAT
 
+include $(INCLUDE_DIR)/uclibc++.mk
 include $(INCLUDE_DIR)/package.mk
 
 define Package/pjproject/Default
@@ -34,7 +35,7 @@ define Package/pjproject/Default
   CATEGORY:=Libraries
   SUBMENU:=Telephony
   URL:=http://www.pjsip.org
-  DEPENDS:=+libopenssl +libuuid +libstdcpp +libpthread
+  DEPENDS:=$(CXX_DEPENDS) +libopenssl +libuuid +libpthread
 endef
 
 define Package/pjproject/install/lib
diff --git a/libs/pjproject/patches/160-remove-hardcoded-lstdc++.patch b/libs/pjproject/patches/160-remove-hardcoded-lstdc++.patch
new file mode 100644 (file)
index 0000000..bf3bfbf
--- /dev/null
@@ -0,0 +1,22 @@
+--- a/build.mak.in
++++ b/build.mak.in
+@@ -293,7 +293,6 @@ export APP_LDLIBS := $(PJSUA_LIB_LDLIB)
+       $(PJLIB_LDLIB) \
+       @LIBS@
+ export APP_LDXXLIBS := $(PJSUA2_LIB_LDLIB) \
+-      -lstdc++ \
+       $(APP_LDLIBS)
+ # Here are the variabels to use if application is using the library
+--- a/pjsip/build/Makefile
++++ b/pjsip/build/Makefile
+@@ -152,8 +152,7 @@ export PJSUA2_LIB_LDFLAGS += $(PJSUA_LIB
+                            $(PJNATH_LDLIB) \
+                            $(PJLIB_UTIL_LDLIB) \
+                            $(PJLIB_LDLIB) \
+-                           $(_LDFLAGS) \
+-                           -lstdc++
++                           $(_LDFLAGS)
+ ###############################################################################