Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 483784 - net-libs/polarssl lacks zlib support and other various fixes
Summary: net-libs/polarssl lacks zlib support and other various fixes
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Thomas Sachau
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 483794
  Show dependency tree
 
Reported: 2013-09-05 19:04 UTC by Julian Ospald
Modified: 2013-10-07 18:34 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
polarssl-1.2.8-r1.ebuild.diff (polarssl-1.2.8-r1.ebuild.diff,3.09 KB, patch)
2013-09-05 20:00 UTC, Julian Ospald
Details | Diff
polarssl-1.2.0-cflags.patch (polarssl-1.2.0-cflags.patch,456 bytes, patch)
2013-09-05 20:00 UTC, Julian Ospald
Details | Diff
polarssl-1.2.8-r1.ebuild.diff (polarssl-1.2.8-r1.ebuild.diff,3.29 KB, patch)
2013-09-05 20:40 UTC, Julian Ospald
Details | Diff
polarssl-1.2.8-r1.ebuild (polarssl-1.2.8-r1.ebuild,2.08 KB, text/plain)
2013-09-05 20:41 UTC, Julian Ospald
Details
polarssl-1.2.8-r1-x509write.patch (polarssl-1.2.8-r1-x509write.patch,599 bytes, patch)
2013-09-05 21:42 UTC, Michael Cook
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Julian Ospald 2013-09-05 19:04:29 UTC
although zlib is supported via "#define POLARSSL_ZLIB_SUPPORT" in include/polarssl/config.h (commented)

and "ifdef ZLIB" in Makefile
Comment 1 Julian Ospald 2013-09-05 20:00:20 UTC
Created attachment 357970 [details, diff]
polarssl-1.2.8-r1.ebuild.diff

* use EAPI=5
* add havege (#483792), static-libs and zlib (#483784) useflags
* remove unneded patch
* respect CFLAGS in linking command (as advised by toolchain team)
* die on all non-portage functions
* remove obsolete dies
* make some variables local
Comment 2 Julian Ospald 2013-09-05 20:00:37 UTC
Created attachment 357972 [details, diff]
polarssl-1.2.0-cflags.patch
Comment 3 Julian Ospald 2013-09-05 20:02:09 UTC
I forgot... I changed the sed from "-DHAVE_SSE2" to "-DPOLARSSL_HAVE_SSE2", because I there is no "HAVE_SSE2" ifdef in the code, check

https://github.com/polarssl/polarssl/blob/e29ab067011b8e79fdd5c16bcb0604587ea6e5de/include/polarssl/config.h#L96
Comment 4 Julian Ospald 2013-09-05 20:05:25 UTC
on the other hand, the CFLAGS magic might be insufficient, because "config.h" is shipped with the headers, so it's probably better so sed the "config.h" file for all useflags
Comment 5 Julian Ospald 2013-09-05 20:40:56 UTC
Created attachment 357978 [details, diff]
polarssl-1.2.8-r1.ebuild.diff

* use EAPI=5
* add havege (#483792), static-libs and zlib (#483784) useflags
* remove unneded patch
* respect CFLAGS in linking command (as advised by toolchain team)
* die on all non-portage functions
* remove obsolete dies
* make some variables local
* fix sse2 useflag
* sed config.h rather than adding CFLAGS since config.h is shipped
Comment 6 Julian Ospald 2013-09-05 20:41:32 UTC
Created attachment 357980 [details]
polarssl-1.2.8-r1.ebuild

plain ebuild
Comment 7 Michael Cook 2013-09-05 21:42:46 UTC
Created attachment 357986 [details, diff]
polarssl-1.2.8-r1-x509write.patch

fix for https://polarssl.org/discussions/bug-report-issues/c-plus-plus-linking-issues-with-x509write-c-vc-plus-plus
Comment 8 Julian Ospald 2013-09-25 13:05:42 UTC
can the maintainer comment on this?
Comment 9 Thomas Sachau gentoo-dev 2013-09-25 14:59:25 UTC
(In reply to Julian Ospald (hasufell) from comment #8)
> can the maintainer comment on this?

Why did you add the OFLAGS variable in the emake options in src_compile?
I also dont see any option to disable static libs and no reasoning, why a static lib should be installed.

The rest should be ok

(In reply to Michael Cook from comment #7)
> Created attachment 357986 [details, diff] [details, diff]
> polarssl-1.2.8-r1-x509write.patch
> 
> fix for
> https://polarssl.org/discussions/bug-report-issues/c-plus-plus-linking-
> issues-with-x509write-c-vc-plus-plus

Any specific reason, why we should do this patch downstream instead of waiting for upstream to include it in a future release?
Comment 10 Julian Ospald 2013-09-25 16:27:41 UTC
(In reply to Thomas Sachau from comment #9)
> (In reply to Julian Ospald (hasufell) from comment #8)
> > can the maintainer comment on this?
> 
> Why did you add the OFLAGS variable in the emake options in src_compile?

Because that is easier than sedding CFLAGS+="-fPIC" into the Makefile.

> I also dont see any option to disable static libs and no reasoning, why a
> static lib should be installed.
> 

to disable static libs you do USE="-static-libs"

If libraries allow building of static libs, then we should provide that as an ebuild option. Gentoo is not just for end users. It doesn't matter if there is no consumer or obvious use case.
Comment 11 Thomas Sachau gentoo-dev 2013-10-07 18:16:24 UTC
ebuild patch applied to 1.3.0
Comment 12 Julian Ospald 2013-10-07 18:34:12 UTC
thanks bro