Bug 247500 - lang/swi-pl: update to 8.2.0 and take maintainership
Summary: lang/swi-pl: update to 8.2.0 and take maintainership
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Fernando Apesteguía
URL: https://www.swi-prolog.org/ChangeLog?...
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2020-06-23 13:52 UTC by Nikolaj Thygesen
Modified: 2020-07-03 10:49 UTC (History)
2 users (show)

See Also:


Attachments
Update to most recent version 8.2.0 (78.50 KB, text/plain)
2020-06-23 13:52 UTC, Nikolaj Thygesen
no flags Details
svn diff (164.22 KB, patch)
2020-06-24 20:03 UTC, Nikolaj Thygesen
no flags Details | Diff
New svn diff (167.52 KB, patch)
2020-06-28 20:18 UTC, Nikolaj Thygesen
no flags Details | Diff
Mark i386 broken (167.70 KB, patch)
2020-06-30 08:56 UTC, Nikolaj Thygesen
mailinglist: maintainer-approval+
Details | Diff
Makefile diff for CLI only, reduced function (2.78 KB, patch)
2020-07-02 06:44 UTC, dewayne
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nikolaj Thygesen 2020-06-23 13:52:08 UTC
Created attachment 215882 [details]
Update to most recent version 8.2.0

Take maintainership for lang/swi-pl
update to most recent version 8.2.0
move to cmake/ninja build framework
Comment 1 Fernando Apesteguía freebsd_committer 2020-06-24 06:42:12 UTC
Hi Nikolaj!

^Triage: If there is a changelog or release notes URL available for this version, please add it to the URL field

Also, could you remove this commented line?:

# PORTREVISION=	1

And last thing, would it be possible to get a svn diff for the patch? shar files are recommended for new ports mainly :-)

Thanks!
Comment 2 Nikolaj Thygesen 2020-06-24 20:03:33 UTC
Created attachment 215915 [details]
svn diff

I just added an "svn diff" + added the changelog URL - please note that the changelog is dynamic, so in order to get the full picture one must change the origin version back to the previous version 7.6.4
Comment 3 dewayne 2020-06-25 04:26:41 UTC
(In reply to Nikolaj Thygesen from comment #2)
The prospect of doing the move to cmake was prohibitive.  I appreciate you taking over the port.

I've been using swi-pl for a few years.  Though I've changed the Makefile's USES readline to USES libedit, without adverse effect and honouring the intent of the BSD2CLAUSE licence. ;)

My version of swi-pl is CLI only, very bare bones and no X11 stuff as I use it to remotely manage servers. Would the details be of any use? (Perhaps a CLI only flavour?) :)
Comment 4 Nikolaj Thygesen 2020-06-25 20:37:37 UTC
Thanks for the info. We likewise use it cli only; it seems xpce is falling from grace a bit :o) I'm also considering adding a config dialog later; right now we just want it updated to most recent release, since we got a few bugs fixed upstream.
Comment 5 Fernando Apesteguía freebsd_committer 2020-06-26 10:07:42 UTC
There are pkg-plist issues:

====> Running Q/A tests (stage-qa)
====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
Error: Orphaned: lib/cmake/swipl/SWIPLConfig.cmake
Error: Orphaned: lib/cmake/swipl/SWIPLConfigVersion.cmake
Error: Orphaned: lib/cmake/swipl/SWIPLTargets-release.cmake
Error: Orphaned: lib/cmake/swipl/SWIPLTargets.cmake
Error: Orphaned: lib/swipl/library/win_menu.pl
Error: Orphaned: lib/swipl/swipl-win.rc
===> Checking for items in pkg-plist which are not in STAGEDIR
Error: Missing: lib/swipl/doc/packages/yaml.html
Error: Missing: lib/swipl/lib/%%ARCH%%-%%OS%%/uuid.so
Error: Missing: lib/swipl/lib/%%ARCH%%-%%OS%%/yaml4pl.so
Error: Missing: lib/swipl/library/uuid.pl
Error: Missing: lib/swipl/library/yaml.pl
===> Error: Plist issues found.


Would you mind having a look?

Thanks!
Comment 6 Nikolaj Thygesen 2020-06-26 12:15:31 UTC
Sure thing - I will add all orphaned files to pkg-plist. What I don't understand is that after making the port, I can find all the five missing files in the proper places under "./work/stage" and "make install" completes successfully!? I don't know how to fix that.
Comment 7 Fernando Apesteguía freebsd_committer 2020-06-26 12:28:49 UTC
(In reply to Nikolaj Thygesen from comment #6)

I can't :-)
I'm doing clean builds with poudriere:

root@12_1amd64-default:/wrkdirs/usr/ports/lang/swi-pl/work/stage # find . -name uuid.pl
root@12_1amd64-default:/wrkdirs/usr/ports/lang/swi-pl/work/stage # ls usr/local/lib/swipl/library/uu*.pl
ls: No match.

Maybe they are there from a previus build? 

Tip: make makeplist does a pretty nice job generating pkg-plist files although _we need to always check_ the result :-)
Comment 8 Nikolaj Thygesen 2020-06-28 20:18:58 UTC
Created attachment 216018 [details]
New svn diff

Fixed yaml + ossp-uuid issues
Added the generated .cmake files to pkg-plist
Comment 9 Fernando Apesteguía freebsd_committer 2020-06-30 06:23:59 UTC
(In reply to Nikolaj Thygesen from comment #8)

Hi Nikolaj,

The port does not build on i386

It might need BROKEN_i386:

src/libswipl.so.8.2.0: undefined reference to `__atomic_compare_exchange_8'
src/libswipl.so.8.2.0: undefined reference to `__atomic_fetch_add_8'
Comment 10 Nikolaj Thygesen 2020-06-30 08:56:07 UTC
Created attachment 216063 [details]
Mark i386 broken

As suggested I mark i386 broken for now. I pretty much think I know what the issue is, but I need a little time to fix it. Interestingly this seems related to the "old" mips-brokenness, so perhaps this can eventually go away as well.
Comment 11 commit-hook freebsd_committer 2020-06-30 16:36:11 UTC
A commit references this bug:

Author: fernape
Date: Tue Jun 30 16:35:54 UTC 2020
New revision: 540903
URL: https://svnweb.freebsd.org/changeset/ports/540903

Log:
  lang/swi-pl: update to 8.2.0 and update MAINTAINER

  ChangeLog: https://www.swi-prolog.org/ChangeLog?branch=stable

  While here, mark BROKEN on i386 but keep the dependency condition for
  when this builds again. (Possible duplicate of PR #242229)

  Submitter takes maintainership

  PR:     247500
  Submitted by:   mailinglist@diamondbox.dk

Changes:
  head/lang/swi-pl/Makefile
  head/lang/swi-pl/distinfo
  head/lang/swi-pl/files/extra-patch-skip-gnu-qsort
  head/lang/swi-pl/files/patch-packages_clib_cmake_FindLibUUID.cmake
  head/lang/swi-pl/pkg-plist
Comment 12 Fernando Apesteguía freebsd_committer 2020-06-30 16:37:12 UTC
Committed with minor cosmetic changes.

Thanks for your work!
Comment 13 dewayne 2020-07-02 06:44:59 UTC
Created attachment 216127 [details]
Makefile diff for CLI only, reduced function

Indeed thank-you both :)

I have swi-pl version 8 running on both an i386 and amd64 jail on FreeBSD 12.1-STABLE. 

Unfortunately I have port ncurses installed, so swi-pl links to both
        libncurses.so.8 => /lib/libncurses.so.8 (0x8019d7000)
        libncurses.so.6 => /usr/local/lib/libncurses.so.6 (0x801c9c000)
even when I have explicitly included USES+=ncurses:port. Please note that:
- /usr/local/lib/swipl/lib/amd64-freebsd/libswipl.so.8 brings in /lib/libncurses.so.8
- libedit brings in /usr/local/lib/libncurses.so.6


I have a very specific use for PROLOG so I've pruned the Makefile to my needs.  From the included Makefile (for both) and the pkg-plist diff for the amd64, I am running swi-pl from a package as a CLI only application.

The i386 version doesn't seem to like tex files so I needed to make additional adjustments to those files (the Makefile change reflects this).

Preliminary testing on cputypes: c3-2, prescott and haswell are favourable. 

Screen grab from within an i386 jail:

Welcome to SWI-Prolog (32 bits, version 8.2.0)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.

    CMake built from "/var/ports/usr/ports/lang/swi-pl/work/.build"

For online help and background, visit https://www.swi-prolog.org
For built-in help, use ?- help(Topic). or ?- apropos(Word).

?- shell('uname -a').
FreeBSD b1.hs 12.1-STABLE FreeBSD 12.1-STABLE #0 r362474M: Mon Jun 22 22:41:35 AEST 2020     root@hathor:/usr/obj/prod/120109/D/K8/smallblocks/src/amd64.amd64/sys/hqdev-amd64-smp-vga                      i386

-- 
Changes to the pkg-plist for amd64 as a minimal system, required
for i in /xpce/d /readline/d /cql/d /odbc/d /simplex/d  /rdf_diagram.pl/d /in_menu.pl/d /swipl.rc/d /swipl-win.rc/d   ; do sed -i "" $i  /usr/ports/lang/swi-pl/pkg-plist; done

Additional changes are required for i386 pkg-plist to build a package.

This port upgrade is very much appreciated.
Kind regards.
Comment 14 Nikolaj Thygesen 2020-07-03 10:49:58 UTC
If I understand you correctly, you would like to have the ability to disable certain features to get a leaner installation. This fits pretty well with my thoughts on having a config dialog, but first I would like to get everything to build on i386, which I hope to find time for today.