Re: Fwd: New Port: Security/liblurch & Security/Pidgin-lurch

From: Ronald Klop <ronald-lists_at_klop.ws>
Date: Fri, 26 Aug 2022 17:07:53 UTC
On 8/26/22 17:26, Michael A. Oshin wrote:
> Thanks Ronald.
> It now builds and deploys into the right dir. I needed to get rid of the LD_CONFIG too.
> See the makefile at https://github.com/micadeyeye/freebsd-ports/blob/master/security/liblurch/Makefile <https://github.com/micadeyeye/freebsd-ports/blob/master/security/liblurch/Makefile>.
> 
> 1) However, how do I get rid of the below error?
> ---------
> ===>   Generating temporary packing list
> .....
> ......
> ====> Compressing man pages (compress-man)
> ===>  Installing for liblurch-0.7.0
> ===>  Checking if liblurch is already installed
> usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpsvx] source_file target_file
>         cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpsvx] source_file ... target_directory
> *** Error code 64
> 
> Stop.
> make: stopped in /usr/ports/security/liblurch/
> -------
> 


You can run make with some flags to get output about the actual commands it runs. See man make, but I think this will give something useful:
make -d elx


> 2) Next, try use the GH repo (Preferred) and you will see the below error:
> ----------
> ===>  Building for liblurch-0.7.0
> gmake[1]: Entering directory '......ports/security/liblurch/work/lurch-84f72d8'
> cc -fPIC -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing  -std=c11 -Wall -g -Wstrict-overflow -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include  -I/usr/local/include/libpurple -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include  -I/usr/local/include/libxml2 -I./headers/jabber -I./lib/libomemo/src -I./lib/axc/src -I./lib/axc/lib/libsignal-protocol-c/src -D_XOPEN_SOURCE=700 -D_BSD_SOURCE -D_DEFAULT_SOURCE -DPURPLE_PLUGINS -c ./src/lurch.c -o build/lurch.o
> ./src/lurch.c:14:10: fatal error: 'libomemo.h' file not found
> #include "libomemo.h"
>           ^~~~~~~~~~~~
> 1 error generated.
> gmake[1]: *** [Makefile:148: build/lurch.o] Error 1
> ------
> --------------
> 
> I have tried several options - e.g. SUB_FILES=      ${WRKSRC}/lib/libomemo/ - but no luck.How else can I get it built? I think the do-install throws error too for GH.


I'm sorry, but I don't have the time to dive this deep into this port. SUB_FILES is not the right statement. You need to add the directory containing libomemo.h to the CFLAGS.
Something like "CFLAGS+=-I${WRKSRC}/lib/limomemo". I see that this is already in the cc command: "-I./lib/libomemo/src". Isn't this the right directory?


> On a final note, what other steps do I need to do to finalise and publish into ports? I have read the pages but need quicker porting.


Your usage of ${USER} in the do-install step would only work if the port is executed as a regular user. Although not impossible most ports install in a general location which is usable by all users on a system. Also if you want your port to be available as a general pkg installing in /usr/home/${USER} is not possible because the right ${USER} does not exist on the pkg builders.

Regards,
Ronald.


> 
> Michael
> 
> On Fri, Aug 26, 2022, 16:12 Ronald Klop <ronald-lists@klop.ws <mailto:ronald-lists@klop.ws>> wrote:
> 
>     Mmm, lets take another look at it.
> 
>      From /usr/ports/Mk/bsd.ports.mk <http://bsd.ports.mk>:
> 
>     "# Set these variables if your port doesn't need some of the steps.
>     # Note that there are no NO_PATCH or NO_CONFIGURE variables because
>     # those steps are empty by default.  NO_EXTRACT is not allowed anymore
>     # since we need to at least create ${WRKDIR}.  Also, NO_CHECKSUM is a user
>     # variable and is not to be set in a port's Makefile.  See above for NO_PACKAGE.
>     #
>     # NO_BUILD      - Use a dummy (do-nothing) build target.
>     # NO_INSTALL    - Use a dummy (do-nothing) install target.
>     # NO_TEST       - Use a dummy (do-nothing) test target."
> 
>     Oh, lets take a look at your Makefile.
>     You have "GNU_CONFIGURE= yes" defined. That is why it tries to run configure.
>     Remove that line and try again.
> 
>     See also the link I posted in the previous reply:
>     "If |HAS_CONFIGURE| or |GNU_CONFIGURE| is set, WRKSRC/configure is run."
> 
>     Regards,
>     Ronald.
> 
>     *Van:* "Michael A. Oshin" <micadeyeye@gmail.com <mailto:micadeyeye@gmail.com>>
>     *Datum:* vrijdag, 26 augustus 2022 08:55
>     *Aan:* Ronald Klop <ronald-lists@klop.ws <mailto:ronald-lists@klop.ws>>
>     *Onderwerp:* Re: Fwd: New Port: Security/liblurch & Security/Pidgin-lurch
> 
>         HAS_CONFIGURE=off in Makefile did not work. A blank configure file in dir did not either. I have not seen one in pkg dirs though.
>         On Fri, 26 Aug 2022 at 13:19, Ronald Klop <ronald-lists@klop.ws <mailto:ronald-lists@klop.ws>> wrote:
> 
>             Does this work?
>             HAS_CONFIGURE=off
> 
>             https://docs.freebsd.org/en/books/porters-handbook/slow-porting/#slow-work <https://docs.freebsd.org/en/books/porters-handbook/slow-porting/#slow-work>
> 
>             *Van:* "Michael A. Oshin" <micadeyeye@gmail.com <mailto:micadeyeye@gmail.com>>
>             *Datum:* 26 augustus 2022 05:37
>             *Aan:* freebsd-ports@freebsd.org <mailto:freebsd-ports@freebsd.org>
>             *Onderwerp:* Fwd: New Port: Security/liblurch & Security/Pidgin-lurch
> 
>                 Good Morning folks,
> 
>                 I made a few changes to the liblurch Makefile. It now points to the developer's github for the pkg. See https://github.com/micadeyeye/freebsd-ports/blob/master/security/liblurch/Makefile <https://github.com/micadeyeye/freebsd-ports/blob/master/security/liblurch/Makefile>.
> 
>                 One problem I have with the liblurch is that it wants to run '.configure'. See the below:
> 
>                 ______________________
>                 make -C /usr/local/opt/github/freebsd-ports/security/liblurch/ install clean
>                 ===>   liblurch-0.7.0 depends on package: gmake>=4.3 - found
>                 ===>   liblurch-0.7.0 depends on package: pkgconf>=1.3.0_1 - found
>                 ===>   liblurch-0.7.0 depends on file: /usr/local/bin/ccache - found
>                 ===>   liblurch-0.7.0 depends on shared library: libmxml.so - found (/usr/local/lib/libmxml.so)
>                 ===>   liblurch-0.7.0 depends on shared library: libpurple.so - found (/usr/local/lib/libpurple.so)
>                 ===>  Configuring for liblurch-0.7.0
>                 env: ./configure: No such file or directory
>                 ===>  Script "configure" failed unexpectedly.
>                 Please report the problem to micadeyeye@gmail.com <mailto:micadeyeye@gmail.com> [maintainer] and attach the
>                 "/usr/local/opt/github/freebsd-ports/security/liblurch/work/lurch-0.7.0-src/config.log"
>                 including the output of the failure of your make command. Also, it might be
>                 a good idea to provide an overview of all packages installed on your system
>                 (e.g. a /usr/local/sbin/pkg-static info -g -Ea).
>                 *** Error code 1
> 
>                 Stop.
>                 make: stopped in /usr/local/opt/github/freebsd-ports/security/liblurch/
>                 _________________________________
> 
>                 What it should do is ONLY run 'gmake install'. Please show me how to replace the process  "===>  Configuring for liblurch-0.7.0
>                 env: ./configure: No such file or directory" with the "gmake install".
> 
>                 On the other hand, please note that the pidgin-lurch (https://github.com/micadeyeye/freebsd-ports/blob/master/security/pidgin-lurch/Makefile <https://github.com/micadeyeye/freebsd-ports/blob/master/security/pidgin-lurch/Makefile>) is the UI modification to Pidgin, and currently, I have only copied the OTR UI with no modifications yet to its source code. I need a lot of assistance here.
> 
> 
>