Re: UPDATE: devel/sdcc 4.2.0

2023-04-10 Thread Brian Callahan
On 4/10/2023 1:56 AM, Rafael Sadowski wrote:
> 
> Thanks Sven, your changes make sense to me.  Sorry Brian I was probably
> something in Easter mode and too fast. This was committed.
> 

Fine by me. Thanks!

~Brian



Re: UPDATE: devel/sdcc 4.2.0

2023-04-09 Thread Rafael Sadowski
On Fri Apr 07, 2023 at 11:18:13PM +0200, Sven M. Hallberg wrote:
> Hi,
> 
> after some initial trouble, I managed to update this port to the latest
> version. The issue I ran into was that the build failed with a linker
> error that, strangely, did not appear when I compiled the package by
> hand outside of ports.
> 
> Specifically, building ucsim failed with
> 
> ld: error: undefined symbol:  uc_yy_free_string_to_parse()
> ld: error: undefined symbol: yylex()
> 
> config.log showed this:
> 
> checking for lex output file root... (cached) lex.yy
> checking for lex library... cat: lex.yy.c: No such file or directory
> cat: lex.yy.c: No such file or directory
> cat: lex.yy.c: No such file or directory
> not found
> configure: WARNING: required lex library not found; giving up on flex
> 
> What happens is that the OpenBSD config.site sets the variable
> ac_cv_prog_lex_root (shown cached above) and this causes the following
> check for the lex library to fail, since the test assumes the file
> lex.yy.cc to exit as a side effect of the first test. The configure
> script then sets LEX=':' (the empty command). Then the empty command
> gets used with an output redirection, creating an empty C file, which
> the compiler happily accepts, until the linker notices that it didn't
> define any of the symbols that it should have.
> 
> I solved the issue by adding ac_cv_lib_lex='none needed' to
> CONFIGURE_ENV. Or should that be -lfl? Should this variable be added to
> config.site itself?
> 
> Further changes:
> 
> - Removed the only two patches (patch-sim_ucsim_cmd_src_Makefile_in and
>   patch-sim_ucsim_cmd_src_cmdlex_l) that change the name cmdpars.hh
>   to cmdpars.h. Their comment says "Allow use of in-base yacc."
>   The build worked for me without them, using yacc from base, so I guess
>   they are no longer needed?
> 
>   portcheck complained that I didn't remove the empty patches directory,
>   so i did that, but now the removal of the files no longer appears in
>   the diff. Not sure if I did this right. ;)
> 
> - Changes to CONFIGURE_ENV:
>   - Changed sdcc_cv_CCggdb=no to sdcc_cv_c_ggdb=no. I think this may
> have been a typo?!
>   - Guessing that the intention was to not compile anything with -ggdb,
> I also added sdcc_cv_cxx_ggdb=no and bor_cv_c_ggdb=no. The latter
> appears in debugger/mcs51/configure.
>   - Removed sdcc_cv_c_fms_extensions=no. I could not find that variable
> in the source.
> 
> - Added curses to WANTLIB (needed by serialview).
> 
> I tested this on my amd64 system. I couldn't check if the archs marked
> BROKEN (sparc64, alpha, aarch64) are still current.
> 
> Regards,
> pesco
> 
> PS: Not subscribed to ports@, please Cc me in replies.
> 

Thanks Sven, your changes make sense to me.  Sorry Brian I was probably
something in Easter mode and too fast. This was committed.



UPDATE: devel/sdcc 4.2.0

2023-04-07 Thread Sven M. Hallberg
Hi,

after some initial trouble, I managed to update this port to the latest
version. The issue I ran into was that the build failed with a linker
error that, strangely, did not appear when I compiled the package by
hand outside of ports.

Specifically, building ucsim failed with

ld: error: undefined symbol:  uc_yy_free_string_to_parse()
ld: error: undefined symbol: yylex()

config.log showed this:

checking for lex output file root... (cached) lex.yy
checking for lex library... cat: lex.yy.c: No such file or directory
cat: lex.yy.c: No such file or directory
cat: lex.yy.c: No such file or directory
not found
configure: WARNING: required lex library not found; giving up on flex

What happens is that the OpenBSD config.site sets the variable
ac_cv_prog_lex_root (shown cached above) and this causes the following
check for the lex library to fail, since the test assumes the file
lex.yy.cc to exit as a side effect of the first test. The configure
script then sets LEX=':' (the empty command). Then the empty command
gets used with an output redirection, creating an empty C file, which
the compiler happily accepts, until the linker notices that it didn't
define any of the symbols that it should have.

I solved the issue by adding ac_cv_lib_lex='none needed' to
CONFIGURE_ENV. Or should that be -lfl? Should this variable be added to
config.site itself?

Further changes:

- Removed the only two patches (patch-sim_ucsim_cmd_src_Makefile_in and
  patch-sim_ucsim_cmd_src_cmdlex_l) that change the name cmdpars.hh
  to cmdpars.h. Their comment says "Allow use of in-base yacc."
  The build worked for me without them, using yacc from base, so I guess
  they are no longer needed?

  portcheck complained that I didn't remove the empty patches directory,
  so i did that, but now the removal of the files no longer appears in
  the diff. Not sure if I did this right. ;)

- Changes to CONFIGURE_ENV:
  - Changed sdcc_cv_CCggdb=no to sdcc_cv_c_ggdb=no. I think this may
have been a typo?!
  - Guessing that the intention was to not compile anything with -ggdb,
I also added sdcc_cv_cxx_ggdb=no and bor_cv_c_ggdb=no. The latter
appears in debugger/mcs51/configure.
  - Removed sdcc_cv_c_fms_extensions=no. I could not find that variable
in the source.

- Added curses to WANTLIB (needed by serialview).

I tested this on my amd64 system. I couldn't check if the archs marked
BROKEN (sparc64, alpha, aarch64) are still current.

Regards,
pesco

PS: Not subscribed to ports@, please Cc me in replies.

? devel/sdcc/Notes
Index: devel/sdcc/Makefile
===
RCS file: /cvs/ports/devel/sdcc/Makefile,v
retrieving revision 1.29
diff -u -p -r1.29 Makefile
--- devel/sdcc/Makefile	11 Mar 2022 18:53:23 -	1.29
+++ devel/sdcc/Makefile	7 Apr 2023 19:30:29 -
@@ -3,11 +3,10 @@ BROKEN-sparc64=	illegal operands buildin
 BROKEN-alpha=	sdcc segfaults when building the device library
 BROKEN-aarch64=	*** BFD does not support target aarch64-unknown-openbsd6.2.
 
-DISTNAME=	sdcc-src-3.8.0
+DISTNAME=	sdcc-src-4.2.0
 PKGNAME=	${DISTNAME:S/-src//}
 EXTRACT_SUFX=	.tar.bz2
 CATEGORIES=	devel
-REVISION=	0
 
 HOMEPAGE=	http://sdcc.sourceforge.net/
 MAINTAINER=	Brian Callahan 
@@ -35,8 +34,10 @@ RUN_DEPENDS=		devel/gputils
 
 CONFIGURE_STYLE=	gnu
 CONFIGURE_ARGS+=	docdir=${PREFIX}/share/doc/sdcc
-CONFIGURE_ENV+=		sdcc_cv_CCggdb=no \
-sdcc_cv_c_fms_extensions=no \
+CONFIGURE_ENV+=		sdcc_cv_c_ggdb=no \
+			sdcc_cv_cxx_ggdb=no \
+			bor_cv_c_ggdb=no \
+			ac_cv_lib_lex='none needed' \
 			CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \
 			LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib"
 
Index: devel/sdcc/distinfo
===
RCS file: /cvs/ports/devel/sdcc/distinfo,v
retrieving revision 1.8
diff -u -p -r1.8 distinfo
--- devel/sdcc/distinfo	2 Apr 2019 19:49:58 -	1.8
+++ devel/sdcc/distinfo	7 Apr 2023 19:30:29 -
@@ -1,2 +1,2 @@
-SHA256 (sdcc-src-3.8.0.tar.bz2) = szFmjet72DLv0RIFLlsO0jE9tkGpIr05KAum1HrbuyE=
-SIZE (sdcc-src-3.8.0.tar.bz2) = 18987862
+SHA256 (sdcc-src-4.2.0.tar.bz2) = tJuuHSO81gV6gsT/5WE/nNDLz9HpQOnYTEv+nfCowFM=
+SIZE (sdcc-src-4.2.0.tar.bz2) = 19662367
Index: devel/sdcc/patches/patch-sim_ucsim_cmd_src_Makefile_in
===
RCS file: devel/sdcc/patches/patch-sim_ucsim_cmd_src_Makefile_in
diff -N devel/sdcc/patches/patch-sim_ucsim_cmd_src_Makefile_in
--- devel/sdcc/patches/patch-sim_ucsim_cmd_src_Makefile_in	11 Mar 2022 18:53:23 -	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -
@@ -1,36 +0,0 @@
-Allow use of in-base yacc.
-
-Index: sim/ucsim/cmd.src/Makefile.in
 sim/ucsim/cmd.src/Makefile.in.orig
-+++ sim/ucsim/cmd.src/Makefile.in
-@@ -96,13 +96,13 @@ installdirs:
- # -
- dep: Makefile.dep
- 
--Makefile.dep: $(SOURCES) $(LOCAL_SOURCES) $(srcdir)/*.h