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
  



[UPDATE] games/yquake2 7.45 -> 8.00

2021-12-11 Thread Tom Murphy
Hi,

  Attached is a diff that updates games/yquake2 from 7.45 to 8.00.

  * Makefile patch no longer needed as there have been extensive
fixes to the Makefile since 7.45

  * audio/openal and net/curl are dlopen()'d instead of dynamically
linked, so they have been moved to RUN_DEPENDS

  * execinfo added to WANTLIB. The original Makefile patch seems
to remove execinfo but I found it built just fine with it.

  Builds and runs great on my amd64 system. Tested with my Quake2
  server on a few maps.

  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
+++ Makefile11 Dec 2021 12:53:57 -
@@ -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,12 @@ EXTRACT_SUFX=   .tar.xz
 # GPLv2
 PERMIT_PACKAGE=Yes
 
-WANTLIB += GL SDL2 c curl m openal pthread
+WANTLIB += GL SDL2 c execinfo m
 
-LIB_DEPENDS=   audio/openal \
-   devel/sdl2 \
+RUN_DEPENDS=   audio/openal \
net/curl
+
+LIB_DEPENDS=   devel/sdl2
 
 MAKE_ENV+= VERBOSE=1
 USE_GMAKE= Yes
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 12:53:57 -
@@ -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

2020-03-24 Thread Adam Wolk
On Tue, Mar 24, 2020, at 5:09 PM, Solene Rapenne wrote:
> This updates yquake2 to last version
> 
> Changelog available here
> https://github.com/yquake2/yquake2/blob/master/CHANGELOG
> 
> I deleted some wantlib due to this line "Removed static dependencies to
> libogg, libvorbis and libz." and that port-libs-depend-check wasn't
> happy with them in WANTLIB.
> 
> PLIST has been updated with update-plist, it's mostly reordering.
> 
> Works fine for me
>

First off, thanks for hacking on this!
Like we discussed on IRC this is OK awolk@ 
but to the diff provided on https://perso.pw/f/1yKM4u5YyuwCBKGhn6RcIg.diff

Tested on amd64 with all 3 renderers, which confirms that my previous issue
detailed here https://marc.info/?l=openbsd-ports=153773376818361=2 resolved
itself with time.

I can also confirm the music files work at least in .ogg format as that is the 
one I own.

Regards,
Adam



update games/yquake2

2020-03-24 Thread Solene Rapenne
This updates yquake2 to last version

Changelog available here
https://github.com/yquake2/yquake2/blob/master/CHANGELOG

I deleted some wantlib due to this line "Removed static dependencies to
libogg, libvorbis and libz." and that port-libs-depend-check wasn't
happy with them in WANTLIB.

PLIST has been updated with update-plist, it's mostly reordering.

Works fine for me

Index: Makefile
===
RCS file: /data/cvs/ports/games/yquake2/Makefile,v
retrieving revision 1.19
diff -u -p -r1.19 Makefile
--- Makefile12 Jul 2019 21:02:21 -  1.19
+++ Makefile24 Mar 2020 16:06:43 -
@@ -4,25 +4,22 @@ ONLY_FOR_ARCHS=   i386 amd64 sparc64
 
 COMMENT=   Yamagi Quake II
 N= yquake2
-V= 7.21
+V= 7.43
 PKGNAME=   ${N}-${V}
 DISTNAME=  quake2-${V}
 CATEGORIES=games
-REVISION=  2
 
-HOMEPAGE=  http://www.yamagi.org/quake2/
+HOMEPAGE=  https://www.yamagi.org/quake2/
 MAINTAINER=Adam Wolk 
-MASTER_SITES=  http://deponie.yamagi.org/quake2/
+MASTER_SITES=  https://deponie.yamagi.org/quake2/
 EXTRACT_SUFX=  .tar.xz
 
 # GPLv2
 PERMIT_PACKAGE=Yes
 
-WANTLIB += GL SDL2 c m ogg openal pthread vorbis vorbisfile z
+WANTLIB += GL SDL2 c m
 
-LIB_DEPENDS=   audio/libvorbis \
-   audio/openal \
-   devel/sdl2
+LIB_DEPENDS=   devel/sdl2
 
 MAKE_ENV+= VERBOSE=1
 USE_GMAKE= Yes
Index: distinfo
===
RCS file: /data/cvs/ports/games/yquake2/distinfo,v
retrieving revision 1.8
diff -u -p -r1.8 distinfo
--- distinfo29 Jul 2018 14:06:38 -  1.8
+++ distinfo24 Mar 2020 15:46:52 -
@@ -1,2 +1,2 @@
-SHA256 (quake2-7.21.tar.xz) = PnxCi7Kqy8OtqZULnhT8WZ0KBU+e7c2sVaS/9O/vXqU=
-SIZE (quake2-7.21.tar.xz) = 1854928
+SHA256 (quake2-7.43.tar.xz) = kncKVwye61DtMF2DqHKeezTOv3Fm8bijXSPXSicXPxY=
+SIZE (quake2-7.43.tar.xz) = 1989812
Index: pkg/PLIST
===
RCS file: /data/cvs/ports/games/yquake2/pkg/PLIST,v
retrieving revision 1.5
diff -u -p -r1.5 PLIST
--- pkg/PLIST   4 Sep 2018 12:46:13 -   1.5
+++ pkg/PLIST   24 Mar 2020 16:01:32 -
@@ -1,20 +1,21 @@
 @comment $OpenBSD: PLIST,v 1.5 2018/09/04 12:46:13 espie Exp $
 @newgroup _yquake2:779
 @newuser _yquake2:779:_yquake2:daemon:Yamagi Quake II 
Server:/var/yquake2:/sbin/nologin
+@rcscript ${RCDIR}/q2ded
 bin/quake2
-@bin share/yquake2/q2ded
-@bin share/yquake2/quake2
+lib/yquake2/
 share/doc/pkg-readmes/${PKGSTEM}
 share/yquake2/
-share/yquake2/ref_gl1.so
-share/yquake2/ref_gl3.so
 share/yquake2/baseq2/
-share/yquake2/baseq2/game.so
+@so share/yquake2/baseq2/game.so
 @mode 750
 @owner _yquake2
 @group _yquake2
 @sample /var/yquake2/
+@mode
 @owner
 @group
-@mode
-@rcscript ${RCDIR}/q2ded
+@bin share/yquake2/q2ded
+@bin share/yquake2/quake2
+@so share/yquake2/ref_gl1.so
+@so share/yquake2/ref_gl3.so



Re: [UPDATE] games/yquake2 7.01 => 7.02

2017-11-09 Thread Adam Wolk
On Thu, Nov 09, 2017 at 11:04:18AM +0100, Adam Wolk wrote:
> Hi ports@
> 
> Upgrading our yquake2 from 7.01 to 7.02
> 

updated diff with the missing files folder
Index: Makefile
===
RCS file: /cvs/ports/games/yquake2/Makefile,v
retrieving revision 1.9
diff -u -p -r1.9 Makefile
--- Makefile20 Jul 2017 23:33:46 -  1.9
+++ Makefile9 Nov 2017 15:01:45 -
@@ -4,7 +4,7 @@ ONLY_FOR_ARCHS= i386 amd64 sparc64
 
 COMMENT=   Yamagi Quake II
 N= yquake2
-V= 7.01
+V= 7.02
 PKGNAME=   ${N}-${V}
 DISTNAME=  quake2-${V}
 CATEGORIES=games
@@ -31,14 +31,16 @@ MAKE_FLAGS = config WITH_SYSTEMWIDE=yes 
 do-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/${N}
${INSTALL_PROGRAM} ${WRKBUILD}/release/{quake2,q2ded} \
-   ${PREFIX}/bin/
+   ${PREFIX}/share/${N}/
${INSTALL_DATA_DIR} ${PREFIX}/share/${N}/baseq2
${INSTALL_PROGRAM} ${WRKBUILD}/release/baseq2/game.so \
${PREFIX}/share/${N}/baseq2/
${INSTALL_DATA_DIR} ${PREFIX}/lib/${N}
${INSTALL_PROGRAM} ${WRKBUILD}/release/ref_gl1.so \
-   ${PREFIX}/lib/${N}/
+   ${PREFIX}/share/${N}/
${INSTALL_PROGRAM} ${WRKBUILD}/release/ref_gl3.so \
-   ${PREFIX}/lib/${N}/
+   ${PREFIX}/share/${N}/
+   ${SUBST_CMD} -m 555 -c ${FILESDIR}/quake2.sh ${WRKSRC}/quake2
+   ${INSTALL_SCRIPT} ${WRKSRC}/quake2 ${PREFIX}/bin/
 
 .include 
Index: distinfo
===
RCS file: /cvs/ports/games/yquake2/distinfo,v
retrieving revision 1.4
diff -u -p -r1.4 distinfo
--- distinfo20 Jul 2017 23:33:46 -  1.4
+++ distinfo9 Nov 2017 15:01:45 -
@@ -1,2 +1,2 @@
-SHA256 (quake2-7.01.tar.xz) = ly93hnCTs8Fi37KMqTBYXLcdG3sYPWdthlnS/JcTfvc=
-SIZE (quake2-7.01.tar.xz) = 1778212
+SHA256 (quake2-7.02.tar.xz) = qe29vbXRP1abqr4DRtymPcP/pQwk3GeViDnoCuQBwN4=
+SIZE (quake2-7.02.tar.xz) = 1787092
Index: files/quake2.sh
===
RCS file: files/quake2.sh
diff -N files/quake2.sh
--- /dev/null   1 Jan 1970 00:00:00 -
+++ files/quake2.sh 9 Nov 2017 15:01:45 -
@@ -0,0 +1,4 @@
+#!/bin/sh
+cd ${TRUEPREFIX}/share/yquake2
+exec ${TRUEPREFIX}/share/yquake2/quake2
+
Index: patches/patch-Makefile
===
RCS file: patches/patch-Makefile
diff -N patches/patch-Makefile
--- patches/patch-Makefile  20 Jul 2017 23:33:46 -  1.1
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,16 +0,0 @@
-$OpenBSD: patch-Makefile,v 1.1 2017/07/20 23:33:46 awolk Exp $
-
-Index: Makefile
 Makefile.orig
-+++ Makefile
-@@ -251,8 +251,8 @@ endif
- CFLAGS += -fvisibility=hidden
- LDFLAGS += -fvisibility=hidden
- 
--ifneq ($(YQ2_OSTYPE), Darwin)
--# for some reason the OSX linker doesn't support this
-+ifneq ($(YQ2_OSTYPE), $(filter $(YQ2_OSTYPE), Darwin, OpenBSD))
-+# for some reason the OSX & OpenBSD linker doesn't support this
- LDFLAGS += -Wl,--no-undefined
- endif
- 
Index: patches/patch-src_backends_generic_vid_c
===
RCS file: patches/patch-src_backends_generic_vid_c
diff -N patches/patch-src_backends_generic_vid_c
--- patches/patch-src_backends_generic_vid_c20 Jul 2017 23:33:46 -  
1.1
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,14 +0,0 @@
-$OpenBSD: patch-src_backends_generic_vid_c,v 1.1 2017/07/20 23:33:46 awolk Exp 
$
-
-Index: src/backends/generic/vid.c
 src/backends/generic/vid.c.orig
-+++ src/backends/generic/vid.c
-@@ -342,7 +342,7 @@ VID_LoadRefresh(void)
-   Com_Printf("- refresher initialization -\n");
- 
-   snprintf(reflib_name, sizeof(reflib_name), "ref_%s.%s", 
vid_renderer->string, lib_ext);
--  snprintf(reflib_path, sizeof(reflib_path), "%s%s", Sys_GetBinaryDir(), 
reflib_name);
-+  snprintf(reflib_path, sizeof(reflib_path), "/usr/local/lib/yquake2/%s", 
reflib_name);
- 
-   Com_Printf("LoadLibrary(%s)\n", reflib_name);
-   GetRefAPI = Sys_LoadLibrary(reflib_path, "GetRefAPI", _handle);
Index: pkg/PLIST
===
RCS file: /cvs/ports/games/yquake2/pkg/PLIST,v
retrieving revision 1.3
diff -u -p -r1.3 PLIST
--- pkg/PLIST   20 Jul 2017 23:33:46 -  1.3
+++ pkg/PLIST   9 Nov 2017 15:01:45 -
@@ -1,13 +1,13 @@
 @comment $OpenBSD: PLIST,v 1.3 2017/07/20 23:33:46 awolk Exp $
 @newgroup _yquake2:779
 @newuser _yquake2:779:_yquake2:daemon:Yamagi Quake II 
Server:/var/yquake2:/sbin/nologin
-@bin bin/q2ded
-@bin bin/quake2
-lib/yquake2/
-lib/yquake2/ref_gl1.so
-lib/yquake2/ref_gl3.so
+bin/quake2
+@bin share/yquake2/q2ded
+@bin share/yquake2/quake2
 share/doc/pkg-readmes/${FULLPKGNAME}
 share/yquake2/
+share/yquake2/ref_gl1.so
+share/yquake2/ref_gl3.so
 share/yquake2/baseq2/
 share/yquake2/baseq2/game.so
 @mode 750

[UPDATE] games/yquake2 7.01 => 7.02

2017-11-09 Thread Adam Wolk
Hi ports@

Upgrading our yquake2 from 7.01 to 7.02

Port changes:
 - bump version
 - everything now lives under /usr/local/share/yquake2
   this has been asked by upstream and outlined in
   their porting guide that was created after
   I started complaining that they want relative
   paths between the binaries:

   
https://github.com/yquake2/yquake2/blob/master/stuff/packaging.md#where-you-should-put-the-executables

 - adding a new wrapper for the quake2 binary
   to cd into the port directory before executing it
   as we provide no way for a binary to get its executable
   directory
 - drop the patch that hardcoded the executable directory
   upstream accounted for us not supporting that feature
   and defaults to returning cwd (./) instead of bailing
   out with an error
 - modified the q2ded rc.d script to account for the need
   of changing the working directory before starting the
   server
 - note I am not providing a separate wrapper for q2ded
   in /usr/bin on purpose - I don't see a need for running
   it outside of the rc.d scripts for any reasons other
   than debugging and that's rare enough that people can
   just cd to the game folder themselves
 - we can drop the Makefile compilation flag diff as
   upstream took our patch

Upstream changelog:

Quake II 7.01 to 7.02:
- Fix several corner cases regarding render library loading. The game
  should now always fall back to the OpenGL 1.4 renderer if the new
  OpenGL 3.2 renderer can't be initialized. Also the game aborts if no
  useable OpenGL implementation exists.
- Refactor the search path code. This should fix several bugs with
  Quake II writing to the wrong directories or being unable to find
  some / all assets.
- Reimplement portable binaries. If called with the -portable command
  line option Quake II saves all data (configs, savegames, screenshorts
  etc.) into it's systemwide installation directory and not users home
  directory. In contrast to the old implementation on Windows stdout.txt
  contains all output, the first lines are no longer missing.
- vid_fullscreen set to 1 now keeps the desktops resolution. Set it to 2
  to change the resolution.
- Instead of a list with precalculated FOV values the video menu now
  shows a slider with possible values from 60 to 120. Horplus is now
  always enabled, set the horplus cvar to 0 to disable it.
- The game is now able to hold the requested framerate (either by the
  vsync or the gl_maxfps cvar) with an accuracy of about +/- 1% as long
  as the hardware is fast enough.  The framecounter was reimplemented
  to be much more precise.
- Fix misspredictions if an original client running on Win32 connects
to a Yamagi Quake II server running on Linux/i386.

Frags? OK's?
Index: Makefile
===
RCS file: /cvs/ports/games/yquake2/Makefile,v
retrieving revision 1.9
diff -u -p -r1.9 Makefile
--- Makefile20 Jul 2017 23:33:46 -  1.9
+++ Makefile9 Nov 2017 09:53:43 -
@@ -4,7 +4,7 @@ ONLY_FOR_ARCHS= i386 amd64 sparc64
 
 COMMENT=   Yamagi Quake II
 N= yquake2
-V= 7.01
+V= 7.02
 PKGNAME=   ${N}-${V}
 DISTNAME=  quake2-${V}
 CATEGORIES=games
@@ -31,14 +31,16 @@ MAKE_FLAGS = config WITH_SYSTEMWIDE=yes 
 do-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/${N}
${INSTALL_PROGRAM} ${WRKBUILD}/release/{quake2,q2ded} \
-   ${PREFIX}/bin/
+   ${PREFIX}/share/${N}/
${INSTALL_DATA_DIR} ${PREFIX}/share/${N}/baseq2
${INSTALL_PROGRAM} ${WRKBUILD}/release/baseq2/game.so \
${PREFIX}/share/${N}/baseq2/
${INSTALL_DATA_DIR} ${PREFIX}/lib/${N}
${INSTALL_PROGRAM} ${WRKBUILD}/release/ref_gl1.so \
-   ${PREFIX}/lib/${N}/
+   ${PREFIX}/share/${N}/
${INSTALL_PROGRAM} ${WRKBUILD}/release/ref_gl3.so \
-   ${PREFIX}/lib/${N}/
+   ${PREFIX}/share/${N}/
+   ${SUBST_CMD} -m 555 -c ${FILESDIR}/quake2.sh ${WRKSRC}/quake2
+   ${INSTALL_SCRIPT} ${WRKSRC}/quake2 ${PREFIX}/bin/
 
 .include 
Index: distinfo
===
RCS file: /cvs/ports/games/yquake2/distinfo,v
retrieving revision 1.4
diff -u -p -r1.4 distinfo
--- distinfo20 Jul 2017 23:33:46 -  1.4
+++ distinfo9 Nov 2017 09:53:43 -
@@ -1,2 +1,2 @@
-SHA256 (quake2-7.01.tar.xz) = ly93hnCTs8Fi37KMqTBYXLcdG3sYPWdthlnS/JcTfvc=
-SIZE (quake2-7.01.tar.xz) = 1778212
+SHA256 (quake2-7.02.tar.xz) = qe29vbXRP1abqr4DRtymPcP/pQwk3GeViDnoCuQBwN4=
+SIZE (quake2-7.02.tar.xz) = 1787092
Index: patches/patch-Makefile
===
RCS file: patches/patch-Makefile
diff -N patches/patch-Makefile
--- patches/patch-Makefile  20 Jul 2017 23:33:46 -  1.1
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,16 +0,0 @@
-$OpenBSD: patch-Makefile,v 1.1 2017/07/20 23:33:46 awolk Exp $
-
-Index: Makefile
 Makefile.orig
-+++ 

[UPDATE] games/yquake2 6.00 => 7.01

2017-07-20 Thread Adam Wolk
Hi ports@,

Upgrading our yquake2 from 6.00 to 7.01

Port changes:
 - bump version
 - install new ref_gl1 / ref_gl3 shared libraries into
   /usr/local/lib/yquake2
 - patch the Makefile to not pass -Wl,--no-undefined to
   the linker, change already merged upstream:
 https://github.com/yquake2/yquake2/pull/213
 - patch backends/generic/vid.c to dlopen libraries
   from /usr/local/lib/yquake2 instead of relying
   on Sys_GetBinaryDir() that thinks the OS can tell
   it the executable path

Regarding the .so changes, please see the following 2 github links
 - https://github.com/yquake2/yquake2/pull/213
 - https://github.com/yquake2/yquake2/issues/214
especially the second one. In short, it's possible that upstream will
add a way to define /usr/local/lib/yquake2 as a compile time option
which would make this patch obsolete. Note that I did not move the game.so
file on purpose, as upstream mentioned in 213 that mods expect it to be
in that specific spot.

If you want to test the new renderer just execute the game with:
 $ quake2 +vid_renderer gl3 

after first run it will be added to your config, or you can add it
yourself by adding:

 set vid_renderer "gl3"

to:

/home/mulander/.yq2/baseq2/config.cfg

Upstream changelog:

Quake II 7.00 to 7.01:
- Fix build of GL3 for platforms without SSE.
- Fix Jennel Jaquays name in credits and quit screen.
- Make Quake II high DPI aware on Window Vista and above.
- Fix some problems with loading dependend librarys on Windows.

Quake II 6.00 to 7.00:
- Remove the broken multitexturing render path from the OpenGL 1.4
  renderer. It was switched off by default in 6.00.
- Reimplement the support for shared renderer libraries. Please note
  the this is an incompatible implementation with an custom API. The
  original renderer libraries will not work!
- Implement an OpenGL 3.2 renderer. This renderer has the same look
  and feel as the old OpenGL 1.4 renderer but makes heavy use of
  modern OpenGL and GPU features. An OpenGL 3.2 capable GPU (Intel
  starting with Ivy Bridge on Windows or Sandy Bridge on Linux, Nvidia
  staring with G80 and AMD starting with R600 / HD2000) is required.
- Fix OpenAL compatibility with modern openal-soft versions.
- Several fixes and optimizations to OpenAL, implement support for
  doppler effects. (by xorw)

Frags? OK's?

Index: Makefile
===
RCS file: /cvs/ports/games/yquake2/Makefile,v
retrieving revision 1.8
diff -u -p -r1.8 Makefile
--- Makefile27 May 2017 19:57:06 -  1.8
+++ Makefile20 Jul 2017 20:44:12 -
@@ -4,10 +4,9 @@ ONLY_FOR_ARCHS=i386 amd64 sparc64
 
 COMMENT=   Yamagi Quake II
 N= yquake2
-V= 6.00
+V= 7.01
 PKGNAME=   ${N}-${V}
 DISTNAME=  quake2-${V}
-REVISION=  2
 CATEGORIES=games
 
 HOMEPAGE=  http://www.yamagi.org/quake2/
@@ -36,5 +35,10 @@ do-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/${N}/baseq2
${INSTALL_PROGRAM} ${WRKBUILD}/release/baseq2/game.so \
${PREFIX}/share/${N}/baseq2/
+   ${INSTALL_DATA_DIR} ${PREFIX}/lib/${N}
+   ${INSTALL_PROGRAM} ${WRKBUILD}/release/ref_gl1.so \
+   ${PREFIX}/lib/${N}/
+   ${INSTALL_PROGRAM} ${WRKBUILD}/release/ref_gl3.so \
+   ${PREFIX}/lib/${N}/
 
 .include 
Index: distinfo
===
RCS file: /cvs/ports/games/yquake2/distinfo,v
retrieving revision 1.3
diff -u -p -r1.3 distinfo
--- distinfo5 Dec 2016 21:03:33 -   1.3
+++ distinfo20 Jul 2017 20:44:12 -
@@ -1,2 +1,2 @@
-SHA256 (quake2-6.00.tar.xz) = N7a7eiHUOxf2bvkIsXKjuRi5Z/r7pZwT7ssUfXXEXUw=
-SIZE (quake2-6.00.tar.xz) = 1705640
+SHA256 (quake2-7.01.tar.xz) = ly93hnCTs8Fi37KMqTBYXLcdG3sYPWdthlnS/JcTfvc=
+SIZE (quake2-7.01.tar.xz) = 1778212
Index: patches/patch-Makefile
===
RCS file: patches/patch-Makefile
diff -N patches/patch-Makefile
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-Makefile  20 Jul 2017 20:44:12 -
@@ -0,0 +1,16 @@
+$OpenBSD$
+
+Index: Makefile
+--- Makefile.orig
 Makefile
+@@ -251,8 +251,8 @@ endif
+ CFLAGS += -fvisibility=hidden
+ LDFLAGS += -fvisibility=hidden
+ 
+-ifneq ($(YQ2_OSTYPE), Darwin)
+-# for some reason the OSX linker doesn't support this
++ifneq ($(YQ2_OSTYPE), $(filter $(YQ2_OSTYPE), Darwin, OpenBSD))
++# for some reason the OSX & OpenBSD linker doesn't support this
+ LDFLAGS += -Wl,--no-undefined
+ endif
+ 
Index: patches/patch-src_backends_generic_vid_c
===
RCS file: patches/patch-src_backends_generic_vid_c
diff -N patches/patch-src_backends_generic_vid_c
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-src_backends_generic_vid_c20 Jul 2017 20:44:12 -
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: src/backends/generic/vid.c
+--- src/backends/generic/vid.c.orig
 

[UPDATE] games/yquake2 5.34 => 6.00

2016-12-04 Thread Adam Wolk
Hi ports@

Here is a trivial version bump for games/yquake2 6.00.

Tested on amd64 snapshot from December 1st.

Upstream changelog:

Quake II 5.34 to 6.00:
- Make the client asynchronous. The old behaviour can be forced by
  setting cl_async to 0. Please note that asynchronicity can lead to
  problems if the old SDL 1.2 backend is used and vsync is enabled.
- Implement gl_overbrightbits in the non multitexturing case.  A value
  of 1 just fixes lighting on water surfaces, higher values increase
  the brightness of everything.
- General renderer overhaul for better compatibility with modern GPUs.
  OpenGL 1.4 is now required, older versions are no longer supported.
  Multitexturing was deprecated and will be removed in a future release.
- Fix some longstanding AI problems.
- Several general gameplay fixes.

Any feedback? OK's?
Index: Makefile
===
RCS file: /cvs/ports/games/yquake2/Makefile,v
retrieving revision 1.4
diff -u -p -r1.4 Makefile
--- Makefile28 Jun 2016 20:50:22 -  1.4
+++ Makefile4 Dec 2016 17:07:26 -
@@ -4,7 +4,7 @@ ONLY_FOR_ARCHS= i386 amd64 sparc64
 
 COMMENT=   Yamagi Quake II
 N= yquake2
-V= 5.34
+V= 6.00
 PKGNAME=   ${N}-${V}
 DISTNAME=  quake2-${V}
 CATEGORIES=games
Index: distinfo
===
RCS file: /cvs/ports/games/yquake2/distinfo,v
retrieving revision 1.2
diff -u -p -r1.2 distinfo
--- distinfo28 Jun 2016 20:50:22 -  1.2
+++ distinfo4 Dec 2016 17:07:26 -
@@ -1,2 +1,2 @@
-SHA256 (quake2-5.34.tar.xz) = gOEZPGM9vuh7n8uGQwafm9pEOqZVUcjzUYcBNsM9ONQ=
-SIZE (quake2-5.34.tar.xz) = 1702984
+SHA256 (quake2-6.00.tar.xz) = N7a7eiHUOxf2bvkIsXKjuRi5Z/r7pZwT7ssUfXXEXUw=
+SIZE (quake2-6.00.tar.xz) = 1705640


Re: [UPDATE] games/yquake2 5.32 => 5.34

2016-06-27 Thread lists
Sun, 26 Jun 2016 22:31:55 +0200 Adam Wolk 

> > Same diff but with an additional change to
> > ports/infrastructure/db/user.list and using the same ID.

An underscore informs me it's a program Who brought the user, correct?

Is it any reasonable consideration to make the user names any package,
(here a port) brings up on the system match the _program (_port) name?

Is it also worth making packages (ports) users/groups start with a _p
so they end up together when listed alphabetically, e.g. _pdescent2 ?

NB: I am only considering the system maintenance factors, and don't
insist on anything changed, but please let me know what is the norm.

> Index: Makefile
> ===
> RCS file: /cvs/ports/games/yquake2/Makefile,v
> retrieving revision 1.3
> diff -u -p -r1.3 Makefile
> --- Makefile  16 Mar 2016 16:46:32 -  1.3
> +++ Makefile  26 Jun 2016 20:23:55 -
> @@ -4,12 +4,13 @@ ONLY_FOR_ARCHS= i386 amd64 sparc64
>  
>  COMMENT= Yamagi Quake II
>  N=   yquake2
> -V=   5.32
> +V=   5.34
>  PKGNAME= ${N}-${V}
>  DISTNAME=quake2-${V}
>  CATEGORIES=  games
>  
>  HOMEPAGE=http://www.yamagi.org/quake2/
> +MAINTAINER=  Adam Wolk 
>  MASTER_SITES=http://deponie.yamagi.org/quake2/
>  EXTRACT_SUFX=.tar.xz
>  
> @@ -25,11 +26,12 @@ LIB_DEPENDS=  audio/libvorbis \
>  MAKE_ENV+=   VERBOSE=1
>  USE_GMAKE=   Yes
>  
> +MAKE_FLAGS = config WITH_SYSTEMWIDE=yes WITH_SYSTEMDIR=${PREFIX}/share/${N}
> +
>  do-install:
> - ${INSTALL_SCRIPT} ${FILESDIR}/yquake2 ${PREFIX}/bin/
>   ${INSTALL_DATA_DIR} ${PREFIX}/share/${N}
>   ${INSTALL_PROGRAM} ${WRKBUILD}/release/{quake2,q2ded} \
> - ${PREFIX}/share/${N}/
> + ${PREFIX}/bin/
>   ${INSTALL_DATA_DIR} ${PREFIX}/share/${N}/baseq2
>   ${INSTALL_PROGRAM} ${WRKBUILD}/release/baseq2/game.so \
>   ${PREFIX}/share/${N}/baseq2/
> Index: distinfo
> ===
> RCS file: /cvs/ports/games/yquake2/distinfo,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 distinfo
> --- distinfo  17 Jan 2016 15:18:31 -  1.1.1.1
> +++ distinfo  26 Jun 2016 20:23:55 -
> @@ -1,2 +1,2 @@
> -SHA256 (quake2-5.32.tar.xz) = v8eAMlSp0iiIVU1a8lL//iEts9qwYxY3u5BFhhuOUIw=
> -SIZE (quake2-5.32.tar.xz) = 1692720
> +SHA256 (quake2-5.34.tar.xz) = gOEZPGM9vuh7n8uGQwafm9pEOqZVUcjzUYcBNsM9ONQ=
> +SIZE (quake2-5.34.tar.xz) = 1702984
> Index: files/yquake2
> ===
> RCS file: files/yquake2
> diff -N files/yquake2
> --- files/yquake2 17 Jan 2016 15:18:31 -  1.1.1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -
> @@ -1,3 +0,0 @@
> -#!/bin/sh
> -cd /usr/local/share/yquake2
> -exec /usr/local/share/yquake2/quake2 "$@"
> Index: pkg/PLIST
> ===
> RCS file: /cvs/ports/games/yquake2/pkg/PLIST,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 PLIST
> --- pkg/PLIST 17 Jan 2016 15:18:31 -  1.1.1.1
> +++ pkg/PLIST 26 Jun 2016 20:23:55 -
> @@ -1,8 +1,17 @@
>  @comment $OpenBSD: PLIST,v 1.1.1.1 2016/01/17 15:18:31 bmercer Exp $
> -bin/yquake2
> +@newgroup _q2:779
> +@newuser _q2:779:_q2:daemon:Yamagi Quake II Server:/var/q2:/sbin/nologin
> +@bin bin/q2ded
> +@bin bin/quake2
>  share/doc/pkg-readmes/${FULLPKGNAME}
>  share/yquake2/
>  share/yquake2/baseq2/
>  share/yquake2/baseq2/game.so
> -@bin share/yquake2/q2ded
> -@bin share/yquake2/quake2
> +@mode 750
> +@owner _q2
> +@group _q2
> +@sample /var/q2/
> +@owner
> +@group
> +@mode
> +@rcscript ${RCDIR}/q2ded
> Index: pkg/q2ded.rc
> ===
> RCS file: pkg/q2ded.rc
> diff -N pkg/q2ded.rc
> --- /dev/null 1 Jan 1970 00:00:00 -
> +++ pkg/q2ded.rc  26 Jun 2016 20:23:55 -
> @@ -0,0 +1,15 @@
> +#!/bin/sh
> +#
> +# $OpenBSD: $
> +
> +daemon="${TRUEPREFIX}/bin/q2ded"
> +daemon_user="_q2"
> +
> +. /etc/rc.d/rc.subr
> +
> +pexp="${daemon}.*"
> +
> +rc_bg=YES
> +rc_reload=NO
> +
> +rc_cmd $1
> Index: user.list
> ===
> RCS file: /cvs/ports/infrastructure/db/user.list,v
> retrieving revision 1.275
> diff -u -p -r1.275 user.list
> --- user.list 2 Jun 2016 18:32:26 -   1.275
> +++ user.list 26 Jun 2016 20:24:13 -
> @@ -287,3 +287,4 @@ id  user  group   port options
>  776 _ioq3_ioq3   games/ioquake3
>  777 _svnserve_svnserve   devel/subversion
>  778 _gitdaemon   _gitdaemon  devel/git
> +779 _q2  _q2 games/yquake2
> 
> 



Re: [UPDATE] games/yquake2 5.32 => 5.34

2016-06-26 Thread Adam Wolk
On Sun, 26 Jun 2016 21:57:53 +0200
Adam Wolk  wrote:

> On Sun, 26 Jun 2016 20:51:46 +0200
> Adam Wolk  wrote:
> 
> > Hi ports@
> > 
> > Here is an updated diff for games/yquake2 5.34.
> > 
> > Changes in the port:
> >  - taking MAINTAINER, agreed with bmercer@ who provided the initial
> > port
> >  - added a q2ded rc script in a similar fashion as the
> > games/ioquake3 port does (note I did not reserve any id's so far -
> > how do we do that?)  
> 
> Updated diff below thanks to fcambus :)
> 
> >  - the existing /usr/local/share/yquake2/q2ded binary from previous
> >port did not work as it was searching for games.so from a
> > relative path. I found a way to make both quake2 and q2ded work
> > with an upstream supported MAKE variable to provide the system wide
> > quake data directory. Thanks to this change we can drop the wrapper
> > script and use the binaries directly.
> >  - adding a new _q2 user/group plus /var/q2 for the dedicated server
> >binary
> >  - updated the port to version 5.34
> > 
> > Tested on amd64 snapshot from June 18th.
> > 
> > Additional notes:
> >  - make port-lib-depends-check complains on:
> >Extra:  openal.2 pthread.22
> > 
> >ktrace tells me that the check is wrong. Openal and pthreads are
> > both used.
> >  - upstream said in their changelog that they are changing their
> >platform policy 'Switch from an arch whitelist to an "all archs
> > are supported" approach.'. I saw in our tree a change by landry@
> >specifically limiting the supported platform to the upstream
> >supported versions
> >
> > (http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/games/yquake2/Makefile?rev=1.2=text/x-cvsweb-markup).
> >I am not removing this restriction until I get some feedback from
> >people able to test other platforms than currently
> >listed in ONLY_FOR_ARCHS.
> > 
> > Upstream changelog:
> > 
> > Quake II 5.33 to 5.34:
> > - Add support for stereo 3D (by Valery Guskov)
> > - Make gibt solid so they move with conveyor belts.
> > - Disable gl_ext_multitexturing by default.
> > - Switch from an arch whitelist to an "all archs are supported"
> >   approach.
> > - Add a new README.
> > 
> > Quake II 5.32 to 5.33:
> > - Add OGG volume slider in settings menu
> > - Fixed some bugs in volume settings
> > - Replaced HUD scale option in video menu with generic UI scale
> > - General UI upscaling improvements
> > - Better support for keyboards with AZERTY layout
> > 
> > Any feedback? OK's?
> >   
> 
> Same diff but with an additional change to
> ports/infrastructure/db/user.list and using the same ID.
> 

Fix tabs vs spaces in user.list reported by danj@

Index: Makefile
===
RCS file: /cvs/ports/games/yquake2/Makefile,v
retrieving revision 1.3
diff -u -p -r1.3 Makefile
--- Makefile16 Mar 2016 16:46:32 -  1.3
+++ Makefile26 Jun 2016 20:23:55 -
@@ -4,12 +4,13 @@ ONLY_FOR_ARCHS=   i386 amd64 sparc64
 
 COMMENT=   Yamagi Quake II
 N= yquake2
-V= 5.32
+V= 5.34
 PKGNAME=   ${N}-${V}
 DISTNAME=  quake2-${V}
 CATEGORIES=games
 
 HOMEPAGE=  http://www.yamagi.org/quake2/
+MAINTAINER=Adam Wolk 
 MASTER_SITES=  http://deponie.yamagi.org/quake2/
 EXTRACT_SUFX=  .tar.xz
 
@@ -25,11 +26,12 @@ LIB_DEPENDS=audio/libvorbis \
 MAKE_ENV+= VERBOSE=1
 USE_GMAKE= Yes
 
+MAKE_FLAGS = config WITH_SYSTEMWIDE=yes WITH_SYSTEMDIR=${PREFIX}/share/${N}
+
 do-install:
-   ${INSTALL_SCRIPT} ${FILESDIR}/yquake2 ${PREFIX}/bin/
${INSTALL_DATA_DIR} ${PREFIX}/share/${N}
${INSTALL_PROGRAM} ${WRKBUILD}/release/{quake2,q2ded} \
-   ${PREFIX}/share/${N}/
+   ${PREFIX}/bin/
${INSTALL_DATA_DIR} ${PREFIX}/share/${N}/baseq2
${INSTALL_PROGRAM} ${WRKBUILD}/release/baseq2/game.so \
${PREFIX}/share/${N}/baseq2/
Index: distinfo
===
RCS file: /cvs/ports/games/yquake2/distinfo,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 distinfo
--- distinfo17 Jan 2016 15:18:31 -  1.1.1.1
+++ distinfo26 Jun 2016 20:23:55 -
@@ -1,2 +1,2 @@
-SHA256 (quake2-5.32.tar.xz) = v8eAMlSp0iiIVU1a8lL//iEts9qwYxY3u5BFhhuOUIw=
-SIZE (quake2-5.32.tar.xz) = 1692720
+SHA256 (quake2-5.34.tar.xz) = gOEZPGM9vuh7n8uGQwafm9pEOqZVUcjzUYcBNsM9ONQ=
+SIZE (quake2-5.34.tar.xz) = 1702984
Index: files/yquake2
===
RCS file: files/yquake2
diff -N files/yquake2
--- files/yquake2   17 Jan 2016 15:18:31 -  1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,3 +0,0 @@
-#!/bin/sh
-cd /usr/local/share/yquake2
-exec /usr/local/share/yquake2/quake2 "$@"
Index: pkg/PLIST
===
RCS file: /cvs/ports/games/yquake2/pkg/PLIST,v
retrieving revision 

Re: [UPDATE] games/yquake2 5.32 => 5.34

2016-06-26 Thread Adam Wolk
On Sun, 26 Jun 2016 20:51:46 +0200
Adam Wolk  wrote:

> Hi ports@
> 
> Here is an updated diff for games/yquake2 5.34.
> 
> Changes in the port:
>  - taking MAINTAINER, agreed with bmercer@ who provided the initial
> port
>  - added a q2ded rc script in a similar fashion as the games/ioquake3
>port does (note I did not reserve any id's so far - how do we do
>that?)

Updated diff below thanks to fcambus :)

>  - the existing /usr/local/share/yquake2/q2ded binary from previous
>port did not work as it was searching for games.so from a relative
>path. I found a way to make both quake2 and q2ded work with an
>upstream supported MAKE variable to provide the system wide quake
>data directory. Thanks to this change we can drop the wrapper
> script and use the binaries directly.
>  - adding a new _q2 user/group plus /var/q2 for the dedicated server
>binary
>  - updated the port to version 5.34
> 
> Tested on amd64 snapshot from June 18th.
> 
> Additional notes:
>  - make port-lib-depends-check complains on:
>Extra:  openal.2 pthread.22
> 
>ktrace tells me that the check is wrong. Openal and pthreads are
> both used.
>  - upstream said in their changelog that they are changing their
>platform policy 'Switch from an arch whitelist to an "all archs are
>supported" approach.'. I saw in our tree a change by landry@
>specifically limiting the supported platform to the upstream
>supported versions
>
> (http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/games/yquake2/Makefile?rev=1.2=text/x-cvsweb-markup).
>I am not removing this restriction until I get some feedback from
>people able to test other platforms than currently
>listed in ONLY_FOR_ARCHS.
> 
> Upstream changelog:
> 
> Quake II 5.33 to 5.34:
> - Add support for stereo 3D (by Valery Guskov)
> - Make gibt solid so they move with conveyor belts.
> - Disable gl_ext_multitexturing by default.
> - Switch from an arch whitelist to an "all archs are supported"
>   approach.
> - Add a new README.
> 
> Quake II 5.32 to 5.33:
> - Add OGG volume slider in settings menu
> - Fixed some bugs in volume settings
> - Replaced HUD scale option in video menu with generic UI scale
> - General UI upscaling improvements
> - Better support for keyboards with AZERTY layout
> 
> Any feedback? OK's?
> 

Same diff but with an additional change to ports/infrastructure/db/user.list
and using the same ID.

Index: Makefile
===
RCS file: /cvs/ports/games/yquake2/Makefile,v
retrieving revision 1.3
diff -u -p -r1.3 Makefile
--- Makefile16 Mar 2016 16:46:32 -  1.3
+++ Makefile26 Jun 2016 19:54:14 -
@@ -4,12 +4,13 @@ ONLY_FOR_ARCHS=   i386 amd64 sparc64
 
 COMMENT=   Yamagi Quake II
 N= yquake2
-V= 5.32
+V= 5.34
 PKGNAME=   ${N}-${V}
 DISTNAME=  quake2-${V}
 CATEGORIES=games
 
 HOMEPAGE=  http://www.yamagi.org/quake2/
+MAINTAINER=Adam Wolk 
 MASTER_SITES=  http://deponie.yamagi.org/quake2/
 EXTRACT_SUFX=  .tar.xz
 
@@ -25,11 +26,12 @@ LIB_DEPENDS=audio/libvorbis \
 MAKE_ENV+= VERBOSE=1
 USE_GMAKE= Yes
 
+MAKE_FLAGS = config WITH_SYSTEMWIDE=yes WITH_SYSTEMDIR=${PREFIX}/share/${N}
+
 do-install:
-   ${INSTALL_SCRIPT} ${FILESDIR}/yquake2 ${PREFIX}/bin/
${INSTALL_DATA_DIR} ${PREFIX}/share/${N}
${INSTALL_PROGRAM} ${WRKBUILD}/release/{quake2,q2ded} \
-   ${PREFIX}/share/${N}/
+   ${PREFIX}/bin/
${INSTALL_DATA_DIR} ${PREFIX}/share/${N}/baseq2
${INSTALL_PROGRAM} ${WRKBUILD}/release/baseq2/game.so \
${PREFIX}/share/${N}/baseq2/
Index: distinfo
===
RCS file: /cvs/ports/games/yquake2/distinfo,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 distinfo
--- distinfo17 Jan 2016 15:18:31 -  1.1.1.1
+++ distinfo26 Jun 2016 19:54:14 -
@@ -1,2 +1,2 @@
-SHA256 (quake2-5.32.tar.xz) = v8eAMlSp0iiIVU1a8lL//iEts9qwYxY3u5BFhhuOUIw=
-SIZE (quake2-5.32.tar.xz) = 1692720
+SHA256 (quake2-5.34.tar.xz) = gOEZPGM9vuh7n8uGQwafm9pEOqZVUcjzUYcBNsM9ONQ=
+SIZE (quake2-5.34.tar.xz) = 1702984
Index: files/yquake2
===
RCS file: files/yquake2
diff -N files/yquake2
--- files/yquake2   17 Jan 2016 15:18:31 -  1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,3 +0,0 @@
-#!/bin/sh
-cd /usr/local/share/yquake2
-exec /usr/local/share/yquake2/quake2 "$@"
Index: pkg/PLIST
===
RCS file: /cvs/ports/games/yquake2/pkg/PLIST,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 PLIST
--- pkg/PLIST   17 Jan 2016 15:18:31 -  1.1.1.1
+++ pkg/PLIST   26 Jun 2016 19:54:14 -
@@ -1,8 +1,17 @@
 @comment $OpenBSD: PLIST,v 1.1.1.1 2016/01/17 15:18:31 bmercer Exp $
-bin/yquake2
+@newgroup _q2:779

[UPDATE] games/yquake2 5.32 => 5.34

2016-06-26 Thread Adam Wolk
Hi ports@

Here is an updated diff for games/yquake2 5.34.

Changes in the port:
 - taking MAINTAINER, agreed with bmercer@ who provided the initial port
 - added a q2ded rc script in a similar fashion as the games/ioquake3
   port does (note I did not reserve any id's so far - how do we do
   that?)
 - the existing /usr/local/share/yquake2/q2ded binary from previous
   port did not work as it was searching for games.so from a relative
   path. I found a way to make both quake2 and q2ded work with an
   upstream supported MAKE variable to provide the system wide quake
   data directory. Thanks to this change we can drop the wrapper script
   and use the binaries directly.
 - adding a new _q2 user/group plus /var/q2 for the dedicated server
   binary
 - updated the port to version 5.34

Tested on amd64 snapshot from June 18th.

Additional notes:
 - make port-lib-depends-check complains on:
   Extra:  openal.2 pthread.22

   ktrace tells me that the check is wrong. Openal and pthreads are both
   used.
 - upstream said in their changelog that they are changing their
   platform policy 'Switch from an arch whitelist to an "all archs are
   supported" approach.'. I saw in our tree a change by landry@
   specifically limiting the supported platform to the upstream
   supported versions
   
(http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/games/yquake2/Makefile?rev=1.2=text/x-cvsweb-markup).
   I am not removing this restriction until I get some feedback from
   people able to test other platforms than currently
   listed in ONLY_FOR_ARCHS.

Upstream changelog:

Quake II 5.33 to 5.34:
- Add support for stereo 3D (by Valery Guskov)
- Make gibt solid so they move with conveyor belts.
- Disable gl_ext_multitexturing by default.
- Switch from an arch whitelist to an "all archs are supported"
  approach.
- Add a new README.

Quake II 5.32 to 5.33:
- Add OGG volume slider in settings menu
- Fixed some bugs in volume settings
- Replaced HUD scale option in video menu with generic UI scale
- General UI upscaling improvements
- Better support for keyboards with AZERTY layout

Any feedback? OK's?

Index: Makefile
===
RCS file: /cvs/ports/games/yquake2/Makefile,v
retrieving revision 1.3
diff -u -p -r1.3 Makefile
--- Makefile16 Mar 2016 16:46:32 -  1.3
+++ Makefile26 Jun 2016 18:30:12 -
@@ -4,12 +4,13 @@ ONLY_FOR_ARCHS=   i386 amd64 sparc64
 
 COMMENT=   Yamagi Quake II
 N= yquake2
-V= 5.32
+V= 5.34
 PKGNAME=   ${N}-${V}
 DISTNAME=  quake2-${V}
 CATEGORIES=games
 
 HOMEPAGE=  http://www.yamagi.org/quake2/
+MAINTAINER=Adam Wolk 
 MASTER_SITES=  http://deponie.yamagi.org/quake2/
 EXTRACT_SUFX=  .tar.xz
 
@@ -25,11 +26,12 @@ LIB_DEPENDS=audio/libvorbis \
 MAKE_ENV+= VERBOSE=1
 USE_GMAKE= Yes
 
+MAKE_FLAGS = config WITH_SYSTEMWIDE=yes WITH_SYSTEMDIR=${PREFIX}/share/${N}
+
 do-install:
-   ${INSTALL_SCRIPT} ${FILESDIR}/yquake2 ${PREFIX}/bin/
${INSTALL_DATA_DIR} ${PREFIX}/share/${N}
${INSTALL_PROGRAM} ${WRKBUILD}/release/{quake2,q2ded} \
-   ${PREFIX}/share/${N}/
+   ${PREFIX}/bin/
${INSTALL_DATA_DIR} ${PREFIX}/share/${N}/baseq2
${INSTALL_PROGRAM} ${WRKBUILD}/release/baseq2/game.so \
${PREFIX}/share/${N}/baseq2/
Index: distinfo
===
RCS file: /cvs/ports/games/yquake2/distinfo,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 distinfo
--- distinfo17 Jan 2016 15:18:31 -  1.1.1.1
+++ distinfo26 Jun 2016 18:30:12 -
@@ -1,2 +1,2 @@
-SHA256 (quake2-5.32.tar.xz) = v8eAMlSp0iiIVU1a8lL//iEts9qwYxY3u5BFhhuOUIw=
-SIZE (quake2-5.32.tar.xz) = 1692720
+SHA256 (quake2-5.34.tar.xz) = gOEZPGM9vuh7n8uGQwafm9pEOqZVUcjzUYcBNsM9ONQ=
+SIZE (quake2-5.34.tar.xz) = 1702984
Index: files/yquake2
===
RCS file: files/yquake2
diff -N files/yquake2
--- files/yquake2   17 Jan 2016 15:18:31 -  1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,3 +0,0 @@
-#!/bin/sh
-cd /usr/local/share/yquake2
-exec /usr/local/share/yquake2/quake2 "$@"
Index: pkg/PLIST
===
RCS file: /cvs/ports/games/yquake2/pkg/PLIST,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 PLIST
--- pkg/PLIST   17 Jan 2016 15:18:31 -  1.1.1.1
+++ pkg/PLIST   26 Jun 2016 18:30:12 -
@@ -1,8 +1,17 @@
 @comment $OpenBSD: PLIST,v 1.1.1.1 2016/01/17 15:18:31 bmercer Exp $
-bin/yquake2
+@newgroup _q2:777
+@newuser _q2:777:_q2:daemon:Yamagi Quake II Server:/var/q2:/sbin/nologin
+@bin bin/q2ded
+@bin bin/quake2
 share/doc/pkg-readmes/${FULLPKGNAME}
 share/yquake2/
 share/yquake2/baseq2/
 share/yquake2/baseq2/game.so
-@bin share/yquake2/q2ded
-@bin share/yquake2/quake2
+@mode 750
+@owner _q2
+@group _q2
+@sample /var/q2/
+@owner