Bug 279914 - [NEW PORT] astro/google-earth-pro 7.3.6: Virtual globe, map and geographical information program
Summary: [NEW PORT] astro/google-earth-pro 7.3.6: Virtual globe, map and geographical ...
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Tijl Coosemans
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-22 18:19 UTC by John Hay
Modified: 2024-07-12 05:56 UTC (History)
4 users (show)

See Also:


Attachments
port of google-earth-pro-7.3.6 including some linux-c7 ports (46.04 KB, patch)
2024-06-22 18:19 UTC, John Hay
no flags Details | Diff
port of google-earth-pro-7.3.6 including some linux-c7 ports (53.66 KB, patch)
2024-06-23 07:14 UTC, John Hay
no flags Details | Diff
port of google-earth-pro 7.3.6 (49.19 KB, patch)
2024-06-23 13:31 UTC, John Hay
no flags Details | Diff
port of google-earth-pro-7.3.6 using compat/linux/opt (53.65 KB, patch)
2024-06-24 09:50 UTC, John Hay
no flags Details | Diff
port of google-earth-pro 7.3.6 (53.12 KB, patch)
2024-06-25 14:45 UTC, John Hay
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Hay 2024-06-22 18:19:58 UTC
Created attachment 251622 [details]
port of google-earth-pro-7.3.6 including some linux-c7 ports

A port of google-earth-pro 7.3.6.

The old, deleted google-earth was used as a starting point.

It will only work for amd64 and FreeBSD-14.0 or higher because it needs the newer kernel linux emulation.

Included are 5 new ports that were needed:

devel/linux-c7-libmodman
devel/linux-c7-orc
multimedia/linux-c7-gstreamer1
multimedia/linux-c7-gstreamer1-plugins-base
net/linux-c7-libproxy

I made their MAINTAINER emulation@FreeBSD.org, which seems to be the way.

BTW I tried to use poudriere testport, but it does not seem to handle linux ports correctly. It tries to remove compat/linux while compat/linux/proc is still mounted. I did a build with "poudriere bulk astro/google-earth-pro".
Comment 1 John Hay 2024-06-23 07:14:35 UTC
Created attachment 251632 [details]
port of google-earth-pro-7.3.6 including some linux-c7 ports

I found that the latest poudriere-devel in ports handles linux port correctly.

Here is a new patch with all the linux-c7 ports passing poudriere testport.

I have removed linux-c7-gstreamer1--plugins-base and combined it with linux-c7-gstreamer1.

google-earth-pro still fails poudriere testport when PREFIX != LOCALBASE. I think it is because the port is trying to put some stuff in LINUXBASE and some in PREFIX.

Suggestions or fixes are welcome.
Comment 2 Tijl Coosemans freebsd_committer freebsd_triage 2024-06-23 09:29:04 UTC
USE_LINUX_RPM is only for linux-(c7|rl9) ports.  It sets USE_LINUX_PREFIX which is probably causing problems with PREFIX != LOCALBASE.  So try the following changes:

-PKGNAMEPREFIX=
-USE_LINUX_RPM=	nolib
-SRC_DISTFILES=
+NO_BUILD=	yes
+NO_WRKSUBDIR=	yes

You should also remove @dir /compat from pkg-plist.  Traditionally it's not a directory but a symbolic link to /usr/compat.  I think it's added by "make makeplist" but that's a bug.
Comment 3 John Hay 2024-06-23 13:31:13 UTC
Created attachment 251646 [details]
port of google-earth-pro 7.3.6

Thank you for the tips Tijl.

Here is the third attempt of the google-earth-pro 7.3.6 port. All of the ports now pass poudriere testport.

At the end I moved the google-earth-pro binaries and libraries from opt/google/earth/pro/ inside compat/linux to usr/local/share/google-earth-pro, or wherever DATADIR is pointing to.
Comment 4 Tijl Coosemans freebsd_committer freebsd_triage 2024-06-23 19:27:59 UTC
There's no guarantee that putting the files in a different location than in the rpm works correctly, so I wouldn't move them, but it's up to you as maintainer of course.  Was there a problem with putting them under /compat/linux?
Comment 5 John Hay 2024-06-23 19:58:37 UTC
It does work, I am using the packages that I built.

The reason I moved it is because I wanted googleearth-pro in the path (/usr/local/bin) because people don't normally have /compat/linux/... in their path, and also to have google-earth-pro.desktop in /usr/local/share/applications/ so that window managers will automatically pick it up.

If there are other ways, I'm all ears, or if someone wants to do it, I'm also ok.
Comment 6 Tijl Coosemans freebsd_committer freebsd_triage 2024-06-24 09:42:22 UTC
The original google-earth port did all of that.  It put the rpm files under LINUXBASE, but it put the script from the files/ directory in PREFIX/bin and icons and a desktop file were put in PREFIX/share.  See https://cgit.freebsd.org/ports/tree/astro/google-earth/?id=dadc95730d5582ec4b6eb5ed1d41c7f89c68ed8a.  You can also look at the post-install scriptlet in the rpm using "rpm -qp --scripts google-earth-pro-stable-7.3.6.x86_64.rpm", but that contains a lot of irrelevant things.
Comment 7 John Hay 2024-06-24 09:50:27 UTC
Created attachment 251670 [details]
port of google-earth-pro-7.3.6 using compat/linux/opt

After Tijl's message, I looked through port for something similar and found net-im/zoom that also put most of its stuff in /compat/linux/opt/. and some stuff in /usr/local and it passed poudriere testport. So I gave it another try.

Here is a version that use /compat/linux/opt and pass testport. I left "@dir /compat" in pk-plist because otherwise testport fails.
Comment 8 Tijl Coosemans freebsd_committer freebsd_triage 2024-06-25 11:52:04 UTC
- files/google-earth-pro still contains %%DATADIR%%.
- I don't think you need pkg-message.  linux_enable="YES" in /etc/rc.conf mounts linprocfs by default nowadays.
- In post-patch, ${RM} and ${LN} -s lines can be combined with ${LN} -sf.
- If you rename files/google-earth-pro to files/google-earth-pro.in, the second ${SED} in post-patch can be replaced with:
SUB_FILES=	google-earth-pro
SUB_LIST=	LINUXBASE=${LINUXBASE}
- The Makefile seems to be missing PLIST_SUB=LINUXBASE=${LINUXBASE}.  Maybe it's added by the ports framework these days?  Can you run "make check-plist" to make sure it's correct?
Comment 9 John Hay 2024-06-25 14:45:39 UTC
Created attachment 251691 [details]
port of google-earth-pro 7.3.6

It looks like my previous patch missed a few changes. I had the PLIST_SUB=LINUXBASE=${LINUXBASE} in my local directory.

I also have implemented all the suggestions.

It does pass poudriere testport, which does a make 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)
=>> Checking for staging violations... done
Comment 10 Tijl Coosemans freebsd_committer freebsd_triage 2024-06-26 12:05:30 UTC
In files/google-earth-pro.in the second %%LINUXBASE%% isn't necessary, but it's probably harmless.  Besides that, the linux-c7 ports are missing pkg-plist.i386 and pkg-plist.aarch64.  You can create these like this:

make clean
make ARCH=i386 RUN_DEPENDS=
make ARCH=i386 RUN_DEPENDS= makeplist > pkg-plist.i386

Typically pkg-plist.i386 is the same as pkg-plist.amd64 but without usr/lib64, and pkg-plist.aarch64 is the same but without usr/lib.

Do you have commit access?  Because if not, I can make these changes and you don't need to submit a new patch.
Comment 11 John Hay 2024-06-26 12:07:57 UTC
I do not have commit access. You are welcome to make changes.
Comment 12 commit-hook freebsd_committer freebsd_triage 2024-07-08 10:39:08 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0db19ad3f6bc5cd80403c28381ec446d686acde6

commit 0db19ad3f6bc5cd80403c28381ec446d686acde6
Author:     John Hay <jhay@FreeBSD.org>
AuthorDate: 2024-06-25 14:31:40 +0000
Commit:     Tijl Coosemans <tijl@FreeBSD.org>
CommitDate: 2024-07-08 10:35:59 +0000

    astro/google-earth-pro: New port, version 7.3.6

    Explore the world with Google Earth. View satellite imagery, maps, terrain,
    3D buildings, galaxies far in space, and the deepest depths of the ocean.

    PR:             279914

 astro/Makefile                                     |   1 +
 astro/google-earth-pro/Makefile (new)              |  51 +++
 astro/google-earth-pro/distinfo (new)              |   3 +
 .../files/google-earth-pro.in (new)                |   2 +
 astro/google-earth-pro/pkg-descr (new)             |  11 +
 astro/google-earth-pro/pkg-plist (new)             | 394 +++++++++++++++++++++
 6 files changed, 462 insertions(+)
Comment 13 Tijl Coosemans freebsd_committer freebsd_triage 2024-07-08 10:50:01 UTC
It requires a newer glibc than provided by linux_base-c7 so I made it depend on linux:rl9. The new c7 ports aren't needed so I didn't commit them yet.  Do you need them for something else?
Comment 14 John Hay 2024-07-08 18:07:33 UTC
Thank you, it is working for me.

I do not need the other ports. When I started with the google-earth-pro port, the rl9 ports did not exist yet.
Comment 15 Rainer Hurling freebsd_committer freebsd_triage 2024-07-11 20:07:45 UTC
Many thanks for the revival of the port. Really appreciated!

I also had to install graphics/linux-rl9-libglvnd on my boxes for astro/google-earth-pro to work. Maybe it has something to do with the fact that all my boxes have an NVidia graphics card and the corresponding driver x11/nvidia-driver installed?

Oh yes, and graphics/linux-rl9-libglvnd can only be installed if x11/linux-nvidia-libs is not installed at the same time.
Comment 16 John Hay 2024-07-12 04:47:44 UTC
I am also using an Nvidia graphics card. I deleted all linux packages before I started because I still has c7 ones. Then just did:

poudriere bulk -b latest -j 140Ramd64 astro/google-earth-pro
pkg install linux_base-rl9
pkg add my_poudriere_path/All/google-earth-pro-7.3.6.pkg

Looking at the dependencies according to pkg:

> pkg info -d google-earth-pro-7.3.6
google-earth-pro-7.3.6:
	linux-rl9-xorg-libs-7.7_2
	linux-rl9-libxml2-2.9.13_3
	linux-rl9-libproxy-0.4.15
	linux-rl9-gstreamer1-1.22.1_1
	linux-rl9-dri-23.3.3
	linux-rl9-dbus-libs-1.12.20_2
	desktop-file-utils-0.26_1
	linux-rl9-sqlite-3.34.1_1
> pkg info -d linux-rl9-dri
linux-rl9-dri-23.3.3:
	linux-rl9-xorg-libs-7.7_2
	linux-rl9-expat-2.5.0_2
	linux-rl9-wayland-1.21.0
	linux-rl9-libglvnd-1.3.4
	linux-rl9-libdrm-2.4.117
	linux-rl9-llvm-17.0.6
	linux-rl9-elfutils-libelf-0.190

So linux-rl9-libglvnd is there. Maybe it is because you had x11/linux-nvidia-libs installed. I do not have it installed.
Comment 17 Rainer Hurling freebsd_committer freebsd_triage 2024-07-12 05:56:33 UTC
(In reply to John Hay from comment #16)

> So linux-rl9-libglvnd is there. Maybe it is because you had
> x11/linux-nvidia-libs installed. I do not have it installed.
Yes, that sounds reasonable. Thanks for the explanation.