Bug 58338 - [PATCH] security/nettle: Added Shared library support.
Summary: [PATCH] security/nettle: Added Shared library support.
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Sergei Kolobov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-21 17:30 UTC by Xavier Beaudouin
Modified: 2003-10-29 21:42 UTC (History)
1 user (show)

See Also:


Attachments
nettle-1.7.patch (903 bytes, patch)
2003-10-21 17:30 UTC, Xavier Beaudouin
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Xavier Beaudouin 2003-10-21 17:30:15 UTC
Added shared library support mostly for Pike 7.5 crypto toolkit.

Port maintainer (jim@corebsd.or.id) is cc'd.

Generated with FreeBSD Port Tools 0.26
Comment 1 Sergei Kolobov freebsd_committer freebsd_triage 2003-10-24 11:32:15 UTC
Responsible Changed
From-To: freebsd-ports-bugs->sergei

I'll handle it.
Comment 2 Sergei Kolobov freebsd_committer freebsd_triage 2003-10-24 11:41:39 UTC
I have made some additional changes to Xavier's PR:
- Install libnettle.so.1 as opposed to libnettle.so.1.0
- Utilize INFO
- Install documentation and examples

Please review the following patch:
(Xavier, please test this with Pike, if possible)

Index: Makefile
===================================================================
RCS file: /FreeBSD/cvs/ports/security/nettle/Makefile,v
retrieving revision 1.10
diff -u -r1.10 Makefile
--- Makefile	1 Sep 2003 18:45:41 -0000	1.10
+++ Makefile	24 Oct 2003 10:20:50 -0000
@@ -20,12 +20,25 @@
 USE_GMAKE=	yes
 USE_OPENSSL=	yes
 GNU_CONFIGURE=	yes
+CONFIGURE_ENV=	CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" 
 CONFIGURE_TARGET=	--build=${ARCH}-portbld-freebsd${OSREL}
-CONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/include" \
-		MAKEINFO="makeinfo --no-split"
+CONFIGURE_ARGS=	--enable-shared
 LDFLAGS+=	-L${LOCALBASE}/lib
+INSTALLS_SHLIB=	yes
+
+DOCS=		NEWS README TODO nettle.html
+EXAMPLES=	examples/README examples/*.c examples/*.h
+INFO=		nettle
 
 post-extract:
 	@${RM} -f ${WRKSRC}/nettle.info*
+
+post-install:
+	@${MKDIR} ${EXAMPLESDIR}
+	cd ${WRKSRC} && ${INSTALL_DATA} ${EXAMPLES} ${EXAMPLESDIR}
+.if !defined(NOPORTDOCS)
+	@${MKDIR} ${DOCSDIR}
+	cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR}
+.endif
 
 .include <bsd.port.mk>
Index: pkg-plist
===================================================================
RCS file: /FreeBSD/cvs/ports/security/nettle/pkg-plist,v
retrieving revision 1.4
diff -u -r1.4 pkg-plist
--- pkg-plist	8 May 2003 05:00:10 -0000	1.4
+++ pkg-plist	24 Oct 2003 10:31:31 -0000
@@ -24,8 +24,21 @@
 include/nettle/sha.h
 include/nettle/twofish.h
 include/nettle/yarrow.h
-@unexec install-info --delete %D/info/nettle.info %D/info/dir
-info/nettle.info
-@exec install-info %D/info/nettle.info %D/info/dir
-lib/libnettle.a
 @dirrm include/nettle
+lib/libnettle.a
+lib/libnettle.so.1
+lib/libnettle.so
+%%PORTDOCS%%%%DOCSDIR%%/NEWS
+%%PORTDOCS%%%%DOCSDIR%%/README
+%%PORTDOCS%%%%DOCSDIR%%/TODO
+%%PORTDOCS%%%%DOCSDIR%%/nettle.html
+%%PORTDOCS%%@dirrm %%DOCSDIR%%
+%%EXAMPLESDIR%%/README
+%%EXAMPLESDIR%%/io.c
+%%EXAMPLESDIR%%/nettle-benchmark.c
+%%EXAMPLESDIR%%/nettle-openssl.c
+%%EXAMPLESDIR%%/rsa-keygen.c
+%%EXAMPLESDIR%%/rsa-sign.c
+%%EXAMPLESDIR%%/rsa-verify.c
+%%EXAMPLESDIR%%/io.h
+@dirrm %%EXAMPLESDIR%%
Index: files/patch-Makefile.in
===================================================================
RCS file: files/patch-Makefile.in
diff -N files/patch-Makefile.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-Makefile.in	24 Oct 2003 10:29:25 -0000
@@ -0,0 +1,10 @@
+--- Makefile.in.orig	Fri Oct 24 14:28:03 2003
++++ Makefile.in	Fri Oct 24 14:29:11 2003
+@@ -1067,7 +1067,6 @@ $(SHLIBFORLINK): $(SHLIBOBJECTS)
+ install-shared: $(SHLIBFORLINK)
+ 	$(INSTALL_DATA) $(SHLIBFORLINK) $(DESTDIR)$(libdir)/$(SHLIBFILE)
+ 	(cd $(DESTDIR)$(libdir) \
+-		&& ln -sf $(SHLIBFILE) $(SHLIBSONAME) \
+ 		&& ln -sf $(SHLIBFILE) $(SHLIBFORLINK) )
+ 
+ %.html : %.texinfo
Index: files/patch-configure
===================================================================
RCS file: files/patch-configure
diff -N files/patch-configure
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-configure	24 Oct 2003 10:29:25 -0000
@@ -0,0 +1,11 @@
+--- configure.orig	Fri Oct 24 14:27:53 2003
++++ configure	Fri Oct 24 14:28:43 2003
+@@ -3160,7 +3160,7 @@ fi
+ SHLIBCFLAGS="-fpic"
+ SHLIBFORLINK=libnettle.so
+ SHLIBSONAME='$(SHLIBFORLINK).$(SHLIBMAJOR)'
+-SHLIBFILE='$(SHLIBSONAME).$(SHLIBMINOR)'
++SHLIBFILE='$(SHLIBSONAME)'
+ SHLIBLINK='$(CC) $(LDFLAGS) -shared -Wl,-soname=$(SHLIBSONAME)'
+ 
+ echo "enable_shared: $enable_shared"
Comment 3 Sergei Kolobov freebsd_committer freebsd_triage 2003-10-24 11:54:00 UTC
State Changed
From-To: open->feedback

Waiting for maintainer feedback.
Comment 4 Sergei Kolobov freebsd_committer freebsd_triage 2003-10-29 21:41:47 UTC
State Changed
From-To: feedback->closed

Committed (with modifications), thanks!