Jelajahi Sumber

add support for C++ packages, which need G++ compiler

Waldemar Brodkorb 14 tahun lalu
induk
melakukan
e435ddd4ee

+ 1 - 0
package/dansguardian/Makefile

@@ -13,6 +13,7 @@ PKG_DEPENDS:=		libpcre zlib
 PKG_BUILDDEP:=		pcre zlib
 PKG_URL:=		http://dansguardian.org/
 PKG_SITES:=		http://dansguardian.org/downloads/2/Stable/
+PKG_NEED_CXX:=		1
 PKG_CXX:=		DANSGUARDIAN
 
 include ${TOPDIR}/mk/package.mk

+ 1 - 0
package/gpsd/Makefile

@@ -13,6 +13,7 @@ PKG_DEPENDS:=		libpthread
 PKG_BUILDDEP:=		ncurses
 PKG_SITES:=		http://download.berlios.de/gpsd/
 PKG_URL:=		http://gpsd.berlios.de/
+PKG_NEED_CXX:=		1
 PKG_CXX:=		GPSD
 
 PKG_SUBPKGS:=		GPSD GPSD_CLIENTS

+ 1 - 0
package/id3lib/Makefile

@@ -13,6 +13,7 @@ PKG_DEPENDS:=		zlib libiconv
 PKG_BUILDDEP:=		zlib libiconv
 PKG_URL:=		http://id3lib.sourceforge.net/
 PKG_SITES:=		${MASTER_SITE_SOURCEFORGE:=id3lib/}
+PKG_NEED_CXX:=		1
 PKG_CXX:=		ID3LIB
 
 include ${TOPDIR}/mk/package.mk

+ 1 - 0
package/iperf/Makefile

@@ -12,6 +12,7 @@ PKG_SECTION:=		net
 PKG_DEPENDS:=		libpthread
 PKG_URL:=		http://sourceforge.net/projects/iperf
 PKG_SITES:=		${MASTER_SITE_SOURCEFORGE:=iperf/}
+PKG_NEED_CXX:=		1
 PKG_CXX:=		IPERF
 
 include ${TOPDIR}/mk/package.mk

+ 1 - 0
package/mrd6/Makefile

@@ -11,6 +11,7 @@ PKG_DESCR:=		IPv6 multicast routing daemon
 PKG_SECTION:=		ipv6
 PKG_DEPENDS:=		kmod-ipv6
 PKG_SITES:=		http://www.openadk.org/distfiles/
+PKG_NEED_CXX:=		1
 PKG_CXX:=		MRD6
 
 WRKBUILD=		${WRKSRC}/src

+ 1 - 0
package/nmap/Makefile

@@ -13,6 +13,7 @@ PKG_DEPENDS:=		libdnet libpcap libpcre
 PKG_BUILDDEP:=		libdnet libpcap pcre
 PKG_URL:=		http://nmap.org/
 PKG_SITES:=		http://download.insecure.org/nmap/dist/
+PKG_NEED_CXX:=		1
 PKG_CXX:=		NMAP
 
 DISTFILES:=		${PKG_NAME}-${PKG_VERSION}.tar.bz2

+ 4 - 0
package/uclibc++/Config.in.manual

@@ -1,7 +1,11 @@
+comment "uClibc++... C++ library for embedded systems (disabled, c++ missing)"
+depends on !ADK_TOOLCHAIN_GCC_CXX
+
 config ADK_PACKAGE_UCLIBCXX
 	prompt "uClibc++............... C++ library for embedded systems"
 	tristate
 	depends on ADK_TARGET_LIB_UCLIBC
+	depends on ADK_TOOLCHAIN_GCC_CXX
 	default n
 	help
 	  A standard C++ library for embedded systems

+ 1 - 0
package/uclibc++/Makefile

@@ -11,6 +11,7 @@ PKG_DESCR:=		A standard c++ library for embedded systems
 PKG_SECTION:=		libs
 PKG_URL:=		http://cxx.uclibc.org/
 PKG_SITES:=		http://cxx.uclibc.org/src/
+PKG_NEED_CXX:=		1
 
 DISTFILES:=		${PKG_NAME}-${PKG_VERSION}.tar.bz2
 

+ 10 - 5
tools/adk/pkgmaker.c

@@ -508,8 +508,12 @@ int main() {
 				if (cfg == NULL)
 					perror("Can not open Config.in file");
 
+				if (pkg_need_cxx != NULL) {
+					fprintf(cfg, "comment \"%s... %s (disabled, c++ missing)\"\n", token, pkg_descr);
+					fprintf(cfg, "depends on !ADK_TOOLCHAIN_GCC_CXX\n\n");
+				}
 				fprintf(cfg, "config ADK_PACKAGE_%s\n", toupperstr(token));
-				fprintf(cfg, "\tprompt \"%s... %s\"\n", pseudo_name, pkg_descr);
+				fprintf(cfg, "\tprompt \"%s. %s\"\n", pseudo_name, pkg_descr);
 				fprintf(cfg, "\ttristate\n");
 				if (pkg_multi != NULL)
 					if (strncmp(pkg_multi, "1", 1) == 0)
@@ -592,10 +596,11 @@ int main() {
 				}
 
 				if (pkg_need_cxx != NULL) {
-					fprintf(cfg, "\tdepends on ADK_TOOLCHAIN_GCC_CXX");
+					fprintf(cfg, "\tdepends on ADK_TOOLCHAIN_GCC_CXX\n");
 				}
 				if (pkg_need_java != NULL) {
-					fprintf(cfg, "\tdepends on ADK_TOOLCHAIN_GCC_JAVA");
+					fprintf(cfg, "\tdepends on ADK_TOOLCHAIN_GCC_JAVA\n");
+					pkg_need_java = NULL;
 				}
 
 				fprintf(cfg, "\tselect ADK_COMPILE_%s\n", toupperstr(pkgdirp->d_name));
@@ -712,6 +717,8 @@ int main() {
 			free(packages);
 			packages = NULL;
 
+			pkg_need_cxx = NULL;
+			pkg_need_java = NULL;
 			/* reset flags, free memory */
 			free(pkg_name);
 			free(pkg_descr);
@@ -724,8 +731,6 @@ int main() {
 			free(pkg_arch_depends);
 			free(pkg_host_depends);
 			free(pkg_cxx);
-			free(pkg_need_cxx);
-			free(pkg_need_java);
 			free(pkg_dflt);
 			free(pkg_cfline);
 			free(pkg_multi);