Browse Source

automatic handling of CFrustFrust packages

Signed-off-by: Thorsten Glaser <tg@mirbsd.org>
Thorsten Glaser 15 years ago
parent
commit
39d2849441

+ 9 - 0
mk/package.mk

@@ -3,6 +3,15 @@
 
 all: build-all-pkgs
 
+ifneq (${PKG_CXX},)
+ifeq (${ADK_COMPILE_${PKG_CXX}_WITH_UCLIBCXX},y)
+PKG_BUILDDEP+=		uclibc++
+PKG_DEPENDS+=		uclibc++
+else
+PKG_DEPENDS+=		libstdcxx
+endif
+endif
+
 TCFLAGS:=		${TARGET_CFLAGS}
 TCXXFLAGS:=		${TARGET_CFLAGS}
 TCPPFLAGS:=		${TARGET_CPPFLAGS}

+ 1 - 9
package/ctorrent/Makefile

@@ -7,21 +7,13 @@ PKG_NAME:=		ctorrent
 PKG_VERSION:=		dnh3.3.2
 PKG_RELEASE:=		1
 PKG_BUILDDEP+=		openssl
-ifeq (${ADK_COMPILE_CTORRENT_WITH_UCLIBCXX},y)
-PKG_BUILDDEP+=		uclibc++
-endif
+PKG_CXX:=		CTORRENT
 PKG_MD5SUM:=		59b23dd05ff70791cd6449effa7fc3b6
 PKG_DESCR:=		console-based BitTorrent client
 PKG_SECTION:=		net
 PKG_URL:=		http://www.rahul.net/dholmes/ctorrent
 PKG_SITES:=		${MASTER_SITE_SOURCEFORGE:=dtorrent/}
 
-ifeq ($(ADK_COMPILE_CTORRENT_WITH_UCLIBCXX),y)
-PKG_DEPENDS:=            uclibc++
-else
-PKG_DEPENDS:=            libstdcxx
-endif
-
 include ${TOPDIR}/mk/package.mk
 
 $(eval $(call PKG_template,CTORRENT,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))

+ 1 - 9
package/cxxtools/Makefile

@@ -7,9 +7,7 @@ PKG_NAME:=		cxxtools
 PKG_VERSION:=		1.4.8
 PKG_RELEASE:=		1
 PKG_BUILDDEP+=		libiconv
-ifeq (${ADK_COMPILE_CXXTOOLS_WITH_UCLIBCXX},y)
-PKG_BUILDDEP+=		uclibc++
-endif
+PKG_CXX:=		CXXTOOLS
 PKG_MD5SUM:=		16ce92a83beb925fa5138fc9a52d55af
 PKG_DESCR:=		a collection of general-purpose C++ classes
 PKG_SECTION:=		net
@@ -19,12 +17,6 @@ PKG_SITES:=		http://www.tntnet.org/download/
 
 include ${TOPDIR}/mk/package.mk
 
-ifeq (${ADK_COMPILE_CXXTOOLS_WITH_UCLIBCXX},y)
-PKG_DEPENDS+=		uclibc++
-else
-PKG_DEPENDS+=		libstdcxx
-endif
-
 $(eval $(call PKG_template,CXXTOOLS,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
 
 ifeq (${ADK_COMPILE_CXXTOOLS_WITH_UCLIBCXX},y)

+ 1 - 9
package/dansguardian/Makefile

@@ -7,9 +7,7 @@ PKG_NAME:=		dansguardian
 PKG_VERSION:=		2.10.1.1
 PKG_RELEASE:=		1
 PKG_BUILDDEP+=		pcre zlib
-ifeq (${ADK_COMPILE_DANSGUARDIAN_WITH_UCLIBCXX},y)
-PKG_BUILDDEP+=		uclibc++
-endif
+PKG_CXX:=		DANSGUARDIAN
 PKG_MD5SUM:=		0987a1c9bfbdf398118386f10279611a
 PKG_DESCR:=		web content filter proxy
 PKG_SECTION:=		net
@@ -17,12 +15,6 @@ PKG_DEPENDS:=		pcre zlib
 PKG_URL:=		http://dansguardian.org
 PKG_SITES:=		http://dansguardian.org/downloads/2/Stable/
 
-ifeq ($(ADK_COMPILE_DANSGUARDIAN_WITH_UCLIBCXX),y)
-PKG_DEPENDS+=		uclibc++
-else
-PKG_DEPENDS+=		libstdcxx
-endif
-
 include ${TOPDIR}/mk/package.mk
 
 $(eval $(call PKG_template,DANSGUARDIAN,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))

+ 1 - 9
package/gpsd/Makefile

@@ -7,9 +7,7 @@ PKG_NAME:=		gpsd
 PKG_VERSION:=		2.39
 PKG_RELEASE:=		1
 PKG_BUILDDEP+=		ncurses
-ifeq (${ADK_COMPILE_GPSD_WITH_UCLIBCXX},y)
-PKG_BUILDDEP+=		uclibc++
-endif
+PKG_CXX:=		GPSD
 PKG_MD5SUM:=		3db437196a6840c252fca99b6c19d4d0
 PKG_DESCR:=		An interface daemon for GPS receivers
 PKG_SECTION:=		net
@@ -20,12 +18,6 @@ PKG_DESCR_1:=		GPS client utilities
 
 include ${TOPDIR}/mk/package.mk
 
-ifeq ($(ADK_COMPILE_GPSD_WITH_UCLIBCXX),y)
-PKG_DEPENDS+=		uclibc++
-else
-PKG_DEPENDS+=		libstdcxx
-endif
-
 $(eval $(call PKG_template,GPSD,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
 $(eval $(call PKG_template,GPSD_CLIENTS,gpsd-clients,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR_1},${PKG_SECTION}))
 

+ 1 - 9
package/id3lib/Makefile

@@ -7,9 +7,7 @@ PKG_NAME:=		id3lib
 PKG_VERSION:=		3.8.3
 PKG_RELEASE:=		1
 PKG_BUILDDEP+=		zlib libiconv
-ifeq (${ADK_COMPILE_ID3LIB_WITH_UCLIBCXX},y)
-PKG_BUILDDEP+=		uclibc++
-endif
+PKG_CXX:=		ID3LIB
 PKG_MD5SUM:=		19f27ddd2dda4b2d26a559a4f0f402a7
 PKG_DESCR:=		An ID3v1/ID3v2 tagging library
 PKG_SECTION:=		libs
@@ -17,12 +15,6 @@ PKG_DEPENDS:=		zlib libiconv
 PKG_URL:=		http://id3lib.sourceforge.net
 PKG_SITES:=		${MASTER_SITE_SOURCEFORGE:=id3lib/}
 
-ifeq ($(ADK_COMPILE_ID3LIB_WITH_UCLIBCXX),y)
-PKG_DEPENDS+=		uclibc++
-else
-PKG_DEPENDS+=		libstdcxx
-endif
-
 include ${TOPDIR}/mk/package.mk
 
 $(eval $(call PKG_template,ID3LIB,id3lib,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))

+ 1 - 9
package/iperf/Makefile

@@ -6,9 +6,7 @@ include ${TOPDIR}/rules.mk
 PKG_NAME:=		iperf
 PKG_VERSION:=		2.0.4
 PKG_RELEASE:=		1
-ifeq (${ADK_COMPILE_IPERF_WITH_UCLIBCXX},y)
-PKG_BUILDDEP+=		uclibc++
-endif
+PKG_CXX:=		IPERF
 PKG_MD5SUM:=		8c5bc14cc2ea55f18f22afe3c23e3dcb
 PKG_DESCR:=		Internet Protocol bandwidth measuring tool
 PKG_SECTION:=		net
@@ -18,12 +16,6 @@ PKG_SITES:=		${MASTER_SITE_SOURCEFORGE:=iperf/}
 
 include ${TOPDIR}/mk/package.mk
 
-ifeq ($(ADK_COMPILE_IPERF_WITH_UCLIBCXX),y)
-PKG_DEPENDS+=		uclibc++
-else
-PKG_DEPENDS+=		libstdcxx
-endif
-
 $(eval $(call PKG_template,IPERF,iperf,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
 
 CONFIGURE_STYLE=	gnu

+ 1 - 3
package/kismet/Makefile

@@ -7,9 +7,7 @@ PKG_NAME:=		kismet
 PKG_VERSION:=		2008-05-R1
 PKG_RELEASE:=		1
 PKG_BUILDDEP+=		libpcap ncurses
-ifeq (${ADK_COMPILE_KISMET_WITH_UCLIBCXX},y)
-PKG_BUILDDEP+=		uclibc++
-endif
+PKG_CXX:=		KISMET
 PKG_MD5SUM:=		6ee365d36354b4dee4945e67f8149294
 PKG_SITES:=		http://www.kismetwireless.net/code/
 

+ 1 - 6
package/libsigc++/Makefile

@@ -11,15 +11,10 @@ PKG_DESCR:=		Callback framework for C++
 PKG_SECTION:=		libs
 PKG_URL:=		http://libsigc.sourceforge.net
 PKG_SITES:=		${MASTER_SITE_GNOME:=libsigc++/2.2/}
+PKG_CXX:=		LIBSIGCXX
 
 include ${TOPDIR}/mk/package.mk
 
-ifeq ($(ADK_COMPILE_LIBSIGCXX_WITH_UCLIBCXX),y)
-PKG_DEPENDS:=		uclibc++
-else
-PKG_DEPENDS:=		libstdcxx
-endif
-
 $(eval $(call PKG_template,LIBSIGCXX,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
 
 ifeq ($(ADK_COMPILE_LIBSIGCXX_WITH_UCLIBCXX),y)

+ 1 - 6
package/libtorrent/Makefile

@@ -13,15 +13,10 @@ PKG_SECTION:=		libs
 PKG_DEPENDS:=		libopenssl libsigc++
 PKG_URL:=		http://libtorrent.rakshasa.no
 PKG_SITES:=		http://libtorrent.rakshasa.no/downloads/
+PKG_CXX:=		LIBTORRENT
 
 include ${TOPDIR}/mk/package.mk
 
-ifeq ($(ADK_COMPILE_LIBTORRENT_WITH_UCLIBCXX),y)
-PKG_DEPENDS+=		uclibc++
-else
-PKG_DEPENDS+=		libstdcxx
-endif
-
 $(eval $(call PKG_template,LIBTORRENT,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
 
 ifeq ($(ADK_COMPILE_LIBTORRENT_WITH_UCLIBCXX),y)

+ 1 - 9
package/mrd6/Makefile

@@ -6,9 +6,7 @@ include ${TOPDIR}/rules.mk
 PKG_NAME:=		mrd6
 PKG_VERSION:=		0.9.6
 PKG_RELEASE:=		1
-ifeq (${ADK_COMPILE_MRD6_WITH_UCLIBCXX},y)
-PKG_BUILDDEP+=		uclibc++
-endif
+PKG_CXX:=		MRD6
 PKG_MD5SUM:=		93ada53bb414b9d622f80a717bc2694b
 PKG_DESCR:=		IPv6 multicast routing daemon
 PKG_SECTION:=		net
@@ -19,12 +17,6 @@ WRKBUILD=		${WRKSRC}/src
 
 include ${TOPDIR}/mk/package.mk
 
-ifeq (${ADK_COMPILE_MRD6_WITH_UCLIBCXX},y)
-PKG_DEPENDS:=		uclibc++
-else
-PKG_DEPENDS:=		libstdcxx
-endif
-
 $(eval $(call PKG_template,MRD6,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
 
 ifeq (${ADK_COMPILE_MRD6_WITH_UCLIBCXX},y)

+ 1 - 9
package/nmap/Makefile

@@ -7,9 +7,7 @@ PKG_NAME:=		nmap
 PKG_VERSION:=		5.00
 PKG_RELEASE:=		1
 PKG_BUILDDEP+=		pcre libpcap
-ifeq (${ADK_COMPILE_NMAP_WITH_UCLIBCXX},y)
-PKG_BUILDDEP+=		uclibc++
-endif
+PKG_CXX:=		NMAP
 PKG_MD5SUM:=		32d27de32166c02d670bb4a086185886
 PKG_DESCR:=		utility for network exploration or security auditing
 PKG_SECTION:=		net
@@ -21,12 +19,6 @@ DISTFILES:=		${PKG_NAME}-${PKG_VERSION}.tar.bz2
 
 include ${TOPDIR}/mk/package.mk
 
-ifeq ($(ADK_COMPILE_NMAP_WITH_UCLIBCXX),y)
-PKG_DEPENDS+=		uclibc++
-else
-PKG_DEPENDS+=		libstdcxx
-endif
-
 $(eval $(call PKG_template,NMAP,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
 
 TCPPFLAGS+=		-DNOLUA

+ 22 - 0
package/pkgmaker

@@ -32,6 +32,7 @@ for sd in */Makefile; do
 	dnu=${dnu//+/X}
 	pd=$($GMAKE show=PKG_DESCR)		# pd: package description
 	ph=$($GMAKE show=PKG_URL)		# ph: package homepage
+	usecxx=$($GMAKE show=PKG_CXX)
 
 	(
 	print "config ADK_COMPILE_$dnu"
@@ -57,6 +58,8 @@ for sd in */Makefile; do
 		print \\tdefault n
 		deps=$($GMAKE show=PKGDEPS_$xu)
 		for dep in $deps; do
+			[[ -n $usecxx && $dep = @(uclibc++|libstdcxx) ]] && \
+			    continue
 			case $dep {
 			(kmod-*)
 				typeset -u udep=${dep//-/_}
@@ -77,6 +80,25 @@ for sd in */Makefile; do
 		fi
 	done
 
+	[[ -n $usecxx ]] && cat <<EOF
+
+choice
+prompt "C++ library to use"
+depends on ADK_COMPILE_$dnu
+default ADK_COMPILE_${usecxx}_WITH_STDCXX if ADK_TARGET_LIB_GLIBC || ADK_TARGET_LIB_EGLIBC
+default ADK_COMPILE_${usecxx}_WITH_UCLIBCXX if ADK_TARGET_LIB_UCLIBC
+
+config ADK_COMPILE_${usecxx}_WITH_STDCXX
+	bool "GNU C++ library"
+	select ADK_PACKAGE_LIBSTDCXX
+
+config ADK_COMPILE_${usecxx}_WITH_UCLIBCXX
+	bool "uClibc++ library"
+	select ADK_PACKAGE_UCLIBCXX
+
+endchoice
+EOF
+
 	for pf in $pfl; do			# pf: package flavour
 		pfd=$($GMAKE show=PKGFD_$pf)
 		print

+ 1 - 5
package/rrs/Makefile

@@ -7,9 +7,7 @@ PKG_NAME:=		rrs
 PKG_VERSION:=		1.70
 PKG_RELEASE:=		2
 PKG_BUILDDEP+=		zlib
-ifeq (${ADK_COMPILE_RRS_WITH_UCLIBCXX},y)
-PKG_BUILDDEP+=		uclibc++
-endif
+PKG_CXX:=		RRS
 ifneq ($(ADK_PACKAGE_RRS),)
 PKG_BUILDDEP+=		openssl
 endif
@@ -23,10 +21,8 @@ PKG_DEPENDS:=		libopenssl zlib
 PKG_DEPENDS_NOSSL:=	zlib
 
 ifeq ($(ADK_COMPILE_RRS_WITH_UCLIBCXX),y)
-PKG_DEPENDS+=		uclibc++
 PKG_DEPENDS_NOSSL+=	uclibc++
 else
-PKG_DEPENDS+=		libstdcxx
 PKG_DEPENDS_NOSSL+=	libstdcxx
 endif
 

+ 1 - 0
package/rtorrent/Makefile

@@ -13,6 +13,7 @@ PKG_SECTION:=		net
 PKG_DEPENDS:=		libncurses libtorrent libcurl
 PKG_URL:=		http://libtorrent.rakshasa.no
 PKG_SITES:=		http://libtorrent.rakshasa.no/downloads/
+PKG_CXX:=		RTORRENT
 
 include ${TOPDIR}/mk/package.mk
 

+ 1 - 6
package/squid/Makefile

@@ -13,12 +13,7 @@ PKG_SECTION:=		net
 PKG_DEPENDS:=		libopenssl libpthread
 PKG_URL:=		http://www.squid-cache.org
 PKG_SITES:=		http://www.squid-cache.org/Versions/v3/3.0/
-
-ifeq ($(ADK_COMPILE_SQUID_WITH_UCLIBCXX),y)
-PKG_DEPENDS+=		uclibc++
-else
-PKG_DEPENDS+=		libstdcxx
-endif
+PKG_CXX:=		SQUID
 
 AUTH_MODULES:=		basic digest ntlm
 ifneq (${ADK_PACKAGE_SQUID_MOD_BASIC_AUTH_GETPWNAM},)

+ 3 - 10
package/tntnet/Makefile

@@ -18,20 +18,13 @@ PKG_SECTION:=		net
 PKG_DEPENDS:=		cxxtools zlib libpthread libiconv
 PKG_URL:=		http://www.tntnet.org
 PKG_SITES:=		http://www.tntnet.org/download/
+PKG_CXX:=		TNTNET
 
 include ${TOPDIR}/mk/package.mk
 
-ifeq (${ADK_COMPILE_TNTNET_WITH_UCLIBCXX},y)
-PKG_DEPENDS+=		uclibc++
-else
-PKG_DEPENDS+=		libstdcxx
-endif
-
-ifeq (${ADK_COMPILE_TNTNET_WITH_OPENSSL},y)
+ifneq (${ADK_COMPILE_TNTNET_WITH_OPENSSL},)
 PKG_DEPENDS+=		libopenssl
-endif
-
-ifeq (${ADK_COMPILE_TNTNET_WITH_GNUTLS},y)
+else ifneq (${ADK_COMPILE_TNTNET_WITH_GNUTLS},)
 PKG_DEPENDS+=		libgnutls
 endif