public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* How do I write a cygport file for two different configurations in the same cygport package
@ 2020-04-05 20:51 Åke Rehnman
  2020-04-06  3:12 ` Marco Atzeri
  0 siblings, 1 reply; 2+ messages in thread
From: Åke Rehnman @ 2020-04-05 20:51 UTC (permalink / raw)
  To: cygwin

Hello all,

I was going to update the libftdi1 package which in addition to the 
regular ftdi library contains python bindings. Unfortunately the cmake 
CMakeLists only builds python 3 bindings for this library unless 
explicitly passed some magic variables on the command line. However both 
python 2 and python 3 bindings cannot be built in one go.

So the question is how do I write a cygport file to first compile the 
libraries with python 3 then reconfigure (run cmake again with new 
parameters) and build the python 2 bindings?

Any ideas?

BR

/Ake


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: How do I write a cygport file for two different configurations in the same cygport package
  2020-04-05 20:51 How do I write a cygport file for two different configurations in the same cygport package Åke Rehnman
@ 2020-04-06  3:12 ` Marco Atzeri
  0 siblings, 0 replies; 2+ messages in thread
From: Marco Atzeri @ 2020-04-06  3:12 UTC (permalink / raw)
  To: cygwin

Am 05.04.2020 um 22:51 schrieb Åke Rehnman via Cygwin:
> Hello all,
> 
> I was going to update the libftdi1 package which in addition to the 
> regular ftdi library contains python bindings. Unfortunately the cmake 
> CMakeLists only builds python 3 bindings for this library unless 
> explicitly passed some magic variables on the command line. However both 
> python 2 and python 3 bindings cannot be built in one go.
> 
> So the question is how do I write a cygport file to first compile the 
> libraries with python 3 then reconfigure (run cmake again with new 
> parameters) and build the python 2 bindings?
> 
> Any ideas?
> 
> BR
> 
> /Ake
> 

this is the solution implemented to build fftw3
3 times with different parameters.
I will use something similar for postgresql that has the same
problem of your libftdi1.

src_compile() {
         cd ${S}
         cygautoreconf

         mkdir -p ${B}/float
         cd ${B}/float
         CYGCONF_SOURCE=${S} cygconf \
                 --enable-float \
                 --enable-threads \
                 --enable-shared --disable-static \
                 --enable-openmp \
                 --enable-sse -enable-avx \
                 --with-windows-f77-mangling
         cygmake

         mkdir -p ${B}/long
         cd ${B}/long
         CYGCONF_SOURCE=${S} cygconf \
                 --enable-threads \
                 --enable-shared --disable-static \
                 --enable-openmp \
                 --enable-sse2 -enable-avx \
                 --with-windows-f77-mangling
         cygmake

         mkdir -p ${B}/double
         cd ${B}/double
         CYGCONF_SOURCE=${S} cygconf \
                 --enable-long-double \
                 --enable-threads \
                 --enable-shared --disable-static \
                 --enable-openmp \
                 --with-windows-f77-mangling
         cygmake

}

src_test() {
         for precision in float long double
         do
                 cd ${B}/${precision}/tests
                 cygtest
         done
}

src_install() {
         for precision in float long double
         do
                 cd ${B}/${precision}
                 cyginstall
         done
..

Regards
Marco

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-04-06  3:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-05 20:51 How do I write a cygport file for two different configurations in the same cygport package Åke Rehnman
2020-04-06  3:12 ` Marco Atzeri

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).