summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2010-07-20 10:57:22 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2010-07-20 10:57:22 +0200
commitbc5ad557b704093747089bb5bcd2080938bb9918 (patch)
treecc28a17d6e5c64e47b0a45596f6943f2314b09de
parent550d6fcb12647b11e947ed909d5a4f31361f8692 (diff)
create a subpackage flavour for elliptic curves
-rw-r--r--package/openssl/Makefile12
-rw-r--r--package/pkgmaker24
2 files changed, 24 insertions, 12 deletions
diff --git a/package/openssl/Makefile b/package/openssl/Makefile
index 43b860369..0ab3c2e7f 100644
--- a/package/openssl/Makefile
+++ b/package/openssl/Makefile
@@ -21,6 +21,10 @@ PKG_DESCR_DEV:= development files for openssl
PKG_SECTION_DEV:= devel
PKG_DEPENDS_DEV:= libopenssl
+PKG_FLAVOURS:= WITH_EC
+PKGFD_WITH_EC:= enable Elliptic Curve crypto
+PKGSUB_WITH_EC:= libopenssl
+
include ${TOPDIR}/mk/package.mk
$(eval $(call PKG_template,LIBOPENSSL,libopenssl,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
@@ -37,13 +41,17 @@ BUILD_STYLE:= manual
INSTALL_TARGET:= install_sw
FAKE_FLAGS+= INSTALL_PREFIX=${WRKINST}
-OPENSSL_OPTIONS = shared no-ec 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
+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),)
+OPENSSL_OPTIONS+= no-ec
+endif
do-configure:
(cd $(WRKBUILD); \
PATH=$(TARGET_PATH) \
OPTIMIZATION_FLAGS="$(TARGET_CFLAGS) -fPIC" \
- bash -x ./Configure linux-embedded \
+ ./Configure linux-embedded \
--prefix=/usr \
--openssldir=/etc/ssl \
-I$(STAGING_DIR)/usr/include \
diff --git a/package/pkgmaker b/package/pkgmaker
index 34bd129e6..e391c680b 100644
--- a/package/pkgmaker
+++ b/package/pkgmaker
@@ -72,10 +72,12 @@ for dn in */Makefile; do
PKGDESC_\${x} PKGDEPS_\${x} PKGDFLT_\${x} PKGSECT_\${x} CFLINE_\${x}) \
\$(foreach x,\${PKG_FLAVOURS},PKGFD_\${x}) \
\$(foreach x,\${PKG_FLAVOURS},PKGFS_\${x}) \
+ \$(foreach x,\${PKG_FLAVOURS},PKGSUB_\${x}) \
\$(foreach x,\${PKG_CHOICES},PKGCD_\${x}) \
\$(foreach x,\${PKG_CHOICES},PKGCS_\${x}) \
PKG_HOST_DEPENDS PKG_TARGET_DEPENDS")
+
# dnu: directory name, uppercase, y/-+/_X/
typeset -u dnu=${dn//-/_}
dnu=${dnu//+/X}
@@ -282,23 +284,25 @@ EOF
endchoice
EOF
-
# Handle flavours (per directory)
for pfcu in $PKG_FLAVOURS; do # pfcu: pkg flavour conf opt.
+ fh=4
eval pfd=\$PKGFD_$pfcu # pfd: pkg flavour description
eval pfs=\$PKGFS_$pfcu # pfs: pkg flavour dependencies
- print
- print config ADK_PACKAGE_${dnu}_$pfcu
- print "\tbool \"${pfd:-$PKG_NAME -> flavour $pfcu}\""
- print \\tdefault n
- print \\tdepends on ADK_COMPILE_$dnu
+ eval sub=\$PKGSUB_$pfcu # sub: add to subpackage
+ [[ -n ${sub} ]] && exec 5>>../pkgconfigs.d/$dn/Config.in.$sub && fh=5
+ print -u$fh
+ print -u$fh config ADK_PACKAGE_${dnu}_$pfcu
+ print -u$fh "\tbool \"${pfd:-$PKG_NAME -> flavour $pfcu}\""
+ print -u$fh \\tdefault n
+ print -u$fh \\tdepends on ADK_COMPILE_$dnu
for pfso in $pfs; do
typeset -u pfso=${pfso#!}
- print \\tselect ADK_PACKAGE_${pfso}
+ print -u$fh \\tselect ADK_PACKAGE_${pfso}
done
- print \\thelp
- print "\t flavour ADK_PACKAGE_${dnu}_$pfcu for $PKG_NAME"
- done >&4
+ print -u$fh \\thelp
+ print -u$fh "\t flavour ADK_PACKAGE_${dnu}_$pfcu for $PKG_NAME"
+ done
cd ..
done