Opened 8 years ago

Last modified 7 years ago

#53425 new submission

gedit-app

Reported by: e-t-h-a-n Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: gedit-app

Description

I have created a portfile that creates an app bundle for the Gedit text editor.

Attachments (4)

gedit-app.tar.gz (2.7 KB) - added by e-t-h-a-n 8 years ago.
Portfile and patches
gedit-app.tar.gz.asc (833 bytes) - added by e-t-h-a-n 8 years ago.
PGP Signature
Portfile (1.8 KB) - added by kencu (Ken) 7 years ago.
Portfile - modified 20170922 - goes with the other files in the archive above
gedit-app-bundle-20171011.zip (3.6 KB) - added by kencu (Ken) 7 years ago.
folder with Portfile and filesdir 20171011

Download all attachments as: .zip

Change History (13)

Changed 8 years ago by e-t-h-a-n

Attachment: gedit-app.tar.gz added

Portfile and patches

Changed 8 years ago by e-t-h-a-n

Attachment: gedit-app.tar.gz.asc added

PGP Signature

comment:1 Changed 8 years ago by mf2k (Frank Schima)

Port: gedit removed

comment:2 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

You're including the compiler_blacklist_versions portgroup, but aren't using it.

You're setting configure.cmd ./autogen.sh, but aren't adding the build dependencies that script will need (autoconf, automake, gettext, gtk-doc, intltool, libtool, yelp-tools).

Instead of system "cd ${worksrcpath} && ...", please use system -W ${worksrcpath} "..."

Instead of assuming the applications directory is /Applications/MacPorts, please use the variable ${applications_dir}

Instead of using system to copy the application, use the MacPorts Tcl copy procedure.

There's no need to create the applications directory before copying to it; MacPorts creates it and other common destroot directories for you.

Your patch includes a comment that reads "Apperentely Pango doesn't include modules anymore?" Yes, pango modules died with version 1.37.0.

The build fails, saying:

--->  Building gedit-app
DEBUG: Executing proc-pre-org.macports.build-build-0
DEBUG: Executing org.macports.build (gedit-app)
DEBUG: system: cd /opt/local/var/macports/build/_private_tmp_gnome_gedit-app/gedit-app/work/gedit-app-3.22.0 && MACPORTS_PREFIX="/opt/local" gtk-mac-bundler osx/bundle/data/gedit.bundle
Cannot find source to copy: /opt/local/share/themes/Mac

It's better to just attach the text files to the ticket directly, rather than inside a tarball; it's easier to review that way.

comment:3 Changed 7 years ago by kencu (Ken)

I fixed this Portfile up a bit, using Ryan's comments. I ran into a little hicccup - libenchant_applespell.so doesn't seem to exist any more, and appears to be installed currently as libenchant_aspell.so. I just made a quick symlink to keep going:

sudo ln -s /opt/local/lib/enchant/libenchant_aspell.so /opt/local/lib/enchant/libenchant_applespell.so

but in the end, it still died at:

--->  Computing dependencies for gedit-app.
--->  Building gedit-app
Cannot find source to copy: /opt/local/share/themes/Mac
Command failed: MACPORTS_PREFIX=/opt/local /opt/local/bin/gtk-mac-bundler osx/bundle/data/gedit.bundle

I went in and edited that theme reference out in this file:

/opt/local/var/macports/build/_Users_Shared_Downloads_gnome_gedit-app/gedit-app/work/gedit-app-3.22.0/osx/bundle/data/gedit.bundle

and then it built through and installed a full bundled copy of gedit as an application. I had to change the plist to allow it to run on 10.6 (it defaults to 10.7), but then it worked as expected.

It's huge -- > 500 MB. But I see it copies in the entire gtk infrastructure, so I guess that makes sense.

So - this is still not fully finished - the enchant aspell name and the /themes/Mac thing need to get properly fixed up -- but it does work.

Where does that /themes/Mac theme come from, anyway? I wonder if we're missing that on MacPorts; or maybe it's already there as a port and I just don't know which one it is.

Modified Portfile attached.

Changed 7 years ago by kencu (Ken)

Attachment: Portfile added

Portfile - modified 20170922 - goes with the other files in the archive above

comment:4 Changed 7 years ago by kencu (Ken)

probably doesn't need

PortGroup               active_variants 1.1

and I don't think it needs

PortGroup               gobject_introspection 1.0

but I don't actually know exactly what that last PortGroup does just now.

comment:5 Changed 7 years ago by kencu (Ken)

I think this is in a commitable state at this point. Please see <https://github.com/macports/macports-ports/pull/824> and if Ethan approves, we can add it to the mixture.

comment:6 Changed 7 years ago by mf2k (Frank Schima)

If he does not respond, then we should make this port nomaintainer. As a very minor nitpick, I prefer sorted dependencies.

comment:7 Changed 7 years ago by libsystem-ethan

Thank you for tidying up these up, Ken, I should've done so a very long time ago. Your changes look completely fine to me, and I would be happy if this were to be submitted. I'm also willing to continue maintaining the port.

comment:8 Changed 7 years ago by kencu (Ken)

I'm still struggling with this one. The idea is to have a "pretty much" self contained app bundle in the end, that you could either install by itself and run, or put on a dmg and give to someone. I have it working, but even though it has only build deps and no run or lib deps, it still insists on wanting to bring a whole host of macports packages when it's installed. This more or less defeats the purpose, I think:

$ sudo port activate gedit-app-bundle
--->  Computing dependencies for gedit-app-bundle
The following dependencies will be installed: 
 bzip2
 cairo
 db48
 expat
 fontconfig
 freetype
 gettext
 glib2
 gobject-introspection
 libedit
 libffi
 libiconv
 libpixman
 libpng
 libtool
 libxml2
 ncurses
 openssl
 pcre
 py27-beaker
 py27-mako
 py27-markupsafe
 py27-setuptools
 python27
 python2_select
 python_select
 sqlite3
 xorg-kbproto
 xorg-libX11
 xorg-libXau
 xorg-libXdmcp
 xorg-libXext
 xorg-libpthread-stubs
 xorg-libxcb
 xorg-renderproto
 xorg-xcb-proto
 xorg-xcb-util
 xorg-xextproto
 xorg-xproto
 xrender
 xz
 zlib
Continue? [Y/n]: n

I'm not quite sure where to go with this. I don't know where these extra deps are coming from, or how to get rid of them. I'll wait a bit to see if inspiration strikes. Anyone have any ideas?

comment:9 Changed 7 years ago by kencu (Ken)

I'm going to park the current state of affairs here in this ticket. If anyone can see where the many extra deps are coming from, or how to get rid of them, if possible, this might still be a useful addition to the port mix. As it is, it's an interesting demo of how to use the gtk-app-bundler. K

Changed 7 years ago by kencu (Ken)

folder with Portfile and filesdir 20171011

Note: See TracTickets for help on using tickets.