Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 260324 - provide static libraries for x11-libs/qwt:5
Summary: provide static libraries for x11-libs/qwt:5
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal enhancement with 1 vote (vote)
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-26 00:00 UTC by Thomas Capricelli
Modified: 2013-03-06 12:11 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Capricelli 2009-02-26 00:00:34 UTC
qwt can optionally be compiled statically, but the ebuild neither install them nor provide a way (USE flag?) to have them installed. (correct me if i'm wrong).
Ideally both static and dynamic libs would be provided.

Reproducible: Always
Comment 1 Caleb Tennis (RETIRED) gentoo-dev 2009-03-21 12:05:45 UTC
I believe this is a limitation of the Qt build system.  You can either have dynamic or static, but not both.  We just generally opt for dynamic as a default build condition.
Comment 2 Thomas Capricelli 2009-03-23 02:38:49 UTC
i understand, but could it be possible a to have a USE flag 'static', disabled by default ?
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2010-01-03 20:48:53 UTC
(In reply to comment #2)
> i understand, but could it be possible a to have a USE flag 'static', disabled
> by default ?
> 

The flag would be called 'static-libs' and it would enable/disable the additional static .a(rchives)...
Comment 4 Thomas Capricelli 2010-03-10 04:55:48 UTC
yes, that's what i mean... how difficult would it be ? why isn't there such a flag already ? none of the libraries can be installed as static lib ?
Comment 5 Thomas Capricelli 2010-06-17 23:11:07 UTC
it seems that now, several packages have the static-libs USE flag... It still would be great to have the qwt ebuild support this.
Comment 6 Thomas Capricelli 2010-06-17 23:15:02 UTC
Wow, quite a lot actually! :-)

/usr/portage% grep "IUSE.*static-libs" */*/*ebuild -l | cut -d/ -f1,2 | sort | uniq| wc -l

67
Comment 7 Justin Lecher (RETIRED) gentoo-dev 2013-03-04 18:31:19 UTC
+*qwt-5.2.3 (04 Mar 2013)
+
+  04 Mar 2013; Justin Lecher <jlec@gentoo.org> +qwt-5.2.3.ebuild,
+  -qwt-6.0.1.ebuild, -qwt-6.0.1-r1.ebuild, metadata.xml:
+  Version Bump, #460200; build static libs, #260324
+
Comment 8 Thomas Capricelli 2013-03-04 22:32:44 UTC
Thank you very much. I've just tested it and it works here. With the USE flag, both dynamic/static libs are installed which is just perfect.

It is not currently available for qwt:6, any chance to have it for those recent versions as well ?

Thanks a lot again!
Comment 9 Thomas Capricelli 2013-03-04 22:43:53 UTC
I copied x11-libs/qwt-6.0.2 to x11-libs/qwt-6.0.2-r1 in my local overlay and more or less copied everything related to 'static-bulid' from the qwt:5 ebuild. It seems to work well : it emerged fine and now :

% equery files qwt:6 | grep libqwt
/usr/lib64/libqwt6.a

For reference :

% diff -u /usr/portage/x11-libs/qwt/qwt-6.0.2.ebuild qwt-6.0.2-r1.ebuild 
--- /usr/portage/x11-libs/qwt/qwt-6.0.2.ebuild  2013-03-03 01:01:35.000000000 +0100
+++ qwt-6.0.2-r1.ebuild 2013-03-04 23:35:05.514767637 +0100
@@ -15,7 +15,7 @@
 LICENSE="qwt mathml? ( LGPL-2.1 Nokia-Qt-LGPL-Exception-1.1 )"
 KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos"
 SLOT="6"
-IUSE="doc examples mathml svg"
+IUSE="doc examples static-libs mathml svg"
 
 DEPEND="
        dev-qt/qtgui:4
@@ -78,13 +78,26 @@
 }
 
 src_compile() {
-       # split compilation to allow parallel building
-       emake sub-src
-       emake
+       building() {
+               # split compilation to allow parallel building
+               emake sub-src
+               emake
+       }
+       building
+
+       if use static-libs; then
+               sed "/QwtDll/d" -i qwtconfig.pri || die
+               eqmake4
+               building
+               echo "CONFIG += QwtDll" >> qwtconfig.pri || die
+       fi
 }
 
+
+
 src_install () {
        qt4-r2_src_install
+       use static-libs && dolib.a lib/libqwt6.a
        if use doc; then
                dohtml -r doc/html/*
        fi
Comment 10 Justin Lecher (RETIRED) gentoo-dev 2013-03-05 12:55:54 UTC
+*qwt-6.0.2-r1 (05 Mar 2013)
+*qwt-5.2.3-r1 (05 Mar 2013)
+
+  05 Mar 2013; Justin Lecher <jlec@gentoo.org> +qwt-5.2.3-r1.ebuild,
+  +files/qwt-5.2.3-install_qt.patch, +qwt-6.0.2-r1.ebuild:
+  Fix installation location for designer and plugin stuff, #460256; add
+  static-libs support, #260324
+
Comment 11 Thomas Capricelli 2013-03-05 18:08:39 UTC
I tested the new x11-libs/qwt-6.0.2-r1 ebuild and if fails with :

------------------------------------------------------------------------
..
make[1]: Entering directory `/var/tmp/portage/x11-libs/qwt-6.0.2-r1/work/qwt-6.0.2/textengines'
make[1]: Nessuna operazione da eseguire per «install».
make[1]: Leaving directory `/var/tmp/portage/x11-libs/qwt-6.0.2-r1/work/qwt-6.0.2/textengines'
!!! dolib: lib/libqwt.a does not exist
 * ERROR: x11-libs/qwt-6.0.2-r1 failed (install phase):
 *   dolib failed
 * 
...
------------------------------------------------------------------------

Which is not really surprising, i wonder why you removed the 6 in your update. i did a find on /tmp/portage/x11-libs/qwt-6.0.2-r1/work/ and i can confirm the lib is still called with a 6 in the name :
./qwt-6.0.2/lib/libqwt6.a


Also, I think there will be another problem once this one is resolved : you have removed all the '6' suffix that were there, and this will cause filename conflicts with the one installed by qwt:5. I'm not familiar with this, but i guess this was the original reason those were there.
Comment 12 Justin Lecher (RETIRED) gentoo-dev 2013-03-05 18:22:34 UTC
(In reply to comment #11)
> I tested the new x11-libs/qwt-6.0.2-r1 ebuild and if fails with :
args my fault. I didn't test the code which I copied from slot=5
Comment 13 Justin Lecher (RETIRED) gentoo-dev 2013-03-06 08:37:49 UTC
+*qwt-6.0.2-r2 (06 Mar 2013)
+*qwt-5.2.3-r2 (06 Mar 2013)
+
+  06 Mar 2013; Justin Lecher <jlec@gentoo.org> +qwt-5.2.3-r2.ebuild,
+  +qwt-6.0.2-r2.ebuild:
+  Enhance building static-libs by using multibuild.eclass
+
Comment 14 Thomas Capricelli 2013-03-06 12:08:08 UTC
Tested emerging both x11-libs/qwt-5.2.3-r2 and x11-libs/qwt-6.0.2-r2
It worked despite collisions in /usr/share/qwt/examples/ (~60 files i guess). Which is fine with me.

I have the following libs installed : 
qwt:5
/usr/lib64/libqwt.a
/usr/lib64/libqwt.so
/usr/lib64/libqwt.so.5
/usr/lib64/libqwt.so.5.2
/usr/lib64/libqwt.so.5.2.3

qwt:6
/usr/lib64/libqwt6.a
/usr/lib64/libqwt6.so
/usr/lib64/libqwt6.so.6
/usr/lib64/libqwt6.so.6.0
/usr/lib64/libqwt6.so.6.0.2

Thanks for taking care of this!
Comment 15 Justin Lecher (RETIRED) gentoo-dev 2013-03-06 12:11:12 UTC
+  06 Mar 2013; Justin Lecher <jlec@gentoo.org> qwt-5.2.3-r2.ebuild,
+  qwt-6.0.2-r2.ebuild:
+  Fix collision of example installation
+