On Mon, Apr 11, 2022 at 6:09 PM Richard Narron <rich...@aaazen.com> wrote:
> > The PDCurses 3.9 package on SLackBuilds.org now creates a pkg-config file > for use in building the Hessling editor 3.3RC8. > Nice addition. > > > Ideally this file would be named the same as the library: > > /usr/lib64/pkgconfig/LibXCurses.pc > > And also it would have Libs: for dynamic loading and and Libs.private: > for static loading. > > Libs: -lXCurses > Libs.private: -l:libXCurses.a -lXaw -lXmu -lXt -lX11 -lXpm -lSM -lICE > -lXext > > More information on creating these files is here: > > https://www.freedesktop.org/wiki/Software/pkg-config/ > > > I use pkgconf ( https://github.com/pkgconf/pkgconf ) with almost all of my builds and I have scripts similar to Slackbuilds (for a variety of operating systems) that generate a .pc file as well. Here's part of a script for MinGW on Windows: #!/bin/bash ... cat > pdcurses.pc << EOF prefix=/opt exec_prefix=\${prefix} libdir=\${exec_prefix}/lib includedir=\${prefix}/include Name: pdcurses Description: Public Domain Curses screen library Version: 3.4 Requires: Requires.private: Libs: -L\${libdir} -lpdcurses Libs.private: Cflags: -I\${includedir} EOF It gets tricky tracking the different dependent libraries on different operating systems. None of the X libraries are typically used on Windows (unless you're developing for a target like Cygwin). I investigated naming the pc file something generic like curses.pc so I could switch out curses libraries and use either pdcurses or ncurses as desired. Didn't work out that well so I just use pdcurses.pc. Sincerely, Laura http://www.distasis.com/cpp