Created attachment 230624 [details] Patch for jasper Use release archive as suggested by Porters Handbook Do some minor rearragement of port Makefile
Friendly ping
Created attachment 231156 [details] Patch for jasper v2 Import patch from Fedora to fix detection of FreeGLUT when pkgconf(ig) is installed Connect test suite to "make test" Reported here: https://lists.freebsd.org/archives/freebsd-ports/2022-January/001288.html Reference: https://src.fedoraproject.org/rpms/jasper/blob/rawhide/f/jasper-freeglut.patch Compile and runtime tested on FreeBSD 13.0-STABLE #2 stable/13-n248607-93a95ebbf7c (amd64) (make, make check-plist, make test) Poudriere testport OK 12.2-RELEASE (amd64) Poudriere testport OK 13.0-RELEASE (i386)
(In reply to Daniel Engberg from comment #2) By applying this attachment 231156 [details], the build will now always succeed.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=10212df6567f632fdf19f15fd7c040cd6b53b041 commit 10212df6567f632fdf19f15fd7c040cd6b53b041 Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org> AuthorDate: 2022-01-23 18:26:37 +0000 Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org> CommitDate: 2022-01-23 19:09:47 +0000 graphics/jasper: Use upstream release tarball PR: 260878 Reported by: diizzy graphics/jasper/Makefile | 5 +---- graphics/jasper/distinfo | 6 +++--- 2 files changed, 4 insertions(+), 7 deletions(-)
What about the rest of this patch?
(In reply to commit-hook from comment #4) This commit does not solve my problem. FAILED: src/appl/jiv : && /usr/bin/cc -O2 -pipe -march=haswell -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -Wall -pedantic -W -Wformat -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wredundant-decls -O2 -pipe -march=haswell -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -fstack-protector-strong src/appl/CMakeFiles/jiv.dir/jiv.c.o -o src/appl/jiv -Wl,-rpath,/var/tmp/ports/work/usr/ports/graphics/jasper/work/.build/src/libjasper:/usr/local/lib: src/libjasper/libjasper.so.4.0.0 /usr/local/lib/libjpeg.so /usr/local/lib/libOpenGL.so /usr/local/lib/libGLX.so /usr/local/lib/libGLU.so -lm && : ld: error: undefined symbol: glutInit >>> referenced by jiv.c >>> src/appl/CMakeFiles/jiv.dir/jiv.c.o:(main) ld: error: undefined symbol: glutInitDisplayMode >>> referenced by jiv.c >>> src/appl/CMakeFiles/jiv.dir/jiv.c.o:(main) ︙ cc: error: linker command failed with exit code 1 (use -v to see invocation) ninja: build stopped: subcommand failed. ===> Compilation failed unexpectedly.
(In reply to Daniel Engberg ...) By the way, what are the patch in files/patch-build-cmake-modules-JasOpenGL.cmake used for? Here is where it was added. https://cgit.freebsd.org/ports/commit/graphics/jasper/files/patch-CMakeLists.txt?id=a4e17888a09515462d653f03e7f674c023fe87fd Where will JAS_OPENGL_REQUIRED be provided from?
(In reply to Daniel Engberg from comment #5) attachment 231156 [details] solves my problem. But this patch is too big a change. Perhaps the following changes will be sufficient. file: jasper-2.0.33/build/cmake/modules/JasOpenGL.cmake - if (NOT GLUT_Xmu_LIBRARY OR NOT GLUT_Xmi_LIBRARY) + if (FALSE AND (NOT GLUT_Xmu_LIBRARY OR NOT GLUT_Xmi_LIBRARY))
Created attachment 231574 [details] proposal patch for graphics/jasper (In reply to Daniel Engberg from comment #5) I wasn't sure about the bug that exists in Fedora, but I think this is what it means. It should be rewritten more properly in the upstream :) This part does not exist in 3.0, does it?
Created attachment 231705 [details] Fix libglut discovery This is a horrible hack but it lets jasper to build for me.
The inital patch did fix this issue however for whatever reason sunpoet decided to commit half of it and keep the broken part still broken. I'm not sure what the best solution would be however, I picked Fedora's because it were at least at the time adopted by others. Tatsuki, I haven't tried to verify this issue on 3.X
Created attachment 231736 [details] CMakeLists.txt for test /usr/local/share/cmake/Modules/FindGLUT.cmake How to use the attachment: cd `mktemp -d` && cmake -DPC=0 /the-directory-where-this-attachment-exists cd `mktemp -d` && cmake -DPC=1 /the-directory-where-this-attachment-exists (In reply to Daniel Engberg from comment #11) (In reply to Peter Jeremy from comment #10) GLUT is properly detected. So I guess sunpoet-san did not commit half of the patch. However, different results are returned with and without pkgconf-1.8.0,1. We can use PKG_CONFIG_FOUND to branch on whether pkgconf is available or not. If we use the result when pkgconfig is exist, it will not touch the -L/usr/local/lib flag. attachment 231574 [details] is a patch that makes GLUT_LIBRARIES have the same value regardless of whether pkgconf is available or not.
(In reply to Daniel Engberg from comment #11) > Tatsuki, I haven't tried to verify this issue on 3.X From what little I've seen, there are no files related to this in 3.x yet :)
...which is why I was a bit confused ;-) (Comment #9) Anyhow, 3.0.2 is out so we should probably focus on that updating the port and go from there as CMake files seems to have been rewritten.
I have a patch for 3.0.2 ready but since my buildbox is "not very fast" it's doing to take a few days or so to test deps.
Superseded by https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262039 (help is appreciated)