Am Donnerstag, 23. August 2018 11:30:40 CEST schrieb Scott Kostyshak 
<skost...@lyx.org>:
> On Wed, Aug 22, 2018 at 09:42:50PM -0400, Scott Kostyshak wrote:
> > On Wed, Aug 22, 2018 at 08:26:48PM +0200, M.B. Schiekel wrote:
> > > -----BEGIN PGP SIGNED MESSAGE-----
> > > Hash: SHA1
> > > 
> > > 
> > > Hi all,
> > > 
> > > 1. when I'm doing a LyX 'configure' and 'make' with
> > >   ./configure --with-qt-dir=/usr/share/qt5/ --enable-qt5
> > >   make
> > > everything is fine and I get a LyX-2.3.0 executable.
> > > 
> > > 2. when I try to build a rpm-file with:
> > >   lyx.spec -> /usr/src/packages/SPECS/
> > >   lyx-2.3.0.tar.gz -> /usr/src/packages/SOURCES/
> > >   QTDIR=/usr/share/qt5/
> > >   rpmbuild -bb /usr/src/packages/SPECS/lyx.spec
> > > I get an error-message from the configure-script:
> > >   checking for Qt library name... failed
> > >   configure: error: cannot compile a simple Qt executable.
> > >   Check you have the right $QTDIR.
> > > 
> > > Hmm? Any idea?
> > 
> > Are you open to using CMake? I don't know much about CMake or about .rpm
> > files, but the following produces a .rpm for me:
> > 
> >   mkdir build_dir && cd build_dir &&
> >   cmake -DLYX_CPACK=ON -DCPACK_BINARY_RPM:BOOL=ON /path/to/lyx/source &&
> >   make &&
> >   make package
> > 
> > Note that I do get a minor warning with the above:
> > 
> > CPackRPM:Warning: CPACK_SET_DESTDIR is set (=ON) while requesting a 
> > relocatable package (CPACK_RPM_PACKAGE_RELOCATABLE is set): this is not 
> > supported
> 
> Kornel, is the above warning something we could improve (e.g. should we
> change CPACK_SET_DESTDIR to OFF if CPACK_BINARY_RPM is ON)? Please don't
> spend any time on this if you think it's not worth the time to look
> into. I was just curious. I tried to look into it myself, but cannot
> find a way to produce the .rpm without a warning. In
> development/cmake/LyxPackaging.cmake I tried changing
> 
>         # needed by rpm
>         set(CPACK_SET_DESTDIR "ON")
> 
> to
> 
>         # needed by rpm
>         #set(CPACK_SET_DESTDIR "ON")
> 
> That didn't work. I also tried
> 
>         # needed by rpm
>         set(CPACK_SET_DESTDIR "OFF")
> 
> That didn't work. I also tried
> 
>         # needed by rpm
>         set(CPACK_SET_DESTDIR "ON")
>         set(CPACK_RPM_PACKAGE_RELOCATABLE "OFF")
> 
> That didn't work.

Which you did not want. Instead
          set(CPACK_SET_DESTDIR OFF)
looks better to me (omitting quotes)
Could you try
        set(CPACK_SET_DESTDIR "I_ON")
instead? I am only looking into the cmake module CPackRPM.cmake, 

> By "didn't work" above, I mean either I got an error or it produced a
> .rpm with the warning.

OK, installed rpm.
        set(CPACK_SET_DESTDIR ON)
        set(CPACK_RPM_PACKAGE_RELOCATABLE OFF)
        set(CPACK_PACKAGE_RELOCATABLE OFF)

No warning now.

> Scott

        Kornel

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to