Bug 224355

Summary: devel/upp: Update to 11540
Product: Ports & Packages Reporter: lightside <lightside>
Component: Individual Port(s)Assignee: Yuri Victorovich <yuri>
Status: Closed FIXED    
Severity: Affects Some People CC: m.sund, yuri
Priority: --- Keywords: patch
Version: LatestFlags: m.sund: maintainer-feedback+
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Proposed patch (since 450351 revision)
none
The poudriere testport log (FreeBSD 10.3 amd64)
none
Proposed patch (since 450351 revision)
none
Proposed patch (since 457642 revision) lightside: maintainer-approval? (m.sund)

Description lightside 2017-12-15 03:09:15 UTC
Created attachment 188851 [details]
Proposed patch (since 450351 revision)

Patch to update devel/upp port from 10804 to 11540 version.

Look following link for changes:
http://www.ultimatepp.org/www$uppweb$Roadmap$en-us.html

- Remove IDE_USES variable
- Adapt sed patch

The build was tested for FreeBSD 10.3 amd64 (native and with using poudriere).
Comment 1 lightside 2017-12-15 03:11:04 UTC
Created attachment 188852 [details]
The poudriere testport log (FreeBSD 10.3 amd64)

Attached archive with poudriere testport log for FreeBSD 10.3 amd64, just in case.
Comment 2 Yuri Victorovich freebsd_committer freebsd_triage 2018-02-11 00:38:19 UTC
m.sund@arcor.de,

This looks like a broken port.

MYSQL_USES=mysql only enables mysql dependency. But where does it tell build to use/not use it? Same with OPENGL_USE=gl, and PGSQL_USES=pgsql.

Yuri
Comment 3 lightside 2018-02-11 00:52:22 UTC
(In reply to Yuri Victorovich from comment #2)
> MYSQL_USES=mysql only enables mysql dependency. But where does it tell build
> to use/not use it? Same with OPENGL_USE=gl, and PGSQL_USES=pgsql.
The question is for maintainer, but I can try to answer.

As I understand, this is optional dependencies, which possible to install, because there are U++ packages (in source code form), which may use MySQL, PostgreSQL, GL, etc. libraries:
https://github.com/ultimatepp/mirror/tree/master/uppsrc/MySql
https://github.com/ultimatepp/mirror/tree/master/uppsrc/PostgreSQL
https://github.com/ultimatepp/mirror/tree/master/uppsrc/GLCtrl
etc.
Comment 4 Yuri Victorovich freebsd_committer freebsd_triage 2018-02-11 00:57:24 UTC
(In reply to lightside from comment #3)

Port option should rigidly enable/disable libraries. It can't be that the option FOO=off, but libfoo.so happens to be installed and therefore it is picked up anyways.

Additionally, when I've first built it with GL and then have commented out its USES clause, stage-qa doesn't complain that it needs USE_GL=gl. This means that it isn't even used at all.
Comment 5 lightside 2018-02-11 01:15:11 UTC
(In reply to Yuri Victorovich from comment #4)
> Additionally, when I've first built it with GL and then have commented out
> its USES clause, stage-qa doesn't complain that it needs USE_GL=gl. This means
> that it isn't even used at all.
As I said, this is optional (e.g. runtime) dependencies. The devel/upp not only builds TheIDE and/or umk, but also installs other U++ packages, which possible to build after installation.
Overview:
https://www.ultimatepp.org/www$uppweb$overview$en-us.html
Tutorial:
https://www.ultimatepp.org/www$uppweb$Tutorials$en-us.html
Examples:
https://www.ultimatepp.org/www$uppweb$examples$en-us.html
etc.

Probably, maintainer have own opinion(s) about this. I just tried to explain possible purpose of optional port's options. Moreover, previous committer(s) approved such changes before, if it was committed, i.e. there are possible reasons about this. Personally, my attachment #188851 [details] doesn't propose changes for this. This is just an update.
Comment 6 Yuri Victorovich freebsd_committer freebsd_triage 2018-02-11 01:19:22 UTC
(In reply to lightside from comment #5)

I understand optional packages. But FreeBSD ports have to build deterministically, they can't depend on what is already installed. This leads to broken packages. The result should only depend on port options.

I am not saying that you did anything wrong. I am just saying that the port is broken as it is, and maintainer needs to correct this.

Cheers,
Yuri
Comment 7 lightside 2018-02-12 12:08:01 UTC
Created attachment 190540 [details]
Proposed patch (since 450351 revision)

(In reply to Yuri Victorovich from comment #6)
> But FreeBSD ports have to build deterministically, they can't depend on what
> is already installed. This leads to broken packages. The result should only
> depend on port options.
Please, do not generalize. The possible purpose of optional port's options is to install related dependencies, in this case. These optional options aren't enabled by default. The selected dependencies will be installed, if build devel/upp port manually and/or install it as package.

Personally, I noticed, that OPENGL_USE and SDL_USE have incorrect values. The attached patch fixes this.
- Fix values for OPENGL_USE and SDL_USE

MYSQL:
https://github.com/ultimatepp/mirror/blob/bee0742269e448f218d0fcfba8577533556db04d/uppsrc/MySql/MySql.upp#L27
library(FREEBSD) mysqlclient;
-8<--
% make PORT_OPTIONS=MYSQL -V USES
compiler:c++11-lib mysql:
% make PORT_OPTIONS=MYSQL -V BUILD_DEPENDS

% make PORT_OPTIONS=MYSQL -V LIB_DEPENDS
libmysqlclient.so.18:databases/mysql56-client
% make PORT_OPTIONS=MYSQL -V RUN_DEPENDS

-->8-

OPENGL:
https://github.com/ultimatepp/mirror/blob/d469d8d2c42523db6ba8666f06e23aa2beb7aece/uppsrc/GLCtrl/GLCtrl.upp#L6
library(LINUX | BSD) "GL GLU";
-8<--
% make PORT_OPTIONS=OPENGL -V USE_GL
gl glu
% make PORT_OPTIONS=OPENGL -V BUILD_DEPENDS
/usr/local/lib/libGL.so:graphics/mesa-libs  /usr/local/libdata/pkgconfig/glproto.pc:x11/glproto /usr/local/libdata/pkgconfig/dri2proto.pc:x11/dri2proto /usr/local/libdata/pkgconfig/dri3proto.pc:x11/dri3proto /usr/local/libdata/pkgconfig/glproto.pc:x11/glproto /usr/local/libdata/pkgconfig/dri2proto.pc:x11/dri2proto /usr/local/libdata/pkgconfig/dri3proto.pc:x11/dri3proto
% make PORT_OPTIONS=OPENGL -V LIB_DEPENDS
 libGLU.so:graphics/libGLU
% make PORT_OPTIONS=OPENGL -V RUN_DEPENDS
/usr/local/lib/libGL.so:graphics/mesa-libs
-->8-

PGSQL:
https://github.com/ultimatepp/mirror/blob/a66b76887401154459a63ebaab141d4622c808b5/uppsrc/PostgreSQL/PostgreSQL.upp#L11
library(POSIX !NOPOSTGRESQL) pq;
-8<--
% make PORT_OPTIONS=PGSQL -V USES
compiler:c++11-lib pgsql
% make PORT_OPTIONS=PGSQL -V BUILD_DEPENDS

% make PORT_OPTIONS=PGSQL -V LIB_DEPENDS
libpq.so.5:databases/postgresql95-client
% make PORT_OPTIONS=PGSQL -V RUN_DEPENDS

-->8-

SDL:
https://github.com/ultimatepp/mirror/blob/b70af542d0f94c9847fa7156c7bc3ec20630f451/bazaar/SDL/SDL.upp#L11
library(FREEBSD) "SDL SDLmain X11 Xext Xrandr Xrender vga vgl aa usbhid ncurses";
-8<--
% make PORT_OPTIONS=SDL -V USE_SDL
sdl
% make PORT_OPTIONS=SDL -V BUILD_DEPENDS
/usr/local/bin/sdl-config:devel/sdl12
% make PORT_OPTIONS=SDL -V LIB_DEPENDS
libSDL.so:devel/sdl12
% make PORT_OPTIONS=SDL -V RUN_DEPENDS

-->8-

For example with SDL (or OPENGL) options (and without IDE option for faster build):
-8<--
% make WITH=SDL OPTIONS_EXCLUDE=IDE describe | sed -e 's/|[[:alnum:].]*@[[:alnum:].]*|/|maintainer|/'
upp-11540|/usr/home/mcas/PortsWork/Ultimatepp/11540/2/upp|/usr/local|Ultimate++, a BSD-licensed, cross-platform, C/C++ RAD suite|/usr/home/mcas/PortsWork/Ultimatepp/11540/2/upp/pkg-descr|maintainer|devel x11-toolkits||||/usr/ports/devel/sdl12|/usr/ports/devel/sdl12|http://upp.sourceforge.net/
% make WITH=OPENGL OPTIONS_EXCLUDE=IDE describe | sed -e 's/|[[:alnum:].]*@[[:alnum:].]*|/|maintainer|/'
upp-11540|/usr/home/mcas/PortsWork/Ultimatepp/11540/2/upp|/usr/local|Ultimate++, a BSD-licensed, cross-platform, C/C++ RAD suite|/usr/home/mcas/PortsWork/Ultimatepp/11540/2/upp/pkg-descr|maintainer|devel x11-toolkits||||/usr/ports/graphics/libGLU /usr/ports/graphics/mesa-libs /usr/ports/x11/dri2proto /usr/ports/x11/dri3proto /usr/ports/x11/glproto|/usr/ports/graphics/libGLU /usr/ports/graphics/mesa-libs|http://upp.sourceforge.net/
% make WITH=SDL OPTIONS_EXCLUDE=IDE check-plist
<..>
====> Running Q/A tests (stage-qa)
====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
===> Checking for items in pkg-plist which are not in STAGEDIR
===> No pkg-plist issues found (check-plist)
% make WITH=SDL OPTIONS_EXCLUDE=IDE package
===>  Building package for upp-11540
% pkg info -d --file work/pkg/upp-11540.txz
upp-11540:
	sdl-1.2.15_10,2
% make WITH=OPENGL OPTIONS_EXCLUDE=IDE restage
<..>
====> Compressing man pages (compress-man)
====> Running Q/A tests (stage-qa)
% make WITH=OPENGL OPTIONS_EXCLUDE=IDE check-plist
====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
===> Checking for items in pkg-plist which are not in STAGEDIR
===> No pkg-plist issues found (check-plist)
% make WITH=OPENGL OPTIONS_EXCLUDE=IDE package
===>  Building package for upp-11540
% pkg info -d --file work/pkg/upp-11540.txz
upp-11540:
	libGLU-9.0.0_3
	mesa-libs-17.3.1
-->8-
Comment 8 lightside 2018-02-18 15:21:49 UTC
Created attachment 190747 [details]
Proposed patch (since 457642 revision)

Updated after ports r457642 changes.
Comment 10 Yuri Victorovich freebsd_committer freebsd_triage 2018-02-18 18:50:03 UTC
FYI Now there is a similar problem with OPENGL. The port option only enables dependencies (OPENGL_USE=GL=gl,glu), but it doesn't tell the code to use it.

Additionally, I don't see that it is used: removing OPENGL_USE=GL=gl,glu does't cause stage-qa failures as it would have been if it was actually used.

lightside, I know that this isn't what you changed, it isn't your fault. :-) But I can't commit the port update when I see that this thing is broken.

But don't worry about it, I will fix it myself. It will take 1-2 days.

Yuri
Comment 11 m.sund 2018-02-18 20:39:00 UTC
Yuri, please let me explain the reasoning behind these port options for libraries that are not used by the port build.

U++ is a C++ framework that ships its own IDE which is build when building this port. The IDE does not use, e.g. OpenGL but other U++ libs/apps do and that is why the user should have the option to install these libraries if she/he wishes to do so. This makes it more convenient for the user since she/he may choose during U++ installation (or afterwards when changing port options) what is required for her/his specific development environment.

So please leave options as they are, even if it is not used directly by this port since it does not only provide the IDE, but the complete U++ framework too.

Matthias
Comment 12 Yuri Victorovich freebsd_committer freebsd_triage 2018-02-18 21:07:33 UTC
(In reply to m.sund from comment #11)

Thanks for the explanation!

In such case, they should be only RUN_DEPENDS, currently they are LIB_DEPENDS.
There should be an explanation next to them then, so that such questions would not arise.

I will study it some more, and update.

Yuri
Comment 13 Yuri Victorovich freebsd_committer freebsd_triage 2018-02-19 06:08:13 UTC
Committed with small changes.
Thank you for the patch!
Comment 14 commit-hook freebsd_committer freebsd_triage 2018-02-19 06:08:36 UTC
A commit references this bug:

Author: yuri
Date: Mon Feb 19 06:08:06 UTC 2018
New revision: 462278
URL: https://svnweb.freebsd.org/changeset/ports/462278

Log:
  devel/upp: Update to 11540

  Additional port changes:
  * Changed to DISTVERSION
  * Moved BROKEN_xx to a proper place
  * Removed IDE_USES=gmake
  * Adjusted various _USEx= clauses

  PR:		224355
  Submitted by:	lightside <lightside@gmx.com>
  Approved by:	Matthias <m.sund@arcor.de> (maintainer), tcberner (mentor, implicit)

Changes:
  head/devel/upp/Makefile
  head/devel/upp/distinfo