Hi Ervin,

I am building packages for openSUSE in a private project.
https://build.opensuse.org/project/show/home:dl8fcl:afu

To solve this problem I am using this lines in the wsjtx.spec file:

# cmake finds hamlib devel files only when installed in /usr/local
%cmake -Dhamlib_INCLUDE_DIRS=%{_includedir} \
       -Dhamlib_LIBRARIES=%{_libdir}/libhamlib.so \
       -Dhamlib_LIBRARY_DIRS=%{_libdir}

The whole spec file is here:
https://build.opensuse.org/package/view_file/home:dl8fcl:afu/wsjtx/wsjtx.spec?expand=1

I think you only have to substitute the rpm macros (%cmake, %{_libdir}, ...) with the data necessary for debian.

73, Walter DL8FCL


Am 26.10.2017 um 03:51 schrieb wsjt-devel-requ...@lists.sourceforge.net:
> Message: 2
> Date: Wed, 25 Oct 2017 22:55:23 +0200
> From: Ervin Heged?s <airw...@gmail.com>
> To: WSJT software development <wsjt-devel@lists.sourceforge.net>
> Subject: Re: [wsjt-devel] Build problem on Linux
> Message-ID: <20171025205523.ga23...@arxnet.hu>
> Content-Type: text/plain; charset=utf-8
>
> Hi Bill,
>
> sorry for the delay,
>
> On Sun, Oct 22, 2017 at 12:04:07AM +0100, Bill Somerville wrote:
>> On 21/10/2017 22:15, Ervin Heged?s wrote:
>>
>> I need to do some work to ensure that CMake detection of Hamlib works
>> correctly for system installed Hamlib libraries. This has only become
>> possible with the very latest distributions that are starting to include
>> Hamlib v3.1. For now I suggest building with my Hamlib fork. When I have
>> made the changes there should be no need to pass any paths nor set
>> environment variables for CMake to locate Hamlib, I believe I set the
>> current CMake scripts to break with the system Hamlib because of many issues
>> with WSJT-X using v2 Hamlib versions.
> Just some infos to help to clarify, why would like to build WSJTX
> with system installed Hamlib.
>
> I'm a Debian Maintainer, and member of Debian Hamradio team.
>
> The current version of WSJTX in Debian (and its derivates) is
> very old:
>
> https://packages.debian.org/sid/wsjtx
>
> The version is 1.1... and has some bugs:
>
> https://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=wsjtx;dist=unstable
>
> So I've started to make a new package, which up-to-date, and
> aligned to the new cmake style build system.
>
> I couldn't make any packages with non-system library. The
> documented build flow isn't allowed in a distribution.
>
> Anyway, at last few days I played with that codes, and here are
> my experiences:
>
> * I've built the packages (in Debian, the "Hamlib" divided to
>    many packages, eg. libhamlib++-dev, libhamlib-dev, ...)
> * when I installed the builded packages, I've got the error from
>    cmake
> * when I copied the files from builded packages (eg. started an
>    "mc", press ENTER on package, and copy the content of CONTET
>    directory) to a temporary directory, then the cmake recognizes
>    it too, as with your source tree
>
> Here is the example:
>
> cmake -D CMAKE_INSTALL_PREFIX=/home/airween/src/wsjtx-1.7.0-1/build/ -D CMAKE_PREFIX_PATH=/home/airween/hamlib-prefix-3.1-DEB/usr .
>
> and the content of builded packages are in /home/airween/hamlib-prefix-3.1-DEB/ directory.
>
> I just replaced the first line in usr/lib/pkgconfig/hamlib.pc to
> the right path (to the directory itself).
>
> In this case the cmake found the Hamlib:
>
> ...
> ...
> -- Checking for module 'hamlib'
> --   Found hamlib, version 3.1
> -- Found hamlib
> -- Found hamlib: /home/airween/hamlib-prefix-3.1-DEB/usr/include;/usr/include/libusb-1.0 (Required is at least version "3") > -- hamlib_INCLUDE_DIRS: /home/airween/hamlib-prefix-3.1-DEB/usr/include;/usr/include/libusb-1.0 > -- hamlib_LIBRARIES: -L/home/airween/hamlib-prefix-3.1-DEB/usr/lib;-lhamlib;-lm;-ldl;-lusb-1.0;-ludev;-pthread
> -- hamlib_LIBRARY_DIRS: /home/airween/hamlib-prefix-3.1-DEB/usr/lib
>
>
> With ... -D CMAKE_PREFIX_PATH=/usr . I get still
>
> -- Checking for module 'hamlib'
> --   Found hamlib, version 3.1
> -- Found hamlib
> CMake Error at /usr/share/cmake-3.9/Modules/FindPackageHandleStandardArgs.cmake:137 (message): >    Could NOT find hamlib (missing: hamlib_LIBRARY_DIRS) (Required is at least version "3")
> Call Stack (most recent call first):
> /usr/share/cmake-3.9/Modules/FindPackageHandleStandardArgs.cmake:377 (_FPHSA_FAILURE_MESSAGE)
>    CMake/Modules/Findhamlib.cmake:81 (find_package_handle_standard_args)
>    CMakeLists.txt:735 (find_package)
>
>
> Do you have any idea, what's wrong with system installed
> components? I think that the dirrecences between the released 3.1
> and your repository has NO effect.
>
>
>
> Thanks again for your help,
>
>
> 73, Ervin
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
wsjt-devel mailing list
wsjt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wsjt-devel

Reply via email to