How do I write a cygport file for two different configurations in the same cygport package

Marco Atzeri marco.atzeri@gmail.com
Mon Apr 6 03:12:35 GMT 2020


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


More information about the Cygwin mailing list