From: Alon Bar-Lev Date: Sat, 2 Dec 2006 17:23:43 +0000 (+0000) Subject: Hack configure to set dependency based on use flags, closes bug#156424, thanks to... X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0d0287c42c34d268866407a9897cc7f1180a1bfc;p=gentoo.git Hack configure to set dependency based on use flags, closes bug#156424, thanks to Mart Raudsepp for reporting Package-Manager: portage-2.1.1-r2 --- diff --git a/dev-libs/opensc/ChangeLog b/dev-libs/opensc/ChangeLog index 808cdbc7c7ec..bcc8b5ccc5f7 100644 --- a/dev-libs/opensc/ChangeLog +++ b/dev-libs/opensc/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-libs/opensc # Copyright 2000-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/opensc/ChangeLog,v 1.33 2006/10/20 00:30:30 kloeri Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/opensc/ChangeLog,v 1.34 2006/12/02 17:23:42 alonbl Exp $ + +*opensc-0.11.1-r1 (02 Dec 2006) + + 02 Dec 2006; Alon Bar-Lev + +files/opensc-0.11.1-dep.patch, +opensc-0.11.1-r1.ebuild: + Hack configure to set dependency based on use flags, closes bug#156424, + thanks to Mart Raudsepp for reporting 20 Oct 2006; Bryan Østergaard opensc-0.10.1.ebuild: Stable on Alpha. diff --git a/dev-libs/opensc/Manifest b/dev-libs/opensc/Manifest index 4ad7ce771421..a45675720269 100644 --- a/dev-libs/opensc/Manifest +++ b/dev-libs/opensc/Manifest @@ -2,6 +2,10 @@ AUX 0.8.1-64bit.patch 577 RMD160 1f42835fc1118bbcb7382b19bbedd108cf3f7cd4 SHA1 6 MD5 074aae91efbecf981a1e8ed73d5d1681 files/0.8.1-64bit.patch 577 RMD160 1f42835fc1118bbcb7382b19bbedd108cf3f7cd4 files/0.8.1-64bit.patch 577 SHA256 4915dc600a0c932b3b50dfa7ae780448a5b57b6d96ffce3fb4b61de1aca685c4 files/0.8.1-64bit.patch 577 +AUX opensc-0.11.1-dep.patch 5441 RMD160 2dd46dde4728fa0347bd142372d1e21feb8ff6d8 SHA1 88f8370f4ff7f4f89b2061e5c364b0660613e639 SHA256 3106e1b795cc65c581fc9663d12397971c8a0e73334752c15c6c4ed6a3be115b +MD5 a6ec4cbb56dfa3162c7d168183ac9401 files/opensc-0.11.1-dep.patch 5441 +RMD160 2dd46dde4728fa0347bd142372d1e21feb8ff6d8 files/opensc-0.11.1-dep.patch 5441 +SHA256 3106e1b795cc65c581fc9663d12397971c8a0e73334752c15c6c4ed6a3be115b files/opensc-0.11.1-dep.patch 5441 AUX opensc-0.9.4-gcc4.patch 446 RMD160 d9d896adc0d1362d74e3c31bac9194077ae446a8 SHA1 bae7cac27c74890cd7b99480d1eaf09a77a1ac7e SHA256 b22069f42a5d223e4de7a8bc2d5aa8e2110ce7e22b262a59332cd188a0b0a505 MD5 c16f3cf2a3cb31195b173e54f4d2212d files/opensc-0.9.4-gcc4.patch 446 RMD160 d9d896adc0d1362d74e3c31bac9194077ae446a8 files/opensc-0.9.4-gcc4.patch 446 @@ -22,6 +26,10 @@ EBUILD opensc-0.11.0-r2.ebuild 1568 RMD160 c5cfdb519a7f9bebfc095361d73342ecdda0c MD5 9479161ce8aa035ce93e3e0e1d86c4f7 opensc-0.11.0-r2.ebuild 1568 RMD160 c5cfdb519a7f9bebfc095361d73342ecdda0c5c0 opensc-0.11.0-r2.ebuild 1568 SHA256 d888963df9db8b4768b9bf760b5bad1c17014ef0175e4e75a7108d3d9bfe1c50 opensc-0.11.0-r2.ebuild 1568 +EBUILD opensc-0.11.1-r1.ebuild 1697 RMD160 b1a46c8989aac5474fb4d6b0feab07ac03bbfea4 SHA1 d9c8bc6682f4b08daec1cbf30302d5003371e378 SHA256 40f984809b2054046d64ab113e03f57d4250eb720fc8a07fe6a069a0e0123165 +MD5 cc4fa99f09164a0e2bdae4f027ea18d1 opensc-0.11.1-r1.ebuild 1697 +RMD160 b1a46c8989aac5474fb4d6b0feab07ac03bbfea4 opensc-0.11.1-r1.ebuild 1697 +SHA256 40f984809b2054046d64ab113e03f57d4250eb720fc8a07fe6a069a0e0123165 opensc-0.11.1-r1.ebuild 1697 EBUILD opensc-0.11.1.ebuild 1560 RMD160 6b3b5a2eae40353b0eaa44d665606adfb2d62b59 SHA1 60b6558ec2e13bc611746605d49a18d3f4dfe756 SHA256 1cfe23a10cb0989b2cc1360d9c5598e687e05217de1bae59aa24c15d4da9f3b5 MD5 7fab2ccb85c5d7c141c9c69fbc5791db opensc-0.11.1.ebuild 1560 RMD160 6b3b5a2eae40353b0eaa44d665606adfb2d62b59 opensc-0.11.1.ebuild 1560 @@ -30,10 +38,10 @@ EBUILD opensc-0.9.4.ebuild 1601 RMD160 b627a8e28d8d79aaedc28423c977a84b4986d548 MD5 ee098da16bebb2cdb28490b35e1fd288 opensc-0.9.4.ebuild 1601 RMD160 b627a8e28d8d79aaedc28423c977a84b4986d548 opensc-0.9.4.ebuild 1601 SHA256 68ebc5ae39f2975a2cb0999cb3993b0b279d8713fb41c69975e31b55ab3cdcdd opensc-0.9.4.ebuild 1601 -MISC ChangeLog 5055 RMD160 4f072950fa3e347d4d9a6abc4ef088d0744fb4ec SHA1 1316e394ab78e4002bd8228079fe055d32c8b3ea SHA256 2a303dacf2ba23c2d1c749f08e635d23fdbe53751fe49e87b7898ef4dff8628b -MD5 db97531275142017b265a7f08e908565 ChangeLog 5055 -RMD160 4f072950fa3e347d4d9a6abc4ef088d0744fb4ec ChangeLog 5055 -SHA256 2a303dacf2ba23c2d1c749f08e635d23fdbe53751fe49e87b7898ef4dff8628b ChangeLog 5055 +MISC ChangeLog 5311 RMD160 8a931ae6d5a4ceb008ef8aefcf67499a037a0680 SHA1 2ab7ed6c52ee6248fc41c046aad969d6de317f08 SHA256 e249b127420fe05a9864306948269a5cc81f9e769859248f329773b2a15e5f69 +MD5 7e2143ed415abf0aedd1080e5fdff751 ChangeLog 5311 +RMD160 8a931ae6d5a4ceb008ef8aefcf67499a037a0680 ChangeLog 5311 +SHA256 e249b127420fe05a9864306948269a5cc81f9e769859248f329773b2a15e5f69 ChangeLog 5311 MISC metadata.xml 663 RMD160 004493a490c8ef2ab6add0f20d1bca1257fbc9d5 SHA1 a81f8c6081816041b96a8dc97f8ef7933c8a5c1d SHA256 d1372ebc4a755688717f980bdc3bf23710bde20b7faf7a9e4a59c128569e41a9 MD5 286a92520aa59a11916aacd680088270 metadata.xml 663 RMD160 004493a490c8ef2ab6add0f20d1bca1257fbc9d5 metadata.xml 663 @@ -50,6 +58,9 @@ SHA256 1dbdb63efdfb4dfb3d9af627947c8b7e7a6bdae4cf65b9bcd58be2bf8850d7c7 files/di MD5 92e02a5d898a6dd244bf8c008c67c641 files/digest-opensc-0.11.1 244 RMD160 b19a590de424c598c2023acd65e85ee1bbac77c3 files/digest-opensc-0.11.1 244 SHA256 02dd51642188023a7d6c887052b0cf7fcecc403f1da20bd7bfa55aa2a339341c files/digest-opensc-0.11.1 244 +MD5 92e02a5d898a6dd244bf8c008c67c641 files/digest-opensc-0.11.1-r1 244 +RMD160 b19a590de424c598c2023acd65e85ee1bbac77c3 files/digest-opensc-0.11.1-r1 244 +SHA256 02dd51642188023a7d6c887052b0cf7fcecc403f1da20bd7bfa55aa2a339341c files/digest-opensc-0.11.1-r1 244 MD5 8e0199b4b4e82375b4b984dfa4a81268 files/digest-opensc-0.9.4 241 RMD160 1719b875cef69d9d4d235ed5584d7d0da7ddfe7f files/digest-opensc-0.9.4 241 SHA256 7c9bb81f6520dbb1496112be99287208a9ecf82b338fbfd0957d6680032551f6 files/digest-opensc-0.9.4 241 diff --git a/dev-libs/opensc/files/digest-opensc-0.11.1-r1 b/dev-libs/opensc/files/digest-opensc-0.11.1-r1 new file mode 100644 index 000000000000..652ec44c29a9 --- /dev/null +++ b/dev-libs/opensc/files/digest-opensc-0.11.1-r1 @@ -0,0 +1,3 @@ +MD5 94ce00a6bda38fac10ab06f5d5d1a8c3 opensc-0.11.1.tar.gz 1263611 +RMD160 f4d78936b2684f2eec94ec5d300841dea4234e91 opensc-0.11.1.tar.gz 1263611 +SHA256 6c2285b6a838903e2da9d72e997d4f3f5a59c7a31d47c98f864b350b116d365c opensc-0.11.1.tar.gz 1263611 diff --git a/dev-libs/opensc/files/opensc-0.11.1-dep.patch b/dev-libs/opensc/files/opensc-0.11.1-dep.patch new file mode 100644 index 000000000000..3a73a53935ce --- /dev/null +++ b/dev-libs/opensc/files/opensc-0.11.1-dep.patch @@ -0,0 +1,190 @@ +--- opensc-0.11.1.org/configure.in 2006-05-31 00:04:47.000000000 +0300 ++++ opensc-0.11.1/configure.in 2006-12-02 19:10:35.000000000 +0200 +@@ -25,6 +25,7 @@ AC_SUBST(OPENSC_LT_AGE) + + AC_CANONICAL_HOST + AC_PROG_CC ++PKG_PROG_PKG_CONFIG + AC_C_BIGENDIAN + + dnl Check for some target-specific stuff +@@ -59,6 +60,17 @@ case "$host" in + ;; + esac + ++dnl Enable/disable openct ++AC_ARG_ENABLE(openct, ++ AC_HELP_STRING([--disable-openct], [disable openct linkage. [[default=no]]]), ++ [ENABLE_OPENCT="${enableval}"], ++ [ENABLE_OPENCT="yes"]) ++dnl Enable/disable pcsc ++AC_ARG_ENABLE(pcsc-lite, ++ AC_HELP_STRING([--disable-pcsc-lite], [disable pcsc-lite linkage. [[default=no]]]), ++ [ENABLE_PCSC_LITE="${enableval}"], ++ [ENABLE_PCSC_LITE="yes"]) ++ + dnl Options + AM_MAINTAINER_MODE + +@@ -194,14 +206,17 @@ AC_CHECK_HEADER([ltdl.h], [AC_MSG_RESULT + [ AC_MSG_ERROR([ltdl.h not found, please install libltdl and/or libtool]) ]) + LIBS="$saved_LIBS" + +-PKG_CHECK_MODULES(OPENCT, [libopenct], [ +- OPENCT_MSG=yes +- AC_DEFINE(HAVE_OPENCT, 1, [Have OpenCT libraries and header files]) +- ], [ +- OPENCT_MSG=no +- ]) +-AC_SUBST(OPENCT_CFLAGS) +-AC_SUBST(OPENCT_LIBS) ++OPENCT_MSG=no ++if test "x${ENABLE_OPENCT}" = "xyes"; then ++ PKG_CHECK_MODULES(OPENCT, [libopenct], [ ++ OPENCT_MSG=yes ++ AC_DEFINE(HAVE_OPENCT, 1, [Have OpenCT libraries and header files]) ++ ], [ ++ OPENCT_MSG=no ++ ]) ++ AC_SUBST(OPENCT_CFLAGS) ++ AC_SUBST(OPENCT_LIBS) ++fi + + AM_CONDITIONAL(HAVE_OPENCT, test "x$OPENCT_MSG" = "xyes") + +@@ -216,72 +231,75 @@ AC_SUBST(OPENSSL_LIBS) + + AM_CONDITIONAL(HAVE_OPENSSL, test "x$OPENSSL_MSG" = "xyes") + +-PKG_CHECK_MODULES(PCSC, [libpcsclite], [ +- PCSC_MSG=yes +- AC_DEFINE(HAVE_PCSC, 1, [Have PC/SC implementation]) +- ], [ +- PCSC_MSG=no +- ]) +-AC_SUBST(PCSC_CFLAGS) +-AC_SUBST(PCSC_LIBS) +- +-case "$host" in +-*-*-darwin*) +- if test -z "$PCSC_LIBS" -a -z "$PCSC_LIBS" +- then ++PCSC_MSG=no ++if test "x${ENABLE_PCSC_LITE}" = "xyes"; then ++ PKG_CHECK_MODULES(PCSC, [libpcsclite], [ + PCSC_MSG=yes +- PCSC_CFLAGS="" +- PCSC_LIBS="-Wl,-framework,PCSC" ++ AC_DEFINE(HAVE_PCSC, 1, [Have PC/SC implementation]) ++ ], [ ++ PCSC_MSG=no ++ ]) ++ AC_SUBST(PCSC_CFLAGS) ++ AC_SUBST(PCSC_LIBS) ++ ++ case "$host" in ++ *-*-darwin*) ++ if test -z "$PCSC_LIBS" -a -z "$PCSC_LIBS" ++ then ++ PCSC_MSG=yes ++ PCSC_CFLAGS="" ++ PCSC_LIBS="-Wl,-framework,PCSC" ++ ++ # overwrite autoconf cached variables, too. ++ ac_env_PCSC_CFLAGS_set=${PCSC_CFLAGS+set} ++ ac_env_PCSC_CFLAGS_value=$PCSC_CFLAGS ++ ac_cv_env_PCSC_CFLAGS_set=${PCSC_CFLAGS+set} ++ ac_cv_env_PCSC_CFLAGS_value=$PCSC_CFLAGS ++ ac_env_PCSC_LIBS_set=${PCSC_LIBS+set} ++ ac_env_PCSC_LIBS_value=$PCSC_LIBS ++ ac_cv_env_PCSC_LIBS_set=${PCSC_LIBS+set} ++ ac_cv_env_PCSC_LIBS_value=$PCSC_LIBS ++ ++ # header files are included via PCSC/* ++ AC_DEFINE(PCSC_INCLUDES_IN_PCSC, 1, [Header files in PCSC subdirectory]) ++ AC_DEFINE(HAVE_PCSC, 1 , [Have PC/SC implementation]) ++ fi ++ ;; ++ esac + +- # overwrite autoconf cached variables, too. +- ac_env_PCSC_CFLAGS_set=${PCSC_CFLAGS+set} +- ac_env_PCSC_CFLAGS_value=$PCSC_CFLAGS +- ac_cv_env_PCSC_CFLAGS_set=${PCSC_CFLAGS+set} +- ac_cv_env_PCSC_CFLAGS_value=$PCSC_CFLAGS +- ac_env_PCSC_LIBS_set=${PCSC_LIBS+set} +- ac_env_PCSC_LIBS_value=$PCSC_LIBS +- ac_cv_env_PCSC_LIBS_set=${PCSC_LIBS+set} +- ac_cv_env_PCSC_LIBS_value=$PCSC_LIBS +- +- # header files are included via PCSC/* +- AC_DEFINE(PCSC_INCLUDES_IN_PCSC, 1, [Header files in PCSC subdirectory]) +- AC_DEFINE(HAVE_PCSC, 1 , [Have PC/SC implementation]) ++ saved_LIBS="$LIBS" ++ saved_CFLAGS="$CFLAGS" ++ if test "x$PCSC_MSG" = "xyes"; then ++ CFLAGS="${PCSC_CFLAGS} $saved_CFLAGS" ++ LIBS="$PCSC_LIBS $saved_LIBS" ++ AC_TRY_LINK([ ++ #include ++ #ifdef PCSC_INCLUDES_IN_PCSC ++ #include ++ #include ++ #else ++ #include ++ #endif ++ ], [ ++ SCardControl(NULL, NULL, 0, NULL, NULL); ++ ], [ ++ AC_DEFINE(HAVE_PCSC_OLD, 1, [old version of pc/sc-lite]) ++ ]) + fi +- ;; +-esac +- +-AM_CONDITIONAL(HAVE_PCSC, test "x$PCSC_MSG" = "xyes") ++ LIBS="$saved_LIBS" ++ CFLAGS="$saved_CFLAGS" + +-saved_LIBS="$LIBS" +-saved_CFLAGS="$CFLAGS" +-if test "x$PCSC_MSG" = "xyes"; then +- CFLAGS="${PCSC_CFLAGS} $saved_CFLAGS" +- LIBS="$PCSC_LIBS $saved_LIBS" +- AC_TRY_LINK([ +-#include +-#ifdef PCSC_INCLUDES_IN_PCSC +-#include +-#include +-#else +-#include +-#endif +- ], [ +-SCardControl(NULL, NULL, 0, NULL, NULL); +- ], [ +- AC_DEFINE(HAVE_PCSC_OLD, 1, [old version of pc/sc-lite]) +- ]) ++ # check for reader.h ++ saved_CFLAGS="$CFLAGS" ++ CFLAGS="$CFLAGS $PCSC_CFLAGS" ++ AC_CHECK_HEADER(reader.h, ++ [AC_DEFINE([HAVE_READER_H], 1, [Define if pcsc-lite with reader.h exists])], ++ [AC_MSG_WARN([reader.h not found, install pcsc-lite 1.2.9-beta8 or later, or use PCSC_CFLAGS=... ./configure])], ++ [ #include ]) ++ CFLAGS="$saved_CFLAGS" + fi +-LIBS="$saved_LIBS" +-CFLAGS="$saved_CFLAGS" + +-# check for reader.h +-saved_CFLAGS="$CFLAGS" +-CFLAGS="$CFLAGS $PCSC_CFLAGS" +-AC_CHECK_HEADER(reader.h, +- [AC_DEFINE([HAVE_READER_H], 1, [Define if pcsc-lite with reader.h exists])], +- [AC_MSG_WARN([reader.h not found, install pcsc-lite 1.2.9-beta8 or later, or use PCSC_CFLAGS=... ./configure])], +- [ #include ]) +-CFLAGS="$saved_CFLAGS" ++AM_CONDITIONAL(HAVE_PCSC, test "x$PCSC_MSG" = "xyes") + + dnl AM_PATH_LIBASSUAN([MINIMUM-VERSION, + dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) diff --git a/dev-libs/opensc/opensc-0.11.1-r1.ebuild b/dev-libs/opensc/opensc-0.11.1-r1.ebuild new file mode 100644 index 000000000000..d5a2c4053368 --- /dev/null +++ b/dev-libs/opensc/opensc-0.11.1-r1.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/opensc/opensc-0.11.1-r1.ebuild,v 1.1 2006/12/02 17:23:42 alonbl Exp $ + +inherit eutils libtool autotools + +DESCRIPTION="SmartCard library and applications" +HOMEPAGE="http://www.opensc-project.org/opensc/" +SRC_URI="http://www.opensc-project.org/files/opensc/${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="pcsc-lite openct" + +RDEPEND="dev-libs/openssl + sys-libs/zlib + openct? ( >=dev-libs/openct-0.5.0 ) + pcsc-lite? ( >=sys-apps/pcsc-lite-1.3.0 )" +DEPEND="${RDEPEND} + dev-util/pkgconfig" + +src_unpack() { + unpack ${A} + cd "${S}" + + EPATCH_SINGLE_MSG="Applying libtool reverse deps patch ..." \ + epatch ${ELT_PATCH_DIR}/fix-relink/1.5.0 + + epatch "${FILESDIR}/${P}-dep.patch" + + AT_M4DIR="aclocal" eautoreconf +} + +src_compile() { + # --without-plugin-dir generates a /no directory + econf \ + --with-plugin-dir=/usr/lib/mozilla/plugins \ + $(use_enable openct) \ + $(use_enable pcsc-lite) \ + || die + + emake -j1 || die +} + +src_install() { + make install DESTDIR="${D}" || die + + dodoc NEWS README + dohtml doc/*.{html,css} + + insinto /etc + doins etc/opensc.conf +} + +pkg_postinst() { + ewarn "If you are upgrading from < opensc-0.10.0, be advised" + ewarn "that some functionality that was previously provided" + ewarn "by opensc is now packaged separately." + ewarn "check out sys-auth/pam_pkcs11, sys-auth/pam_p11 and" + ewarn "dev-libs/engine_pkcs11 since you might need them." + ewarn "Also in case of an upgrade please remember to run" + ewarn "revdep-rebuild due to ABI breakage." +}