Re: policy for dlopen'd libraries etc (was Re: [UPDATE] games/yquake2 7.45 -> 8.00)

2021-12-12 Thread Stefan Hagen
Stuart Henderson wrote:
> On 2021/12/12 14:16, Stefan Hagen wrote:
> > Stuart Henderson wrote:
> > > On 2021/12/12 12:10, Stefan Hagen wrote:
> > > > Anthony J. Bentley wrote:
> > > > > Stuart Henderson writes:
> > > > > > Please put them in LIB_DEPENDS/WANTLIB with the annotation in the 
> > > > > > comment. 
> > > > > > What they're doing is not safe/reliable because it relies on the 
> > > > > > library 
> > > > > > ABI not changing. Adding as a LIB_DEPENDS ensures that yquake is 
> > > > > > updated 
> > > > > > when required due to any incompatible changes to the libraries.
> > > > > 
> > > > > This needs to be documented somewhere. bsd.port.mk(5) implies that
> > > > > LIB_DEPENDS is not necessary for dlopen'd libraries:
> > > > > 
> > > > >   LIB_DEPENDS  not needed for   There doesn't seem 
> > > > > to be
> > > > >   any WANTLIB to match the given LIB_DEPENDS.  Thus, the LIB_DEPENDS 
> > > > > won't
> > > > >   turn into a @depends line in the created package.  This is often 
> > > > > because
> > > > >   of confusion between LIB_DEPENDS and RUN_DEPENDS: RUN_DEPENDS is 
> > > > > needed
> > > > >   for dlopen'd libraries.
> > > > 
> > > > I thought so too. What about this?
> > > 
> > > 
> > > But I think maybe we should just stop suggesting that completely (I
> > > think it relates to a shortcut of just listing libraries for _all_
> > > subpackages in LIB_DEPENDS so they end up in every LIB_DEPENDS-subpkg
> > > and relying on tools to prune the ones which aren't needed; in practice
> > > afaik no port does that intentionally).
> > > 
> > > Secondly "is safer" isn't really informative. Safer why? Unless it's
> > > going to explain in more detail then something like "should be added"
> > > would be better than "is safer".
> > > 
> > > (also a nit: for manpages the standard is "new sentence -> new line").
> > 
> > I started to rewrite the paragraph and add more information about how 
> > dlopen is used and why rebuilds are necessary.
> > 
> > But that made me think about how those reasons do not matter at all. We
> > have libraries ports depend on. Ports should be updated when the library
> > changes. No matter how the library is used. I think it's as simple as
> > that.
> 
> Not quite - ports using a shared library only need to be updated if the
> ABI changes (library version number changes) - ports using a static library
> need to be updated every time the library changes.

As far as I understood, the static library case is not handled 
automatically. So the port compiling in the library statically needs a 
manual REVISION bump.

So from a port perspective, the next best automatic case is to handle 
them the same way.

At least as long as we don't introduce LIB_STATIC which could lead to a 
tighter coupling of ports.

But I see that "when the library changes" is not precise enough for 
either case.

Best Regards,
Stefan



Re: policy for dlopen'd libraries etc (was Re: [UPDATE] games/yquake2 7.45 -> 8.00)

2021-12-12 Thread Stefan Hagen
Stefan Hagen wrote:
> Stuart Henderson wrote:
> > On 2021/12/12 12:10, Stefan Hagen wrote:
> > > Anthony J. Bentley wrote:
> > > > Stuart Henderson writes:
> > > > > Please put them in LIB_DEPENDS/WANTLIB with the annotation in the 
> > > > > comment. 
> > > > > What they're doing is not safe/reliable because it relies on the 
> > > > > library 
> > > > > ABI not changing. Adding as a LIB_DEPENDS ensures that yquake is 
> > > > > updated 
> > > > > when required due to any incompatible changes to the libraries.
> > > > 
> > > > This needs to be documented somewhere. bsd.port.mk(5) implies that
> > > > LIB_DEPENDS is not necessary for dlopen'd libraries:
> > > > 
> > > >   LIB_DEPENDS  not needed for   There doesn't seem 
> > > > to be
> > > >   any WANTLIB to match the given LIB_DEPENDS.  Thus, the LIB_DEPENDS 
> > > > won't
> > > >   turn into a @depends line in the created package.  This is often 
> > > > because
> > > >   of confusion between LIB_DEPENDS and RUN_DEPENDS: RUN_DEPENDS is 
> > > > needed
> > > >   for dlopen'd libraries.
> > > 
> > > I thought so too. What about this?
> > 
> > 
> > But I think maybe we should just stop suggesting that completely (I
> > think it relates to a shortcut of just listing libraries for _all_
> > subpackages in LIB_DEPENDS so they end up in every LIB_DEPENDS-subpkg
> > and relying on tools to prune the ones which aren't needed; in practice
> > afaik no port does that intentionally).
> > 
> > Secondly "is safer" isn't really informative. Safer why? Unless it's
> > going to explain in more detail then something like "should be added"
> > would be better than "is safer".
> > 
> > (also a nit: for manpages the standard is "new sentence -> new line").
> 
> I started to rewrite the paragraph and add more information about how 
> dlopen is used and why rebuilds are necessary.
> 
> But that made me think about how those reasons do not matter at all. We
> have libraries ports depend on. Ports should be updated when the library
> changes. No matter how the library is used. I think it's as simple as
> that.
> 
> The problem is only that the ports system looks at dynamically linked
> libraries, which fails when the library is dlopened or statically linked
> in.
> 
> Or maybe for stylistic reasons like setting LIB_DEPENDS globally and
> having flavors/subpackages that only need parts of it.
> 
> It all boils down to:
> Libraries go to LIB_DEPENDS and WANTLIB. If you see this warning, check
> if the library is actually needed. If the answer is yes, ignore the
> warning and add a comment.
> 
> Did I get this right?
> 
> I reworked the paragraph a bit and dropped the multi-package case.

Another update. The whole thing was under the wrong warning.

"LIB_DEPENDS  not needed for " can be fixed. Also
for dlopened and statically linked libraries. It's merely a discrepancy
between LIB_DEPENDS and WANTLIB.. well... as described in the manpage ;)

If this is done correctly, lib-depends-check shows "Extra: "
lines, which are the ones that can be ignored in non-dynamic-linking 
cases.

This message was not yet mentioned in bsd.port.mk(5), so I added it.

I'm still dropping the special cases mentioned under "LIB_DEPENDS not
needed for ...". Let me know if I dropped too much.


Index: ./share/man/man5/bsd.port.mk.5
===
RCS file: /home/cvs/src/share/man/man5/bsd.port.mk.5,v
retrieving revision 1.550
diff -u -p -u -p -r1.550 bsd.port.mk.5
--- ./share/man/man5/bsd.port.mk.5  22 Nov 2021 11:17:39 -  1.550
+++ ./share/man/man5/bsd.port.mk.5  12 Dec 2021 13:46:56 -
@@ -3482,6 +3482,15 @@ instead, assuming they understand the im
 See
 .Cm print-package-args Pq Cm wantlib-args
 for details.
+.It Extra: 
+Check if these libraries are really used.
+Needed libraries should always be added to LIB_DEPENDS and WANTLIB.
+In cases where the libraries are not dynamically linked in, this warning
+is shown, because we can't detect the dependency.
+If the libraries have been statically linked, or are
+loaded by
+.Xr dlopen 3 ,
+add a comment to the Makefile about it above the LIB_DEPENDS line.
 .It "Fatal: can't flavor a SUBDIR"
 A dependency mentions top_subdir,flavor.
 Flavor would then be ignored, as it is only applied to individual ports.
@@ -3558,17 +3567,7 @@ usage.
 .It LIB_DEPENDS  not needed for 
 There doesn't seem to be any WANTLIB to match the given LIB_DEPENDS.
 Thus, the LIB_DEPENDS won't turn into a @depends line in the created package.
-This is often because of confusion between LIB_DEPENDS and RUN_DEPENDS:
-RUN_DEPENDS is needed for dlopen'd libraries.
-.Pp
-Might be intentional sometimes, if some compile flavors create static binaries,
-for instance.
-Also, will happen for multi-packages, where one sets LIB_DEPENDS to have
-a given build dependency (and corresponding WANTLIB for a given SUBPACKAGE).
-.Pp
-See
-.Cm print-package-args Pq Cm lib-depends-args
-for details.
+This is often because of confusion 

Re: policy for dlopen'd libraries etc (was Re: [UPDATE] games/yquake2 7.45 -> 8.00)

2021-12-12 Thread Stuart Henderson
On 2021/12/12 14:16, Stefan Hagen wrote:
> Stuart Henderson wrote:
> > On 2021/12/12 12:10, Stefan Hagen wrote:
> > > Anthony J. Bentley wrote:
> > > > Stuart Henderson writes:
> > > > > Please put them in LIB_DEPENDS/WANTLIB with the annotation in the 
> > > > > comment. 
> > > > > What they're doing is not safe/reliable because it relies on the 
> > > > > library 
> > > > > ABI not changing. Adding as a LIB_DEPENDS ensures that yquake is 
> > > > > updated 
> > > > > when required due to any incompatible changes to the libraries.
> > > > 
> > > > This needs to be documented somewhere. bsd.port.mk(5) implies that
> > > > LIB_DEPENDS is not necessary for dlopen'd libraries:
> > > > 
> > > >   LIB_DEPENDS  not needed for   There doesn't seem 
> > > > to be
> > > >   any WANTLIB to match the given LIB_DEPENDS.  Thus, the LIB_DEPENDS 
> > > > won't
> > > >   turn into a @depends line in the created package.  This is often 
> > > > because
> > > >   of confusion between LIB_DEPENDS and RUN_DEPENDS: RUN_DEPENDS is 
> > > > needed
> > > >   for dlopen'd libraries.
> > > 
> > > I thought so too. What about this?
> > 
> > 
> > But I think maybe we should just stop suggesting that completely (I
> > think it relates to a shortcut of just listing libraries for _all_
> > subpackages in LIB_DEPENDS so they end up in every LIB_DEPENDS-subpkg
> > and relying on tools to prune the ones which aren't needed; in practice
> > afaik no port does that intentionally).
> > 
> > Secondly "is safer" isn't really informative. Safer why? Unless it's
> > going to explain in more detail then something like "should be added"
> > would be better than "is safer".
> > 
> > (also a nit: for manpages the standard is "new sentence -> new line").
> 
> I started to rewrite the paragraph and add more information about how 
> dlopen is used and why rebuilds are necessary.
> 
> But that made me think about how those reasons do not matter at all. We
> have libraries ports depend on. Ports should be updated when the library
> changes. No matter how the library is used. I think it's as simple as
> that.

Not quite - ports using a shared library only need to be updated if the
ABI changes (library version number changes) - ports using a static library
need to be updated every time the library changes.

> The problem is only that the ports system looks at dynamically linked
> libraries, which fails when the library is dlopened or statically linked
> in.
> 
> Or maybe for stylistic reasons like setting LIB_DEPENDS globally and
> having flavors/subpackages that only need parts of it.
> 
> It all boils down to:
> Libraries go to LIB_DEPENDS and WANTLIB. If you see this warning, check
> if the library is actually needed. If the answer is yes, ignore the
> warning and add a comment.
> 
> Did I get this right?
> 
> I reworked the paragraph a bit and dropped the multi-package case.
> 
> Index: ./share/man/man5/bsd.port.mk.5
> ===
> RCS file: /home/cvs/src/share/man/man5/bsd.port.mk.5,v
> retrieving revision 1.550
> diff -u -p -u -p -r1.550 bsd.port.mk.5
> --- ./share/man/man5/bsd.port.mk.522 Nov 2021 11:17:39 -  1.550
> +++ ./share/man/man5/bsd.port.mk.512 Dec 2021 13:07:44 -
> @@ -3558,17 +3558,16 @@ usage.
>  .It LIB_DEPENDS  not needed for 
>  There doesn't seem to be any WANTLIB to match the given LIB_DEPENDS.
>  Thus, the LIB_DEPENDS won't turn into a @depends line in the created package.
> -This is often because of confusion between LIB_DEPENDS and RUN_DEPENDS:
> -RUN_DEPENDS is needed for dlopen'd libraries.
> +This is often because of confusion between LIB_DEPENDS and RUN_DEPENDS.
>  .Pp
> -Might be intentional sometimes, if some compile flavors create static 
> binaries,
> -for instance.
> -Also, will happen for multi-packages, where one sets LIB_DEPENDS to have
> -a given build dependency (and corresponding WANTLIB for a given SUBPACKAGE).
> -.Pp
> -See
> -.Cm print-package-args Pq Cm lib-depends-args
> -for details.
> +Needed libraries should always be added to LIB_DEPENDS and WANTLIB.
> +In cases where the libraries are not dynamically linked in,
> +.Cm lib-depends-check
> +will raise a warning, because it can't detect the dependency.
> +For example for statically linked libraries, or libraries that are
> +loaded by
> +.Xr dlopen 3 .
> +In this case, add a comment to the Makefile about the intentional warning.
>  .It "Warning: FULLPKGNAME-sub defined but not FULLPKGPATH-sub"
>  .Ev FULLPKGNAME-sub
>  has been explicitly defined by the port, instead of relying on the default,
> 

I think this is good on the dlopen/normal shared case, but static is a bit
different.



Re: policy for dlopen'd libraries etc (was Re: [UPDATE] games/yquake2 7.45 -> 8.00)

2021-12-12 Thread Stefan Hagen
Stuart Henderson wrote:
> On 2021/12/12 12:10, Stefan Hagen wrote:
> > Anthony J. Bentley wrote:
> > > Stuart Henderson writes:
> > > > Please put them in LIB_DEPENDS/WANTLIB with the annotation in the 
> > > > comment. 
> > > > What they're doing is not safe/reliable because it relies on the 
> > > > library 
> > > > ABI not changing. Adding as a LIB_DEPENDS ensures that yquake is 
> > > > updated 
> > > > when required due to any incompatible changes to the libraries.
> > > 
> > > This needs to be documented somewhere. bsd.port.mk(5) implies that
> > > LIB_DEPENDS is not necessary for dlopen'd libraries:
> > > 
> > >   LIB_DEPENDS  not needed for   There doesn't seem to 
> > > be
> > >   any WANTLIB to match the given LIB_DEPENDS.  Thus, the LIB_DEPENDS won't
> > >   turn into a @depends line in the created package.  This is often because
> > >   of confusion between LIB_DEPENDS and RUN_DEPENDS: RUN_DEPENDS is needed
> > >   for dlopen'd libraries.
> > 
> > I thought so too. What about this?
> 
> 
> But I think maybe we should just stop suggesting that completely (I
> think it relates to a shortcut of just listing libraries for _all_
> subpackages in LIB_DEPENDS so they end up in every LIB_DEPENDS-subpkg
> and relying on tools to prune the ones which aren't needed; in practice
> afaik no port does that intentionally).
> 
> Secondly "is safer" isn't really informative. Safer why? Unless it's
> going to explain in more detail then something like "should be added"
> would be better than "is safer".
> 
> (also a nit: for manpages the standard is "new sentence -> new line").

I started to rewrite the paragraph and add more information about how 
dlopen is used and why rebuilds are necessary.

But that made me think about how those reasons do not matter at all. We
have libraries ports depend on. Ports should be updated when the library
changes. No matter how the library is used. I think it's as simple as
that.

The problem is only that the ports system looks at dynamically linked
libraries, which fails when the library is dlopened or statically linked
in.

Or maybe for stylistic reasons like setting LIB_DEPENDS globally and
having flavors/subpackages that only need parts of it.

It all boils down to:
Libraries go to LIB_DEPENDS and WANTLIB. If you see this warning, check
if the library is actually needed. If the answer is yes, ignore the
warning and add a comment.

Did I get this right?

I reworked the paragraph a bit and dropped the multi-package case.

Index: ./share/man/man5/bsd.port.mk.5
===
RCS file: /home/cvs/src/share/man/man5/bsd.port.mk.5,v
retrieving revision 1.550
diff -u -p -u -p -r1.550 bsd.port.mk.5
--- ./share/man/man5/bsd.port.mk.5  22 Nov 2021 11:17:39 -  1.550
+++ ./share/man/man5/bsd.port.mk.5  12 Dec 2021 13:07:44 -
@@ -3558,17 +3558,16 @@ usage.
 .It LIB_DEPENDS  not needed for 
 There doesn't seem to be any WANTLIB to match the given LIB_DEPENDS.
 Thus, the LIB_DEPENDS won't turn into a @depends line in the created package.
-This is often because of confusion between LIB_DEPENDS and RUN_DEPENDS:
-RUN_DEPENDS is needed for dlopen'd libraries.
+This is often because of confusion between LIB_DEPENDS and RUN_DEPENDS.
 .Pp
-Might be intentional sometimes, if some compile flavors create static binaries,
-for instance.
-Also, will happen for multi-packages, where one sets LIB_DEPENDS to have
-a given build dependency (and corresponding WANTLIB for a given SUBPACKAGE).
-.Pp
-See
-.Cm print-package-args Pq Cm lib-depends-args
-for details.
+Needed libraries should always be added to LIB_DEPENDS and WANTLIB.
+In cases where the libraries are not dynamically linked in,
+.Cm lib-depends-check
+will raise a warning, because it can't detect the dependency.
+For example for statically linked libraries, or libraries that are
+loaded by
+.Xr dlopen 3 .
+In this case, add a comment to the Makefile about the intentional warning.
 .It "Warning: FULLPKGNAME-sub defined but not FULLPKGPATH-sub"
 .Ev FULLPKGNAME-sub
 has been explicitly defined by the port, instead of relying on the default,



Re: [UPDATE] games/yquake2 7.45 -> 8.00

2021-12-12 Thread Stuart Henderson
On 2021/12/12 12:10, Stefan Hagen wrote:
> Anthony J. Bentley wrote:
> > Stuart Henderson writes:
> > > Please put them in LIB_DEPENDS/WANTLIB with the annotation in the 
> > > comment. 
> > > What they're doing is not safe/reliable because it relies on the library 
> > > ABI not changing. Adding as a LIB_DEPENDS ensures that yquake is updated 
> > > when required due to any incompatible changes to the libraries.
> > 
> > This needs to be documented somewhere. bsd.port.mk(5) implies that
> > LIB_DEPENDS is not necessary for dlopen'd libraries:
> > 
> >   LIB_DEPENDS  not needed for   There doesn't seem to be
> >   any WANTLIB to match the given LIB_DEPENDS.  Thus, the LIB_DEPENDS won't
> >   turn into a @depends line in the created package.  This is often because
> >   of confusion between LIB_DEPENDS and RUN_DEPENDS: RUN_DEPENDS is needed
> >   for dlopen'd libraries.
> 
> I thought so too. What about this?
> 
> Index: ./share/man/man5/bsd.port.mk.5
> ===
> RCS file: /home/cvs/src/share/man/man5/bsd.port.mk.5,v
> retrieving revision 1.550
> diff -u -p -u -p -r1.550 bsd.port.mk.5
> --- ./share/man/man5/bsd.port.mk.522 Nov 2021 11:17:39 -  1.550
> +++ ./share/man/man5/bsd.port.mk.512 Dec 2021 11:10:05 -
> @@ -3566,6 +3566,10 @@ for instance.
>  Also, will happen for multi-packages, where one sets LIB_DEPENDS to have
>  a given build dependency (and corresponding WANTLIB for a given SUBPACKAGE).
>  .Pp
> +It is safer to add dlopen'd libraries to LIB_DEPENDS to ensure that the
> +port is rebuild when the library is updated. If this decision has been
> +made, a comment should be added.
> +.Pp
>  See
>  .Cm print-package-args Pq Cm lib-depends-args
>  for details.

This inserts unrelated text between two related paragraphs; "see
print-package-args ..." is directly related to the previous bit talking
about multi-packages.

But I think maybe we should just stop suggesting that completely (I
think it relates to a shortcut of just listing libraries for _all_
subpackages in LIB_DEPENDS so they end up in every LIB_DEPENDS-subpkg
and relying on tools to prune the ones which aren't needed; in practice
afaik no port does that intentionally).

Secondly "is safer" isn't really informative. Safer why? Unless it's
going to explain in more detail then something like "should be added"
would be better than "is safer".

(also a nit: for manpages the standard is "new sentence -> new line").



policy for dlopen'd libraries etc (was Re: [UPDATE] games/yquake2 7.45 -> 8.00)

2021-12-12 Thread Stuart Henderson
On 2021/12/12 03:51, Anthony J. Bentley wrote:
> Stuart Henderson writes:
> > Please put them in LIB_DEPENDS/WANTLIB with the annotation in the comment. 
> > What they're doing is not safe/reliable because it relies on the library 
> > ABI not changing. Adding as a LIB_DEPENDS ensures that yquake is updated 
> > when required due to any incompatible changes to the libraries.
> 
> This needs to be documented somewhere. bsd.port.mk(5) implies that
> LIB_DEPENDS is not necessary for dlopen'd libraries:
> 
>   LIB_DEPENDS  not needed for   There doesn't seem to be
>   any WANTLIB to match the given LIB_DEPENDS.  Thus, the LIB_DEPENDS won't
>   turn into a @depends line in the created package.  This is often because
>   of confusion between LIB_DEPENDS and RUN_DEPENDS: RUN_DEPENDS is needed
>   for dlopen'd libraries.

There are a few related subjects

- software which dlopen's a shared library (.so.X.Y file)
- software which links to a library statically
- (and of course the standard case "software which links to a shared library")

In all these cases, when the library is updated, packages depending
on that library need to be considered for updates.


In the "static linking" case, every time the library is changed,
packages of the dependent port need to get updated to pick up changes
(security fixes etc).

Really the only reliable way we have to handle updates for static
libraries is to bump REVISION on the static linked ports whenever the
library is updated. Adding a "bogus" LIB_DEPENDS+WANTLIB will catch some
updates but only if the library version of the associated shared library
changes (i.e. on ABI changes) but often security fixes deliberately
don't change ABI.


"dlopen a shared library" is often used when software wants to use
some library when possible but fallback to running but with lesser
functionality if the library isn't present. I think this is the usual
case within qt/kde ports for example.

This is very similar to the standard case; usually the depending port
does pull in headers from the library and if those headers change
in an incompatible way (i.e. changes which would result in a libray
version number change) the depending port needs to be rebuilt. Same as
the standard case. The difference is that in the standard case, tools
can find the library dependency automatically (check-lib-depends runs
objdump -p and looks at NEEDED entries) whereas in the dlopen case you
have to find them yourself.

We can't handle "update automatically when the library changes in
an incompatible way" unless an actual runtime dependency is listed.

Listing as BUILD_DEPENDS and RUN_DEPENDS would mean that updates don't
happen when needed.

Listing as LIB_DEPENDS without a WANTLIB line (triggering the "not needed
for" message) would mean that updates don't happen when needed _and_
it's only treated as a build dependency not a runtime dependency.

So really the only way we can handle this is to list as LIB_DEPENDS
and WANTLIB (forcing the runtime dependency) and comment to annotate
that we should ignore check-lib-depends not being able to find a
NEEDED line.




Re: [UPDATE] games/yquake2 7.45 -> 8.00

2021-12-12 Thread Stefan Hagen
Tom Murphy wrote:
> On Sun, Dec 12, 2021 at 10:32:29AM +, Stuart Henderson wrote:
> > Please put them in LIB_DEPENDS/WANTLIB with the annotation in the comment.
> > What they're doing is not safe/reliable because it relies on the library ABI
> > not changing. Adding as a LIB_DEPENDS ensures that yquake is updated when
> > required due to any incompatible changes to the libraries.
> 
> OK here's a new patch.
> 
> 1. Removes the patch that removes execinfo (since execinfo is in base 
>now, it's OK to keep it.)
> 2. Adds curl and openal to WANTLIB and keeps them in LIB_DEPENDS with
>a comment that they are dlopen(3)'d.
> 
> Thanks,
> Tom

OK sdk@ with a better comment that makes it clear that the 
lib-depends-check error is intended.

Index: games/yquake2/Makefile
===
RCS file: /home/cvs/ports/games/yquake2/Makefile,v
retrieving revision 1.23
diff -u -p -u -p -r1.23 Makefile
--- games/yquake2/Makefile  7 Jan 2021 22:20:25 -   1.23
+++ games/yquake2/Makefile  12 Dec 2021 11:24:21 -
@@ -4,7 +4,7 @@ ONLY_FOR_ARCHS= i386 amd64 sparc64
 
 COMMENT=   Yamagi Quake II
 N= yquake2
-V= 7.45
+V= 8.00
 PKGNAME=   ${N}-${V}
 DISTNAME=  quake2-${V}
 CATEGORIES=games
@@ -17,8 +17,10 @@ EXTRACT_SUFX=.tar.xz
 # GPLv2
 PERMIT_PACKAGE=Yes
 
-WANTLIB += GL SDL2 c curl m openal pthread
+WANTLIB += GL SDL2 c curl execinfo m openal
 
+# Libraries loaded with dlopen(3)
+# Extra: curl.26 openal.4
 LIB_DEPENDS=   audio/openal \
devel/sdl2 \
net/curl
Index: games/yquake2/distinfo
===
RCS file: /home/cvs/ports/games/yquake2/distinfo,v
retrieving revision 1.10
diff -u -p -u -p -r1.10 distinfo
--- games/yquake2/distinfo  7 Jan 2021 22:20:25 -   1.10
+++ games/yquake2/distinfo  12 Dec 2021 11:19:05 -
@@ -1,2 +1,2 @@
-SHA256 (quake2-7.45.tar.xz) = x1JFZ78apgRfJWGb6m5P2QZihLP7gYY7WB+0T09H/2U=
-SIZE (quake2-7.45.tar.xz) = 1997816
+SHA256 (quake2-8.00.tar.xz) = YNjRD8K011uWElGZDk2QM1cZSnMhC8HkKSTt74h9DrI=
+SIZE (quake2-8.00.tar.xz) = 2086776
Index: games/yquake2/patches/patch-Makefile
===
RCS file: games/yquake2/patches/patch-Makefile
diff -N games/yquake2/patches/patch-Makefile
--- games/yquake2/patches/patch-Makefile7 Jan 2021 22:20:26 -   
1.3
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,17 +0,0 @@
-$OpenBSD: patch-Makefile,v 1.3 2021/01/07 22:20:26 thfr Exp $
-
-Index: Makefile
 Makefile.orig
-+++ Makefile
-@@ -452,11 +452,6 @@ release/quake2 : CFLAGS += -DHAVE_EXECINFO
- release/quake2 : LDFLAGS += -lexecinfo
- endif
- 
--ifeq ($(YQ2_OSTYPE), OpenBSD)
--release/quake2 : CFLAGS += -DHAVE_EXECINFO
--release/quake2 : LDFLAGS += -lexecinfo
--endif
--
- ifeq ($(YQ2_OSTYPE), Haiku)
- release/quake2 : CFLAGS += -DHAVE_EXECINFO
- release/quake2 : LDFLAGS += -lexecinfo



Re: [UPDATE] games/yquake2 7.45 -> 8.00

2021-12-12 Thread Stefan Hagen
Anthony J. Bentley wrote:
> Stuart Henderson writes:
> > Please put them in LIB_DEPENDS/WANTLIB with the annotation in the comment. 
> > What they're doing is not safe/reliable because it relies on the library 
> > ABI not changing. Adding as a LIB_DEPENDS ensures that yquake is updated 
> > when required due to any incompatible changes to the libraries.
> 
> This needs to be documented somewhere. bsd.port.mk(5) implies that
> LIB_DEPENDS is not necessary for dlopen'd libraries:
> 
>   LIB_DEPENDS  not needed for   There doesn't seem to be
>   any WANTLIB to match the given LIB_DEPENDS.  Thus, the LIB_DEPENDS won't
>   turn into a @depends line in the created package.  This is often because
>   of confusion between LIB_DEPENDS and RUN_DEPENDS: RUN_DEPENDS is needed
>   for dlopen'd libraries.

I thought so too. What about this?

Index: ./share/man/man5/bsd.port.mk.5
===
RCS file: /home/cvs/src/share/man/man5/bsd.port.mk.5,v
retrieving revision 1.550
diff -u -p -u -p -r1.550 bsd.port.mk.5
--- ./share/man/man5/bsd.port.mk.5  22 Nov 2021 11:17:39 -  1.550
+++ ./share/man/man5/bsd.port.mk.5  12 Dec 2021 11:10:05 -
@@ -3566,6 +3566,10 @@ for instance.
 Also, will happen for multi-packages, where one sets LIB_DEPENDS to have
 a given build dependency (and corresponding WANTLIB for a given SUBPACKAGE).
 .Pp
+It is safer to add dlopen'd libraries to LIB_DEPENDS to ensure that the
+port is rebuild when the library is updated. If this decision has been
+made, a comment should be added.
+.Pp
 See
 .Cm print-package-args Pq Cm lib-depends-args
 for details.



Re: [UPDATE] games/yquake2 7.45 -> 8.00

2021-12-12 Thread Tom Murphy
On Sun, Dec 12, 2021 at 10:32:29AM +, Stuart Henderson wrote:
> Please put them in LIB_DEPENDS/WANTLIB with the annotation in the comment.
> What they're doing is not safe/reliable because it relies on the library ABI
> not changing. Adding as a LIB_DEPENDS ensures that yquake is updated when
> required due to any incompatible changes to the libraries.

OK here's a new patch.

1. Removes the patch that removes execinfo (since execinfo is in base 
   now, it's OK to keep it.)
2. Adds curl and openal to WANTLIB and keeps them in LIB_DEPENDS with
   a comment that they are dlopen(3)'d.

Thanks,
Tom

Index: Makefile
===
RCS file: /cvs/ports/games/yquake2/Makefile,v
retrieving revision 1.23
diff -u -p -r1.23 Makefile
--- Makefile7 Jan 2021 22:20:25 -   1.23
+++ Makefile12 Dec 2021 11:02:20 -
@@ -4,7 +4,7 @@ ONLY_FOR_ARCHS= i386 amd64 sparc64
 
 COMMENT=   Yamagi Quake II
 N= yquake2
-V= 7.45
+V= 8.00
 PKGNAME=   ${N}-${V}
 DISTNAME=  quake2-${V}
 CATEGORIES=games
@@ -17,8 +17,9 @@ EXTRACT_SUFX= .tar.xz
 # GPLv2
 PERMIT_PACKAGE=Yes
 
-WANTLIB += GL SDL2 c curl m openal pthread
+WANTLIB += GL SDL2 c curl execinfo m openal
 
+# openal and curl dlopen(3)'d if found
 LIB_DEPENDS=   audio/openal \
devel/sdl2 \
net/curl
Index: distinfo
===
RCS file: /cvs/ports/games/yquake2/distinfo,v
retrieving revision 1.10
diff -u -p -r1.10 distinfo
--- distinfo7 Jan 2021 22:20:25 -   1.10
+++ distinfo12 Dec 2021 11:02:20 -
@@ -1,2 +1,2 @@
-SHA256 (quake2-7.45.tar.xz) = x1JFZ78apgRfJWGb6m5P2QZihLP7gYY7WB+0T09H/2U=
-SIZE (quake2-7.45.tar.xz) = 1997816
+SHA256 (quake2-8.00.tar.xz) = YNjRD8K011uWElGZDk2QM1cZSnMhC8HkKSTt74h9DrI=
+SIZE (quake2-8.00.tar.xz) = 2086776
Index: patches/patch-Makefile
===
RCS file: patches/patch-Makefile
diff -N patches/patch-Makefile
--- patches/patch-Makefile  7 Jan 2021 22:20:26 -   1.3
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,17 +0,0 @@
-$OpenBSD: patch-Makefile,v 1.3 2021/01/07 22:20:26 thfr Exp $
-
-Index: Makefile
 Makefile.orig
-+++ Makefile
-@@ -452,11 +452,6 @@ release/quake2 : CFLAGS += -DHAVE_EXECINFO
- release/quake2 : LDFLAGS += -lexecinfo
- endif
- 
--ifeq ($(YQ2_OSTYPE), OpenBSD)
--release/quake2 : CFLAGS += -DHAVE_EXECINFO
--release/quake2 : LDFLAGS += -lexecinfo
--endif
--
- ifeq ($(YQ2_OSTYPE), Haiku)
- release/quake2 : CFLAGS += -DHAVE_EXECINFO
- release/quake2 : LDFLAGS += -lexecinfo




Re: [UPDATE] games/yquake2 7.45 -> 8.00

2021-12-12 Thread Anthony J. Bentley
Stuart Henderson writes:
> Please put them in LIB_DEPENDS/WANTLIB with the annotation in the comment. 
> What they're doing is not safe/reliable because it relies on the library 
> ABI not changing. Adding as a LIB_DEPENDS ensures that yquake is updated 
> when required due to any incompatible changes to the libraries.

This needs to be documented somewhere. bsd.port.mk(5) implies that
LIB_DEPENDS is not necessary for dlopen'd libraries:

  LIB_DEPENDS  not needed for   There doesn't seem to be
  any WANTLIB to match the given LIB_DEPENDS.  Thus, the LIB_DEPENDS won't
  turn into a @depends line in the created package.  This is often because
  of confusion between LIB_DEPENDS and RUN_DEPENDS: RUN_DEPENDS is needed
  for dlopen'd libraries.



Re: [UPDATE] games/yquake2 7.45 -> 8.00

2021-12-12 Thread Stuart Henderson
Please put them in LIB_DEPENDS/WANTLIB with the annotation in the comment. 
What they're doing is not safe/reliable because it relies on the library 
ABI not changing. Adding as a LIB_DEPENDS ensures that yquake is updated 
when required due to any incompatible changes to the libraries.


--
 Sent from a phone, apologies for poor formatting.

On 12 December 2021 09:49:24 Stefan Hagen  wrote:


Tom Murphy wrote:

On Sun, Dec 12, 2021 at 10:18:27AM +0100, Stefan Hagen wrote:
> Hi Tom,
>
> This update works for me. The execinfo problem has been discussed
> before. I'm quoting sthen:
>
> > Can it be disabled instead? The backtrace functions are a perennial
> > problem with ports and bulk builds.
> >
> > Software often checks for the headers and functions separately but
> > don't check with -lexecinfo (because they're often in libc), and uses
> > #ifdef HAVE_EXECINFO_H or similar around the #include, and
> > #ifdef HAVE_BACKTRACE or similar around function calls.
> > (yes this is not very sensible, but we do run into it quite often).
>
> So I think we should leave it disabled.

OK I'll leave the execinfo disabled as it was.


As discussed with you, op@ and sthen@ on irc. The execinfo issue doesn't
apply anymore since execinfo is in base. (I read it at the time, but
didn't recall, sorry).

The libs actually can go to RUN_DEP and BUILD_DEP but need to be removed
from WANTLIB then.

I propose the following patch:

Index: games/yquake2/Makefile
===
RCS file: /home/cvs/ports/games/yquake2/Makefile,v
retrieving revision 1.23
diff -u -p -u -p -r1.23 Makefile
--- games/yquake2/Makefile  7 Jan 2021 22:20:25 -   1.23
+++ games/yquake2/Makefile  12 Dec 2021 09:48:07 -
@@ -4,7 +4,7 @@ ONLY_FOR_ARCHS= i386 amd64 sparc64

COMMENT=Yamagi Quake II
N=  yquake2
-V= 7.45
+V= 8.00
PKGNAME=${N}-${V}
DISTNAME=   quake2-${V}
CATEGORIES= games
@@ -17,11 +17,15 @@ EXTRACT_SUFX=   .tar.xz
# GPLv2
PERMIT_PACKAGE= Yes

-WANTLIB += GL SDL2 c curl m openal pthread
+WANTLIB += GL SDL2 c m

-LIB_DEPENDS=   audio/openal \
-   devel/sdl2 \
+DLOPEN_LIBS=   audio/openal \
net/curl
+
+BUILD_DEPENDS= ${DLOPEN_LIBS}
+RUN_DEPENDS=   ${DLOPEN_LIBS}
+
+LIB_DEPENDS=   devel/sdl2

MAKE_ENV+=  VERBOSE=1
USE_GMAKE=  Yes
Index: games/yquake2/distinfo
===
RCS file: /home/cvs/ports/games/yquake2/distinfo,v
retrieving revision 1.10
diff -u -p -u -p -r1.10 distinfo
--- games/yquake2/distinfo  7 Jan 2021 22:20:25 -   1.10
+++ games/yquake2/distinfo  11 Dec 2021 19:44:56 -
@@ -1,2 +1,2 @@
-SHA256 (quake2-7.45.tar.xz) = x1JFZ78apgRfJWGb6m5P2QZihLP7gYY7WB+0T09H/2U=
-SIZE (quake2-7.45.tar.xz) = 1997816
+SHA256 (quake2-8.00.tar.xz) = YNjRD8K011uWElGZDk2QM1cZSnMhC8HkKSTt74h9DrI=
+SIZE (quake2-8.00.tar.xz) = 2086776
Index: games/yquake2/patches/patch-Makefile
===
RCS file: games/yquake2/patches/patch-Makefile
diff -N games/yquake2/patches/patch-Makefile
--- games/yquake2/patches/patch-Makefile7 Jan 2021 22:20:26 -   
1.3
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,17 +0,0 @@
-$OpenBSD: patch-Makefile,v 1.3 2021/01/07 22:20:26 thfr Exp $
-
-Index: Makefile
 Makefile.orig
-+++ Makefile
-@@ -452,11 +452,6 @@ release/quake2 : CFLAGS += -DHAVE_EXECINFO
- release/quake2 : LDFLAGS += -lexecinfo
- endif
-
--ifeq ($(YQ2_OSTYPE), OpenBSD)
--release/quake2 : CFLAGS += -DHAVE_EXECINFO
--release/quake2 : LDFLAGS += -lexecinfo
--endif
--
- ifeq ($(YQ2_OSTYPE), Haiku)
- release/quake2 : CFLAGS += -DHAVE_EXECINFO
- release/quake2 : LDFLAGS += -lexecinfo




Re: [UPDATE] games/yquake2 7.45 -> 8.00

2021-12-12 Thread Stefan Hagen
Tom Murphy wrote:
> On Sun, Dec 12, 2021 at 10:18:27AM +0100, Stefan Hagen wrote:
> > Hi Tom,
> > 
> > This update works for me. The execinfo problem has been discussed 
> > before. I'm quoting sthen:
> > 
> > > Can it be disabled instead? The backtrace functions are a perennial
> > > problem with ports and bulk builds.
> > > 
> > > Software often checks for the headers and functions separately but
> > > don't check with -lexecinfo (because they're often in libc), and uses
> > > #ifdef HAVE_EXECINFO_H or similar around the #include, and
> > > #ifdef HAVE_BACKTRACE or similar around function calls.
> > > (yes this is not very sensible, but we do run into it quite often).
> > 
> > So I think we should leave it disabled.
> 
> OK I'll leave the execinfo disabled as it was.

As discussed with you, op@ and sthen@ on irc. The execinfo issue doesn't 
apply anymore since execinfo is in base. (I read it at the time, but
didn't recall, sorry).

The libs actually can go to RUN_DEP and BUILD_DEP but need to be removed 
from WANTLIB then.

I propose the following patch:

Index: games/yquake2/Makefile
===
RCS file: /home/cvs/ports/games/yquake2/Makefile,v
retrieving revision 1.23
diff -u -p -u -p -r1.23 Makefile
--- games/yquake2/Makefile  7 Jan 2021 22:20:25 -   1.23
+++ games/yquake2/Makefile  12 Dec 2021 09:48:07 -
@@ -4,7 +4,7 @@ ONLY_FOR_ARCHS= i386 amd64 sparc64
 
 COMMENT=   Yamagi Quake II
 N= yquake2
-V= 7.45
+V= 8.00
 PKGNAME=   ${N}-${V}
 DISTNAME=  quake2-${V}
 CATEGORIES=games
@@ -17,11 +17,15 @@ EXTRACT_SUFX=   .tar.xz
 # GPLv2
 PERMIT_PACKAGE=Yes
 
-WANTLIB += GL SDL2 c curl m openal pthread
+WANTLIB += GL SDL2 c m
 
-LIB_DEPENDS=   audio/openal \
-   devel/sdl2 \
+DLOPEN_LIBS=   audio/openal \
net/curl
+
+BUILD_DEPENDS= ${DLOPEN_LIBS}
+RUN_DEPENDS=   ${DLOPEN_LIBS}
+
+LIB_DEPENDS=   devel/sdl2
 
 MAKE_ENV+= VERBOSE=1
 USE_GMAKE= Yes
Index: games/yquake2/distinfo
===
RCS file: /home/cvs/ports/games/yquake2/distinfo,v
retrieving revision 1.10
diff -u -p -u -p -r1.10 distinfo
--- games/yquake2/distinfo  7 Jan 2021 22:20:25 -   1.10
+++ games/yquake2/distinfo  11 Dec 2021 19:44:56 -
@@ -1,2 +1,2 @@
-SHA256 (quake2-7.45.tar.xz) = x1JFZ78apgRfJWGb6m5P2QZihLP7gYY7WB+0T09H/2U=
-SIZE (quake2-7.45.tar.xz) = 1997816
+SHA256 (quake2-8.00.tar.xz) = YNjRD8K011uWElGZDk2QM1cZSnMhC8HkKSTt74h9DrI=
+SIZE (quake2-8.00.tar.xz) = 2086776
Index: games/yquake2/patches/patch-Makefile
===
RCS file: games/yquake2/patches/patch-Makefile
diff -N games/yquake2/patches/patch-Makefile
--- games/yquake2/patches/patch-Makefile7 Jan 2021 22:20:26 -   
1.3
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,17 +0,0 @@
-$OpenBSD: patch-Makefile,v 1.3 2021/01/07 22:20:26 thfr Exp $
-
-Index: Makefile
 Makefile.orig
-+++ Makefile
-@@ -452,11 +452,6 @@ release/quake2 : CFLAGS += -DHAVE_EXECINFO
- release/quake2 : LDFLAGS += -lexecinfo
- endif
- 
--ifeq ($(YQ2_OSTYPE), OpenBSD)
--release/quake2 : CFLAGS += -DHAVE_EXECINFO
--release/quake2 : LDFLAGS += -lexecinfo
--endif
--
- ifeq ($(YQ2_OSTYPE), Haiku)
- release/quake2 : CFLAGS += -DHAVE_EXECINFO
- release/quake2 : LDFLAGS += -lexecinfo



Re: [UPDATE] games/yquake2 7.45 -> 8.00

2021-12-12 Thread Tom Murphy
On Sun, Dec 12, 2021 at 10:18:27AM +0100, Stefan Hagen wrote:
> Hi Tom,
> 
> This update works for me. The execinfo problem has been discussed 
> before. I'm quoting sthen:
> 
> > Can it be disabled instead? The backtrace functions are a perennial
> > problem with ports and bulk builds.
> > 
> > Software often checks for the headers and functions separately but
> > don't check with -lexecinfo (because they're often in libc), and uses
> > #ifdef HAVE_EXECINFO_H or similar around the #include, and
> > #ifdef HAVE_BACKTRACE or similar around function calls.
> > (yes this is not very sensible, but we do run into it quite often).
> 
> So I think we should leave it disabled.

OK I'll leave the execinfo disabled as it was.

> Regarding the libraries. Make lib-depends-check now reports:
> Extra:  curl.26 openal.4
> 
> But the headers are needed at compile time. I first thought was to add
> them as BUILD_DEPENDS and RUN_DEPENDS. But this then doesn't package
> with errors:
> 
> Create /home/dpb/data/packages/amd64/all/yquake2-8.00.tgz
> Missing library for curl>=0.0
> Missing library for openal>=0.0
> 
> Therefore I think LIB_DEPENDS is still the correct place, but add a
> comment about these libs being dlopened' and the expected Extra lines.
> 
> Best Regards,
> Stefan

Thanks for the info! I looked around other ports and saw they also
had similar comments above LIB_DEPENDS.

Here's an updated diff with the comment, and it also keeps the patch
to keep execinfo disabled as discussed above.

OK?

Thanks,
Tom


Index: Makefile
===
RCS file: /cvs/ports/games/yquake2/Makefile,v
retrieving revision 1.23
diff -u -p -r1.23 Makefile
--- Makefile7 Jan 2021 22:20:25 -   1.23
+++ Makefile12 Dec 2021 09:26:23 -
@@ -4,7 +4,7 @@ ONLY_FOR_ARCHS= i386 amd64 sparc64
 
 COMMENT=   Yamagi Quake II
 N= yquake2
-V= 7.45
+V= 8.00
 PKGNAME=   ${N}-${V}
 DISTNAME=  quake2-${V}
 CATEGORIES=games
@@ -17,8 +17,9 @@ EXTRACT_SUFX= .tar.xz
 # GPLv2
 PERMIT_PACKAGE=Yes
 
-WANTLIB += GL SDL2 c curl m openal pthread
+WANTLIB += GL SDL2 c curl m openal
 
+# openal and curl dlopen(3)'d if found
 LIB_DEPENDS=   audio/openal \
devel/sdl2 \
net/curl
Index: distinfo
===
RCS file: /cvs/ports/games/yquake2/distinfo,v
retrieving revision 1.10
diff -u -p -r1.10 distinfo
--- distinfo7 Jan 2021 22:20:25 -   1.10
+++ distinfo12 Dec 2021 09:26:23 -
@@ -1,2 +1,2 @@
-SHA256 (quake2-7.45.tar.xz) = x1JFZ78apgRfJWGb6m5P2QZihLP7gYY7WB+0T09H/2U=
-SIZE (quake2-7.45.tar.xz) = 1997816
+SHA256 (quake2-8.00.tar.xz) = YNjRD8K011uWElGZDk2QM1cZSnMhC8HkKSTt74h9DrI=
+SIZE (quake2-8.00.tar.xz) = 2086776
Index: patches/patch-Makefile
===
RCS file: /cvs/ports/games/yquake2/patches/patch-Makefile,v
retrieving revision 1.3
diff -u -p -r1.3 patch-Makefile
--- patches/patch-Makefile  7 Jan 2021 22:20:26 -   1.3
+++ patches/patch-Makefile  12 Dec 2021 09:26:23 -
@@ -3,7 +3,7 @@ $OpenBSD: patch-Makefile,v 1.3 2021/01/0
 Index: Makefile
 --- Makefile.orig
 +++ Makefile
-@@ -452,11 +452,6 @@ release/quake2 : CFLAGS += -DHAVE_EXECINFO
+@@ -505,11 +505,6 @@ release/quake2 : CFLAGS += -DHAVE_EXECINFO
  release/quake2 : LDFLAGS += -lexecinfo
  endif
  



Re: [UPDATE] games/yquake2 7.45 -> 8.00

2021-12-12 Thread Stefan Hagen
Tom Murphy wrote:
> Hi again,
> 
>   Here is a reworked diff. This time it keeps the patch for the 
>   Makefile that takes execinfo out of the flags. (Though I think
>   it will compile with execinfo anyway, I'm not 100% sure if we
>   should be compiling it or shouldn't?)
> 
>   This makes the least amount of changes to the port.
>   Is this preferable?
> 
>   Thanks,
>   Tom

Hi Tom,

This update works for me. The execinfo problem has been discussed 
before. I'm quoting sthen:

> Can it be disabled instead? The backtrace functions are a perennial
> problem with ports and bulk builds.
> 
> Software often checks for the headers and functions separately but
> don't check with -lexecinfo (because they're often in libc), and uses
> #ifdef HAVE_EXECINFO_H or similar around the #include, and
> #ifdef HAVE_BACKTRACE or similar around function calls.
> (yes this is not very sensible, but we do run into it quite often).

So I think we should leave it disabled.

Regarding the libraries. Make lib-depends-check now reports:
Extra:  curl.26 openal.4

But the headers are needed at compile time. I first thought was to add
them as BUILD_DEPENDS and RUN_DEPENDS. But this then doesn't package
with errors:

Create /home/dpb/data/packages/amd64/all/yquake2-8.00.tgz
Missing library for curl>=0.0
Missing library for openal>=0.0

Therefore I think LIB_DEPENDS is still the correct place, but add a
comment about these libs being dlopened' and the expected Extra lines.

Best Regards,
Stefan

> Index: Makefile
> ===
> RCS file: /cvs/ports/games/yquake2/Makefile,v
> retrieving revision 1.23
> diff -u -p -r1.23 Makefile
> --- Makefile  7 Jan 2021 22:20:25 -   1.23
> +++ Makefile  11 Dec 2021 18:37:05 -
> @@ -4,7 +4,7 @@ ONLY_FOR_ARCHS=   i386 amd64 sparc64
>  
>  COMMENT= Yamagi Quake II
>  N=   yquake2
> -V=   7.45
> +V=   8.00
>  PKGNAME= ${N}-${V}
>  DISTNAME=quake2-${V}
>  CATEGORIES=  games
> @@ -17,7 +17,7 @@ EXTRACT_SUFX=   .tar.xz
>  # GPLv2
>  PERMIT_PACKAGE=  Yes
>  
> -WANTLIB +=   GL SDL2 c curl m openal pthread
> +WANTLIB += GL SDL2 c curl m openal
>  
>  LIB_DEPENDS= audio/openal \
>   devel/sdl2 \
> Index: distinfo
> ===
> RCS file: /cvs/ports/games/yquake2/distinfo,v
> retrieving revision 1.10
> diff -u -p -r1.10 distinfo
> --- distinfo  7 Jan 2021 22:20:25 -   1.10
> +++ distinfo  11 Dec 2021 18:37:05 -
> @@ -1,2 +1,2 @@
> -SHA256 (quake2-7.45.tar.xz) = x1JFZ78apgRfJWGb6m5P2QZihLP7gYY7WB+0T09H/2U=
> -SIZE (quake2-7.45.tar.xz) = 1997816
> +SHA256 (quake2-8.00.tar.xz) = YNjRD8K011uWElGZDk2QM1cZSnMhC8HkKSTt74h9DrI=
> +SIZE (quake2-8.00.tar.xz) = 2086776
> Index: patches/patch-Makefile
> ===
> RCS file: /cvs/ports/games/yquake2/patches/patch-Makefile,v
> retrieving revision 1.3
> diff -u -p -r1.3 patch-Makefile
> --- patches/patch-Makefile7 Jan 2021 22:20:26 -   1.3
> +++ patches/patch-Makefile11 Dec 2021 18:37:05 -
> @@ -3,7 +3,7 @@ $OpenBSD: patch-Makefile,v 1.3 2021/01/0
>  Index: Makefile
>  --- Makefile.orig
>  +++ Makefile
> -@@ -452,11 +452,6 @@ release/quake2 : CFLAGS += -DHAVE_EXECINFO
> +@@ -505,11 +505,6 @@ release/quake2 : CFLAGS += -DHAVE_EXECINFO
>   release/quake2 : LDFLAGS += -lexecinfo
>   endif
>   



Re: [UPDATE] games/yquake2 7.45 -> 8.00

2021-12-11 Thread Tom Murphy
Hi again,

  Here is a reworked diff. This time it keeps the patch for the 
  Makefile that takes execinfo out of the flags. (Though I think
  it will compile with execinfo anyway, I'm not 100% sure if we
  should be compiling it or shouldn't?)

  This makes the least amount of changes to the port.
  Is this preferable?

  Thanks,
  Tom


Index: Makefile
===
RCS file: /cvs/ports/games/yquake2/Makefile,v
retrieving revision 1.23
diff -u -p -r1.23 Makefile
--- Makefile7 Jan 2021 22:20:25 -   1.23
+++ Makefile11 Dec 2021 18:37:05 -
@@ -4,7 +4,7 @@ ONLY_FOR_ARCHS= i386 amd64 sparc64
 
 COMMENT=   Yamagi Quake II
 N= yquake2
-V= 7.45
+V= 8.00
 PKGNAME=   ${N}-${V}
 DISTNAME=  quake2-${V}
 CATEGORIES=games
@@ -17,7 +17,7 @@ EXTRACT_SUFX= .tar.xz
 # GPLv2
 PERMIT_PACKAGE=Yes
 
-WANTLIB += GL SDL2 c curl m openal pthread
+WANTLIB += GL SDL2 c curl m openal
 
 LIB_DEPENDS=   audio/openal \
devel/sdl2 \
Index: distinfo
===
RCS file: /cvs/ports/games/yquake2/distinfo,v
retrieving revision 1.10
diff -u -p -r1.10 distinfo
--- distinfo7 Jan 2021 22:20:25 -   1.10
+++ distinfo11 Dec 2021 18:37:05 -
@@ -1,2 +1,2 @@
-SHA256 (quake2-7.45.tar.xz) = x1JFZ78apgRfJWGb6m5P2QZihLP7gYY7WB+0T09H/2U=
-SIZE (quake2-7.45.tar.xz) = 1997816
+SHA256 (quake2-8.00.tar.xz) = YNjRD8K011uWElGZDk2QM1cZSnMhC8HkKSTt74h9DrI=
+SIZE (quake2-8.00.tar.xz) = 2086776
Index: patches/patch-Makefile
===
RCS file: /cvs/ports/games/yquake2/patches/patch-Makefile,v
retrieving revision 1.3
diff -u -p -r1.3 patch-Makefile
--- patches/patch-Makefile  7 Jan 2021 22:20:26 -   1.3
+++ patches/patch-Makefile  11 Dec 2021 18:37:05 -
@@ -3,7 +3,7 @@ $OpenBSD: patch-Makefile,v 1.3 2021/01/0
 Index: Makefile
 --- Makefile.orig
 +++ Makefile
-@@ -452,11 +452,6 @@ release/quake2 : CFLAGS += -DHAVE_EXECINFO
+@@ -505,11 +505,6 @@ release/quake2 : CFLAGS += -DHAVE_EXECINFO
  release/quake2 : LDFLAGS += -lexecinfo
  endif