Re: .if and Makefile issues

2018-03-26 Thread Gary Aitken

On 03/26/18 01:11, Don Lewis wrote:

On 25 Mar, Don Lewis wrote:

On 25 Mar, Gary Aitken wrote:


I forgot that all of the lines from the "if" up to but not including 
"fi" need to end with a \ so that make treats them all as one

multi-line shell command:

post-build:
echo "* post-build *"
#   Avoid executable name conflict with dcraw port
if [ -e ${WRKSRC}/dcraw ]; then \
echo = dcraw exists = \
mv ${WRKSRC}/dcraw ${WRKSRC}/${PORTNAME}-dcraw \
else \
echo = dcraw does not exist = \
fi


Thanks, and thanks also to Theron Tarigo for his solution.

In case anyone in the future is looking at this:
The above doesn't work because of a few missing ;
(not a Makefile related issue; a shell syntax issue)
What works:

post-build:
echo "* post-build *"
#Avoid executable name conflict with dcraw port
if [ -e ${WRKSRC}/dcraw ] ; then \
echo "= dcraw exists =" ; \
mv ${WRKSRC}/dcraw ${WRKSRC}/${PORTNAME}-dcraw ; \
else \
echo "= dcraw does not exist =" ; \
fi

Thanks again,
Gary
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Help with porting carbon-c-relay.

2018-03-26 Thread Sergey Akhmatov

Try adding:

CPPFLAGS+=  -I${LOCALBASE}/include
LDFLAGS+=   -L${LOCALBASE}/lib

CONFIGURE_ARGS+=--with-lz4=yes


On 26/03/2018 13:17, Andreas Andersson wrote:

First of, with this Makefile the port is functional. It's just that it
lacks the ability to compress data sent between two carbon-c-relay's.

According to config.log it does set both prefix and includedir, yet it is
unable to find lz4.h.

I'm kind of new to porting stuff using autoconf and such , therefor any
hints or advice would be appreciated.

I am including the Makefile I have at this point.


/Andreas


___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Help with porting carbon-c-relay.

2018-03-26 Thread Andreas Andersson
First of, with this Makefile the port is functional. It's just that it
lacks the ability to compress data sent between two carbon-c-relay's.

According to config.log it does set both prefix and includedir, yet it is
unable to find lz4.h.

I'm kind of new to porting stuff using autoconf and such , therefor any
hints or advice would be appreciated.

I am including the Makefile I have at this point.


/Andreas


Makefile
Description: Binary data
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: libreoffice fails to build [SOLVED]

2018-03-26 Thread tech-lists
On 24/03/2018 19:07, tech-lists wrote:
> Hi,
> 
> Building libreoffice (libreoffice-en_GB) complains about illegal
> instruction and dumps core. Full script output is at
> https://www.zyxst.net/errors/libreofficebuildfail.txt

please ignore, libreoffice builds fine on a pristine installation.

-- 
J.
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: .if and Makefile issues

2018-03-26 Thread Don Lewis
On 25 Mar, Don Lewis wrote:
> On 25 Mar, Gary Aitken wrote:
>> Bewildered and frustrated, looking for some guidance on a seemingly
>> simple task: check the existence of a file and rename it.
>> 
>> Looking at a number of examples in the Porter's guide, I should be
>> able to do something like this:
>> 
>> post-build:
>> echo "* post-build *"
>> #Avoid executable name conflict with dcraw port
>> .if exists ${WRKSRC}/dcraw
>> echo = dcraw exists =
>> mv ${WRKSRC}/dcraw ${WRKSRC}/${PORTNAME}-dcraw
>> .else
>> echo = dcraw does not exist =
>> .endif
>> 
>> That causes:
>> echo "* post-build *"
>> * post-build *
>> .if exists /usr/ports/graphics/ufraw-devel/work/ufraw-6d3259a/dcraw
>> make[1]: exec(.if) failed (No such file or directory)
>> *** Error code 1
> 
> Since the .if is indented, it is being treated as a shell command,
> and .if isn't being found in $PATH.
> 
>> I then tried adding parens:
>> 
>> post-build:
>> echo "* post-build *"
>> #Avoid executable name conflict with dcraw port
>> .if exists(${WRKSRC}/dcraw)
>> echo "= dcraw exists ="
>> mv ${WRKSRC}/dcraw ${WRKSRC}/${PORTNAME}-dcraw
>> .else
>> echo "= dcraw does not exist ="
>> .endif
>> 
>> echo "* post-build *"
>> * post-build *
>> .if exists(/usr/ports/graphics/ufraw-devel/work/ufraw-6d3259a/dcraw)
>> Syntax error: "(" unexpected
>> *** Error code 2
> 
> Ditto, but the shell command has a shell syntax error.
>  
>> I finally got this to do *something*:
>> 
>> post-build:
>> echo "* post-build *"
>> #   Avoid executable name conflict with dcraw port
>> .if exists ${WRKSRC}/dcraw
>> echo = dcraw exists =
>> mv ${WRKSRC}/dcraw ${WRKSRC}/${PORTNAME}-dcraw
>> .else
>> echo = dcraw does not exist =
>> .endif
>> 
>> echo "* post-build *"
>> * post-build *
>> echo "= dcraw does not exist ="
>> = dcraw does not exist =
>> 
>> Unfortunately, the file *does* exist.
> 
> The .if is treated as a make directive in this case, but it is
> evaluated at the time that make is first invoked, probably when
> when "make build" is first executed, or earlier.
> 
>> Can someone enlighten me as to what is going on in the above three
>> situations, to further my education?
>> Any hints / pointers would be much appreciated:
>> 
>> 1. Why does the .if, .else, and .endif have to have no leading whitespace?
> 
> If there is leading whitespace, then make assumes they are shell
> commands.
> 
>> 2. Why does it require the  on the stmt after the else but not
>> after the .if?  (Same behavior with tabs on the ones after .if)
> 
> Probably because the .if evaluates false, so anything between the .if
> and the .else isn't even parsed.
> 
>> 3. Why doesn't it find the file?
> 
> Because the file doesn't exist when the make first parses the Makefile.
> 
>> 4. What's a right way to do this?
> 
> Use a shell runtime test:
> 
> post-build:
> echo "* post-build *"
> #   Avoid executable name conflict with dcraw port
> if [ -e ${WRKSRC}/dcraw ]; then
> echo = dcraw exists =
> mv ${WRKSRC}/dcraw ${WRKSRC}/${PORTNAME}-dcraw
> else
> echo = dcraw does not exist =
> fi

I forgot that all of the lines from the "if" up to but not including
"fi" need to end with a \ so that make treats them all as one multi-line
shell command:

post-build:
echo "* post-build *"
#   Avoid executable name conflict with dcraw port
if [ -e ${WRKSRC}/dcraw ]; then \
echo = dcraw exists = \
mv ${WRKSRC}/dcraw ${WRKSRC}/${PORTNAME}-dcraw \
else \
echo = dcraw does not exist = \
fi

___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"