summaryrefslogtreecommitdiff
path: root/package/mrd6
diff options
context:
space:
mode:
Diffstat (limited to 'package/mrd6')
-rw-r--r--package/mrd6/Config.in18
-rw-r--r--package/mrd6/Makefile12
-rw-r--r--package/mrd6/patches/patch-src_Makefile23
3 files changed, 45 insertions, 8 deletions
diff --git a/package/mrd6/Config.in b/package/mrd6/Config.in
index 62a3e3585..5a5a948d7 100644
--- a/package/mrd6/Config.in
+++ b/package/mrd6/Config.in
@@ -13,3 +13,21 @@ config ADK_PACKAGE_MRD6
and provides MLDv2 (as well as MLDv1), PIM-SM and MBGP support.
http://artemis.av.it.pt/mrd6/
+
+choice
+prompt "C++ library to use"
+depends on ADK_PACKAGE_MRD6
+default ADK_COMPILE_MRD6_WITH_STDCXX if ADK_TARGET_LIB_GLIBC
+default ADK_COMPILE_MRD6_WITH_UCLIBCXX if ADK_TARGET_LIB_UCLIBC
+
+config ADK_COMPILE_MRD6_WITH_STDCXX
+ bool "Standard C++ library"
+ select ADK_PACKAGE_LIBSTDCXX
+ help
+
+config ADK_COMPILE_MRD6_WITH_UCLIBCXX
+ bool "Embedded uClibc++ library"
+ select ADK_PACKAGE_UCLIBCXX
+ help
+
+endchoice
diff --git a/package/mrd6/Makefile b/package/mrd6/Makefile
index 009f36516..53ee70a73 100644
--- a/package/mrd6/Makefile
+++ b/package/mrd6/Makefile
@@ -9,13 +9,21 @@ PKG_NAME:= mrd6
PKG_VERSION:= 0.9.6
PKG_RELEASE:= 1
PKG_MD5SUM:= 93ada53bb414b9d622f80a717bc2694b
-MASTER_SITES:= http://fivebits.net/files/mrd6/
+MASTER_SITES:= http://www.openadk.org/distfiles/
WRKBUILD= ${WRKSRC}/src
include ${TOPDIR}/mk/package.mk
-$(eval $(call PKG_template,MRD6,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
+ifeq (${ADK_COMPILE_MRD6_WITH_UCLIBCXX},y)
+TCXXFLAGS+= -fno-builtin -nostdinc++ -nodefaultlibs -I${STAGING_DIR}/usr/include/uClibc++
+TLDFLAGS+= -nodefaultlibs -luClibc++ -shared
+PKG_DEPENDS:= uclibc++
+else
+PKG_DEPENDS:= libstdcxx
+endif
+
+$(eval $(call PKG_template,MRD6,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${ARCH},${PKG_DEPENDS}))
BUILD_STYLE:= auto
INSTALL_STYLE:= auto
diff --git a/package/mrd6/patches/patch-src_Makefile b/package/mrd6/patches/patch-src_Makefile
index 521673933..abe83bf1b 100644
--- a/package/mrd6/patches/patch-src_Makefile
+++ b/package/mrd6/patches/patch-src_Makefile
@@ -1,6 +1,6 @@
$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
--- mrd6-0.9.6.orig/src/Makefile 2007-06-25 01:58:28.000000000 +0200
-+++ mrd6-0.9.6/src/Makefile 2008-10-21 11:27:38.000000000 +0200
++++ mrd6-0.9.6/src/Makefile 2009-05-22 00:43:30.000000000 +0200
@@ -26,7 +26,7 @@ ifeq ($(SUPPORT_MODULES),yes)
MODULES ?= BGP
LDCMD = -rdynamic
@@ -19,7 +19,7 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
ifeq ($(OPTIMIZE),yes)
ifeq ($(SPACE_OPTIMIZE),yes)
-@@ -101,11 +101,8 @@ ifeq ($(OPTIMIZE),yes)
+@@ -101,22 +101,13 @@ ifeq ($(OPTIMIZE),yes)
CXXFLAGS += -O3
endif
else
@@ -31,7 +31,18 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
endif
endif
-@@ -151,7 +148,7 @@ $(foreach test,$(TESTS),$(eval $(call un
+ LDFLAGS += -lm
+
+-ifeq ($(STATIC_STDCXX),no)
+- LDFLAGS += -lstdc++
+-else
+- LDFLAGS += `$(CXX) -print-file-name=libstdc++.a`
+-endif
+-
+ TEST_OBJECTS = $(addprefix $(OBJ_DIR)/,$(TEST_SOURCES:.cpp=.o))
+ MRD_OBJECTS = $(addprefix $(OBJ_DIR)/,$(MRD_SOURCES:.cpp=.o))
+
+@@ -151,7 +142,7 @@ $(foreach test,$(TESTS),$(eval $(call un
$(TARGET): $(MRD_OBJECTS)
@echo "Linking $(TARGET)"
@@ -40,7 +51,7 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
install: $(TARGET) $(EXTERNAL_MODULES)
install -D $(TARGET) $(DEST_PREFIX)/sbin/$(TARGET)
-@@ -162,12 +159,12 @@ ifneq (,$(EXTERNAL_MODULES))
+@@ -162,12 +153,12 @@ ifneq (,$(EXTERNAL_MODULES))
endif
$(MRD_VERSION_CPP): $(SOURCES) Makefile Makefile.options
@@ -55,7 +66,7 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
echo "Generating modules.cpp"; \
scripts/generate-modules-cpp.pl $(STATIC_MODULES) > $(MODULES_CPP)
-@@ -181,7 +178,7 @@ $(OPTIONS):
+@@ -181,7 +172,7 @@ $(OPTIONS):
$(DEPS_DIR)/%.d: %.cpp $(OPTIONS)
@echo "Deps $<"
@@ -64,7 +75,7 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
$(CXX) -MM -MT $@ -MT $(addprefix $(OBJ_DIR)/,$(<:.cpp=.o)) \
$(CXXFLAGS) $< > $@
-@@ -195,7 +192,7 @@ endif
+@@ -195,7 +186,7 @@ endif
$(OBJ_DIR)/%.o: %.cpp $(OPTIONS)
@echo "C++ $<"