summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2010-12-01 03:25:12 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2010-12-01 03:25:12 +0000
commit61894726a0d5640da121e447445e00dd1c050c84 (patch)
tree882330df6fc512e372ab535b2ef88019eb62a5f8 /dev-libs
parentFix recv call (bug #336755), add some more includes. Use make command line va... (diff)
downloadhistorical-61894726a0d5640da121e447445e00dd1c050c84.tar.gz
historical-61894726a0d5640da121e447445e00dd1c050c84.tar.bz2
historical-61894726a0d5640da121e447445e00dd1c050c84.zip
Version bump, rewrite ebuild to actually make sense and work, with the help of the one to be found in chromiumos-overlay. Many thanks to Nathan Williams and Chris Masone for their fixes and the patches. Drop all the previous ebuilds and the previous init script as they are totally broken by design.
Package-Manager: portage-2.2.0_alpha6/cvs/Linux x86_64
Diffstat (limited to 'dev-libs')
-rw-r--r--dev-libs/opencryptoki/ChangeLog18
-rw-r--r--dev-libs/opencryptoki/Manifest26
-rw-r--r--dev-libs/opencryptoki/files/opencryptoki-2.2.8-remove_openlog.patch10
-rw-r--r--dev-libs/opencryptoki/files/opencryptoki-2.2.8-remove_recursive_chmod.patch28
-rw-r--r--dev-libs/opencryptoki/files/opencryptoki-2.2.8-steal_shmem.patch28
-rw-r--r--dev-libs/opencryptoki/files/opencryptoki-2.3.2-build.patch24
-rwxr-xr-xdev-libs/opencryptoki/files/pkcsslotd.init27
-rw-r--r--dev-libs/opencryptoki/files/pkcsslotd.init.227
-rw-r--r--dev-libs/opencryptoki/metadata.xml13
-rw-r--r--dev-libs/opencryptoki/opencryptoki-2.2.4.1.ebuild60
-rw-r--r--dev-libs/opencryptoki/opencryptoki-2.2.8.ebuild53
-rw-r--r--dev-libs/opencryptoki/opencryptoki-2.3.2.ebuild80
12 files changed, 238 insertions, 156 deletions
diff --git a/dev-libs/opencryptoki/ChangeLog b/dev-libs/opencryptoki/ChangeLog
index 2c4d1b32afdc..6770a055fa05 100644
--- a/dev-libs/opencryptoki/ChangeLog
+++ b/dev-libs/opencryptoki/ChangeLog
@@ -1,6 +1,20 @@
# ChangeLog for dev-libs/opencryptoki
-# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/opencryptoki/ChangeLog,v 1.7 2009/06/28 10:48:58 arfrever Exp $
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/opencryptoki/ChangeLog,v 1.8 2010/12/01 03:25:11 flameeyes Exp $
+
+*opencryptoki-2.3.2 (01 Dec 2010)
+
+ 01 Dec 2010; Diego E. Pettenò <flameeyes@gentoo.org>
+ -opencryptoki-2.2.4.1.ebuild, -opencryptoki-2.2.8.ebuild,
+ +files/opencryptoki-2.2.8-remove_openlog.patch,
+ +files/opencryptoki-2.2.8-remove_recursive_chmod.patch,
+ +files/opencryptoki-2.2.8-steal_shmem.patch, +opencryptoki-2.3.2.ebuild,
+ +files/opencryptoki-2.3.2-build.patch, +files/pkcsslotd.init.2,
+ -files/pkcsslotd.init, metadata.xml:
+ Version bump, rewrite ebuild to actually make sense and work, with the help
+ of the one to be found in chromiumos-overlay. Many thanks to Nathan Williams
+ and Chris Masone for their fixes and the patches. Drop all the previous
+ ebuilds and the previous init script as they are totally broken by design.
*opencryptoki-2.2.8 (28 Jun 2009)
diff --git a/dev-libs/opencryptoki/Manifest b/dev-libs/opencryptoki/Manifest
index cba0c3a09d71..f8fbbef65666 100644
--- a/dev-libs/opencryptoki/Manifest
+++ b/dev-libs/opencryptoki/Manifest
@@ -1,9 +1,21 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
AUX opencryptoki-2.2.4.1-tpm_util.c.patch 482 RMD160 35c367185c0b02c37a4b507c38373c6eb4bd0aa8 SHA1 2bcfde7b8ca02c57af7903e8cbd65cb45cf5f18a SHA256 1cab3094e34e12ba2418b81d5143abde8f7ebd26b20826e22462e2e1cf603787
-AUX pkcsslotd.init 607 RMD160 2df71e5f00dcedb4f386f6046348e0f0ad840811 SHA1 ab9c7e350ec55077290255c2a8fdf58f49c6a204 SHA256 02da6e1290363e2ef8abfe883e98dd0212a9ed8e406f3c77dd154b1623633553
-DIST opencryptoki-2.2.4.1.tar.bz2 1025518 RMD160 32ee4f642637a83145ba5ebb54b382e6d00f36cf SHA1 a8766f542c419aab0844c15cf76524a0c406f7ce SHA256 ceef11d1c32e08fc34d2becf319dfd163ac89482180dd10c8e0e1795c603899e
-DIST opencryptoki-2.2.8.tar.bz2 639054 RMD160 f600ebe470272f5a1c8b1b31894a458f281b7d5a SHA1 c20e52f19a22cb9695b8298ca11481f3106e3c8d SHA256 f4ec8438c2527a4945dc7b8b9d324f186f4e286772c56a07c8f2b83516de2f22
+AUX opencryptoki-2.2.8-remove_openlog.patch 411 RMD160 a3a0e3397221708c54bf2df0ec551dc3be119971 SHA1 df329c5753664c995fd6c9cc2082014871449985 SHA256 df9a5d7a4005a8cc59f0c90a013dd76d4b195c1e68b28d5ba5eaa9b0f31a938c
+AUX opencryptoki-2.2.8-remove_recursive_chmod.patch 820 RMD160 1d7f294e7a25bf8e7b8b04868224d2d79e7e5eba SHA1 ff0db4c75a0768427dfa96ccbfbe831feb304076 SHA256 fafcb0d0e15ac9b4f7ac29905dd74f688fd72fe9c2b524b34091655ea9309d31
+AUX opencryptoki-2.2.8-steal_shmem.patch 1258 RMD160 8e1c82e7192e9261dffc8ab7a482bd6e23771e47 SHA1 380267d548b027d883e58d057ceb014bdbcffbe9 SHA256 1941537bb5a05b25e3088362bdd5904d3c1b14ebca0b8fe271cfa33bff152080
+AUX opencryptoki-2.3.2-build.patch 1083 RMD160 fdea88f90c5e7128241b8feab35f902c89644d1d SHA1 581e9c071bcd0b6fa312f8b65678f4cee81eebbd SHA256 9f1b95018c7d4fa5d08a74588e2059079b399fb54cb0725924c2529d94fd7cc3
+AUX pkcsslotd.init.2 664 RMD160 fb529e2318d0608b4f71ec4c95eef020dd13dea9 SHA1 4d5a734570c6abb290d73b1d14080508032225e8 SHA256 d2dc2ef60b89b4889f203500d26c5c78857c3ca1477f4377f120d7ffe5844f3e
+DIST opencryptoki-2.3.2.tar.bz2 665134 RMD160 2945879a367b787432189abd74262e60a3b237bb SHA1 c264f0158d516287846000cd1e90830b18ac4e1d SHA256 44fdf74a9eab2586240a69779c5c323e8378e8f2fde21cd4f8bd9186a24c30f7
DIST opencryptoki-tpm_stdll-sw_fallback-June012006.patch.bz2 3199 RMD160 779cdb6c86c1d3b923f2349d4d3f3ff9bf720c54 SHA1 8835c4ed3a55d48d2b45d3867eedbb7d29ef17d9 SHA256 599b4ce1daea201756bbe1a615b74cc40c8a9a635bc1baffa942fe91f5f82f8b
-EBUILD opencryptoki-2.2.4.1.ebuild 1806 RMD160 73e85a68e8f59e5df9d59afb9f94fe1ce6ec6f93 SHA1 0eefe49cecb9e6a8ffe76dfd9dd43bf6ee0b7e07 SHA256 9bd98c286ab4c043d4b1c3729090d50f606d737c95a7e55eb351d5c763a322cb
-EBUILD opencryptoki-2.2.8.ebuild 1524 RMD160 aaf800b6e90b7b646576fa9859f34497a8dc04d4 SHA1 e459552aec36723454ea31487f8bd56f91c30981 SHA256 ba2e042f39170e0e12cdfa1992fb9e4c8fbf2293e906386c1f931c0d53b0e0fb
-MISC ChangeLog 1114 RMD160 d79d7822f52f6b36b11937f6ee56d9c22d41f48e SHA1 5c2a729bf371fea22fc47ca4bf664500e8dd7071 SHA256 6fdac5fbf9e2f710b9b3acc15d8ff89026b43e0e138250a921da359d01050126
-MISC metadata.xml 317 RMD160 29b2083731f550fd91be45b521793989fef57c07 SHA1 26d8b4e99732dbda127e204d87accc229d334750 SHA256 251d7b21e1b6d4cf93194e69a591ce1cdb910706215c50b411e71ae43a37246a
+EBUILD opencryptoki-2.3.2.ebuild 2278 RMD160 08834412b7980f8972f03802f2d759efcdb92395 SHA1 ad9d3b973749b0453231b4335adbf31dffc9e4d1 SHA256 d3b5043c7bd214fefa19b5f6a62978ce7aa9c026291b665ddf91ad58d823a1ec
+MISC ChangeLog 1863 RMD160 f000c3af6bbb8cf05b8e1d527fc0e3e1ce17b828 SHA1 32f3b1d40b33bda5d573b70f3744e0bf1ffb907f SHA256 d202281dc59b122ab6139ab44302df0dae58e511c4dd6d90251fd558afac9764
+MISC metadata.xml 303 RMD160 c584fb11ce80c614b24f441dee3dc359c032c585 SHA1 72be61c516f86101ea2c6fec4d831a36c9371435 SHA256 6f37596c4a13d63dcbfe0b13494aacf994e803dbdf3190d1545f9fd8b355cead
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.16 (GNU/Linux)
+
+iEYEARECAAYFAkz1v8gACgkQAiZjviIA2Xig5ACfY+1MZJ8uoQpsVWZB4eAx/RFf
+l+IAniU94pkPkLy+Ml5UAA9ezKAow3/X
+=EX87
+-----END PGP SIGNATURE-----
diff --git a/dev-libs/opencryptoki/files/opencryptoki-2.2.8-remove_openlog.patch b/dev-libs/opencryptoki/files/opencryptoki-2.2.8-remove_openlog.patch
new file mode 100644
index 000000000000..199db5a649d9
--- /dev/null
+++ b/dev-libs/opencryptoki/files/opencryptoki-2.2.8-remove_openlog.patch
@@ -0,0 +1,10 @@
+--- opencryptoki-2.2.8.orig/usr/lib/pkcs11/api/apiutil.c 2010-06-04 17:04:48.000000000 -0400
++++ opencryptoki-2.2.8/usr/lib/pkcs11/api/apiutil.c 2010-06-04 17:06:23.000000000 -0400
+@@ -380,7 +380,6 @@
+
+ if (!enabled){
+ enabled=1;
+- openlog("openCryptokiModule",LOG_PID|LOG_NDELAY,LOG_DAEMON);
+ setlogmask(LOG_UPTO(LOG_DEBUG));
+ logit(LOG_DEBUG,"Logging enabled %d enabled",enabled);
+ }
diff --git a/dev-libs/opencryptoki/files/opencryptoki-2.2.8-remove_recursive_chmod.patch b/dev-libs/opencryptoki/files/opencryptoki-2.2.8-remove_recursive_chmod.patch
new file mode 100644
index 000000000000..c8a22e6bb4bf
--- /dev/null
+++ b/dev-libs/opencryptoki/files/opencryptoki-2.2.8-remove_recursive_chmod.patch
@@ -0,0 +1,28 @@
+Index: opencryptoki-2.3.2/usr/sbin/pkcs_slot/pkcs_slot.in
+===================================================================
+--- opencryptoki-2.3.2.orig/usr/sbin/pkcs_slot/pkcs_slot.in
++++ opencryptoki-2.3.2/usr/sbin/pkcs_slot/pkcs_slot.in
+@@ -356,12 +356,14 @@ fi
+ DEVICE=$1
+ DEPTH=$2
+
++# Ensure that any directories created are group-accessible
++umask 002
++
+ # Check for the existance of the directories
+ if [ ! -d @localstatedir@/lib/opencryptoki ]
+ then
+ @MKDIR_P@ @localstatedir@/lib/opencryptoki
+ @CHGRP@ pkcs11 @localstatedir@/lib/opencryptoki
+- @CHMOD@ -R g+rwX @localstatedir@/lib/opencryptoki
+ fi
+
+
+@@ -502,7 +504,6 @@ then
+ echo "TRUE|0|$SLOT_DESCRIPTION|$MANUFACTURER|TRUE|FALSE|TRUE|0|0|1|1|NONE|$CCA_DLL_FN|$CCA_INIT" >>$CFGFILE
+ fi
+
+-@CHMOD@ -R g+wrX @localstatedir@/lib/opencryptoki
+
+
+
diff --git a/dev-libs/opencryptoki/files/opencryptoki-2.2.8-steal_shmem.patch b/dev-libs/opencryptoki/files/opencryptoki-2.2.8-steal_shmem.patch
new file mode 100644
index 000000000000..45e1e7104411
--- /dev/null
+++ b/dev-libs/opencryptoki/files/opencryptoki-2.2.8-steal_shmem.patch
@@ -0,0 +1,28 @@
+diff -Naur opencryptoki-2.2.8.orig/usr/sbin/pkcsslotd/shmem.c opencryptoki-2.2.8/usr/sbin/pkcsslotd/shmem.c
+--- opencryptoki-2.2.8.orig/usr/sbin/pkcsslotd/shmem.c 2010-06-02 09:18:27.000000000 -0700
++++ opencryptoki-2.2.8/usr/sbin/pkcsslotd/shmem.c 2010-06-02 11:41:31.000000000 -0700
+@@ -374,10 +374,20 @@
+
+
+ if ( shmid < 0 ) {
+- ErrLog(SLOTD_MSG(SHMEMCR,
+- "Shared memory creation failed (0x%X)\n"), errno);
+- ErrLog(SLOTD_MSG(IPCRM, "perform ipcrm -M 0x%X\n"), tok);
+- return FALSE;
++ ErrLog(SLOTD_MSG(SHMEMCR,
++ "Shared memory creation failed (0x%X)\n"), errno);
++ ErrLog(SLOTD_MSG(SHMEMCR, "Reclaiming 0x%X\n"), tok);
++ shmid = shmget( tok, sizeof( Slot_Mgr_Shr_t ), 0 );
++ DestroySharedMemory();
++ shmid = shmget( tok, sizeof( Slot_Mgr_Shr_t ),
++ IPC_CREAT | IPC_EXCL | S_IRUSR |
++ S_IRGRP | S_IWUSR | S_IWGRP );
++ if ( shmid < 0 ) {
++ ErrLog(SLOTD_MSG(SHMEMCR,
++ "Shared memory reclamation failed (0x%X)\n"), errno);
++ ErrLog(SLOTD_MSG(IPCRM, "perform ipcrm -M 0x%X\n"), tok);
++ return FALSE;
++ }
+ }
+
+ // SAB Set the group ownership of the shared mem segment..
diff --git a/dev-libs/opencryptoki/files/opencryptoki-2.3.2-build.patch b/dev-libs/opencryptoki/files/opencryptoki-2.3.2-build.patch
new file mode 100644
index 000000000000..c54a02157bf3
--- /dev/null
+++ b/dev-libs/opencryptoki/files/opencryptoki-2.3.2-build.patch
@@ -0,0 +1,24 @@
+Index: opencryptoki-2.3.2/usr/lib/pkcs11/api/Makefile.am
+===================================================================
+--- opencryptoki-2.3.2.orig/usr/lib/pkcs11/api/Makefile.am
++++ opencryptoki-2.3.2/usr/lib/pkcs11/api/Makefile.am
+@@ -15,17 +15,17 @@ opencryptoki_libopencryptoki_la_CFLAGS =
+ opencryptoki_libopencryptoki_la_SOURCES = api_interface.c shrd_mem.c apiutil.c
+
+ install-data-hook:
++ $(MKDIR_P) $(DESTDIR)$(libdir)/opencryptoki/stdll
++ $(MKDIR_P) $(DESTDIR)$(libdir)/pkcs11
+ cd $(DESTDIR)$(libdir)/opencryptoki && \
+ ln -sf libopencryptoki.so PKCS11_API.so
+ cd $(DESTDIR)$(libdir)/opencryptoki && \
+ ln -sf $(sbindir) methods
+- $(MKDIR_P) $(DESTDIR)$(libdir)/pkcs11
+ cd $(DESTDIR)$(libdir)/pkcs11 && \
+ ln -sf $(sbindir) methods
+ cd $(DESTDIR)$(libdir)/pkcs11 && \
+ ln -sf ../opencryptoki/libopencryptoki.so PKCS11_API.so
+ cd $(DESTDIR)$(libdir)/pkcs11 && \
+ ln -sf ../opencryptoki/libopencryptoki.so libopencryptoki.so
+- $(MKDIR_P) $(DESTDIR)$(libdir)/opencryptoki/stdll
+ cd $(DESTDIR)$(libdir)/pkcs11 && \
+ ln -sf ../opencryptoki/stdll/ stdll
diff --git a/dev-libs/opencryptoki/files/pkcsslotd.init b/dev-libs/opencryptoki/files/pkcsslotd.init
deleted file mode 100755
index 3bf1c0328df8..000000000000
--- a/dev-libs/opencryptoki/files/pkcsslotd.init
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2006 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-PKCSSLOTDPID="/var/run/pkcsslotd.pid"
-
-depend() {
- need tcsd
-}
-
-start() {
- ebegin "Starting ${SVCNAME}"
-
- # detect available tokens and
- # set up /var/lib/opencryptoki/pk_config_data
- /usr/sbin/pkcs11_startup
-
- start-stop-daemon --start --exec /usr/sbin/pkcsslotd --pidfile "${PKCSSLOTDPID}"
- eend $? "Check your logs to see why startup failed"
-}
-
-stop() {
- ebegin "Stopping ${SVCNAME}"
- start-stop-daemon --stop --exec /usr/sbin/pkcsslotd --pidfile "${PKCSSLOTDPID}"
- eend $?
-}
-
diff --git a/dev-libs/opencryptoki/files/pkcsslotd.init.2 b/dev-libs/opencryptoki/files/pkcsslotd.init.2
new file mode 100644
index 000000000000..148253f26923
--- /dev/null
+++ b/dev-libs/opencryptoki/files/pkcsslotd.init.2
@@ -0,0 +1,27 @@
+#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need localmount
+
+ # Optional services (see ebuild)
+ need tcsd
+}
+
+start() {
+ # detect available tokens and set up
+ # /var/lib/opencryptoki/pk_config_data
+ ebegin "Preparing pkcs configuration"
+ /usr/sbin/pkcs11_startup
+
+ ebegin "Starting pkcsslotd"
+ start-stop-daemon --start --exec /usr/sbin/pkcsslotd --pidfile /var/run/pkcsslotd.pid
+ eend $? "Check your logs to see why startup failed"
+}
+
+stop() {
+ ebegin "Stopping pkcsslotd"
+ start-stop-daemon --stop --exec /usr/sbin/pkcsslotd --pidfile /var/run/pkcsslotd.pid
+ eend $?
+}
diff --git a/dev-libs/opencryptoki/metadata.xml b/dev-libs/opencryptoki/metadata.xml
index 0c0d0f72d683..daee907f52fd 100644
--- a/dev-libs/opencryptoki/metadata.xml
+++ b/dev-libs/opencryptoki/metadata.xml
@@ -1,11 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<herd>crypto</herd>
-<longdescription>
- PKCS#11 provider for IBM cryptographic hardware.
-</longdescription>
-<use>
- <flag name='tpmtok'>Offer support for TPM token</flag>
-</use>
+ <herd>crypto</herd>
+ <use>
+ <flag name='tpm'>
+ Enable support for Trusted Platform Module (TPM) using <pkg>app-crypt/trousers</pkg>
+ </flag>
+ </use>
</pkgmetadata>
diff --git a/dev-libs/opencryptoki/opencryptoki-2.2.4.1.ebuild b/dev-libs/opencryptoki/opencryptoki-2.2.4.1.ebuild
deleted file mode 100644
index c2fa90d10284..000000000000
--- a/dev-libs/opencryptoki/opencryptoki-2.2.4.1.ebuild
+++ /dev/null
@@ -1,60 +0,0 @@
-# Copyright 1999-2007 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/opencryptoki/opencryptoki-2.2.4.1.ebuild,v 1.4 2007/11/11 06:28:29 mr_bones_ Exp $
-
-inherit autotools eutils multilib
-
-DESCRIPTION="PKCS#11 provider for IBM cryptographic hardware"
-HOMEPAGE="http://sourceforge.net/projects/opencryptoki"
-SRC_URI="mirror://sourceforge/opencryptoki/${P}.tar.bz2
- mirror://gentoo/opencryptoki-tpm_stdll-sw_fallback-June012006.patch.bz2"
-LICENSE="CPL-0.5"
-SLOT="0"
-KEYWORDS="~x86"
-IUSE="tpmtok"
-
-RDEPEND=""
-DEPEND="${RDEPEND}"
-
-pkg_setup() {
- enewgroup pkcs11
-}
-
-src_unpack() {
- unpack ${A}
- cd "${S}"
- sed -i '/groupadd/d' usr/lib/pkcs11/api/Makefile.am
- sed -i 's|$(DESTDIR)||' usr/include/pkcs11/Makefile.am
-
- # enable fallback operation mode for imported keys
- # patch written by Kent Yoder
- epatch "${WORKDIR}/opencryptoki-tpm_stdll-sw_fallback-June012006.patch" || die
- epatch "${FILESDIR}/opencryptoki-2.2.4.1-tpm_util.c.patch" || die
- eautoreconf
-}
-
-src_compile() {
- econf $(use_enable tpmtok) || die "econf failed"
- emake || die "emake failed"
-}
-
-src_install() {
- emake install DESTDIR="${D}" || die "emake install failed"
-
- newinitd "${FILESDIR}/pkcsslotd.init" pkcsslotd
-
- # no need for this
- rm -rf "${D}/etc/ld.so.conf.d"
-
- # tpmtoken_* binaries expect to find the libs in /usr/lib/
- dosym opencryptoki/stdll/libpkcs11_sw.so.0.0.0 "/usr/$(get_libdir)/libpkcs11_sw.so"
- dosym opencryptoki/stdll/libpkcs11_tpm.so.0.0.0 "/usr/$(get_libdir)/libpkcs11_tpm.so"
-
- # we have no man pages so at least these should be installed
- dodoc doc/openCryptoki-HOWTO.pdf
- dodoc doc/opencryptoki_man.txt
- dodoc doc/pk_config_data_man.txt
- dodoc doc/pkcs11_startup_man.txt
- dodoc doc/pkcsconf_man.txt
- dodoc doc/pkcsslotd_man.txt
-}
diff --git a/dev-libs/opencryptoki/opencryptoki-2.2.8.ebuild b/dev-libs/opencryptoki/opencryptoki-2.2.8.ebuild
deleted file mode 100644
index 8ce6b68634e5..000000000000
--- a/dev-libs/opencryptoki/opencryptoki-2.2.8.ebuild
+++ /dev/null
@@ -1,53 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/opencryptoki/opencryptoki-2.2.8.ebuild,v 1.1 2009/06/28 10:48:58 arfrever Exp $
-
-EAPI="2"
-
-inherit autotools eutils multilib
-
-DESCRIPTION="PKCS#11 provider for IBM cryptographic hardware"
-HOMEPAGE="http://sourceforge.net/projects/opencryptoki"
-SRC_URI="mirror://sourceforge/opencryptoki/${P}.tar.bz2
- mirror://gentoo/opencryptoki-tpm_stdll-sw_fallback-June012006.patch.bz2"
-LICENSE="CPL-0.5"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="tpmtok"
-
-RDEPEND=""
-DEPEND="${RDEPEND}"
-
-pkg_setup() {
- enewgroup pkcs11
-}
-
-src_prepare() {
- sed -i '/groupadd/d' usr/lib/pkcs11/api/Makefile.am
- sed -i 's|$(DESTDIR)||' usr/include/pkcs11/Makefile.am
-
- # Enable fallback operation mode for imported keys.
- # Patch written by Kent Yoder.
- epatch "${WORKDIR}/opencryptoki-tpm_stdll-sw_fallback-June012006.patch"
- epatch "${FILESDIR}/opencryptoki-2.2.4.1-tpm_util.c.patch"
- eautoreconf
-}
-
-src_configure() {
- econf $(use_enable tpmtok)
-}
-
-src_install() {
- emake install DESTDIR="${D}" || die "emake install failed"
-
- newinitd "${FILESDIR}/pkcsslotd.init" pkcsslotd
-
- # No need for this.
- rm -rf "${D}/etc/ld.so.conf.d"
-
- # tpmtoken_* binaries expect to find the libraries in /usr/lib/.
- dosym opencryptoki/stdll/libpkcs11_sw.so.0.0.0 "/usr/$(get_libdir)/libpkcs11_sw.so"
- dosym opencryptoki/stdll/libpkcs11_tpm.so.0.0.0 "/usr/$(get_libdir)/libpkcs11_tpm.so"
-
- dodoc doc/openCryptoki-HOWTO.pdf
-}
diff --git a/dev-libs/opencryptoki/opencryptoki-2.3.2.ebuild b/dev-libs/opencryptoki/opencryptoki-2.3.2.ebuild
new file mode 100644
index 000000000000..07db4eaadcbe
--- /dev/null
+++ b/dev-libs/opencryptoki/opencryptoki-2.3.2.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/opencryptoki/opencryptoki-2.3.2.ebuild,v 1.1 2010/12/01 03:25:11 flameeyes Exp $
+
+EAPI="2"
+
+inherit autotools eutils multilib
+
+DESCRIPTION="PKCS#11 provider for IBM cryptographic hardware"
+HOMEPAGE="http://sourceforge.net/projects/opencryptoki"
+SRC_URI="mirror://sourceforge/opencryptoki/${P}.tar.bz2
+ mirror://gentoo/opencryptoki-tpm_stdll-sw_fallback-June012006.patch.bz2"
+
+LICENSE="CPL-0.5"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="tpm? ( app-crypt/trousers )
+ dev-libs/openssl"
+DEPEND="${RDEPEND}"
+
+IUSE="+tpm debug"
+
+pkg_setup() {
+ enewgroup pkcs11
+}
+
+src_prepare() {
+ # Enable fallback operation mode for imported keys.
+ # Patch written by Kent Yoder.
+ epatch "${WORKDIR}/opencryptoki-tpm_stdll-sw_fallback-June012006.patch"
+ epatch "${FILESDIR}/opencryptoki-2.2.4.1-tpm_util.c.patch"
+ epatch "${FILESDIR}/opencryptoki-2.2.8-steal_shmem.patch"
+ epatch "${FILESDIR}/opencryptoki-2.2.8-remove_openlog.patch"
+ epatch "${FILESDIR}/opencryptoki-2.2.8-remove_recursive_chmod.patch"
+ epatch "${FILESDIR}/opencryptoki-2.3.2-build.patch"
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --enable-fast-install \
+ --disable-dependency-tracking \
+ $(use_enable debug) \
+ --enable-daemon \
+ --enable-library \
+ --disable-icatok \
+ --enable-swtok \
+ $(use_enable tpm tpmtok) \
+ --disable-icctok \
+ --disable-aeptok \
+ --disable-bcomtok \
+ --disable-crtok \
+ --disable-pkcscca_migrate
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die "emake install failed"
+
+ # We replace their ld.so and init files (mostly designed for RedHat
+ # as far as I can tell) with our own replacements.
+ rm -rf "${D}"/etc/ld.so.conf.d "${D}"/etc/rc.d
+
+ # make sure that we don't modify the init script if the USE flags
+ # are enabled for the needed services.
+ sed -n \
+ $(use tpm || echo '-e /need tcsd/d') \
+ -e 'p' \
+ "${FILESDIR}/pkcsslotd.init.2" \
+ > "${T}"/pkcsslotd.init || die
+
+ newinitd "${T}/pkcsslotd.init" pkcsslotd
+
+ dodir /etc/env.d
+ cat - > "${D}"/etc/env.d/50${PN} <<EOF
+LDPATH=/usr/$(get_libdir)/opencryptoki:/usr/$(get_libdir)/opencryptoki/stdll
+EOF
+
+ dodoc README AUTHORS FAQ TODO doc/openCryptoki-HOWTO.pdf || die
+}