diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2011-01-18 15:32:55 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2011-01-18 15:32:55 +0100 |
commit | 3d45df344602687c8983f5fb609721aa8ca2469f (patch) | |
tree | bd089044e1402b116cf6447eda74e81b7f65d129 | |
parent | 897be7157eb98898fdc62224857025d4a0f01dd5 (diff) |
rework PKG_FLAVOURS. Subpackages can have flavours, so
always add PKG_NAME to PKG_FLAVOURS variable.
ala PKG_FLAVOURS_LIBNCURSES.
Bug reported by Phil Sutter.
40 files changed, 189 insertions, 139 deletions
diff --git a/package/.template/Makefile b/package/.template/Makefile index 7175f4a48..b9b1c125e 100644 --- a/package/.template/Makefile +++ b/package/.template/Makefile @@ -32,7 +32,7 @@ PKG_SITES:= add download url without package name #PKGSD_SUBPKG1:= # define your flavours for your package here, WITH_SSL f.e. -#PKG_FLAVOURS:= WITH_SSL +#PKG_FLAVOURS_PKGNAME:= WITH_SSL # flavour description #PKGFD_WITH_SSL:= enable SSL support # flavour runtime dependency, package name diff --git a/package/alsa-utils/Makefile b/package/alsa-utils/Makefile index 288faafdf..c134b85be 100644 --- a/package/alsa-utils/Makefile +++ b/package/alsa-utils/Makefile @@ -14,10 +14,10 @@ PKG_BUILDDEP:= alsa-lib PKG_URL:= http://www.alsa-project.org/ PKG_SITES:= ftp://ftp.alsa-project.org/pub/utils/ -PKG_FLAVOURS:= WITH_ALSAMIXER -PKGFS_WITH_ALSAMIXER:= libncurses -PKGFD_WITH_ALSAMIXER:= include alsamixer ncurses applet -PKGFB_WITH_ALSAMIXER:= ncurses +PKG_FLAVOURS_ALSA_UTILS:= WITH_ALSAMIXER +PKGFS_WITH_ALSAMIXER:= libncurses +PKGFD_WITH_ALSAMIXER:= include alsamixer ncurses applet +PKGFB_WITH_ALSAMIXER:= ncurses DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2 diff --git a/package/apr/Makefile b/package/apr/Makefile index 096981833..2b6c05305 100644 --- a/package/apr/Makefile +++ b/package/apr/Makefile @@ -13,7 +13,7 @@ PKG_DEPENDS:= libpthread PKG_URL:= http://apr.apache.org/ PKG_SITES:= http://gd.tuwien.ac.at/infosys/servers/http/apache/dist/${PKG_NAME}/ -PKG_FLAVOURS:= WITH_IPV6 +PKG_FLAVOURS_APR:= WITH_IPV6 PKGFD_WITH_IPV6:= enable IPv6 support include ${TOPDIR}/mk/package.mk @@ -28,7 +28,6 @@ CONFIGURE_ENV+= ac_cv_file__dev_zero=yes CONFIGURE_ENV+= apr_cv_process_shared_works=no CONFIGURE_ENV+= ac_cv_lib_nsl_gethostbyname=no CONFIGURE_ENV+= apr_cv_tcp_nodelay_with_cork=no - CONFIGURE_ARGS+= --with-devrandom=/dev/urandom \ --enable-threads diff --git a/package/bind/Makefile b/package/bind/Makefile index fdde3bf10..278982c4b 100644 --- a/package/bind/Makefile +++ b/package/bind/Makefile @@ -24,8 +24,8 @@ PKGSD_BIND_DNSSEC:= dnssec utilities PKGSD_BIND_HOST:= host utility PKGSD_BIND_DIG:= dig utility -PKG_FLAVOURS:= WITH_IPV6 -PKGFD_WITH_IPV6:= enable IPv6 support +PKG_FLAVOURS_BIND_SERVER:= WITH_IPV6 +PKGFD_WITH_IPV6:= enable IPv6 support include ${TOPDIR}/mk/package.mk diff --git a/package/ca-certificates/Makefile b/package/ca-certificates/Makefile index 56ee67f15..60716f194 100644 --- a/package/ca-certificates/Makefile +++ b/package/ca-certificates/Makefile @@ -15,7 +15,7 @@ PKG_SITES:= http://ftp.debian.org/debian/pool/main/c/ca-certificates/ DISTFILES:= ${PKG_NAME}_${PKG_VERSION}.tar.gz -PKG_FLAVOURS:= SMALL +PKG_FLAVOURS_CA_CERTS:= SMALL PKGFD_SMALL:= Minimal set of CA certificates include $(TOPDIR)/mk/package.mk diff --git a/package/collectd/Makefile b/package/collectd/Makefile index 52e6e6ab5..277e061cf 100644 --- a/package/collectd/Makefile +++ b/package/collectd/Makefile @@ -13,26 +13,26 @@ PKG_DEPENDS:= libpthread PKG_URL:= http://collectd.org/ PKG_SITES:= http://collectd.org/files/ -PKG_FLAVOURS:= CPU LOAD MEMORY PING -PKGFD_CPU:= collect CPU statistics -PKGFD_LOAD:= collect system load statistics -PKGFD_MEMORY:= collect memory usage statistics -PKGFD_PING:= enable ping statistic plugin +PKG_FLAVOURS_COLLECD:= WITH_CPU WITH_LOAD WITH_MEMORY WITH_PING +PKGFD_WITH_CPU:= collect CPU statistics +PKGFD_WITH_LOAD:= collect system load statistics +PKGFD_WITH_MEMORY:= collect memory usage statistics +PKGFD_WITH_PING:= enable ping statistic plugin include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,COLLECTD,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -ifneq (${ADK_PACKAGE_COLLECTD_CPU},y) +ifneq (${ADK_PACKAGE_COLLECTD_WITH_CPU},y) DISABLE_CPU:=--disable-cpu endif -ifneq (${ADK_PACKAGE_COLLECTD_LOAD},y) +ifneq (${ADK_PACKAGE_COLLECTD_WITH_LOAD},y) DISABLE_LOAD:=--disable-load endif -ifneq (${ADK_PACKAGE_COLLECTD_MEMORY},y) +ifneq (${ADK_PACKAGE_COLLECTD_WITH_MEMORY},y) DISABLE_MEMORY:=--disable-memory endif -ifneq (${ADK_PACKAGE_COLLECTD_PING},y) +ifneq (${ADK_PACKAGE_COLLECTD_WITH_PING},y) DISABLE_PING:=--disable-ping endif diff --git a/package/curl/Makefile b/package/curl/Makefile index c9992052a..4e1dd6bf5 100644 --- a/package/curl/Makefile +++ b/package/curl/Makefile @@ -21,7 +21,7 @@ PKGSS_LIBCURL:= libopenssl zlib PKGSD_LIBCURL_DEV:= development files for libcurl PKGSC_LIBCURL_DEV:= devel -PKG_FLAVOURS:= WITH_IPV6 +PKG_FLAVOURS_CURL:= WITH_IPV6 PKGFD_WITH_IPV6:= enable IPv6 support include ${TOPDIR}/mk/package.mk @@ -58,14 +58,14 @@ else CONFIGURE_ARGS+= --disable-ipv6 endif -post-install: - ${INSTALL_DIR} ${IDIR_LIBCURL}/usr/lib - ${CP} ${WRKINST}/usr/lib/libcurl.so* ${IDIR_LIBCURL}/usr/lib/ - curl-install: ${INSTALL_DIR} ${IDIR_CURL}/usr/bin ${INSTALL_BIN} ${WRKINST}/usr/bin/curl ${IDIR_CURL}/usr/bin/ +libcurl-install: + ${INSTALL_DIR} ${IDIR_LIBCURL}/usr/lib + ${CP} ${WRKINST}/usr/lib/libcurl.so* ${IDIR_LIBCURL}/usr/lib/ + libcurl-dev-install: ${INSTALL_DIR} ${IDIR_LIBCURL_DEV}/usr/include/curl ${CP} ${WRKINST}/usr/include/curl/*.h \ diff --git a/package/dovecot/Makefile b/package/dovecot/Makefile index 0716059b0..395a2c70c 100644 --- a/package/dovecot/Makefile +++ b/package/dovecot/Makefile @@ -12,7 +12,7 @@ PKG_SECTION:= mail PKG_URL:= http://www.dovecot.org/ PKG_SITES:= http://www.dovecot.org/releases/2.0/ -PKG_CHOICES:= WITH_OPENSSL WITH_GNUTLS +PKG_CHOICES_DOVECOT:= WITH_OPENSSL WITH_GNUTLS PKGCD_WITH_OPENSSL:= use OpenSSL for crypto PKGCS_WITH_OPENSSL:= libopenssl PKGCB_WITH_OPENSSL:= openssl diff --git a/package/elinks/Makefile b/package/elinks/Makefile index ec7180d93..fe863ec55 100644 --- a/package/elinks/Makefile +++ b/package/elinks/Makefile @@ -15,7 +15,7 @@ PKG_URL:= http://elinks.or.cz/ PKG_SITES:= http://elinks.or.cz/download/ PKG_NOPARALLEL:= 1 -PKG_FLAVOURS:= WITH_IPV6 +PKG_FLAVOURS_ELINKS:= WITH_IPV6 PKGFD_WITH_IPV6:= enable IPv6 support include ${TOPDIR}/mk/package.mk @@ -23,7 +23,6 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,ELINKS,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) INSTALL_STYLE:= manual - TCFLAGS+= -fPIC CONFIGURE_ENV+= $(shell echo ac_cv_file_./features.conf | tr [:blank:]-/. _)=yes CONFIGURE_ENV+= $(shell echo ac_cv_file_${WRKBUILD}/features.conf | tr [:blank:]-/. _)=yes diff --git a/package/fetchmail/Makefile b/package/fetchmail/Makefile index 2734f6d31..f3af7fe66 100644 --- a/package/fetchmail/Makefile +++ b/package/fetchmail/Makefile @@ -14,10 +14,10 @@ PKG_SITES:= http://download.berlios.de/fetchmail/ DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2 -PKG_FLAVOURS:= SSL -PKGFD_SSL:= enable SSL support -PKGFS_SSL:= libopenssl -PKGFB_SSL:= openssl +PKG_FLAVOURS_FETCHMAIL:=WITH_SSL +PKGFD_WITH_SSL:= enable SSL support +PKGFS_WITH_SSL:= libopenssl +PKGFB_WITH_SSL:= openssl include ${TOPDIR}/mk/package.mk @@ -25,7 +25,7 @@ $(eval $(call PKG_template,FETCHMAIL,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},$ CONFIGURE_ARGS+= --without-hesiod -ifeq (${ADK_PACKAGE_FETCHMAIL_SSL},y) +ifeq (${ADK_PACKAGE_FETCHMAIL_WITH_SSL},y) CONFIGURE_ARGS+= --with-ssl='${STAGING_TARGET_DIR}/usr' else CONFIGURE_ARGS+= --without-ssl diff --git a/package/fluxbox/Makefile b/package/fluxbox/Makefile index 885972f1a..74e104d67 100644 --- a/package/fluxbox/Makefile +++ b/package/fluxbox/Makefile @@ -14,7 +14,7 @@ PKG_BUILDDEP:= libXpm PKG_URL:= http://www.fluxbox.org/ PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=fluxbox/} -PKG_FLAVOURS:= WITH_IMLIB2 +PKG_FLAVOURS_FLUXBOX:= WITH_IMLIB2 PKGFD_WITH_IMLIB2:= enable imlib2 support PKGFS_WITH_IMLIB2:= imlib2 PKGFB_WITH_IMLIB2:= imlib2 diff --git a/package/heimdal/Makefile b/package/heimdal/Makefile index 4d7ecafa5..9568237e0 100644 --- a/package/heimdal/Makefile +++ b/package/heimdal/Makefile @@ -21,16 +21,16 @@ PKGSC_LIBHEIMDAL:= libs PKGSD_LIBHEIMDAL_CLIENT:= Kerberos 5 client libraries PKGSC_LIBHEIMDAL_CLIENT:= libs -PKG_FLAVOURS:= PKINIT -PKGFD_PKINIT:= Enable PK-INIT +PKG_FLAVOURS_HEIMDAL_SERVER:= WITH_PKINIT +PKGFD_WITH_PKINIT: Enable PK-INIT -PKG_CHOICES:= WITH_LDAP WITH_BDB -PKGCD_WITH_LDAP:= use OpenLDAP as database backend -PKGCS_WITH_LDAP:= libopenldap -PKGCB_WITH_LDAP:= openldap -PKGCD_WITH_BDB:= use Berkeley DB as database backend -PKGCS_WITH_BDB:= libdb -PKGCB_WITH_BDB:= libdb +PKG_CHOICES_HEIMDAL_SERVER:= WITH_LDAP WITH_BDB +PKGCD_WITH_LDAP:= use OpenLDAP as database backend +PKGCS_WITH_LDAP:= libopenldap +PKGCB_WITH_LDAP:= openldap +PKGCD_WITH_BDB:= use Berkeley DB as database backend +PKGCS_WITH_BDB:= libdb +PKGCB_WITH_BDB:= libdb include $(TOPDIR)/mk/package.mk @@ -48,13 +48,13 @@ CONFIGURE_OPTS:= --with-hdbdir=/etc/heimdal \ --with-ipv6 \ --sysconfdir=/etc/heimdal -ifeq ($(ADK_COMPILE_HEIMDAL_WITH_BDB),y) +ifeq ($(ADK_PACKAGE_HEIMDAL_SERVER_WITH_BDB),y) CONFIGURE_ARGS+= --with-berkeley-db else CONFIGURE_ARGS+= --without-berkeley-db endif -ifeq ($(ADK_COMPILE_HEIMDAL_WITH_LDAP),y) +ifeq ($(ADK_PACKAGE_HEIMDAL_SERVER_WITH_LDAP),y) CONFIGURE_ARGS+= --with-openldap=yes CONFIGURE_ARGS+= --with-openldap-include=${STAGING_TARGET_DIR}/usr CONFIGURE_ARGS+= --with-openldap-lib=${STAGING_TARGET_DIR}/usr @@ -62,7 +62,7 @@ else CONFIGURE_ARGS+= --without-openldap endif -ifeq ($(ADK_PACKAGE_HEIMDAL_PKINIT),y) +ifeq ($(ADK_PACKAGE_HEIMDAL_SERVER_WITH_PKINIT),y) CONFIGURE_OPTS+= --enable-pk-init else CONFIGURE_OPTS+= --disable-pk-init \ @@ -75,10 +75,6 @@ CONFIGURE_ARGS+= ${CONFIGURE_OPTS} --with-cross-tools=${STAGING_HOST_DIR}/bin CONFIGURE_ENV+= cross_compiling=yes \ ac_cv_func_getaddrinfo_numserv=yes -ifeq ($(ADK_HOST_CYGWIN),y) -EXEEXT:= .exe -endif - post-extract: (cd ${WRKBUILD}; rm -rf config.{cache,status} ; \ ./configure --prefix=$(STAGING_HOST_DIR) \ diff --git a/package/hostapd/Makefile b/package/hostapd/Makefile index f57192c27..8e39c52b9 100644 --- a/package/hostapd/Makefile +++ b/package/hostapd/Makefile @@ -16,7 +16,7 @@ PKG_SITES:= http://hostap.epitest.fi/releases/ PKG_MULTI:= 1 PKG_SUBPKGS:= HOSTAPD HOSTAPD_UTILS -PKG_CHOICES:= WITH_OPENSSL WITH_GNUTLS +PKG_CHOICES_HOSTAPD:= WITH_OPENSSL WITH_GNUTLS PKGCD_WITH_OPENSSL:= use OpenSSL for crypto PKGCS_WITH_OPENSSL:= libopenssl PKGCB_WITH_OPENSSL:= openssl diff --git a/package/ipsec-tools/Makefile b/package/ipsec-tools/Makefile index 5e92467cd..f9f2c13d6 100644 --- a/package/ipsec-tools/Makefile +++ b/package/ipsec-tools/Makefile @@ -16,8 +16,8 @@ PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=ipsec-tools/} DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2 -PKG_FLAVOURS:= WITH_IPV6 -PKGFD_WITH_IPV6:= enable IPv6 support +PKG_FLAVOURS_IPSEC_TOOLS:= WITH_IPV6 +PKGFD_WITH_IPV6:= enable IPv6 support include ${TOPDIR}/mk/package.mk diff --git a/package/irssi/Makefile b/package/irssi/Makefile index 55894fd7c..32efe957a 100644 --- a/package/irssi/Makefile +++ b/package/irssi/Makefile @@ -14,7 +14,7 @@ PKG_BUILDDEP:= glib ncurses PKG_URL:= http://www.irssi.org/ PKG_SITES:= http://www.irssi.org/files/ -PKG_FLAVOURS:= WITH_SSL WITH_IPV6 +PKG_FLAVOURS_IRSSI:= WITH_SSL WITH_IPV6 PKGFD_WITH_SSL:= enable SSL/TLS support PKGFS_WITH_SSL:= libopenssl PKGFB_WITH_SSL:= openssl diff --git a/package/libpcap/Makefile b/package/libpcap/Makefile index 4bb8253d7..209a337df 100644 --- a/package/libpcap/Makefile +++ b/package/libpcap/Makefile @@ -12,7 +12,7 @@ PKG_SECTION:= libs PKG_URL:= http://www.tcpdump.org/ PKG_SITES:= http://www.tcpdump.org/release/ -PKG_FLAVOURS:= WITH_IPV6 +PKG_FLAVOURS_LIBPCAP:= WITH_IPV6 PKGFD_WITH_IPV6:= enable IPv6 support include $(TOPDIR)/mk/package.mk diff --git a/package/links/Makefile b/package/links/Makefile index 33be6b148..462d4746b 100644 --- a/package/links/Makefile +++ b/package/links/Makefile @@ -14,7 +14,7 @@ PKG_BUILDDEP:= openssl libpng jpeg gpm PKG_URL:= http://links.twibright.com/ PKG_SITES:= http://links.twibright.com/download/ -PKG_FLAVOURS:= WITH_DIRECTFB +PKG_FLAVOURS_LINKS:= WITH_DIRECTFB PKGFD_WITH_DIRECTFB:= enable DirectFB video output support PKGFS_WITH_DIRECTFB:= directfb PKGFB_WITH_DIRECTFB:= DirectFB diff --git a/package/mksh/Makefile b/package/mksh/Makefile index 7ace9de29..84dee864e 100644 --- a/package/mksh/Makefile +++ b/package/mksh/Makefile @@ -12,7 +12,7 @@ PKG_SECTION:= shells PKG_URL:= http://www.mirbsd.org/ PKG_SITES:= ${MASTER_SITE_MIRBSD:distfiles/=dist/mir/mksh/} -PKG_FLAVOURS:= FULL +PKG_FLAVOURS_MKSH:= FULL PKGFD_FULL:= Include all features DISTFILES= ${PKG_NAME}-R${PKG_VERSION}.cpio.gz diff --git a/package/mpd/Makefile b/package/mpd/Makefile index 522b804b6..b211386b0 100644 --- a/package/mpd/Makefile +++ b/package/mpd/Makefile @@ -14,9 +14,9 @@ PKG_BUILDDEP:= glib PKG_URL:= http://mpd.wikia.com/wiki/Music_Player_Daemon_Wiki PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=musicpd/} -PKG_FLAVOURS:= WITH_ALSA WITH_AO WITH_MP3 WITH_MP4 WITH_TREMOR -PKG_FLAVOURS+= WITH_OGG WITH_FLAC WITH_WAV WITH_MMS WITH_FFMPEG -PKG_FLAVOURS+= WITH_SHOUT WITH_CURL +PKG_FLAVOURS_MPD:= WITH_ALSA WITH_AO WITH_MP3 WITH_MP4 WITH_TREMOR +PKG_FLAVOURS_MPD+= WITH_OGG WITH_FLAC WITH_WAV WITH_MMS WITH_FFMPEG +PKG_FLAVOURS_MPD+= WITH_SHOUT WITH_CURL PKGFD_WITH_ALSA:= enable ALSA output PKGFS_WITH_ALSA:= alsa-lib diff --git a/package/mplayer/Makefile b/package/mplayer/Makefile index 6b4521cf5..21ad00432 100644 --- a/package/mplayer/Makefile +++ b/package/mplayer/Makefile @@ -19,7 +19,7 @@ PKG_SITES:= http://openadk.org/distfiles/ PKG_ARCH_DEPENDS:= x86 x86_64 mips mipsel mips64 mips64el -PKG_FLAVOURS:= WITH_DIRECTFB +PKG_FLAVOURS_MPLAYER:= WITH_DIRECTFB PKGFD_WITH_DIRECTFB:= enable DirectFB video output support PKGFS_WITH_DIRECTFB:= directfb PKGFB_WITH_DIRECTFB:= DirectFB diff --git a/package/nano/Makefile b/package/nano/Makefile index df45c05d4..af87dd3f1 100644 --- a/package/nano/Makefile +++ b/package/nano/Makefile @@ -14,7 +14,7 @@ PKG_BUILDDEP:= ncurses PKG_URL:= http://www.nano-editor.org/ PKG_SITES:= http://www.nano-editor.org/dist/v2.2/ -PKG_FLAVOURS:= TINY +PKG_FLAVOURS_NANO:= TINY PKGFD_TINY:= tiny nano include ${TOPDIR}/mk/package.mk diff --git a/package/ncurses/Makefile b/package/ncurses/Makefile index 4d7b60035..975cfa1b7 100644 --- a/package/ncurses/Makefile +++ b/package/ncurses/Makefile @@ -16,8 +16,8 @@ PKG_SUBPKGS:= LIBNCURSES LIBNCURSES_DEV PKGSD_LIBNCURSES_DEV:= development files for libncurses PKGSC_LIBNCURSES_DEV:= devel -PKG_FLAVOURS:= FULL_TERMINFO -PKGFD_FULL_TERMINFO:= install the complete set of terminfo files as provided upstream +PKG_FLAVOURS_LIBNCURSES:= FULL_TERMINFO +PKGFD_FULL_TERMINFO:= install the complete set of terminfo files as provided upstream include ${TOPDIR}/mk/package.mk @@ -71,7 +71,7 @@ post-install: ${INSTALL_DIR} ${IDIR_LIBNCURSES}/usr/lib ${CP} ${WRKINST}/usr/lib/lib{form,menu,ncurses,panel}.so* \ ${IDIR_LIBNCURSES}/usr/lib -ifeq (${ADK_PACKAGE_NCURSES_FULL_TERMINFO},y) +ifeq (${ADK_PACKAGE_LIBNCURSES_FULL_TERMINFO},y) ${INSTALL_DIR} ${IDIR_LIBNCURSES}/usr/share ${CP} ${WRKINST}/usr/share/terminfo ${IDIR_LIBNCURSES}/usr/share/ else diff --git a/package/net-snmp/Makefile b/package/net-snmp/Makefile index 859e8a658..d32401d33 100644 --- a/package/net-snmp/Makefile +++ b/package/net-snmp/Makefile @@ -22,7 +22,7 @@ PKGSD_LIBNETSNMP:= SNMP library PKGSS_LIBNETSNMP:= libelf PKGSC_LIBNETSNMP:= libs -PKG_FLAVOURS:= WITH_IPV6 +PKG_FLAVOURS_SNMPD:= WITH_IPV6 PKGFD_WITH_IPV6:= enable IPv6 support include ${TOPDIR}/mk/package.mk @@ -33,7 +33,7 @@ $(eval $(call PKG_template,LIBNETSNMP,libnetsnmp,${PKG_VERSION}-${PKG_RELEASE},$ SNMP_TRANSPORTS_INCLUDED:= UDP TCP Callback Unix SNMP_TRANSPORTS_EXCLUDED:= Alias -ifneq (${ADK_PACKAGE_NET_SNMP_WITH_IPV6},) +ifneq (${ADK_PACKAGE_SNMPD_WITH_IPV6},) SNMP_TRANSPORTS_INCLUDED+= TCPIPv6 UDPIPv6 else SNMP_TRANSPORTS_EXCLUDED:= TCPIPv6 UDPIPv6 @@ -61,7 +61,7 @@ CONFIGURE_ARGS+= --with-defaults \ --without-rpm \ --without-zlib -ifneq (${ADK_PACKAGE_NET_SNMP_WITH_IPV6},) +ifneq (${ADK_PACKAGE_SNMPD_WITH_IPV6},) CONFIGURE_ARGS+= --enable-ipv6 else CONFIGURE_ARGS+= --disable-ipv6 @@ -69,13 +69,17 @@ endif FAKE_FLAGS+= INSTALL_PREFIX="${WRKINST}" -post-install: +libnetsnmp-install: ${INSTALL_DIR} ${IDIR_LIBNETSNMP}/usr/lib ${CP} ${WRKINST}/usr/lib/libnetsnmp*.so* ${IDIR_LIBNETSNMP}/usr/lib/ + +snmpd-install: ${INSTALL_DIR} ${IDIR_SNMPD}/etc/snmp ${INSTALL_DIR} ${IDIR_SNMPD}/usr/sbin ${INSTALL_DATA} ./files/snmpd.conf ${IDIR_SNMPD}/etc/snmp/snmpd.conf ${INSTALL_BIN} ${WRKINST}/usr/sbin/snmpd ${IDIR_SNMPD}/usr/sbin/snmpd + +snmp-utils-install: ${INSTALL_DIR} ${IDIR_SNMP_UTILS}/usr/bin ${CP} ${WRKINST}/usr/bin/snmp{get,set,status,test,trap,walk} \ ${IDIR_SNMP_UTILS}/usr/bin/ diff --git a/package/nfs-utils/Makefile b/package/nfs-utils/Makefile index 86c1a9e71..3d55b6260 100644 --- a/package/nfs-utils/Makefile +++ b/package/nfs-utils/Makefile @@ -13,7 +13,7 @@ PKG_DEPENDS:= kmod-nfsd portmap PKG_URL:= http://sourceforge.net/projects/nfs PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=nfs/} -PKG_FLAVOURS:= WITH_KERBEROS WITH_TIRPC +PKG_FLAVOURS_NFS_UTILS:=WITH_KERBEROS WITH_TIRPC PKGFD_WITH_KERBEROS:= enable Kerberos support (MIT) PKGFS_WITH_KERBEROS:= libkrb5 libevent libnfsidmap librpcsecgss libcom-err libgssglue PKGFB_WITH_KERBEROS:= libnfsidmap krb5 libevent libgssglue librpcsecgss diff --git a/package/nut/Makefile b/package/nut/Makefile index 833f271e7..6af495cb6 100644 --- a/package/nut/Makefile +++ b/package/nut/Makefile @@ -12,16 +12,16 @@ PKG_SECTION:= net/misc PKG_URL:= http://www.networkupstools.org/ PKG_SITES:= http://www.networkupstools.org/source/2.4/ -PKG_FLAVOURS:= SSL SNMP USB -PKGFD_SNMP:= enable SNMP support -PKGFS_SNMP:= libnetsnmp -PKGFB_SNMP:= net-snmp -PKGFD_USB:= enable USB support -PKGFS_USB:= libusb -PKGFB_USB:= libusb -PKGFD_SSL:= enable SSL support -PKGFS_SSL:= libopenssl -PKGFB_SSL:= openssl +PKG_FLAVOURS_NUT:= WITH_SSL WITH_SNMP WITH_USB +PKGFD_WITH_SNMP:= enable SNMP support +PKGFS_WITH_SNMP:= libnetsnmp +PKGFB_WITH_SNMP:= net-snmp +PKGFD_WITH_USB:= enable USB support +PKGFS_WITH_USB:= libusb +PKGFB_WITH_USB:= libusb +PKGFD_WITH_SSL:= enable SSL support +PKGFS_WITH_SSL:= libopenssl +PKGFB_WITH_SSL:= openssl include ${TOPDIR}/mk/package.mk @@ -65,10 +65,10 @@ $(eval $(call DRIVER_template,RHINO,rhino)) CONFIG_DRIVERS=$(shell echo ${DRIVERS_y} | tr ' ' ',') INSTALL_DRIVERS_tmp=${DRIVERS_y} -ifneq (${ADK_PACKAGE_NUT_USB},) +ifneq (${ADK_PACKAGE_NUT_WITH_USB},) INSTALL_DRIVERS_tmp+= usbhid-ups tripplite_usb endif -ifneq (${ADK_PACKAGE_NUT_SNMP},) +ifneq (${ADK_PACKAGE_NUT_WITH_SNMP},) INSTALL_DRIVERS_tmp+= snmp-ups endif INSTALL_DRIVERS=$(shell echo ${INSTALL_DRIVERS_tmp} | tr ' ' ',') @@ -79,7 +79,7 @@ CONFIGURE_ARGS+= --with-linux-hiddev=${LINUX_DIR}/include/linux/hiddev.h \ --with-group=0 \ --with-user=0 -ifneq (${ADK_PACKAGE_NUT_SSL},) +ifneq (${ADK_PACKAGE_NUT_WITH_SSL},) CONFIGURE_ARGS+= --with-ssl CONFIGURE_ENV+= CPPFLAGS="${TCPPFLAGS} ${TLDFLAGS}" MAKE_FLAGS+= SSL_CFLAGS="${TCPPFLAGS}" SSL_LDFLAGS="${TLDFLAGS} -lssl -lcrypto" @@ -88,11 +88,11 @@ endif ALL_TARGET:= all INSTALL_TARGET:= install -ifneq (${ADK_PACKAGE_NUT_USB},) +ifneq (${ADK_PACKAGE_NUT_WITH_USB},) ALL_TARGET+= usb INSTALL_TARGET+= install-usb endif -ifneq (${ADK_PACKAGE_NUT_SNMP},) +ifneq (${ADK_PACKAGE_NUT_WITH_SNMP},) ALL_TARGET+= snmp INSTALL_TARGET+= install-snmp endif @@ -108,10 +108,5 @@ post-install: ${INSTALL_BIN} ${WRKINST}/usr/bin/ups{c,cmd,drvctl,log,rw} \ ${IDIR_NUT}/usr/bin/ ${INSTALL_DATA} ./files/ups{d,}.conf ${IDIR_NUT}/etc/ -ifneq (${ADK_PACKAGE_NUT_VARDESC},) - ${INSTALL_DIR} ${IDIR_NUT}/usr/share - ${INSTALL_DATA} ${WRKINST}/usr/share/cmdvartab \ - ${IDIR_NUT}/usr/share/ -endif include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/openldap/Makefile b/package/openldap/Makefile index 8b53713cb..937c32bc7 100644 --- a/package/openldap/Makefile +++ b/package/openldap/Makefile @@ -24,8 +24,8 @@ PKGSC_OPENLDAP_SLAPD:= net/misc DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tgz -PKG_FLAVOURS:= WITH_IPV6 -PKGFD_WITH_IPV6:= enable IPv6 support +PKG_FLAVOURS_OPENLDAP_SLAPD:= WITH_IPV6 +PKGFD_WITH_IPV6:= enable IPv6 support include ${TOPDIR}/mk/package.mk @@ -50,7 +50,7 @@ PKG_CONFIGURE_OPTIONS+= --enable-slapd \ --with-tls \ --with-yielding_select="yes" \ -ifneq (${ADK_PACKAGE_OPENLDAP_WITH_IPV6},) +ifneq (${ADK_PACKAGE_OPENLDAP_SLAPD_WITH_IPV6},) CONFIGURE_ARGS+= --enable-ipv6 else CONFIGURE_ARGS+= --disable-ipv6 diff --git a/package/openssh/Makefile b/package/openssh/Makefile index 787d59954..fb876c330 100644 --- a/package/openssh/Makefile +++ b/package/openssh/Makefile @@ -21,14 +21,14 @@ PKGSD_OPENSSH_CLIENT_UTILS:= OpenSSH client utilities PKGSD_OPENSSH_SFTP_CLIENT:= OpenSSH sftp client PKGSD_OPENSSH_SFTP_SERVER:= OpenSSH sftp server -PKG_CHOICES:= NOKRB WITH_KRB5 WITH_HEIMDAL -PKGCD_NOKRB:= no Kerberos support -PKGCD_WITH_KRB5:= with MIT Kerberos -PKGCS_WITH_KRB5:= libkrb5 libcom-err -PKGCB_WITH_KRB5:= krb5 -PKGCD_WITH_HEIMDAL:= with Heimdal Kerberos -PKGCS_WITH_HEIMDAL:= libheimdal libcom-err -PKGCB_WITH_HEIMDAL:= heimdal +PKG_CHOICES_OPENSSH_SERVER:= NOKRB WITH_KRB5 WITH_HEIMDAL +PKGCD_NOKRB:= no Kerberos support +PKGCD_WITH_KRB5:= with MIT Kerberos +PKGCS_WITH_KRB5:= libkrb5 libcom-err +PKGCB_WITH_KRB5:= krb5 +PKGCD_WITH_HEIMDAL:= with Heimdal Kerberos +PKGCS_WITH_HEIMDAL:= libheimdal libcom-err +PKGCB_WITH_HEIMDAL:= heimdal include ${TOPDIR}/mk/package.mk diff --git a/package/openssl/Makefile b/package/openssl/Makefile index 0d30b8f63..472362adc 100644 --- a/package/openssl/Makefile +++ b/package/openssl/Makefile @@ -22,9 +22,8 @@ PKGSD_LIBOPENSSL_DEV:= development files for openssl PKGSC_LIBOPENSSL_DEV:= devel PKGSS_LIBOPENSSL_DEV:= libopenssl -PKG_FLAVOURS:= WITH_EC -PKGFD_WITH_EC:= enable Elliptic Curve crypto -PKGSUB_WITH_EC:= libopenssl +PKG_FLAVOURS_LIBOPENSSL:= WITH_EC +PKGFD_WITH_EC:= enable Elliptic Curve crypto include ${TOPDIR}/mk/package.mk @@ -40,7 +39,7 @@ FAKE_FLAGS+= INSTALL_PREFIX=${WRKINST} OPENSSL_OPTIONS:= shared no-err no-krb5 no-threads zlib-dynamic no-engines no-camellia no-idea no-rc5 no-mdc2 no-sha0 no-smime no-aes192 no-ripemd no-cast -ifeq ($(ADK_PACKAGE_OPENSSL_WITH_EC),) +ifeq ($(ADK_PACKAGE_LIBOPENSSL_WITH_EC),) OPENSSL_OPTIONS+= no-ec endif diff --git a/package/openvpn/Makefile b/package/openvpn/Makefile index f2ecc8823..5c9c8dc6e 100644 --- a/package/openvpn/Makefile +++ b/package/openvpn/Makefile @@ -15,7 +15,7 @@ PKG_URL:= http://openvpn.net/ PKG_SITES:= http://openvpn.net/release/ PKG_SUBPKGS:= OPENVPN OPENVPN_EASY_RSA -PKG_FLAVOURS:= WITH_LZO WITH_MANAGEMENT WITH_HTTPPROXY WITH_SOCKS +PKG_FLAVOURS_OPENVPN:= WITH_LZO WITH_MANAGEMENT WITH_HTTPPROXY WITH_SOCKS PKGFD_WITH_LZO:= enable LZO compression support PKGFS_WITH_LZO:= liblzo PKGFB_WITH_LZO:= liblzo diff --git a/package/pdnsd/Makefile b/package/pdnsd/Makefile index a6f8041aa..8e83586b3 100644 --- a/package/pdnsd/Makefile +++ b/package/pdnsd/Makefile @@ -13,7 +13,7 @@ PKG_DEPENDS:= libpthread PKG_URL:= http://www.phys.uu.nl/~rombouts/pdnsd.html PKG_SITES:= http://www.phys.uu.nl/~rombouts/pdnsd/releases/ -PKG_FLAVOURS:= WITH_IPV6 +PKG_FLAVOURS_PDNSD:= WITH_IPV6 PKGFD_WITH_IPV6:= enable IPv6 support PKG_HOST_DEPENDS:= !netbsd diff --git a/package/proftpd/Makefile b/package/proftpd/Makefile index 2fea241aa..fbae31c18 100644 --- a/package/proftpd/Makefile +++ b/package/proftpd/Makefile @@ -13,7 +13,7 @@ PKG_URL:= http://www.proftpd.org/ PKG_SITES:= ftp://ftp.proftpd.org/distrib/source/ PKG_NOPARALLEL:= 1 -PKG_FLAVOURS:= WITH_FTPUSERS +PKG_FLAVOURS_PROFTPD:= WITH_FTPUSERS PKGFD_WITH_FTPUSERS:= install /etc/ftpusers along with proftpd include $(TOPDIR)/mk/package.mk diff --git a/package/qemu/Makefile b/package/qemu/Makefile index 864010281..4b8c33c9c 100644 --- a/package/qemu/Makefile +++ b/package/qemu/Makefile @@ -9,7 +9,8 @@ PKG_RELEASE:= 2 PKG_MD5SUM:= 397a0d665da8ba9d3b9583629f3d6421 PKG_DESCR:= cpu and system emulator PKG_SECTION:= misc -PKG_BUILDDEP:= zlib +PKG_DEPENDS:= zlib libSDL +PKG_BUILDDEP:= zlib sdl PKG_URL:= http://wwww.qemu.org/ PKG_SITES:= http://wiki.qemu.org/download/ @@ -27,8 +28,11 @@ CONFIGURE_ARGS+= --host-cc=$(HOSTCC) \ TLDFLAGS+= -pthread -lrt post-install: + $(INSTALL_DIR) $(IDIR_QEMU)/usr/share/qemu $(INSTALL_DIR) $(IDIR_QEMU)/usr/bin $(INSTALL_BIN) $(WRKINST)/usr/bin/qemu* \ $(IDIR_QEMU)/usr/bin + $(CP) $(WRKINST)/usr/share/qemu/* \ + $(IDIR_QEMU)/usr/share/qemu include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/quagga/Makefile b/package/quagga/Makefile index b13c3b197..ee519da73 100644 --- a/package/quagga/Makefile +++ b/package/quagga/Makefile @@ -23,7 +23,7 @@ PKGSD_QUAGGA_RIPNGD:= RIPng daemon PKGSD_QUAGGA_RIPD:= RIP daemon PKGSD_QUAGGA_VTYSH:= vtysh utility -PKG_FLAVOURS:= WITH_IPV6 +PKG_FLAVOURS_QUAGGA:= WITH_IPV6 PKGFD_WITH_IPV6:= enable IPv6 support include ${TOPDIR}/mk/package.mk diff --git a/package/sdl/Makefile b/package/sdl/Makefile index 4b390bb6a..277be34b7 100644 --- a/package/sdl/Makefile +++ b/package/sdl/Makefile @@ -9,11 +9,16 @@ PKG_RELEASE:= 1 PKG_MD5SUM:= e52086d1b508fa0b76c52ee30b55bec4 PKG_DESCR:= Simple DirectMedia Layer PKG_SECTION:= libs -PKG_DEPENDS:= libusb alsa-lib libpthread tslib -PKG_BUILDDEP:= libusb alsa-lib tslib +PKG_DEPENDS:= libusb alsa-lib libpthread libx11 libxext +PKG_BUILDDEP:= libusb alsa-lib libX11 libXext PKG_URL:= http://www.libsdl.org/ PKG_SITES:= http://www.libsdl.org/release/ +PKG_FLAVOURS_LIBSDL:= WITH_TSLIB +PKGFD_WITH_TSLIB:= SDL with touchscreen support +PKGFS_WITH_TSLIB:= tslib +PKGFB_WITH_TSLIB:= tslib + PKG_SUBPKGS:= LIBSDL LIBSDL_DEV PKGSD_LIBSDL_DEV:= development files for libsdl PKGSC_LIBSDL_DEV:= devel @@ -26,13 +31,15 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,LIBSDL,libsdl,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,LIBSDL_DEV,libsdl-dev,$(PKG_VERSION)-${PKG_RELEASE},libsdl,${PKGSD_LIBSDL_DEV},${PKGSC_LIBSDL_DEV})) +ifeq ($(ADK_PACKAGE_SDL_WITH_TSLIB),y) +CONFIGURE_ARGS+= --enable-input-tslib +endif CONFIGURE_ARGS+= --disable-esd \ --disable-oss \ --enable-alsa \ --enable-video-fbcon \ --disable-video-directfb \ --disable-video-opengl \ - --enable-input-tslib \ --with-x post-install: diff --git a/package/strongswan/Makefile b/package/strongswan/Makefile index 6f7f117fe..19d552f85 100644 --- a/package/strongswan/Makefile +++ b/package/strongswan/Makefile @@ -18,7 +18,7 @@ PKG_DEPENDS+= kmod-crypto-hmac kmod-crypto-cbc kmod-crypto-authenc PKG_URL:= http://strongswan.org/index.htm PKG_SITES:= http://download.strongswan.org/ -PKG_CHOICES:= WITH_GMP WITH_OPENSSL WITH_GNUTLS +PKG_CHOICES_STRONGSWAN:=WITH_GMP WITH_OPENSSL WITH_GNUTLS PKGCD_WITH_GMP:= use GMP for crypto PKGCS_WITH_GMP:= libgmp PKGCB_WITH_GMP:= gmp diff --git a/package/tcpdump/Makefile b/package/tcpdump/Makefile index 6910052a3..6eb5d62d3 100644 --- a/package/tcpdump/Makefile +++ b/package/tcpdump/Makefile @@ -14,7 +14,7 @@ PKG_BUILDDEP:= libpcap PKG_URL:= http://www.tcpdump.org/ PKG_SITES:= http://www.tcpdump.org/release/ -PKG_FLAVOURS:= WITH_IPV6 WITH_CHROOT +PKG_FLAVOURS_TCPDUMP:= WITH_IPV6 WITH_CHROOT PKGFD_WITH_IPV6:= enable IPv6 support PKGFD_WITH_CHROOT:= enable chrooting to /var/lib/tcpdump diff --git a/package/tslib/Makefile b/package/tslib/Makefile index ff0afe6c9..17301acf5 100644 --- a/package/tslib/Makefile +++ b/package/tslib/Makefile @@ -11,6 +11,7 @@ PKG_DESCR:= touchscreen library PKG_SECTION:= libs PKG_URL:= http://tslib.berlios.de/ PKG_SITES:= http://download.berlios.de/tslib/ +PKG_NEED_CXX:= 1 DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2 diff --git a/package/wpa_supplicant/Makefile b/package/wpa_supplicant/Makefile index 3b80d12ab..aebb85f8d 100644 --- a/package/wpa_supplicant/Makefile +++ b/package/wpa_supplicant/Makefile @@ -18,13 +18,13 @@ PKG_DFLT_WPA_SUPPLICANT:= y if ADK_TARGET_SYSTEM_IBM_X40 WRKSRC= ${WRKDIST}/${PKG_NAME} -PKG_CHOICES:= WITH_OPENSSL WITH_GNUTLS -PKGCD_WITH_OPENSSL:= use OpenSSL for crypto -PKGCS_WITH_OPENSSL:= libopenssl -PKGCB_WITH_OPENSSL:= openssl -PKGCD_WITH_GNUTLS:= use GnuTLS for crypto -PKGCS_WITH_GNUTLS:= libgnutls -PKGCB_WITH_GNUTLS:= gnutls +PKG_CHOICES_WPA_SUPPLICANT:= WITH_OPENSSL WITH_GNUTLS +PKGCD_WITH_OPENSSL:= use OpenSSL for crypto +PKGCS_WITH_OPENSSL:= libopenssl +PKGCB_WITH_OPENSSL:= openssl +PKGCD_WITH_GNUTLS:= use GnuTLS for crypto +PKGCS_WITH_GNUTLS:= libgnutls +PKGCB_WITH_GNUTLS:= gnutls include ${TOPDIR}/mk/package.mk diff --git a/package/xorg-server/Makefile b/package/xorg-server/Makefile index 9aa7eaba9..92d5ddeaa 100644 --- a/package/xorg-server/Makefile +++ b/package/xorg-server/Makefile @@ -22,10 +22,10 @@ PKG_SITES:= http://xorg.freedesktop.org/archive/individual/xserver/ PKG_CFLINE_XORG_SERVER:=depends on ADK_TARGET_WITH_VGA -PKG_FLAVOURS:= WITH_DRI -PKGFS_WITH_DRI:= mesalib -PKGFD_WITH_DRI:= enable DRI/DRI2 support -PKGFB_WITH_DRI:= xf86driproto glproto dri2proto MesaLib +PKG_FLAVOURS_XORG_SERVER:= WITH_DRI +PKGFS_WITH_DRI:= mesalib +PKGFD_WITH_DRI:= enable DRI/DRI2 support +PKGFB_WITH_DRI:= xf86driproto glproto dri2proto MesaLib include $(TOPDIR)/mk/package.mk diff --git a/tools/adk/pkgmaker.c b/tools/adk/pkgmaker.c index dd4b90f46..18465ce18 100644 --- a/tools/adk/pkgmaker.c +++ b/tools/adk/pkgmaker.c @@ -111,6 +111,53 @@ static int parse_var(char *buf, const char *varname, char *pvalue, char **result return(1); } +static int parse_var_with_pkg(char *buf, const char *varname, char *pvalue, char **result, char **pkgname, int varlen) { + + char *pkg_var, *check; + char *key, *value, *string; + + if ((pkg_var = malloc(MAXLINE)) != NULL) + memset(pkg_var, 0, MAXLINE); + else { + perror("Can not allocate memory"); + exit(EXIT_FAILURE); + } + + check = strstr(buf, ":="); + if (check != NULL) { + string = strstr(buf, varname); + if (string != NULL) { + string[strlen(string)-1] = '\0'; + key = strtok(string, ":="); + *pkgname = strdup(key+varlen); + value = strtok(NULL, "=\t"); + if (value != NULL) { + strncat(pkg_var, value, strlen(value)); + *result = strdup(pkg_var); + } + free(pkg_var); + return(0); + } + } else { + string = strstr(buf, varname); + if (string != NULL) { + string[strlen(string)-1] = '\0'; + key = strtok(string, "+="); + value = strtok(NULL, "=\t"); + if (pvalue != NULL) + strncat(pkg_var, pvalue, strlen(pvalue)); + strncat(pkg_var, " ", 1); + if (value != NULL) + strncat(pkg_var, value, strlen(value)); + *result = strdup(pkg_var); + free(pkg_var); + return(0); + } + } + free(pkg_var); + return(1); +} + /* static void iter_debug(const char *key, const char *value, const void *obj) { fprintf(stderr, "HASHMAP key: %s value: %s\n", key, value); @@ -223,7 +270,7 @@ int main() { char *key, *value, *token, *cftoken, *sp, *hkey, *val, *pkg_fd; char *pkg_name, *pkg_depends, *pkg_section, *pkg_descr, *pkg_url; char *pkg_cxx, *pkg_subpkgs, *pkg_cfline, *pkg_dflt, *pkg_multi; - char *pkg_need_cxx, *pkg_need_java; + char *pkg_need_cxx, *pkg_need_java, *pkgname; char *pkg_host_depends, *pkg_arch_depends, *pkg_flavours, *pkg_choices, *pseudo_name; char *packages, *pkg_name_u, *pkgs; char *saveptr, *p_ptr, *s_ptr; @@ -246,6 +293,7 @@ int main() { pkg_multi = NULL; pkg_need_cxx = NULL; pkg_need_java = NULL; + pkgname = NULL; p_ptr = NULL; s_ptr = NULL; @@ -364,13 +412,13 @@ int main() { continue; if ((parse_var(buf, "PKG_DEPENDS", pkg_depends, &pkg_depends)) == 0) continue; - if ((parse_var(buf, "PKG_FLAVOURS", pkg_flavours, &pkg_flavours)) == 0) + if ((parse_var_with_pkg(buf, "PKG_FLAVOURS_", pkg_flavours, &pkg_flavours, &pkgname, 13)) == 0) continue; if ((parse_var_hash(buf, "PKGFD_", pkgmap)) == 0) continue; if ((parse_var_hash(buf, "PKGFS_", pkgmap)) == 0) continue; - if ((parse_var(buf, "PKG_CHOICES", pkg_choices, &pkg_choices)) == 0) + if ((parse_var_with_pkg(buf, "PKG_CHOICES_", pkg_choices, &pkg_choices, &pkgname, 12)) == 0) continue; if ((parse_var_hash(buf, "PKGCD_", pkgmap)) == 0) continue; @@ -402,10 +450,10 @@ int main() { fprintf(stderr, "Package dependencies are %s\n", pkg_depends); if (pkg_subpkgs != NULL) fprintf(stderr, "Package subpackages are %s\n", pkg_subpkgs); - if (pkg_flavours != NULL) - fprintf(stderr, "Package flavours are %s\n", pkg_flavours); - if (pkg_choices != NULL) - fprintf(stderr, "Package choices are %s\n", pkg_choices); + if (pkg_flavours != NULL && pkgname != NULL) + fprintf(stderr, "Package flavours for %s are %s\n", pkgname, pkg_flavours); + if (pkg_choices != NULL && pkgname != NULL) + fprintf(stderr, "Package choices for %s are %s\n", pkgname, pkg_choices); if (pkg_url != NULL) fprintf(stderr, "Package homepage is %s\n", pkg_url); if (pkg_cfline != NULL) @@ -641,9 +689,8 @@ int main() { if (pkg_flavours != NULL) { token = strtok(pkg_flavours, " "); while (token != NULL) { - fprintf(cfg, "\nconfig ADK_PACKAGE_%s_%s\n", toupperstr(pkgdirp->d_name), - toupperstr(token)); - fprintf(cfg, "\tbool "); + fprintf(cfg, "\nconfig ADK_PACKAGE_%s_%s\n", pkgname, toupperstr(token)); + fprintf(cfg, "\tboolean "); strncat(hkey, "PKGFD_", 6); strncat(hkey, token, strlen(token)); memset(hvalue, 0 , MAXVALUE); @@ -653,7 +700,7 @@ int main() { fprintf(cfg, "\"%s\"\n", pkg_fd); fprintf(cfg, "\tdefault n\n"); - fprintf(cfg, "\tdepends on ADK_PACKAGE_%s\n", toupperstr(pkgdirp->d_name)); + fprintf(cfg, "\tdepends on ADK_PACKAGE_%s\n", pkgname); strncat(hkey, "PKGFS_", 6); strncat(hkey, token, strlen(token)); @@ -678,11 +725,10 @@ int main() { if (pkg_choices != NULL) { fprintf(cfg, "\nchoice\n"); fprintf(cfg, "prompt \"Package flavour choice\"\n"); - fprintf(cfg, "depends on ADK_COMPILE_%s\n\n", toupperstr(pkgdirp->d_name)); + fprintf(cfg, "depends on ADK_PACKAGE_%s\n\n", pkgname); token = strtok(pkg_choices, " "); while (token != NULL) { - fprintf(cfg, "config ADK_PACKAGE_%s_%s\n", toupperstr(pkgdirp->d_name), - toupperstr(token)); + fprintf(cfg, "config ADK_PACKAGE_%s_%s\n", pkgname, toupperstr(token)); fprintf(cfg, "\tbool "); strncat(hkey, "PKGCD_", 6); |